--- Log opened Sat Dec 13 00:00:34 2008 |
00:06 | | Attilla [~The.Attil@Nightstar-9469.cdif.cable.ntl.com] has quit [Connection reset by peer] |
00:07 | | Attilla [~The.Attil@Nightstar-9469.cdif.cable.ntl.com] has joined #code |
00:07 | | mode/#code [+o Attilla] by ChanServ |
00:12 | < eth0> | wb |
00:43 | | eth0 [~justbensc@Nightstar-9585.dyn.optonline.net] has quit [Quit: ] |
01:48 | | Attilla [~The.Attil@Nightstar-9469.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>] |
02:16 | | Androsch100 [~Androsch1@Nightstar-8783.dip.t-dialin.net] has quit [Ping Timeout] |
02:21 | | Androsch100 [~Androsch1@Nightstar-8783.dip.t-dialin.net] has joined #code |
02:27 | | Androsch100 [~Androsch1@Nightstar-8783.dip.t-dialin.net] has quit [Ping Timeout] |
02:30 | | Androsch100 [~Androsch1@Nightstar-8783.dip.t-dialin.net] has joined #code |
02:36 | | Androsch100 [~Androsch1@Nightstar-8783.dip.t-dialin.net] has quit [Ping Timeout] |
03:13 | < Vornicus> | Being able to bang out a poker hand sort-key generator on the first try is an achievement I didn't think I'd see this year. |
03:26 | | gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?] |
04:06 | | GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout] |
04:08 | | GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code |
04:08 | | mode/#code [+o GeekSoldier] by ChanServ |
04:38 | | * Vornicus implements the Miller-Rabin primality test. |
04:38 | < Vornicus> | YAY ZOOM |
04:38 | < Vornicus> | I mean, holy shit. |
05:17 | | Vornicus [~vorn@Admin.Nightstar.Net] has quit [Connection reset by peer] |
05:18 | | Vornicus [~vorn@Admin.Nightstar.Net] has joined #code |
05:18 | | mode/#code [+o Vornicus] by ChanServ |
06:07 | | Derakon[AFK] is now known as Derakon |
06:09 | | * Derakon has a grid of blocks, and he can click on a block to make it go away, moving the others down and spawning a new block at the top. |
06:09 | <@Derakon> | Mind, clearing more than one block in a column at a time has issues. |
06:10 | <@Derakon> | ...oh dear lord the Pygame app icon is silly. |
06:16 | <@ToxicFrog> | ? |
06:16 | <@Derakon> | The Pygame app icon is a cartoony python holding an SNES controller in its mouth. |
06:16 | <@Derakon> | As for the blocks, I'm working on a puzzle game. |
06:21 | <@McMartin> | Vorn and/or Derakon! |
06:21 | <@McMartin> | NES Emulators for Mac. |
06:21 | <@Derakon> | I've been using Nestopia. It works. |
06:21 | <@Vornicus> | Nestopia is mine too. |
06:22 | <@McMartin> | Thanks. |
07:00 | <@Derakon> | Awright. I can now pop two blocks in a column and have the grid refill itself correctly. |
07:00 | <@Derakon> | I think I'm now at the point where I can start implementing the matching logic. |
07:06 | | AnnoDomini [~farkoff@Nightstar-7026.neoplus.adsl.tpnet.pl] has joined #Code |
07:06 | | mode/#code [+o AnnoDomini] by ChanServ |
07:09 | | Derakon is now known as Derakon[AFK] |
07:14 | | Derakon[AFK] [~Derakon@Nightstar-4920.hsd1.ca.comcast.net] has quit [Operation timed out] |
07:56 | <@McMartin> | Hahahaha |
07:56 | <@McMartin> | "Maybe the best time to write my first monadic Haskell code is not during my third cocktail of the evening." |
07:57 | <@Vornicus> | heh |
07:59 | | * jerith points out the Ballmer Peak. |
07:59 | <@jerith> | A trivial alteration made my projecteuler problem 9 solution run in two seconds instead of six minutes. |
07:59 | <@jerith> | A really stupid one, too. |
08:00 | <@jerith> | {a,b,1000-(a+b)} where a and b are integers. |
08:01 | <@jerith> | Instead of {a,b,c} where a, b and c are integers with a filter on adding up to 1000. |
08:02 | <@jerith> | (All interegers in the range (1,998), of course.) |
08:02 | <@Vornicus> | yeah, that'd help |
08:03 | | * Vornicus throws jerith at #projecteuler, where he has made similar speedups by switching to a /good/ primality tester. |
08:06 | <@jerith> | I saw that. |
08:06 | <@jerith> | I'm not going to change a fundamental algorithm just yet. |
08:07 | <@jerith> | I may throw the prime generation and testing in a library, though. |
08:07 | <@Vornicus> | I'm vastly surprised that it's not yet. |
08:08 | <@jerith> | I've been copy/pasting it. |
08:08 | <@jerith> | I wanted each solution to stand entirely alone. |
08:09 | <@Vornicus> | ah. |
08:09 | <@Vornicus> | Whereas I now have like half a dozen factored out modules. |
08:11 | <@C_tiger> | I've been horrible and using one giant file for the whole thing and commenting things out. |
08:12 | <@C_tiger> | so useful functions I write for one just don't get commented out. |
08:13 | <@jerith> | I've been doing that too, except I prefix all my functions with p<number>_ |
08:13 | <@jerith> | I may need to reorganise at some point. |
08:14 | <@C_tiger> | Since I'm doing this as a team effort (competition) with my roommate (he uses python/java/C++ depending on mood, I use perl because I know it comfortably) this horrifies him when he needs to read my code when he's stuck. He's making a C++ library that does common stuff and importing them as needed. |
08:15 | <@jerith> | I'm doing it all in Erlang. |
08:15 | <@C_tiger> | yeah, we've kinda stalled because he spends all day coding and doesn't often want to do more for fun. |
08:18 | <@jerith> | p35 from 137 seconds down to 10 by swapping out the prime generation and testing. |
08:18 | <@jerith> | I really should make the prime number thing a library. |
08:19 | <@jerith> | Except it needs initialisation and cleanup each time it's used. |
08:19 | <@jerith> | (I don't want to cache the primes between problems. That's cheating.) |
08:19 | <@C_tiger> | it is. |
08:19 | <@C_tiger> | it's not really necessary either. |
08:20 | | * Vornicus has the first 8 primes hard-coded. |
08:20 | <@C_tiger> | although /really/ cheating would be grabbing them off a webpage. |
08:20 | <@jerith> | It takes me 9 seconds to make all primes under a million. |
08:20 | <@C_tiger> | I think mine is faster than that... I'm not sure though. |
08:20 | | * Vornicus checks out how long it takes him now. |
08:21 | <@jerith> | If I librify it, I'll refactor it into something more flexible. |
08:21 | | * jerith goes to gym and errands now. |
08:21 | <@jerith> | Back later. |
08:22 | | * McMartin should shower and sleep soon. |
08:23 | <@C_tiger> | I didn't bother, I have five prime functions. nth_prime, prime_undern, and their list output versions and isprime. |
08:23 | | * McMartin thinks. |
08:23 | <@McMartin> | Dissertation: Done. 3DO videos refactored into an expansion pack: Done. |
08:23 | <@C_tiger> | Yay! |
08:23 | <@McMartin> | ... FotH is back at the top of my coding todo list. |
08:24 | | * jerith has two. generate_primes, is_prime. |
08:24 | <@C_tiger> | oh and prime_check_against |
08:25 | <@C_tiger> | (which takes a function reference and a max n and returns the first prime under n that the function reference resolves to true for. |
08:25 | <@jerith> | The former takes a (sorted) list of candidates and assumes that it knows all primes below the first and that the candidates include all primes. |
08:25 | <@jerith> | The latter jsut checks membership. |
08:26 | <@jerith> | I should probably add a for_each_prime and find_first_prime. |
08:28 | <@Vornicus> | miller-rabin is not that fast for low primes. |
08:29 | <@jerith> | I was thinking that when I looked it up. |
08:29 | <@jerith> | Frankly, 10s is acceptable for six-digit and smaller primes. |
08:29 | <@Vornicus> | Actually... |
08:29 | <@jerith> | If I get fancy, I might switch algos on a threshold. |
08:31 | | * C_tiger goes back to making Christmas cards. |
08:32 | <@jerith> | Even six-digit primes only need about 150 divisions. |
08:33 | <@jerith> | Since most candidates fall out below that... |
08:33 | <@McMartin> | There are seriously not that many primes below a million. Why not just compute once and keep 'em around? |
08:33 | <@jerith> | McMartin: Because then I'd have to keep them around. |
08:34 | <@jerith> | I don't want to rely on anything other than the code and the data I'm given. |
08:36 | | * Vornicus shorts out numbers below certain thresholds: 1/4 as many test numbers for primes below 1.3M. |
08:37 | <@jerith> | I currently have 5 that run longer than a minute and 8 over 30s. |
08:38 | | * Vornicus saws off 30 seconds from miller-rabin checking for up to 2M. |
08:41 | | * Vornicus fiddles, drops in a trial division for really small numbers, shaves it in half again. |
08:42 | <@jerith> | The second million takes quite a bit longer than the first. |
08:42 | <@Vornicus> | Indeed. |
08:42 | <@jerith> | I'm timing the first two million, but I'm running out of patience. |
08:43 | <@Vornicus> | 43.203466177 <--- this is my latest run on miller-rabin. |
08:43 | <@jerith> | Right, anything over a million means implementing miller-rabin. |
08:43 | <@Vornicus> | 58 requires testing up to 700 million. |
08:44 | <@jerith> | Even if I just check two iterations as a preliminary filter. |
08:45 | <@Vornicus> | Anything up to 3 billion you can check /just/ 2, 3, 5, and 7. |
08:45 | <@Vornicus> | anything up to 118 billion, at that, if you also compare against 1 hard-coded value. |
08:45 | <@jerith> | Hmm. |
08:46 | <@jerith> | 336s for the first two million primes. |
08:46 | | * jerith really goes now. |
08:46 | <@Vornicus> | ow, damn |
09:00 | <@Vornicus> | no, looks like I won't be able to beat 42 seconds for up to 2 million. |
09:01 | <@Vornicus> | (er, I think we're testing two different things here, now that I look at it - you're aiming at 2 million primes /total/, I'm doing primes up to 2 million) |
09:02 | | Vornicus is now known as Vornicus-Latens |
09:14 | | You're now known as TheWatcher |
10:27 | | Attilla [~The.Attil@Nightstar-9469.cdif.cable.ntl.com] has joined #code |
10:27 | | mode/#code [+o Attilla] by ChanServ |
10:30 | | You're now known as TheWatcher[afk] |
10:41 | <@jerith> | Vorn: No, we're doing the same. I misspoke. |
11:09 | | teacher [~odmec@88.241.147.ns-12923] has joined #code |
11:10 | | grossroot[idle] is now known as grossroot |
11:11 | | teacher [~odmec@88.241.147.ns-12923] has quit [Quit: » intel v6 - www.ayna.org « ] |
13:55 | | gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code |
13:55 | | mode/#code [+o gnolam] by ChanServ |
14:41 | <@gnolam> | http://www.quoted4truth.com/articles/I-wonder-if-he-liked-his-job |
15:07 | | You're now known as TheWatcher |
15:15 | | Syloqs-AFH [~Syloq@Admin.Nightstar.Net] has quit [Ping Timeout] |
15:50 | | grossroot is now known as grossroot[idle] |
17:16 | | Derakon [~Derakon@Nightstar-4920.hsd1.ca.comcast.net] has joined #code |
17:16 | | mode/#code [+o Derakon] by ChanServ |
17:20 | | You're now known as TheWatcher[afk] |
18:24 | | You're now known as TheWatcher |
18:30 | <@Derakon> | Ha HA! Matching works! |
18:30 | <@Derakon> | So now all I have to do is implement grid manipulation. |
18:40 | | * Derakon sets the requirement for a match to 2 blocks, watches the board gradually arrange itself to put only differing-colored blocks next to each other. |
18:41 | <@Vornicus-Latens> | what are you working in? |
18:41 | <@Derakon> | Pygame. |
18:42 | <@Derakon> | ...this would make a good screensaver. |
18:57 | <@Derakon> | Argh. How do I convince Gmail that I want it to render the HTML in this email as HTML, not text? |
18:58 | <@Derakon> | My mom asked me to whip together a quick nicely-formatted invite for a party...I have it rendering well in-browser, but I can't figure out how to send it as an email! |
19:15 | | Consul [~consul@Nightstar-3759.dsl.sfldmi.ameritech.net] has quit [Ping Timeout] |
19:22 | <@gnolam> | HTML mail is an unholy kludge anyway. |
19:22 | <@Derakon> | Believe me, I'm well aware of that. |
19:39 | <@Derakon> | Yay! The game is technically playable now! |
19:39 | <@Vornicus-Latens> | Yay! |
19:39 | <@Derakon> | Rotations are a bit hard to follow because they aren't animated at all, and there's no scoring, but the basic rules work! |
19:40 | <@Derakon> | http://derakon.dyndns.org/~chriswei/temp/puzzle1.tgz |
19:45 | | * Derakon adds chain length tracking. |
20:38 | | Vornotron [~vorn@Admin.Nightstar.Net] has joined #code |
20:39 | | Consul [~consul@Nightstar-4909.dsl.sfldmi.ameritech.net] has joined #code |
20:39 | | mode/#code [+o Consul] by ChanServ |
20:40 | | Vornicus-Latens [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout] |
20:57 | <@Derakon> | Someone wanna download this and see if it works? http:?/derakon.dyndns.org/~chriswei/temp/puzzle2.tgz |
21:33 | | Vornotron [~vorn@Admin.Nightstar.Net] has quit [Connection reset by peer] |
21:34 | | Vornotron [~vorn@Admin.Nightstar.Net] has joined #code |
21:35 | | grossroot[idle] is now known as grossroot |
21:38 | | Vornucopia [~vorn@Admin.Nightstar.Net] has joined #code |
21:40 | | Vornotron [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout] |
22:06 | | Vornucopia [~vorn@Admin.Nightstar.Net] has quit [Connection reset by peer] |
22:07 | | Vornucopia [~vorn@Admin.Nightstar.Net] has joined #code |
22:52 | | crem_ [~moo@Nightstar-28703.adsl.mgts.by] has quit [Quit: Ep0xa 1.2v] |
23:05 | | crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code |
--- Log closed Sun Dec 14 00:00:46 2008 |