code logs -> 2010 -> Wed, 29 Sep 2010< code.20100928.log - code.20100930.log >
--- Log opened Wed Sep 29 00:00:57 2010
00:04 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
00:23 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited]
00:49 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code
01:03 Vornicus-Latens is now known as Vornicus
01:31 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
01:57 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
01:58 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
01:59 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
02:17 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
02:18 ToxicFrog` [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
02:22 ToxicFrog` is now known as ToxicFrog
02:24 Kaura|bbl is now known as Kaura
02:27 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
02:31 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
02:31 mode/#code [+o Vornicus] by Reiver
02:40
< ToxicFrog>
Ugh.
02:40
< ToxicFrog>
Fuck mergesort.
02:46
<@Vornicus>
What's wrong with merge sort? -- I mean, other than "takes up 50% extra space"
02:48
< ToxicFrog>
It's conceptually beautiful but a pain in the ass to implement.
03:18 * Derakon eyes this LP of Final Fantasy.
03:18
<@Derakon>
Apparently running away is done by checking your Luck stat against the byte representing the condition of the character two slots down.
03:18
<@Derakon>
( http://lparchive.org/LetsPlay/FF1/Update%2002/index.html )
03:23
< ToxicFrog>
I read that one while it was in progress. Fun times.
03:24
< ToxicFrog>
The Let's Break Pokemon Blue and LP Final Fantasy Legend are also worth reading if you enjoy seeing a game with its guts spread across the table, and who doesn't?
03:46
<@Derakon>
"...the coding which differentiates undead enemies from everything else so that HARM and its derivatives does double duty as the code for the PCs. If any of the enemies in the came could cast HARM it would damage the characters. So...technically I guess you could say that the heroes are zombies?"
03:58 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
04:03 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
04:03 mode/#code [+o Vornicus] by Reiver
04:17 * ToxicFrog eyes his quicksort implementation
04:17
< ToxicFrog>
Why is t[10] becoming nil?
04:23
< ToxicFrog>
...
04:23
< ToxicFrog>
Because it's not t[10], it's t[self.size].
04:24
< ToxicFrog>
Which, for some reason, is not == to 10.
04:24
< ToxicFrog>
It prints as 10 (to 32 decimal places), it's initialized to...oh wait fuck
04:25
< ToxicFrog>
Fuuuuck dynamic typing
04:25
<@Vornicus>
TF: language?
04:25
< ToxicFrog>
local sort = require((...)) { size = select(2, ...) or 10 }
04:25
< ToxicFrog>
Lua.
04:25
< ToxicFrog>
That line initializes sort with size = argv[2] (if there is an argv[2]) and 10 otherwise.
04:26
< ToxicFrog>
Note that if there is an argv[2], it has type string.
04:26
< ToxicFrog>
"10" ~= 10.0
04:26
<@Vornicus>
Yay.
04:26
< ToxicFrog>
Weirdly, string.format("%.32f", "10") succeeds.
04:26
< ToxicFrog>
Which may be a bug, as it's inconsistent with the behaviour of other format strings (for example, "%s" never coerces)
04:38
< ToxicFrog>
Hmm.
04:38
< ToxicFrog>
Good news: my quicksort no longer blows the stack.
04:38
< ToxicFrog>
Bad news: it doesn't work.
04:38
<@Vornicus>
Heh.
04:44
< ToxicFrog>
Oh, oi
04:44
< ToxicFrog>
Silly me
04:45
< ToxicFrog>
Assumed pivot would always end up the middle
04:45
<@Vornicus>
Nope!
04:47 * ToxicFrog changes two lines and now it works.
04:47
< ToxicFrog>
So, now that the project is done...
04:48
< ToxicFrog>
Shortest: Bubbl sort
04:48
< ToxicFrog>
Easiest to write: Insertion sort
04:48
< ToxicFrog>
Most aggravating: Merge sort
04:48
< ToxicFrog>
Prettiest: Quicksort
04:48
< ToxicFrog>
"Fuck doing this in place" award: Radix sort
04:50
< ToxicFrog>
I may implement bogosort as well just so that I have an excuse to write O(?)
04:51
<@Vornicus>
It's not that though
04:51
<@Vornicus>
it's O(n!) :P
04:54
< ToxicFrog>
O(nn!), actually...in the average case.
04:54
< ToxicFrog>
Worst case, however, is O(?)
04:55
< ToxicFrog>
(also, the "my favorite" award: heapsort. It's easy to do both in-place and with a seperate heap, it's O(n log n) and it's conceptually elegant.)
05:00
<@Vornicus>
I do like heapsort.
05:03
< ToxicFrog>
It's also pretty.
05:03
< ToxicFrog>
Although not as pretty as quicksort.
05:03 * ToxicFrog likes his symmetry
05:03
<@Vornicus>
I've never liked quicksort.
05:03
< ToxicFrog>
Oh, I hate quicksort, but it does look nice.
05:03
< ToxicFrog>
(I'm writing a sort algorithm visualizer)
05:08
<@McMartin>
How is Bogosort O(n!)?
05:09
<@McMartin>
Bogosort as I understand it doesn't pick from the remaining permutations.
05:09
<@Derakon>
Is Bogosort "try every permutation until you find a sorted one"?
05:09
<@Vornicus>
Well, okay, technically that's average time.
05:09 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
05:10
<@McMartin>
Derakon: it's "shuffle, check for sortedness"
05:10
<@Derakon>
...wouldn't that be O(infinity)?
05:10
<@McMartin>
Yes, which is TF's contention.
05:12
< ToxicFrog>
Yes. I'm saying that the average case is O(nn!), but the worst case - which you can easily hit with an inexaustive PRNG or if you're just really unlucky - results in infinite runtime.
05:15 * Derakon implements bogosort in Python, times it on a length-10 list.
05:15 * Derakon fingertappity.
05:15
<@Derakon>
(I'll let y'all know how long it took when it finishes...)
05:17
<@Derakon>
...maybe I should have tried with a smaller list first...
05:18
<@Derakon>
Ah! 2m55.506s runtime.
05:30 kwsn [kwsn@Nightstar-a0abd809.dyn.centurytel.net] has joined #code
05:31
< ToxicFrog>
ghbyjkkkkkkkkkkkkkkkkk
05:31
<@Derakon>
Kitty! \o/
05:31
<@Vornicus>
\o/
05:34
< Rhamphoryncus>
Derakon: try it on a length 5 list, then run it 10 times
05:39
<@Derakon>
100 iterations of the length-5 bogosort took .182s.
05:41
<@Derakon>
(Length-6: 1.008s; length-7: 8.340s)
05:41
<@Derakon>
(Both with 100 iterations)
05:46
<@Vornicus>
about as expected.
06:08 cpux is now known as shade_of_cpux
06:57 Derakon is now known as Derakon[AFK]
07:08 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
07:10 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
07:14 Anno[Laptop] [annodomini@Nightstar-458eddb6.adsl.tpnet.pl] has joined #code
07:21
< EvilDarkLord>
Derakon[AFK]: What is this? A random sorter that returns success if it happens to be correct?
07:22
<@jerith>
EvilDarkLord: That's bogosort.
07:22
<@jerith>
It's the canonical horribly bad algorithm.
07:23 You're now known as TheWatcher
07:29 kaz_ [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Ping timeout: 121 seconds]
07:33 kwsn is now known as kwsn\t-2
07:35 kwsn\t-2 [kwsn@Nightstar-a0abd809.dyn.centurytel.net] has quit [[NS] Quit: LOUD NOISES]
07:59 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
07:59 mode/#code [+o Kazriko] by Reiver
08:10 Vornicus is now known as Vornicus-Latens
08:50
<@TheWatcher>
... gods fucking damnit, I hate PHP
08:51
<@TheWatcher>
How many other languages can you call a function that does not exist, and it carries on happily?
09:02
< Kaura>
... You can do that?
09:02 * Kaura eyes PHP
09:02
< Kaura>
So glad I didn't start with you.
09:03
<@TheWatcher>
Yeah, PHP is an utterly shit started language
09:03
<@McMartin>
PHP is Everything That Can Possibly Be Wrong.
09:03
<@TheWatcher>
(which makes me boggle even more that they're getting the first year undergrads to teach themselves it... and wondering why most of them a failing horribly)
09:03
<@TheWatcher>
s/started/starter/
09:33 * McMartin sighs at GM8.
09:33
<@McMartin>
This isn't great, but I suppose I should appreciate that it does it at all.
09:33
<@McMartin>
Its support for built-in complex data types is somewhat ugly.
09:38 Kaura [kaura@Nightstar-fd82400d.snfc21.sbcglobal.net] has quit [[NS] Quit: zzz]
09:58 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Client closed the connection]
10:00 * McMartin woots
10:02 Anno[Laptop] [annodomini@Nightstar-458eddb6.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
10:14 * McMartin sets about teaching his UI demo how to actually referee an Othello game.
10:44
<@McMartin>
Progress! http://hkn.eecs.berkeley.edu/~mcmartin/playfield.jpg
10:45
<@McMartin>
That's a complete game I played against myself.
10:54
<@TheWatcher>
\o/
10:57
<@McMartin>
The rules aren't fully there - among other things, it can't tell when a player is forced to pass and thus also cannot really tell when the game has ended, and it doesn't keep score - but it's moving along.
10:57
<@McMartin>
You have no idea how much I am not looking forward to porting this thing. -_-
10:58
<@McMartin>
But if I want to give it a serious AI I'm going to need to have something with actual data structures. I was *really* missing deques just for computing legal moves and their consequences.
10:58
<@McMartin>
I'm not actually sure I want to yet though~
10:59
<@McMartin>
Not to mention that I still also need to experiment with rules variants.
11:00
<@TheWatcher>
GM8 sounds like one of those systems that would be awesome, if they had thought things througha bit more and not erected artificial barriers
11:07
<@McMartin>
Surprisingly, no.
11:07
<@McMartin>
These barriers aren't really artificial.
11:07
<@McMartin>
It's a weak language.
11:08
<@McMartin>
But it packs a bunch of data structures that are fairly handy and one *could* define one's own by dicking around with the object model.
11:08
<@McMartin>
I just don't like doing that and while I get arrays, stacks, and queues for free, I wanted a deque and it doesn't have that in its standard library~
11:08
<@McMartin>
This absolutely isn't an ADRIFT system.
11:09
<@McMartin>
(Also, using the library callouts is way faster because that uses the engine core as opposed to the scripting language - which I suspect is going to be Important once I start trying to do an N-ply AI)
11:09
<@McMartin>
That said, building board games with GM8 is also an abuse of the system~
11:10
<@McMartin>
Its design focus is clearly and correctly oriented around frame-update event-based real-time apps.
11:10
<@McMartin>
And I find no fault in that architecture, especially since I've seen way too many actual coders do that part wrong when writing their own games -_-
11:11
<@TheWatcher>
Heh
11:12
<@McMartin>
The only part that's even slightly questionable is that objects are individually responsible for subscribing to the events they're interested in - and I'm not convinced that's a flaw or a limitation.
11:13
<@TheWatcher>
I'm somewhat surprised they didn't use lua for the scripting, but hey.
11:13
<@McMartin>
If I were to try to reimplement the system as an SDK I'd consider that
11:13
<@McMartin>
But yeah, it's got its own Javascripty thing it uses.
11:14
<@McMartin>
I think the plan is actually going to be "get it running well enough that you can do hotseat 2-player and vs-basic-AI 1-player, throw it at gamer geeks and let them pick it apart"
11:15
<@McMartin>
Then two-track on implementing a rules variant that crosses Reversi with Attaxx and on building a platform-neutral, more streamlined engine.
11:15
<@McMartin>
As my game is entirely mouse-driven, there's a lot of infrastructure I don't need
11:16
<@McMartin>
That said, yeah, fantastic prototyping tool, if only because the problem I *didn't* have a good answer for before I now have a good answer for by watching what it actually did.
11:17
<@TheWatcher>
Interesting, I might give it a look at some point down the road - too busy with piles of other stuff now, though
11:17
<@McMartin>
Yeah
11:17
<@McMartin>
It's not like a "omg everyone should use this" tool.
11:17
<@McMartin>
(Dunno if you saw my LJ post dissecting my first project in it)
11:18
<@McMartin>
But I went in expecting ADRIFT and got something more like Inform 6.
11:18
<@TheWatcher>
(I did, but my memory is vaguely swiss-cheese-like due to aformentioned piles, so I should really go reread it)
11:18
<@McMartin>
(Not I7 - it's making no attempt to advance the state of the art - but it's precisely targeted for what it is and gets a lot of irrelevant crap the hell out of a designer's way)
11:19
<@McMartin>
I'm going script-heavy for this project, unlike the first one, because I hope to be able to cut-and-paste a lot of it into Code::Blocks later~
11:42 Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has joined #code
11:43 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has quit [Client exited]
12:33 Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has quit [[NS] Quit: Silly Altera. No free Quartus2 for Linux.]
12:49
< gnolam>
Whee! That was a good meeting.
12:50
< gnolam>
Not only do I now know what to focus on in the project, they also want me to build them an UAV.
13:08 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds]
13:12
<@TheWatcher>
...
13:17 Anno[Laptop] [annodomini@Nightstar-458eddb6.adsl.tpnet.pl] has joined #code
13:56 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
14:02
< gnolam>
Great fixing there, tech support.
14:05
<@TheWatcher>
"they also want me to build them an UAV." as in "unmanned aerial vehicle"?
14:06
< gnolam>
... yeah
14:06
< gnolam>
Well, an UAV spectrometer module at least.
14:18 Zed [Zed@Nightstar-556ea8b5.or.comcast.net] has joined #code
14:29
< gnolam>
And associated client-side stuff.
14:35
< gnolam>
This is all dependent on whether they can get the money for it or not though.
14:38 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
16:35 Alek [omegaboot@Nightstar-8f41d887.il.comcast.net] has quit [[NS] Quit: bbl]
16:38 Alek [omegaboot@Nightstar-8f41d887.il.comcast.net] has joined #code
16:44 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
18:06 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
18:14 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
18:15 Syloqs_AFH is now known as Syloqs-AFH
18:46 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
19:49 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
20:38 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code
20:39 mode/#code [+o Derakon] by Reiver
20:39 * Derakon eyes Matlab.
20:39
<@Derakon>
"MATLAB cannot run this file because <path redacted>/convert.m shadows it in the MATLAB path."
20:39
<@Derakon>
Even though I've opened this file in your frickin' editor.
20:39
<@Derakon>
Really, guys?
20:39
<@Derakon>
This is pretty sad.
20:41
<@Derakon>
"File <path redacted>/dcm2mat.m is not found in the current directory or on the MATLAB path. To run this file, you can either change the MATLAB current directory or add its directory to the MATLAB path."
20:42
<@Derakon>
Is it so hard to run a file that you know exits because you have its contents displayed right here?
20:42
<@Derakon>
Er, exists.
20:42
<@Derakon>
C'mon, you can do this! Modify your own damn path variable if you have to! This is grade-school stuff!
20:42
<@jerith>
Derakon: "displayed right here" isn't on the path...
20:43
<@Derakon>
Jerith: I had to use its open-file dialog to view the program in its editor.
20:43
<@Derakon>
It knows full well where the file is.
20:43
<@jerith>
Only when it's displaying it. Not when it's running it.
20:44
<@jerith>
Or not running it, as the case may be.
20:44
<@McMartin>
The question is why cwd isn't at the front of the load path.
20:44
<@Derakon>
McM: no, not really; the directory I invoked Matlab from has nothing to do with the directory the file itself is in.
20:45
<@Derakon>
(I also love how every time I go to open a file, it starts me from my home directory instead of remembering where I was last time)
20:45
<@Derakon>
(I guess I blame that on the Linux UI widgets though, which Matlab presumably uses here?)
20:47
< RichardBarrell>
McMartin: perhaps cwd isn't at the start of the load path for the same reason that "." isn't in $PATH and $LDPATH by default on most Unix installations?
20:48
< ToxicFrog>
RichardBarrell: generally, though, a program will remember the last place you opened from.
20:48
<@Derakon>
The fundamental point is that if I ask the program to run a file, it should be smart enough to add that file's directory to its path as needed.
20:48
<@Derakon>
It's not like there's any confusion over what I want to run!
20:48
< RichardBarrell>
Oh, thought you meant load path as in *libraries*, not file->open dialogues. Didn't read enough upscroll.
20:48
< ToxicFrog>
It may start in $HOME, but if you then open something in ~/devel/ it should generally start in ~/devel/ next time.
20:49
< ToxicFrog>
That said, this is an app-specific issue, not a widget-specific one, at least for GTK.
20:49
< ToxicFrog>
It is also, IME, far more prevalent on windows than on linux. >.<
20:49
<@Derakon>
Really? That's kinda sad.
20:49
<@Derakon>
It works automatically on OSX...
20:52
< ToxicFrog>
It's been a while since I used filechoosers, but IIRC it's not so much that it doesn't work automatically as that you have a choice of writing your app in such a way that it remembers automatically or writing your app in such a way that it forgets automatically.
20:52
< ToxicFrog>
(you can of course handle this manually with set_path())
21:00 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Connection closed]
21:24 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
21:35 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
21:51 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
22:46 You're now known as TheWatcher[T-2]
22:48 You're now known as TheWatcher[zZzZ]
22:50 Orthia [orthianz@Nightstar-12d7c337.xnet.co.nz] has quit [Connection reset by peer]
22:57 Orthia [orthianz@Nightstar-12d7c337.xnet.co.nz] has joined #code
23:50 Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving]
23:55 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code
23:59 * Vornicus-Latens eyes the conversation of three hours ago. That's... completely ridiculous.
--- Log closed Thu Sep 30 00:00:58 2010
code logs -> 2010 -> Wed, 29 Sep 2010< code.20100928.log - code.20100930.log >