code logs -> 2014 -> Thu, 18 Sep 2014< code.20140917.log - code.20140919.log >
--- Log opened Thu Sep 18 00:00:27 2014
00:44 Turaiel[Offline] is now known as Turaiel
00:49 thalass [thalass@Nightstar-gf3dmq.bigpond.net.au] has quit [Ping timeout: 121 seconds]
01:01 thalass [thalass@Nightstar-rsv0bj.bigpond.net.au] has joined #code
01:01 mode/#code [+o thalass] by ChanServ
01:26
<@macdjord>
https://i.imgur.com/Yv5Cmn1.png Now, I'd add a line saying 'total_hours_spent_enjoyably_puzzling_over_this_intersting_problem = ...'
01:32
<&McMartin>
https://i.imgur.com/DxZAsU4.png
01:46 thalass [thalass@Nightstar-rsv0bj.bigpond.net.au] has quit [Connection closed]
02:00 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
02:00 mode/#code [+qo Vornicus Vornicus] by ChanServ
02:01 thalass [thalass@Nightstar-v4rgbg.bigpond.net.au] has joined #code
02:01 mode/#code [+o thalass] by ChanServ
02:07
<@macdjord>
https://www.youtube.com/watch?v=3San3uKKHgg
02:13 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
02:13 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
02:13 mode/#code [+o Reiv] by ChanServ
03:07 thalass [thalass@Nightstar-v4rgbg.bigpond.net.au] has quit [Ping timeout: 121 seconds]
03:45 Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
04:10 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:12 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
04:14 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
04:15 mode/#code [+qo Vornicus Vornicus] by ChanServ
04:21 * Vornicus points his boss at emufun
05:08 Kindamoody[zZz] is now known as Kindamoody
05:08 thalass [thalass@Nightstar-67f548.bigpond.net.au] has joined #code
05:08 mode/#code [+o thalass] by ChanServ
05:20 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
05:40 Turaiel is now known as Turaiel[Offline]
05:51 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:58 Kindamoody is now known as Kindamoody|afk
07:40 thalass is now known as Thalass|afk
07:57 iospace [Alexandria@Nightstar-fkokc2.com] has quit [Operation timed out]
08:01 macdjord is now known as macdjord|slep
08:05 iospace [Alexandria@Nightstar-fkokc2.com] has joined #code
08:05 mode/#code [+o iospace] by ChanServ
08:12 celticminstrel [celticminst@Nightstar-ak6p6n.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:36 Zelclone [zoomzoom@Nightstar-c11.op7.189.197.IP] has joined #code
08:40 Zelphar [zoomzoom@Nightstar-c11.op7.189.197.IP] has quit [Ping timeout: 121 seconds]
08:47 Zelclone [zoomzoom@Nightstar-c11.op7.189.197.IP] has quit [Ping timeout: 121 seconds]
09:00 Zelphar [zoomzoom@Nightstar-c11.op7.189.197.IP] has joined #code
10:08 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [Connection closed]
10:09 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
10:09 mode/#code [+o RchrdB] by ChanServ
10:13 Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code
10:13 mode/#code [+o Alek] by ChanServ
10:33 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [Ping timeout: 121 seconds]
10:45 Thalass|afk [thalass@Nightstar-67f548.bigpond.net.au] has quit [Ping timeout: 121 seconds]
10:47 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
10:47 mode/#code [+o RchrdB] by ChanServ
10:49
<@Tarinaky>
So \d is a regexp for a digit...
10:49
<@Tarinaky>
However I need to match a real...
10:56
<@gnolam>
In which locale?
10:57
<@Tarinaky>
I have no idea.
10:58
<@Tarinaky>
I'm currently using /(\d+\.?\d*e?[\+-]?\d*)/
10:58
<@Tarinaky>
Noting that said real is strictly positive.
10:58 Thalass|afk [thalass@Nightstar-tag0c3.bigpond.net.au] has joined #code
11:03 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [Ping timeout: 121 seconds]
11:09
<@Tarinaky>
Also, this website is neat: http://regexpal.com/
11:16 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
11:16 mode/#code [+o RchrdB] by ChanServ
11:31
<@RchrdB>
Tarinaky, you regexp matches "1." and "1.e" and "1.e+" and "1.+0"
11:32
<@RchrdB>
for matching a floating-point number, I'd use /(\d+(.\d+)?(e[+-]?\d+)?/
11:32
<@TheWatcher>
Which is wrong, because it's allow 1a3
11:32
<@TheWatcher>
(escape the \. ;))
11:33
<@RchrdB>
Whups, ta.
11:33
<@RchrdB>
*ahem* /(\d+(\.\d+)?(e[+-]?\d+)?/
11:33
<@TheWatcher>
Also, might want to use non-capturing clustering, depending on the setup, so (?:\.\d+)?etc
11:35
<@Azash>
http://i.imgur.com/bhmw96Yl.jpg
11:36
<@TheWatcher>
...
11:38 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [Operation timed out]
11:41
<@Tarinaky>
I'm not sure having a regexp be slightly /too/ permissive is a bad thing as the thing it's matching produces saner error messages.
11:41
<@Tarinaky>
*it's matching for
11:42
<@Tarinaky>
It's the old joke about hiring a team of engineers to come up with a regexp to match valid email addresses... vs using a regexp that accepts anything that looks like an email address and verifying it by sending an email.
11:44
<@Azash>
Is that joke supposed to imply the second one is a good solution?
11:45
<@gnolam>
"Old joke" what
11:45
<@gnolam>
Azash: the second one is the only decent solution.
11:45
<@gnolam>
But this is the first thing I've heard about any jocularity in the situation.
11:47
<@TheWatcher>
There is no decent solution with email
11:47
<@TheWatcher>
there is only madness and pain
11:47
<@Tarinaky>
It's a joke, because I don't do web programming and get to laugh at you going insane.
11:48
<@Azash>
This is closer to how I interpret that choice
11:48 * Azash cheers for back-end development
11:48
<@Tarinaky>
Schadenfreude (sp?)
11:48
<@Azash>
I mean if you want to go by the "don't validate, try" approach
11:49
<@Azash>
I would rather suggest that you split it up, make sure the part before the @ is valid, and then try to dig the part after it
11:49
<@Azash>
That seems better than sending "HELLO ARE YOU THERE?" emails
11:49
<@gnolam>
No, no, no. Then you'll invariably do something idiotic like discarding addresses with pluses in them.
11:49
<@Tarinaky>
Azash: Except you have to go right to left.
11:50
<@Tarinaky>
It's permissible to have an email address Joe@Blogs@Server
11:50
<@Azash>
What
11:50 * TheWatcher refers the honourable gent to his previous note, re: madness and pain
11:50
<@Tarinaky>
I might be wrong though. It's obscure.
11:50
<@Azash>
Oh yeah actually I think I've seen those in relation to corporate gmail or something
11:51
<@Tarinaky>
Actually, is there a sensible way of doing right-to-left regexp now I think about it?
11:51 * gnolam posts https://www.youtube.com/watch?v=JENdgiAPD6c here for like the gazillionth time
11:51
<@Tarinaky>
It still counts as a regular language right? Since we're still doing 1 token at a time... just backwards.
11:52
<@gnolam>
(A talk about email and why it hates you and wants you to be unhappy)
11:52
<@Tarinaky>
It could be worse.
11:52
<@Tarinaky>
It could be time.
11:52
<@TheWatcher>
(and, if anything, he understates the problem)
11:52
<@Azash>
Tarinaky: Yes it should be possible
11:52
<@Azash>
Like all good thoughts begin, so does this
11:52
<@Azash>
Presume an NDFA..
11:53
<@Tarinaky>
Is there a sensible way of doing it though?
11:53
<@TheWatcher>
Tarinaky: if all else fails? Reverse the string first and parse forward.
11:53
<@Tarinaky>
I'd presume writing your regexp backwards and reversing the input string is silly.
11:53
<@Azash>
Anyway, take the set consisting of the starting node and all nodes that are a null transition from it, and label those accepting nodes
11:53
<@Tarinaky>
Or at least, even less human readible than a normal regexp
11:53 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has joined #code
11:53 mode/#code [+o RchrdB] by ChanServ
11:54
<@Azash>
Take the set of formerly accepting nodes and instead put them in a null transition from a new node which is the starting node
11:54
<@Azash>
And reverse all directions
11:54
<@Tarinaky>
TheWatcher: Regexps are hard enough to write front to back though... can you write the regexp forwards and reverse it programaticall?
11:54
<@Tarinaky>
*programaticallu
11:55
<@TheWatcher>
Uh
11:56
<@TheWatcher>
All you're doing is making sure a string has specific things at specific places, and possibly capturing parts of it
11:57
<@TheWatcher>
so if you're checking a string that has been reversed, you just need to write the regexp to allow for that
11:57
<@TheWatcher>
You don't write it forwards and then reverse the regex, you just write it for the different string form
11:58
<@Tarinaky>
/hyperbolic/ is easier to write than /cilobrepyh/
11:58
<@TheWatcher>
(but this is actually kinda moot, as it is quite possible to write a regex to do things like, say, anchor on the last @ and then check the remainder)
11:59
<@Tarinaky>
(it was a moot point to begin with~)
11:59
<@Tarinaky>
(I just have a weird mind)
11:59
<@TheWatcher>
(Ruby will do that to a person~)
11:59
<@Tarinaky>
(touche~)
12:04
<@Azash>
Ruby breaks your mind by being a pleasant experience
12:04
<@Azash>
Rather that than python, at least ( ââ¿â)
12:06
<@Tarinaky>
I disagree.
12:06
<@Tarinaky>
It's impossible to remember all the bits of syntax.
12:06
<@Azash>
You are fully entitled to
12:06
<@Tarinaky>
Also, programming shouldn't be too easy otherwise other people will think they can do it :P
12:11 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:12
<@Tarinaky>
It's not terrible to use Ruby though.
12:13
<@Tarinaky>
I've used worse
12:33 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
12:33 mode/#code [+o Checkmate] by ChanServ
12:40 Thalass|afk is now known as Thalass
12:40 mode/#code [+o Thalass] by ChanServ
12:50
<@Tarinaky>
I need a quick and dirty way to tell me/verify what the frequency of a sine wave is.
12:50
<@Tarinaky>
I just searched github for guitar tuners... but I'm not getting anything useful.
12:52
<@RchrdB>
run it through an FFT function, look at where the biggest peak is.
13:08
<@Tarinaky>
I don't have one of those to hand...
13:08
<@Tarinaky>
Presumably there is a piece of software I can execute to do this...
13:13
<@Tarinaky>
Ahah, found some trial software called Sigview.
13:14
<@Tarinaky>
Yeah, that's what I thought. Right note - wrong octave
13:17
<@RchrdB>
numpy/scipy has one, but I don't know offhand how to interpret the result, so does matlab :)
13:18
<@RchrdB>
(you've already solved it, I was just thinking of where the nearest FFT is to hand right now for me)
13:20
<@Tarinaky>
Let me know if you figure out some numpy magic
13:20
<@Tarinaky>
I'm sure I'll need it again
13:20
<@Tarinaky>
And my solution sucked
13:21
<@RchrdB>
fair
13:33
<@Tarinaky>
Hunh. I managed to kill the hardware on my pi.
13:33
<@Tarinaky>
At least, temporarily.
13:33 * Tarinaky re-runs tests.
15:48 * Tarinaky head-desks at her terrible, terrible, C.
16:02
< Syka>
heh
16:11
<@RchrdB>
Pick up Rust once it gets to 1.0?
16:13 RchrdB [0x2ba22e11@Nightstar-952.jvr.168.194.IP] has quit [[NS] Quit: Leaving]
16:38
<@Tarinaky>
Turns out I just spent the entire day banging my head against something that's out of my control and is nothing to do with my terrible C
16:38
<@Tarinaky>
Goodie.
16:43 celticminstrel [celticminst@Nightstar-ak6p6n.dsl.bell.ca] has joined #code
16:43 mode/#code [+o celticminstrel] by ChanServ
16:58 Attilla [uid13723@Nightstar-ed0oqj.irccloud.com] has joined #code
17:16 Thalass is now known as Thalasleep
17:25
< [R]>
What was that T?
17:27
<@Tarinaky>
Can't say. I'd have to kill ya
17:27 * Tarinaky leaves work.
17:55 RchrdB [0x2ba22e11@Nightstar-qe9.aug.187.81.IP] has joined #code
17:55 mode/#code [+o RchrdB] by ChanServ
18:06 Turaiel[Offline] is now known as Turaiel
18:28 macdjord|slep is now known as macdjord
18:46 Turaiel is now known as Turaiel[Offline]
19:45 Julius [abudhabi@Nightstar-7nkq9k.de] has quit [Ping timeout: 121 seconds]
19:48 RchrdB [0x2ba22e11@Nightstar-qe9.aug.187.81.IP] has quit [[NS] Quit: Leaving]
19:52 Julius [abudhabi@Nightstar-7nkq9k.de] has joined #code
19:59 Kindamoody|afk is now known as Kindamoody
20:23 Kindamoody is now known as Kindamoody[zZz]
20:54 Turaiel[Offline] is now known as Turaiel
22:36 Thalasleep [thalass@Nightstar-tag0c3.bigpond.net.au] has quit [Ping timeout: 121 seconds]
22:49 Thalasleep [thalass@Nightstar-tag0c3.bigpond.net.au] has joined #code
22:50 Turaiel is now known as Turaiel[Offline]
23:18 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Connection closed]
23:21 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
23:22 mode/#code [+o Checkmate] by ChanServ
23:35 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:35 mode/#code [+qo Vornicus Vornicus] by ChanServ
--- Log closed Fri Sep 19 00:00:43 2014
code logs -> 2014 -> Thu, 18 Sep 2014< code.20140917.log - code.20140919.log >

[ Latest log file ]