code logs -> 2012 -> Mon, 24 Sep 2012< code.20120923.log - code.20120925.log >
--- Log opened Mon Sep 24 00:00:53 2012
00:07 Courage [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [[NS] Quit: ]
00:08 Moltare [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
00:31 You're now known as TheWatcher[T-2]
00:35 You're now known as TheWatcher[zZzZ]
00:40 Rhamphoryncus [rhamph@Nightstar-cc6253d6.abhsia.telus.net] has quit [Client exited]
01:36
< Reiv>
Nothing to nothing works?
01:36 * Reiv misses something entirely there.
01:37
<@Tamber>
"Nothing there" to "Something there, but doesn't work", presumably.
01:39
<&ToxicFrog>
Yeah, it's (nothing) -> (nothing works)
01:43
< Reiv>
oh right
01:45
<@Alek>
yep.
02:17 Attilla [Obsolete@Nightstar-fe8a9746.as43234.net] has quit [Ping timeout: 121 seconds]
03:16
<&Derakon>
* Derakon finally gets around to fixing the fact that the "wait one turn" command doesn't actually work.
03:16
<&Derakon>
<myshkin> And then he rested.
04:00 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
04:09 gnolam [lenin@B19C04.C4B928.9A56F0.CF2CAC] has quit [[NS] Quit: Z?]
04:12 gnolam [lenin@Nightstar-ccbf4b44.cust.bredbandsbolaget.se] has joined #code
05:29 Vashicus [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
05:32 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [Ping timeout: 121 seconds]
06:02 Vashicus is now known as Vash
06:03 mode/#code [+o Vash] by ChanServ
06:38 Derakon is now known as Derakon[AFK]
06:45 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
07:06 You're now known as TheWatcher
08:00 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
08:07 You're now known as TheWatcher[afk]
08:53 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
09:27 Attilla [Obsolete@Nightstar-fe8a9746.as43234.net] has joined #code
10:08 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
10:14 You're now known as TheWatcher
10:31 You're now known as TheWatcher[d00m]
10:46 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
10:46 mode/#code [+o himi] by ChanServ
10:58 Rhamphoryncus [rhamph@Nightstar-cc6253d6.abhsia.telus.net] has joined #code
12:00 You're now known as TheWatcher
12:15 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Client closed the connection]
12:18 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:18 mode/#code [+o himi] by ChanServ
12:53
< Nemu>
Hmm, shit. Researchers.
12:53
< Nemu>
Just inherited some code for an experiment stimulus package.
12:54
< Nemu>
The researcher who wrote it, possessing a master's degree in some comp.sci field, wrote a 1000 line if elseif statement.
12:55
< Nemu>
There's something like thirty different cases. Each case has it's own flag. So, each elseif statement has about four lines of conditions
12:59
< Nemu>
The cases themselves are indecipherable. if isrunning && current <= 3 && ~errorflag && param.params.state > 1 .....
13:00
< Nemu>
It's bothersome, because they'd like me to add another case. I'm tempted to pull a few late nights and start over from the beginning.
13:52 Attilla_ [Obsolete@Nightstar-c64cc40a.as43234.net] has joined #code
13:54 Attilla [Obsolete@Nightstar-fe8a9746.as43234.net] has quit [Ping timeout: 121 seconds]
14:05 RichyB [richardb@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving]
14:11
<&jerith>
That sounds like a job for an explicit state machine.
14:11
<&jerith>
What's test coverage like? (ha ha ha)
15:08 You're now known as TheWatcher[afk]
15:15 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
15:22
<&McMartin>
jerith's right; you should even be able to turn it into one by tracking the flags.
15:27 RichyB [richardb@Nightstar-05a7b7ef.bethere.co.uk] has joined #code
15:42
< gnolam>
It's... ALIVE!
16:01 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has joined #code
16:19 Reiv [NSwebIRC@D4E70A.D52DB0.820B13.98C775] has quit [Ping timeout: 121 seconds]
16:19
< gnolam>
http://www.lysator.liu.se/~gnolam/projects/radiacopter/pico-itx.jpg
16:23 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
16:25
<~Vornicus>
I don't see how an explicit state machine helps here; it'd still be a thousand line switch
16:32
<&ToxicFrog>
That is not how you do state machines~
16:37
<&jerith>
At the moment, it's an implicit state machine.
16:39
<&ToxicFrog>
Vornicus: more seriously, if your language has tail call elimination, you can make each state a function and just call other states directly.
16:39
<&ToxicFrog>
If it doesn't, you can still make each state a function, you just need a trampoline between them.
16:47 YoltA [fgd@Nightstar-04a3c093.abo.wanadoo.fr] has joined #code
16:49 YoltA [fgd@Nightstar-04a3c093.abo.wanadoo.fr] has left #code []
17:25 Attilla_ is now known as Attilla
17:29 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
17:29 mode/#code [+o Vash] by ChanServ
17:48
< Rhamphoryncus>
What I'd worry about is how many of the if statements have subtly excluded by the if statements above them
17:50 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
17:52
< Rhamphoryncus>
It's a good bet there's numerous bugs lurking in there and related code, which would be exposed by refactoring it
17:53
< AnnoDomini>
Hmm. What's the easiest way to concatenate AVI files under Linux?
17:55
<&ToxicFrog>
mencoder, I think
17:55
<&ToxicFrog>
Although it might be possible with VLC
17:55 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
17:57
< AnnoDomini>
mencoder worked!
17:58
< AnnoDomini>
Thank you.
18:00
<&jerith>
Rhamphoryncus: This is why it needs test coverage.
18:03
< Rhamphoryncus>
To figure out what it's doing, but a really good refactoring could make tests redundant
18:14
< froztbyte>
hmmmmmm, I don't know
18:14
< froztbyte>
I'd rather write the tests regardless
18:14
< froztbyte>
presumably the previous author had never thought anyone else might touch the code after him
18:14
< froztbyte>
s/him/them/
18:15
< froztbyte>
so writing the tests is a fairly good way to make it future-safe too
18:22 * gnolam flails at his various probes and test cables.
18:23
< gnolam>
This --> <-- close to being able to improvise a PS/2 connector. :P
18:25
< froztbyte>
hahaha
18:26
< froztbyte>
I did that once
18:26
< froztbyte>
used a cork
18:26
< froztbyte>
that board setup from earlier looks pretty cool, btw
18:26
< froztbyte>
is that a rasp-pi, or something else?
18:27
< gnolam>
Pico-ITX. Fanless, wide-temperature EPIA P830.
18:28
< froztbyte>
nice
18:30
< gnolam>
So it's more powerful than my last laptop.
18:31
< froztbyte>
I wouldn't even have a use for one, but I want one :D
18:35
<&jerith>
Rhamphoryncus: The tests are to ensure that you've refactored correctly.
18:36
< Rhamphoryncus>
Yes, but if there's numerous bugs you're going to rewrite the tests as you go
18:37
< Rhamphoryncus>
And tests are most useful when behaviour is least obvious
18:38
< Rhamphoryncus>
For something like this the tests might be just as bulky and unobvious as the refactored code
18:50
<&jerith>
Sure.
18:50
<&jerith>
But at least you know you've refactored the code correctly.
18:53 * gnolam returns home with a borrowed USB keyboard.
18:53
< gnolam>
Awright. Attempt 2.
19:03 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
19:10 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
19:29
< gnolam>
Qapla'!
19:32
<~Vornicus>
Qapla'!
19:33
< gnolam>
Windows 7 installed on it.
20:01
<&jerith>
Qapla'!
20:08
< Moltare>
Capstan!
20:22 Attilla_ [Obsolete@Nightstar-95b1e6b6.as43234.net] has joined #code
20:24 Attilla [Obsolete@Nightstar-c64cc40a.as43234.net] has quit [Ping timeout: 121 seconds]
21:09 Attilla_ is now known as Attilla
21:12 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
21:25 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
21:25 mode/#code [+o himi] by ChanServ
21:32 You're now known as TheWatcher
22:31
< iospace>
well i have a ncie burn on my fingertip now
22:32
< iospace>
i decided to touch a hot PCIe switch Dx
22:39
<@Tamber>
You have the part number burnt, in reverse, into your finger? :p
22:46
< iospace>
no
22:46
< iospace>
>_>
22:46
< iospace>
i had to go get a heatsink for it though
22:46
< iospace>
>_>
22:46
< iospace>
(the switch, not my finger)
22:52 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
22:54 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
23:37 You're now known as TheWatcher[T-2]
23:39 You're now known as TheWatcher[zZzZ]
23:46
< Nemu>
Very late, but Rhamphoryncus, almost every if is masked by the one above. The program is expected to fall through the whole statement until it finds a valid case.
23:47
< Nemu>
I don't even want to imagine what the logic conditions would look like if every if was designed to stand alone
--- Log closed Tue Sep 25 00:00:09 2012
code logs -> 2012 -> Mon, 24 Sep 2012< code.20120923.log - code.20120925.log >

[ Latest log file ]