code logs -> 2014 -> Wed, 30 Apr 2014< code.20140429.log - code.20140501.log >
--- Log opened Wed Apr 30 00:00:06 2014
00:07 * Tarinaky is the world's largest derp.
00:24 * Tarinaky glares.
00:24
<@Tarinaky>
For some reason getline is consistently getting exactly 0 characters.
00:25
<@Tarinaky>
Constantly.
00:40 You're now known as TheWatcher[T-2]
00:45 You're now known as TheWatcher[zZzZ]
00:54 HotShot [HotShot@Nightstar-v7se27.try.wideopenwest.com] has quit [Ping timeout: 121 seconds]
00:57 HotShot [HotShot@Nightstar-v7se27.try.wideopenwest.com] has joined #code
01:06 Reiver is now known as Orth_
01:16 himi [fow035@Nightstar-q9amk4.ffp.csiro.au] has joined #code
01:16 mode/#code [+o himi] by ChanServ
01:28 Derakon[AFK2] is now known as Derakon
01:30 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
01:30 mode/#code [+qo Vornicus Vornicus] by ChanServ
02:02 Turaiel[Offline] is now known as Turaiel
02:06 HotShot [HotShot@Nightstar-v7se27.try.wideopenwest.com] has quit [Connection closed]
03:14 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
03:36 HotShot [fake@Nightstar-t3672h.sfldmi.sbcglobal.net] has joined #code
04:04 Kindamoody[zZz] is now known as Kindamoody
04:12 Johnny [John@Nightstar-fpt1h2.wi.charter.com] has joined #code
04:12 Johnny [John@Nightstar-fpt1h2.wi.charter.com] has quit [[NS] Quit: ]
04:56 Derakon is now known as Derakon[AFK2]
05:20 JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
05:20 mode/#code [+o JackKnife] by ChanServ
05:47 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
05:48 Kindamoody is now known as Kindamoody|afk
06:04 celticminstrel [celticminst@Nightstar-ha4ihv.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:05 Turaiel is now known as Turaiel[Offline]
06:05 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
06:05 mode/#code [+o Reiv] by ChanServ
06:08 gnolam_ [lenin@Nightstar-o44c9a.cust.bredbandsbolaget.se] has joined #code
06:08 gnolam [lenin@Nightstar-o44c9a.cust.bredbandsbolaget.se] has quit [NickServ (RECOVER command used by gnolam_)]
06:08 gnolam_ is now known as gnolam
06:08 mode/#code [+o gnolam] by ChanServ
06:09 Netsplit *.net <-> *.split quits: Xon, @Orthia, Typherix, @JustBob, @Alek, Xirest, @RchrdB, @Azash, RobinStamer, Turaiel[Offline], (+2 more, use /NETSPLIT to show all of them)
06:12 Netsplit over, joins: @RchrdB, @Alek, @Orthia, @JustBob, Xon, Typherix, @Syloq, RobinStamer, Turaiel[Offline], Xirest (+2 more)
06:13 Orth [Reiver@Nightstar-3b3sq3.ihug.co.nz] has quit [Ping timeout: 121 seconds]
06:19 Orth_ [quassel@Nightstar-ksqup0.co.uk] has quit [Ping timeout: 121 seconds]
06:22 Reiver [quassel@Nightstar-ksqup0.co.uk] has joined #code
06:22 mode/#code [+ao Reiver Reiver] by ChanServ
06:22 macdjord|wurk is now known as macdjord|slep
06:51 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.]
06:52 Thalass [thalass@Nightstar-s6dmeo.bigpond.net.au] has joined #code
06:52 mode/#code [+o Thalass] by ChanServ
06:54 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has joined #code
07:31 himi [fow035@Nightstar-q9amk4.ffp.csiro.au] has quit [Ping timeout: 121 seconds]
08:23 Thalass [thalass@Nightstar-s6dmeo.bigpond.net.au] has quit [Ping timeout: 121 seconds]
09:00 gnolam [lenin@Nightstar-o44c9a.cust.bredbandsbolaget.se] has quit [[NS] Quit: Gone]
09:00 You're now known as TheWatcher
09:33 mode/#code [+o RchrdB] by ChanServ
10:17 thalass [thalass@Nightstar-s6dmeo.bigpond.net.au] has joined #code
10:17 mode/#code [+o thalass] by ChanServ
11:01 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
11:01 mode/#code [+o himi] by ChanServ
11:26 Syk [the@Nightstar-g6a.at6.151.1.IP] has joined #code
11:33 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
11:58 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
12:46 * Tarinaky blinks at gdb for being obtuse.
12:49
<@Tarinaky>
For some reason, specifying arguments as part of the 'run' command doesn't work.
12:49
<@Tarinaky>
:/
12:49
<@Tarinaky>
Ooooh!
12:49
<@Tarinaky>
Derp
12:50
< McMartin>
Derp aside, that still counts as obtuse on gdb's part.
12:51
<@Tamber>
gdb is made of obtuse, no?
12:51
<@Tarinaky>
Apparently, it wasn't handling the escaping of the space in the first argument's name (it was a file)
12:53
<@Tarinaky>
So instead of foo foo\ bar bar being split into {"foo", "foo\ bar", "bar"} it was splitting that up into {"foo", "foo\", "bar", "bar"}
12:53
<@Tarinaky>
If that makes any sense.
12:56
< RobinStamer>
Blegh
12:56
< RobinStamer>
That's BR worthy at least
12:57 RobinStamer is now known as [R]
13:03 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
13:07
<@Tarinaky>
C++ question:
13:08
<@Tarinaky>
What are the causes for a float becoming inf
13:08
<@Tarinaky>
And what are the cuases for a float becoming NaN
13:08
<@Tamber>
It's sprung a leak.
13:08
<@Tamber>
It has become a sink.
13:08
<@Tarinaky>
and by causes I mean operations.
13:08
<@Azash>
I guess division by zero and sqrt'ing a negative number would be examples respectively
13:09
< [R]>
Also both Inf and NaN are infectious.
13:09 * Tarinaky nods.
13:10
<@Tarinaky>
I'm just looking for clues to help me debug.
13:10
< [R]>
Though I think NaN has higher priority.
13:11
<@Azash>
That would make sense
13:11
<@Azash>
Considering inf is "you done goofed" and NaN is "okay you really done goofed"
13:13
< [R]>
Pretty sure atof's and/or it's replacement returns NaN when the string isn't a number.
13:15
<@TheWatcher>
Nope
13:16
<@TheWatcher>
double foo = atof("foo"); printf("%f", foo); will print "0.000000"
13:17
<@Tarinaky>
I'm not sure atof has a standard definition
13:17
<@Tarinaky>
Because that sounds suspiciously straight forward.
13:17
<@TheWatcher>
(Also, obligatory Array(16).join("wat" - 1) + " Batman!")
13:18
<@Azash>
"If no valid conversion could be performed, the function returns zero (0.0)."
13:18
<@Azash>
"If the converted value would be out of the range of representable values by a double, it causes undefined behavior."
13:18
<@Azash>
I think if the converted value would be out of range of a double's representable values you have some bigger problems than undefined behaviour
13:20 * Tarinaky blinks at something that doesn't make a whole lot of sense.
13:20
<@TheWatcher>
(also, I note you should really be using strtod() rather than atof(), as the former lets you do error checking, while the latter will behave as Azash said and you can't tell that)
13:22 * Azash wonders who on earth would have a string representing 3.5953862697246314162905484746340871359614113505... Ã 10^308
13:23
<@TheWatcher>
Astrophysicists?
13:23
<@Azash>
I thought they generally use specialized libs for scientific computation
13:24
<@Azash>
Plus I doubt astrophysicists mess around with strings too much
13:24 * Azash straight face
13:24
<@Tarinaky>
Azash: CSV
13:24
<@TheWatcher>
I will be over here, making no comment whatsoever
13:25
<@Tarinaky>
It's quite common for catalogues and databases to be exportable as CSV since, as we pointed out yesterday, it's super-easy to tokenise.
13:25
<@Tarinaky>
And whatever file format you're reading in from disk, it's probably a string. >.>
13:25
<@Azash>
Sure, but if it's from a CSV, it has been put into the CSV from somewhere
13:26
<@Azash>
Meaning it's either going to be something a double can represent, or it will be imported by one of said scientific computing tools and not actually get put into a double form
13:27
<@Tarinaky>
Or someone just typed it in as a string.
13:27
<@Tarinaky>
It's easy to specify numbers bigger then 1e307
13:27
<@Azash>
Tarinaky: Also, the note on astrophysicists not working with strings was a joke that was deliberately left unpronounced
13:27
<@Tarinaky>
1e400! There, I just did it :P
13:27
<@Tarinaky>
Oh. Okay
13:27
<@Tarinaky>
I'll stop procrastinating and get back to the big fixing then
13:28 * Azash feels today is not productive, just heads home
13:28 * Tarinaky blinks at this method.
13:37 macdjord|slep is now known as macdjord|wurk
13:40 Turaiel[Offline] is now known as Turaiel
14:00
< [R]>
Tarinaky: RE the "as a string" thing, you know you can dump the raw binary data onto the disk right?
14:01
< [R]>
So the number 0x30303030 would be the same as "0000" (without the NUL).
14:01
<@Tarinaky>
[R]: Yes, but this is bad practice.
14:02
< [R]>
808464432
14:02
< [R]>
By "bad practice" you mean "what every database does"
14:02
<@Tarinaky>
I rest my case.
14:02
< [R]>
It's also only "bad practice" if you don't know how to deal with endianess.
14:03
< [R]>
Eitherway, I've got to leave for work now.
14:12 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
14:13
<@Azash>
Tarinaky: Paid by the hour
14:15
<@Tarinaky>
Azash: ?
14:16
<@Tarinaky>
I was blinking at my code. Not you leaving.
14:16
<@Azash>
Oh
14:17
<@Tarinaky>
TL;DR - code replication was causing unexpected behavior because a necessary method wasn't getting called to initialise certain values.
14:24 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
14:24 mode/#code [+o himi] by ChanServ
14:38 Turaiel is now known as Turaiel[Offline]
14:43 JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
15:15 JackKnife [Z@Nightstar-ro94ms.balk.dk] has joined #code
15:15 mode/#code [+o JackKnife] by ChanServ
15:16 * Tarinaky yays.
15:16
<@Tarinaky>
I can call "fuck it that'll do" on the code portion.
15:16
<@Tarinaky>
Now I just need to write up :/
15:18 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
15:30 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
15:30 mode/#code [+o himi] by ChanServ
15:31 thalass_ [thalass@Nightstar-s6dmeo.bigpond.net.au] has joined #code
16:15 Syk [the@Nightstar-g6a.at6.151.1.IP] has quit [Connection closed]
16:18 celticminstrel [celticminst@Nightstar-ha4ihv.dsl.bell.ca] has joined #code
16:18 mode/#code [+o celticminstrel] by ChanServ
16:34 Kindamoody|afk is now known as Kindamoody
16:38 thalass_ [thalass@Nightstar-s6dmeo.bigpond.net.au] has quit [[NS] Quit: tick tock tick tock i'm a little sleepy now]
17:30 celticminstrel [celticminst@Nightstar-ha4ihv.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
17:30 celticminstrel [celticminst@Nightstar-ha4ihv.dsl.bell.ca] has joined #code
17:30 mode/#code [+o celticminstrel] by ChanServ
17:32 Kindamoody is now known as Kindamoody|out
20:43 Kindamoody|out is now known as Kindamoody
20:50
< McMartin>
Hooray, the amazing Wince-O-Tron confirmed to work on actual hardware.
20:51
< McMartin>
Also, the weird behavior I saw in VICE is *also* confirmed on actual hardware, which is baffling and now I have no idea what the VIC-II is doing there
20:51
< McMartin>
Possibly even the authors of VICE do not! IIRC the VIC-II emulation is at the gate level so they might just be saying "hey, we just implemented the logic functions."
20:54
< McMartin>
https://hkn.eecs.berkeley.edu/~mcmartin/retro/cc3_3.png <-- The amazing Wince-O-Tron. Those colorbars also scroll up, forever, while you are doing other things on the system.
20:55
<@ErikMesoy>
Doesn't load for me.
20:55
<@Tamber>
It's amazingly eye-searing.
20:55
<@Tamber>
;)
20:56
<@Tamber>
Or, at the very least, mercilessly distracting if you're trying to do other things.
20:56
< McMartin>
https://hkn.eecs.berkeley.edu/~mcmartin/retro/colorchart3.html maybe?
20:56
< McMartin>
It's less distracting than the non-animated one, hilariously, because *that* one is basically guaranteed to hide one out of every 15 lines.
20:57
<@Tamber>
Hee
20:58
<@ErikMesoy>
whaaaaaat
20:58
<@ErikMesoy>
what is this
20:58
<@ErikMesoy>
Wince-O-Tron sounds about right
20:59
< McMartin>
It's me pushing the C64's semi-documented splitscreen capability as far as I can by making it reliably trigger every 8 lines.
20:59
< McMartin>
But also making it trigger a different 8 lines every frame. :D
20:59
< McMartin>
Er. A different every 8 lines, rather.
21:00 * McMartin had found a colorchart demo program from '83 and while he was ripping it apart discovered a better way to do it, and then took that way up to 12.
21:00
<@Tamber>
=)
21:02
< McMartin>
While doing that I *also* found that if I messed up the timing, sometimes I'd get whole-line flicker and sometimes I'd get tearing like the horizontal hold was wrong.
21:02
< McMartin>
I kind of figured that the latter was correct emulation and former was it taking shortcuts turning what should have been tearing into a whole line of color instead (and thus flicker) but that effect has just been confirmed on actual hardware
21:02 * Tamber fires up the wince-o-tron
21:02
< McMartin>
So I dunno wtf, but it's right
21:02 * Tamber attempts to type. Winces.
21:03
< McMartin>
I find that setting the text color to white helps (Ctrl-2, which is actually Tab-2 in VICE by default)
21:03
<@Tamber>
Ah, much better!
21:03
< McMartin>
The programs on that disk can't really coexist while running, so you'll have to run-stop/restore out of it before running other stuff off that disk.
21:04
< McMartin>
(Which is ESC/PgUp and they somehow managed to emulate the part where you have to keep slamming the PgUp key for it to work)
21:04
<@Tamber>
Hee
21:06
< McMartin>
The RESTORE key was apparently wired directly to the non-maskable interrupt pin of the CPU
21:07 Kindamoody is now known as Kindamoody[zZz]
21:08
< McMartin>
(The whole-screen flashing whenever you hit a key is because the keyboard interrupt usurps the graphics timer and by the time it finishes processing the key, it's missed its cue and doesn't fire until the next frame)
21:15 HotShot[ipad] [HotShot@Nightstar-v7se27.try.wideopenwest.com] has joined #code
21:18 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
21:18 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:22 Datawalke [Datawalke@Nightstar-1b1.i5a.224.199.IP] has joined #code
22:17 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
22:17 mode/#code [+o Reiv] by ChanServ
22:32 HotShot[ipad] [HotShot@Nightstar-v7se27.try.wideopenwest.com] has quit [[NS] Quit: Leaving]
22:36 Datawalke [Datawalke@Nightstar-1b1.i5a.224.199.IP] has quit [[NS] Quit: ]
22:38 * TheWatcher scratches his head over implementing weighted random selection from a vector
22:45
<~Vornicus>
thresholds = [sum(probabilities[0:k+1]) for k in range(len(probabilities))]; bisect that on the random number in the interval [0, thresholds[-1]) to find the result.
22:46 * TheWatcher nod
22:47
<@TheWatcher>
I note this is a std::vector in c++, but I get your point.
22:49
<~Vornicus>
You will need to, at the very least, sum the weights to determine what range your random variable needs
22:49
<~Vornicus>
(the thresholds list makes subsequent sampling calls be O(log n) instead of O(n), but costs you memory, of course)
22:53
<@TheWatcher>
Aye, memory isn't really an issue in this case - there's only going to be maybe 30 items at most in the list.
22:56 JackKnife [Z@Nightstar-ro94ms.balk.dk] has quit [Ping timeout: 121 seconds]
22:59 Turaiel[Offline] [Brandon@Nightstar-vku52k.resnet.mtu.edu] has quit [[NS] Quit: Bouncer terminated]
23:03 ErikMesoy is now known as ErikMesoy|sleep
23:05
<~Vornicus>
at that size even bisect has not that great performance
23:12 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
23:18 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
23:25 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
23:25 mode/#code [+o himi] by ChanServ
23:35 JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
23:35 mode/#code [+o JackKnife] by ChanServ
23:55 HotShot[ipad] [HotShot@Nightstar-v7se27.try.wideopenwest.com] has joined #code
23:56 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
--- Log closed Thu May 01 00:00:22 2014
code logs -> 2014 -> Wed, 30 Apr 2014< code.20140429.log - code.20140501.log >

[ Latest log file ]