--- Log opened Fri Jun 05 00:00:21 2009 |
00:04 | | You're now known as TheWatcher[T-2] |
00:07 | | You're now known as TheWatcher[zZzZ] |
01:55 | | Tarinaky [~Tarinaky@88.83.110.ns-10776] has quit [Client exited] |
02:07 | | * Vornicus knows better, yes. |
02:07 | <@Derakon> | Than to what? |
02:08 | <@Vornicus> | Than to rely on client-side code for input validation. |
02:08 | <@Derakon> | Oh, yes. |
02:08 | <@Vornicus> | But it makes my life easier to say "all states you can get in on the page, if the javascript is sane, are valid" |
02:15 | | Tarinaky [~Tarinaky@88.83.110.ns-10776] has joined #code |
02:24 | | gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?] |
02:35 | | * ToxicFrog finally adds dependency checking to omdl |
02:39 | <@Vornicus> | It also makes it so the actual data sent to the server is small and easy to verify. |
02:51 | < Orthia> | Does the server verify data once its there? |
02:55 | < SmithKurosaki> | tf, dependency checks,who needs them :p |
02:55 | <@ToxicFrog> | ...people running omdl under Cygwin, which doesn't install some necessary stuff by default? |
02:55 | < SmithKurosaki> | im joking... |
02:56 | < SmithKurosaki> | trust me, i know, dependency checks are awesome, especially in linux |
03:09 | <@Vornicus> | Orthia: yes, but one of the effects of the javascript is that the verification is "Is this one number in range, and if I set the other six numbers, do I get this set? |
04:03 | | simontwo [~simon@78.129.201.ns-20882] has joined #code |
04:06 | < simontwo> | anyone here dealt with libevent? (monkey.org/~provos/libevent/) I'm not sure if I should event_add() once for read and once for write if I want separate callback functions. |
04:42 | | * Consul is switching back to Windows. |
04:42 | <@Consul> | Linux is a total nightmare for me, all of a sudden. |
04:43 | <@Consul> | I'll keep a little Linux partition around for doing web dev stuff on occasion, otherwise, it's going. |
04:44 | <@Consul> | I spent a few hours today doing a total cleaning of my computer, pulling and checking plugs, fans, RAM, etc. |
04:45 | <@Consul> | I boot into Windows, everything works fine. Memtest86 runs comepletely now with no issues. |
04:45 | <@Consul> | Boot back into Linux to copy some files disk to disk, BANG! Lockups. |
04:46 | <@Consul> | I think the issue is with ALSA. |
04:49 | <@Consul> | The problem now is I can't get my Linux partition to run stably enough to copy all of my data over to a different drive. |
04:50 | <@Consul> | I'll see if I can do it in the "rescue" mode, I guess. |
05:02 | | * Vornicus tries to remember the different functions in Postscript, downloads the manual again. |
05:06 | | * Vornicus tries to figure out what the various arc options are. |
05:09 | <@ToxicFrog> | http://atrey.karlin.mff.cuni.cz/~milanek/PostScript/Reference/ is your not-so-tiny god. |
05:10 | <@Vornicus> | I had to remember how the thing was organized. |
05:11 | <@Vornicus> | That all the things I need are in 8.2 is all I really need. |
05:15 | | Consul_ [~dmlandrum@Nightstar-833.dsl.sfldmi.ameritech.net] has joined #code |
05:15 | | Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: @EvilDarkLord, @MyCatVerbs, @Derakon, crem_, simontwo, @Reiver, +DiceBot, Alek, Namegduf, @Vornicus, (+5 more, use /NETSPLIT to show all of them) |
05:17 | | Doctor_Nick [~nick@Nightstar-7517.tampfl.dsl-w.verizon.net] has joined #code |
05:17 | | mode/#code [+o Doctor_Nick] by ChanServ |
05:17 | | Namegduf [namegduf@82.25.200.ns-12231] has joined #code |
05:18 | | Alek [~omegaboot@Nightstar-29499.dsl.emhril.sbcglobal.net] has joined #code |
05:18 | | MyCatVerbs [~mycatverb@Nightstar-13709.lurkingfox.co.uk] has joined #code |
05:18 | | mode/#code [+o MyCatVerbs] by ChanServ |
05:19 | | Chalain [~chalain@Admin.Nightstar.Net] has joined #code |
05:19 | | mode/#code [+o Chalain] by ChanServ |
05:19 | | crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code |
05:19 | | Reiver [~reaverta@Admin.Nightstar.Net] has joined #code |
05:19 | | Orthia [~Orthianz@Nightstar-23039.xdsl.xnet.co.nz] has joined #code |
05:19 | | EvilDarkLord [~jjlehto3@Nightstar-9591.cs.hut.fi] has joined #code |
05:19 | | DiceBot [~Reiver@Nightstar-24583.xdsl.xnet.co.nz] has joined #code |
05:19 | | simontwo [~simon@78.129.201.ns-20882] has joined #code |
05:19 | | jerith [~jerith@Nightstar-21563.slipgate.za.net] has joined #code |
05:20 | | EvilDarkLord is now known as NSGuest-802 |
05:20 | | Vornicus [~vorn@Admin.Nightstar.Net] has joined #code |
05:20 | | mode/#code [+o Vornicus] by ChanServ |
05:20 | <@Vornicus> | Anyway as I was saying I needed the images. |
05:58 | | Consul_ [~dmlandrum@Nightstar-833.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving] |
06:01 | | crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer] |
06:01 | | crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code |
06:02 | | Derakon [~Derakon@Nightstar-4912.hsd1.ca.comcast.net] has joined #code |
06:03 | | mode/#code [+o Derakon] by ChanServ |
06:04 | | Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Connection reset by peer] |
06:54 | | UndeadAnno [AnnoDomini@Nightstar-29103.neoplus.adsl.tpnet.pl] has joined #Code |
06:54 | | mode/#code [+o UndeadAnno] by ChanServ |
07:07 | | McMartin [~mcmartin@Nightstar-19418.dsl.pltn13.sbcglobal.net] has quit [Operation timed out] |
07:09 | | McMartin [~mcmartin@Nightstar-19418.dsl.pltn13.sbcglobal.net] has joined #code |
07:09 | | mode/#code [+o McMartin] by ChanServ |
07:28 | | Derakon is now known as Derakon[AFK] |
07:55 | | * jerith listens to a podcast interview with Joe Armstrong and falls in love with Erlang all over again. |
08:27 | <@McMartin> | :argh: Haskell :argh: |
08:28 | <@McMartin> | I'm iterating over an array in place, and calling Seq regularly on it, and yet it's still blowing out my RAM despite not being over 4M in size. |
08:28 | <@McMartin> | You're supposed to get collected =( |
08:29 | <@MyCatVerbs> | McMartin: pastebin please, for great justice? |
08:29 | <@McMartin> | One moment |
08:29 | <@MyCatVerbs> | Dankesch?n. |
08:30 | <@McMartin> | Have to wait for me to get my RAM back out of swap. |
08:32 | | gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code |
08:32 | | mode/#code [+o gnolam] by ChanServ |
08:32 | <@McMartin> | http://paste.ubuntu.com/188828/ <-- Warning, Project Euler spoiler |
08:32 | <@McMartin> | A Speuler, if you will |
08:33 | <@MyCatVerbs> | Heh. How large are the numbers you're hitting that with? |
08:33 | <@McMartin> | 1,000,000. |
08:33 | <@MyCatVerbs> | Right. So you need to be making the old arrays trash before using the new ones. |
08:34 | <@McMartin> | Map.updateWith had a similar problem but *much* faster. |
08:34 | <@McMartin> | Well, strictly speaking, I need the new array, and the one immediately before it. |
08:34 | <@MyCatVerbs> | seq'ing them won't cause them to become garbage any quicker, yo. |
08:34 | <@McMartin> | OK, so, where's the dangling reference? |
08:35 | <@MyCatVerbs> | It just puts them to WHNF. I don't know yet. |
08:35 | <@McMartin> | (if they aren't seqed, lazy eval means they aren't actually garbage yet, though) |
08:36 | <@McMartin> | (WHNF?) |
08:36 | <@MyCatVerbs> | Weak Head Normal Form. Means you get the outermost constructor. |
08:36 | <@McMartin> | Aha. |
08:37 | <@Vornicus> | So what it does is it goes "okay build this, but to build this you need that" and so forth a million times? |
08:37 | <@MyCatVerbs> | So I think your garbage problem here is that the arrays' individual elements are lazy. |
08:37 | <@McMartin> | Mm. |
08:37 | <@MyCatVerbs> | Yes, Vorn. Well, it chases all the data dependencies out to the outermost constructor. |
08:38 | <@MyCatVerbs> | So individual elements from aux (i+1) -- are keeping references to the array generated in aux (i) -- and you're getting a bigger-than-RAM chain of arrays. |
08:39 | <@MyCatVerbs> | Easier than forcing all the individual data elements would be to just use an array type that is strict. Might I recommend STUArray? |
08:41 | <@McMartin> | Looking into that now, sounds like what I need. |
08:43 | <@MyCatVerbs> | Or, actually I don't think there's any reason why you couldn't just use plain old Data.Array.Unboxed. No need to bring the ST monad into it at all, I think. |
08:48 | | * gnolam boos at "Speuler". |
08:48 | <@MyCatVerbs> | Woo, typeclasses. |
08:49 | <@McMartin> | Memory usage with UArray now at 53mb instead of blowing out RAM |
08:49 | <@MyCatVerbs> | \o/ |
08:49 | <@Vornicus> | gnolam: of course you had to point it out. Boo. |
08:50 | <@MyCatVerbs> | McMartin: oh and you do need to (seq arr $) 'cuz otherwise the dang thing builds up this huge stack-overflowy thunk. Heh. |
08:50 | | * McMartin didn't bother deleting that from his code~ |
08:50 | <@McMartin> | This is still a far cry from the 6 seconds the process takes in Python, but ah well. |
08:51 | <@MyCatVerbs> | Python's array slicing is fast. What we're doing here is copying chunks out of the array every time. |
08:52 | <@McMartin> | Yeah. In a loop that goes up to a trillion. |
08:53 | <@McMartin> | I may have to throw up my hands and switch languages if this doesn't work the first time. |
08:53 | <@McMartin> | Hmm. Are there Unboxed Maps? |
08:53 | <@MyCatVerbs> | The fast way to do this in Haskell is to use a single STUArray and slice the array by hand. |
08:53 | <@MyCatVerbs> | No, Map is inherently boxy. |
08:53 | <@Vornicus> | for the record I didn't actually slice in Python |
08:54 | <@Vornicus> | I indexed. |
08:54 | <@McMartin> | Yeah |
08:54 | <@McMartin> | This *screams* for a "only update what bits you need" solution. |
08:55 | <@MyCatVerbs> | This might be one of those edge cases where immutability turns out to be a hindrance - array updates are generally dang slow because of all the copying. |
08:55 | <@McMartin> | Yeah |
08:55 | <@Vornicus> | for k in xrange(1,1000001): for j in xrange(2*k, 1000001, k): divisors[j] += k <--- initializing the array in Python. |
08:56 | <@Vornicus> | My program spends about 3/4 of its time doing that. |
08:56 | <@McMartin> | I was hoping to get a similar effect with an IntMap Int Int. |
08:59 | <@MyCatVerbs> | McMartin: oh. collectSigmas is quadratic. |
09:00 | <@McMartin> | Yes. Yes it is. |
09:01 | <@McMartin> | All other approaches to it are even worse. |
09:01 | | You're now known as TheWatcher |
09:01 | <@McMartin> | Generally hyperexponential, in fact. |
09:02 | <@McMartin> | The stateful code there is noticably less quadratic, though. |
09:02 | <@Vornicus> | Yay half a trillion memory cells |
09:02 | <@MyCatVerbs> | collectSigmasU is too, but less so. ^^ |
09:02 | <@Vornicus> | The total is something like 13M additions for the whole thing. |
09:03 | <@MyCatVerbs> | McMartin: do you mean the algorithm itself is quadratic? |
09:03 | <@McMartin> | Yes. |
09:03 | <@McMartin> | .5n^2, with state. |
09:03 | | * McMartin plays games with $! |
09:04 | <@MyCatVerbs> | Oh, looking at it, I guess it has to be. Bummer. Still, it'd be faster without consing extra arrays all over the place. |
09:06 | <@McMartin> | Yeah |
09:06 | <@McMartin> | But the IntMap was blowing out RAM |
09:06 | <@McMartin> | Maybe $! can solve that |
09:07 | <@MyCatVerbs> | Remember that seq only evaluates to the *outermost* constructor. |
09:07 | <@McMartin> | seq arr $ aux (i+1) max $! Map.unionWith (+) arr $! Map.fromList $! [(x, i) | x <\ |
09:07 | <@McMartin> | - [2*i, 3*i..lim]] |
09:07 | <@MyCatVerbs> | e.g. you seq an IntMap, you've almost certainly generated a single (Branch _lazything _lazything2 _morelazythings) constructor at the top of the tree. |
09:08 | <@McMartin> | ... can I seq (toList arr) occasionally? |
09:09 | <@MyCatVerbs> | That'll just end up forcing the leftmost path on the tree in order to return a ((:) _ _). Won't even force any of the leaves. |
09:10 | <@MyCatVerbs> | If you look in Control.Parallel.Strategies, there's a combinator called (rnf) which acts like seq, except that it completely forces the input data structure. Problem is, it's a typeclass rather than an automagic thing like seq is. (IMHO a huge mistake.) |
09:11 | <@MyCatVerbs> | Er, rnf doesn't work exactly like seq. It's pretty similar though. |
09:11 | <@McMartin> | Mmn |
09:11 | <@McMartin> | I think my next trick will be to give up on IntMaps and pay the log n cost of using Maps. |
09:12 | <@McMartin> | And their insertWith'. |
09:13 | <@MyCatVerbs> | IntMaps *have* log n cost too. |
09:13 | <@MyCatVerbs> | They're just Maps specialised for Ints rather than arbitrary keys. |
09:14 | <@McMartin> | O min(log n, W), where W is the bit width. |
09:14 | <@McMartin> | That means "O(1)" |
09:14 | <@MyCatVerbs> | Ah, that's it. ((rnf thingummy) `seq` thingThatYouActuallyCareAbout) -- actually works to completely force thingummy. |
09:14 | <@MyCatVerbs> | McMartin: *facepalm* yes. |
09:15 | <@MyCatVerbs> | And there's an NFData instance for IntMap, thank heck. |
09:17 | <@McMartin> | NFData? |
09:18 | <@McMartin> | OK, insertWith' means it's still growing, but much more slowly. |
09:18 | <@McMartin> | Looks like it'll probably top out at at around 200MB. I can live with that. |
09:20 | <@McMartin> | It's done. |
09:20 | <@McMartin> | Going with "This is something stateless is just inherently terrible at." |
09:20 | <@McMartin> | Final memory usage: 175 MB. |
09:21 | <@McMartin> | ... except the answer was wrong. =( |
09:24 | | * McMartin finds the error, goes to take a shower while it buzzes again. |
09:25 | <@MyCatVerbs> | McMartin: NFData is the typeclass that rnf uses. |
09:27 | <@McMartin> | Aha |
09:29 | <@McMartin> | And solved |
09:30 | <@Vornicus> | What was the error? |
09:44 | | Vornicus is now known as Vornicus-Latens |
10:30 | | NSGuest-802 is now known as EvilDarkLord |
10:31 | | * gnolam blarghs at radiosity. |
10:32 | | Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code |
10:42 | <@McMartin> | Vorn: I wasn't controlling for "smallest" |
10:42 | <@McMartin> | So it was actually finding the longest non-repeating chain instead of the longest loop. |
11:04 | | UndeadAnno [AnnoDomini@Nightstar-29103.neoplus.adsl.tpnet.pl] has quit [Ping Timeout] |
11:10 | | UndeadAnno [AnnoDomini@Nightstar-29230.neoplus.adsl.tpnet.pl] has joined #Code |
11:10 | | mode/#code [+o UndeadAnno] by ChanServ |
11:13 | | Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has quit [Quit: Rhamphoryncus] |
12:39 | | crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer] |
12:40 | | crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code |
13:59 | | Gruber [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code |
14:00 | | gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Ping Timeout] |
14:00 | | Namegduf [namegduf@82.25.200.ns-12231] has quit [Ping Timeout] |
14:01 | | Namegduf [namegduf@82.25.200.ns-12231] has joined #code |
14:29 | | Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout] |
14:31 | | Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code |
14:49 | | Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout] |
15:18 | | Attilla_ [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code |
16:06 | | Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code |
16:08 | | Syloqs_AFH is now known as Syloqs-AFH |
17:07 | | Consul [~dmlandrum@Nightstar-833.dsl.sfldmi.ameritech.net] has joined #code |
17:07 | | mode/#code [+o Consul] by ChanServ |
17:08 | <@Consul> | Well, I think I have a bad motherboard. |
17:08 | <@Consul> | rsync keeps locking up (running from the command line in rescue mode, no GUI, no networking) trying to copy files from one disk to the other. |
17:08 | | Derakon[AFK] is now known as Derakon |
17:09 | <@Consul> | Every single lock-up has a different cause: ATA misreads, CPU loops, etc. |
17:09 | < SmithKurosaki> | thats not good |
17:09 | | Gruber is now known as gnolam |
17:09 | <@Consul> | The clue is, everything seems to be going wrong at once, which kinda points to one thing, doesn't it? |
17:09 | <@Consul> | But you want to know what's funny? |
17:10 | <@Consul> | When I booted into my windows part to do stuff, it was solid and stable, no issues. |
17:10 | <@Consul> | It lives on the same disk as my Linux install. |
17:11 | <@Consul> | Unfortunately, the latest lock-up hosed grub. |
17:11 | <@Consul> | So, my question now: is there a Windows utility that can read info off of an ext3 partition? |
17:13 | < Namegduf> | There are ext3 filesystem drivers, and I think they work okay for read-only use. |
17:13 | < Namegduf> | They screwed up when I was using them read/write, though. |
17:13 | <@Consul> | If the answer is no, I might be royally screwed and will have learned the lesson first-hand about off-site backups. |
17:13 | <@TheWatcher> | any ext2/ext3 windows driver should work for reads at least |
17:13 | <@Consul> | If only I had the money to do things right. *sigh* |
17:13 | <@Consul> | Okay, that helps. |
17:13 | < Namegduf> | Wouldn't off-box backups have done? :P |
17:13 | <@Consul> | I can tell Windows to mount read-only, then? |
17:13 | < Namegduf> | Yeah. |
17:14 | <@TheWatcher> | Consul: http://www.fs-driver.org/index.html |
17:14 | < SmithKurosaki> | consul, look up ext2 ifs |
17:14 | <@Consul> | YAY! Thanks |
17:15 | < SmithKurosaki> | Namegduf: im using ifs and an ext3 partition is my main storage for windows and linux, and it works fine, my problem is that i cant get at my video hdd unless im in linux |
17:16 | <@Consul> | In all honesty, I managed to save most of the important stuff. Most of what's left I can recover other ways. Most of it is music files ripped from CDs I own. |
17:16 | < Namegduf> | SmithKurosaki: I tried that, it screwed up and lost some data. |
17:16 | < Namegduf> | SmithKurosaki: I siwtched to using NTFS for that. |
17:16 | < Namegduf> | (Because Linux's NTFS support seems more mature) |
17:17 | < SmithKurosaki> | http://www.fs-driver.org/index.html use this one, its works no problem on my 430gb partition |
17:18 | <@Consul> | It just needs to work long enough to pull some data off. Thanks! |
17:18 | < SmithKurosaki> | i keep most of my program files there, like steam, nx, vlc etc etc etc. it just works full stop. sadly, the same cannot be said about my 700gb partition :( |
17:23 | <@Consul> | Once I have Windows working again, any ideas on how I can test various parts of the motherboard to see if I can narrow down what's happening? (Sorry, it's been a while since I've had a catastrophic failure.) |
17:24 | | * gnolam yays! |
17:24 | < gnolam> | ... at developments for me, not Consul's problems. |
17:24 | <@Consul> | Heh |
17:24 | < gnolam> | It's now confirmed: the Radiation Safety Authority has allocated a budget for further development of RadiaX. |
17:24 | <@Consul> | Well, at least someone's having a good day. |
17:24 | < gnolam> | They want me in for a meeting next week. |
17:24 | < SmithKurosaki> | ^5 gnolam |
17:25 | | Attilla_ is now known as Attilla |
17:25 | < SmithKurosaki> | you want a hug Consul? |
17:25 | <@Consul> | Heh |
17:25 | <@Consul> | Well, at least my netbook still works (that's what I'm on now). |
17:27 | <@TheWatcher> | gnolam: congrats! |
17:27 | < SmithKurosaki> | you want a hug Consul? <- i am female :) |
17:29 | <@Consul> | Hehe |
17:29 | <@Consul> | Okay! |
17:30 | | * SmithKurosaki hugs :) |
17:30 | | * Consul hugs back |
17:30 | < SmithKurosaki> | yay :) |
17:31 | < gnolam> | Thanks. :) |
17:34 | <@Consul> | So, I guess my next step is "fdisk /mbr" from my Windows CD. |
17:34 | <@Consul> | But I think I'll take a break for a bit. |
17:35 | <@Consul> | If I keep going when I'm frustrated, I start getting careless. |
17:35 | < SmithKurosaki> | oh, how i know. when stuff like that happens, i just bug toxic and he tells me how to fix it |
17:38 | <@ToxicFrog> | Consul: or boot from a liveCD and repair grub from there |
17:39 | <@Consul> | ToxicFrog: Already tried that. The liveCD boot hung. |
17:39 | <@ToxicFrog> | Oh shit, not frosty. |
17:40 | < SmithKurosaki> | daaaaamn |
17:40 | | * SmithKurosaki give Consul more hugs |
17:40 | <@Consul> | Like I said, when it looks like everything's failing, it probably means one specific thing is failing. |
17:40 | <@Consul> | The motherboard. |
17:41 | <@Consul> | I was finally able to eliminate memory. |
17:43 | <@ToxicFrog> | It's really weird that windows is behaving fine, though |
17:43 | <@Consul> | Yeah, isn't it? |
17:43 | <@ToxicFrog> | The fact that everything's going wrong points to motherboard failure, but the fact that windows is still working points to software failure |
17:44 | | * ToxicFrog ponders Haskell |
17:44 | < SmithKurosaki> | have you tried putting a cd or dvd in while booted into windows? maybe dvd drive is part of it, or the controller to it> |
17:45 | <@Consul> | Can't say I have. I'll check that as soon as I get the MBR fixed. |
17:46 | < SmithKurosaki> | good luck |
17:48 | <@Consul> | Thanks |
17:50 | <@MyCatVerbs> | ToxicFrog: eeeeexcellent. If I get just another half-dozen people into this cult, Don Stewart will give me a shiny badge. :) |
17:50 | < SmithKurosaki> | depending on how annoyed tf gets with haskell, i might visit for a bit |
17:52 | <@Consul> | I have an interest in Haskell as well. |
17:52 | < SmithKurosaki> | it will take me a while to get my head around not being able to have assignment statements though |
17:52 | <@Consul> | I started playing around with functional languages doing DSP stuff on Linux, and I took to it quite quickly. |
17:55 | | * TheWatcher eyes, ewws at Haskell, goes back to perl hacking ¬¬ |
17:56 | < SmithKurosaki> | im not sure i want to go anywhere near perl or ruby |
17:57 | <@TheWatcher> | Ruby is, simply, crap. Perl is just lovecraftian, is all. |
17:57 | <@Consul> | My IT career started with learning Perl, so I can't knock it completely. |
17:58 | < SmithKurosaki> | i havent tried it, but ive heard its a bitch to read |
17:58 | < simontwo> | it can be |
17:59 | <@Consul> | That's up to the coder. |
17:59 | <@Consul> | C and C++ can be the same way, really. |
17:59 | <@MyCatVerbs> | SmithKurosaki: not if it's well written. AIUI, the main problem with it is that it's got a half dozen or so fairly important things half-broken, and they can't ever be fixed now. |
17:59 | <@Consul> | But I have had to debug and analyze some pretty hairy regexps. |
17:59 | | * TheWatcher coughs |
17:59 | <@MyCatVerbs> | SmithKurosaki: Well written Perl can be beautiful, though. |
18:00 | <@TheWatcher> | (I note that any language can be a bitch to read if the coder is lazy) |
18:00 | <@Consul> | Python? |
18:00 | <@Consul> | I remember something about a Python Obfuscation Contest. |
18:01 | <@MyCatVerbs> | Consul: was that a challenge? Srsly, yes, Python. |
18:01 | <@Consul> | Which turned out to be a real challenge. |
18:01 | <@Consul> | Which turned out to be a real challenge. |
18:01 | <@Consul> | Argh@ |
18:01 | <@Consul> | I hate this small keyboard sometimes. |
18:01 | < SmithKurosaki> | poor Consul |
18:01 | <@TheWatcher> | SmithKurosaki: what I'd consider decently written perl: http://paste.ubuntu.com/189120/ |
18:02 | <@Consul> | SmithKurosaki: You can give me another hug if you want. :-) |
18:02 | <@TheWatcher> | (of course, in a different piece of the code, I have 'if($recipe -> {"source"} =~ m{^https?://[-\w]+(?:\.[-\w]+)+(?:/(?:[-\w]+/)*[-.\w]*(?:\?(?:[-\w~!\$+|.,*:;]|% [a-f\d]{2,4})+=(?:[-\w~!\$+|.,*:]|%[a-f\d]{2,4})*(?:&(?:[-\w~!\$+|.,*:;]|%[a-f\d ]{2,4})+=(?:[-\w~!\$+|.,*:]|%[a-f\d]{2,4})*)*)?(?:\#(?:[-\w~!\$+|&.,*:;=]|%[a-f\ d]{2,4})*)?)?$}io);' |
18:02 | <@TheWatcher> | ) |
18:03 | < simontwo> | regexes aren't supposed to be readable. |
18:03 | <@ToxicFrog> | MyCatVerbs: I've used Haskell before, and indeed you've helped me a lot with it |
18:03 | <@ToxicFrog> | I've just stopped using it for a while. |
18:03 | < SmithKurosaki> | ok, thats not so bad, but yea, regexs can eat me |
18:04 | <@ToxicFrog> | I think I may have a better understanding of monads now, though. |
18:04 | <@ToxicFrog> | Hey, regexes are awesome! |
18:04 | < SmithKurosaki> | tf, did you see what TheWatcher just posted?? |
18:04 | < SmithKurosaki> | can you understand that?? |
18:04 | < simontwo> | the things I like about haskell are the small things, like its Prelude and how its precedence hierarchy is sane compared to SML. |
18:05 | < simontwo> | then again, I didn't actually do anything advanced in it, so I wouldn't be able tp appreciate much else. ;-) |
18:07 | <@ToxicFrog> | SmithKurosaki: I can, it's pretty nasty though |
18:07 | <@ToxicFrog> | And it takes serious effort |
18:07 | < SmithKurosaki> | you are insane |
18:07 | <@ToxicFrog> | For me, that would be well past the point where I start using PEGs instead of regexes for the processing |
18:07 | < SmithKurosaki> | ahh |
18:07 | <@Consul> | Monads have the most unfortunate name in all of computer science. |
18:07 | < SmithKurosaki> | well, i do need to learn regexes in a couple months.. ;.; |
18:07 | <@ToxicFrog> | simontwo: I love Haskell's type system to bits. |
18:08 | <@ToxicFrog> | Monads, however, keep kicking my ass. |
18:08 | <@ToxicFrog> | MyCatVerbs: remind me what $ means? |
18:08 | < SmithKurosaki> | monad = ergo proxy for me |
18:08 | <@TheWatcher> | SmithKurosaki: get the Owl Book, it helps a lot |
18:08 | <@TheWatcher> | (MAstering Regular Expressions, it's an O'Reilly book) |
18:09 | < simontwo> | ToxicFrog, yeah, its typeclasses are indeed useful. |
18:09 | <@McMartin> | TF: $ means "muck with function application preference", basically |
18:10 | <@McMartin> | Instead of going, say, sum (map snd (f a b c)), say, you can go sum $ map snd $ f a b c |
18:10 | < simontwo> | SmithKurosaki, also, if you want a challenge, there's a 28-level quiz at #regex@undernet. I made it to level 14. :) |
18:10 | < SmithKurosaki> | TheWatcher: i was just planning to squeeze information out of tf |
18:10 | <@TheWatcher> | SmithKurosaki: http://oreilly.com/catalog/9780596002893/ - that one. It covers Perl, java, php, python, and others, and covers a lot of the general theory as well as implementation tips and optimisation routes. |
18:10 | <@TheWatcher> | Heh, that works too :) |
18:11 | <@MyCatVerbs> | ToxicFrog: it's just function application, but it has really low precedence so that it splits expressions in half. |
18:11 | <@ToxicFrog> | Ok. I suspected as much but wasn't sure. |
18:12 | | * TheWatcher yes, ohs, notes there's a 3rd ed, bleghs. |
18:12 | <@TheWatcher> | *eyes |
18:12 | <@ToxicFrog> | Hmm. I wonder if I have a copy of the Owl Book. |
18:12 | <@MyCatVerbs> | ToxicFrog: useful for transformations like f (g (h x)), to: (f . g . h) x, to: f . g . h $ x |
18:12 | < simontwo> | ToxicFrog, http://learnyouahaskell.com/higher-order-functions#function-application |
18:12 | <@ToxicFrog> | I do! |
18:12 | <@MyCatVerbs> | The Owl Book's "Mastering Regular Expressions", right? |
18:13 | <@TheWatcher> | Yep |
18:13 | <@ToxicFrog> | Yeah, I have it now |
18:13 | | * MyCatVerbs thinks he has a copy of the 1st ed lying around in a corner somewhere. |
18:13 | <@ToxicFrog> | It lets you do away with excessive parentheticals |
18:13 | <@ToxicFrog> | Also, while I understand . intellectually it seriously messes with my reflexes |
18:14 | < SmithKurosaki> | this is good, i should grab it from you sometime soon so i can be ahead when they start laying down the regex next semester |
18:14 | <@MyCatVerbs> | If it's really *that* bad, import Control.Arrow and use (>>>). ;) |
18:14 | <@ToxicFrog> | I feel like (f . g . h) x should be h $ g $ f x |
18:14 | <@ToxicFrog> | By analogy to bash's | where the first function goes first. |
18:14 | <@MyCatVerbs> | (g >>> f) == (f . g), incidentally. |
18:15 | <@MyCatVerbs> | Well, (>>>) is more general than that, but it's a handy combinator to use that way. |
18:16 | <@MyCatVerbs> | So you can write it analogously to pipelines, as: h >>> g >>> f $ x, and read the ($) like bash's <filename. |
18:18 | | * ToxicFrog nods |
18:18 | <@ToxicFrog> | (Except the semantics are h < x | g | f :P ) |
18:18 | <@ToxicFrog> | I wish more languages had |, really. |
18:18 | | * SmithKurosaki is terribly confused |
18:19 | < SmithKurosaki> | i understand what mcv was saying though |
18:22 | <@ToxicFrog> | Recall that | is the bash pipe operator - foo | bar runs foo, and runs bar with foo's output as its input |
18:22 | <@ToxicFrog> | I wish you could do that in more languages, for example, x | f | g | h as equivalent to h(g(f(x))) |
18:23 | | * ToxicFrog snrks at Learn You A Haskell's intro on randomness |
18:23 | < SmithKurosaki> | ahh |
18:24 | < SmithKurosaki> | so you want to feed x to f and then feed the result to g and so on? |
18:26 | <@ToxicFrog> | Yeah |
18:26 | <@ToxicFrog> | Which I find more readable |
18:28 | <@MyCatVerbs> | Oh, that's easy enough. :) |
18:28 | <@MyCatVerbs> | ($x) $ h >>> g >>> f |
18:29 | | Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout] |
18:29 | <@MyCatVerbs> | Note that I don't actually recommend writing it *that* way. Better to make an operator for it. |
18:31 | <@ToxicFrog> | Yeah. |
18:31 | <@ToxicFrog> | And while it's easy enough in Haskell, the same is not true of, say, Lua. |
18:32 | <@ToxicFrog> | <hoelzro> my machine went OOM |
18:32 | | Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code |
18:32 | | mode/#code [+o Attilla] by ChanServ |
18:32 | <@ToxicFrog> | <hoelzro> yeah, I wrote an infinitely recursive perl script =( |
18:32 | <@ToxicFrog> | <hoelzro> then X died. |
18:32 | <@Vornicus-Latens> | it's called stack limits, folks, use them. |
18:33 | <@MyCatVerbs> | Harrumph. You try that in Haskell and the RTS will crash cleanly (but not until after scrubbing your swap partition for ten minutes or so.) |
18:33 | <@MyCatVerbs> | ;P |
18:33 | <@ToxicFrog> | My swap partition is LZO-compressed memory~ |
18:33 | <@MyCatVerbs> | Actually, it's easy enough to write that in Haskell. |
18:34 | <@MyCatVerbs> | Define, "x <$ f = f x", and then give "infixl 0 <$", and you can write pipelines like x <$ h >>> g >>> f |
18:34 | <@MyCatVerbs> | Or whatever. I'm not sure what string of random symbols would be best to use for that operator. |
18:34 | <@ToxicFrog> | Is | already in use? |
18:35 | <@MyCatVerbs> | Yes, it's used in data declarations for alternatives, and also for giving fundeps. |
18:36 | <@MyCatVerbs> | You can still use | as part of other operators. e.g. there are |> and <| defined I can't remember where (and can't remember what they do, either). |
18:45 | <@Consul> | Well, I have to go fix my sister's machine now. She's having issues printing from within a Java app on FC10. |
18:45 | <@McMartin> | I've long wanted a mode for Haskell where it going to swap means it fails. |
18:46 | <@McMartin> | Pretty much every major problem I've had with it has had that as its first symptom |
18:46 | <@Consul> | Well, so much for that. She doesn't seem to be at the office at the moment. |
18:51 | <@ToxicFrog> | McMartin: maybe something with ulimit? |
18:51 | <@ToxicFrog> | I would think that in principle Haskell wouldn't be able to tell when it's hitting swap, since that's meant to be entirely transparent to the app |
18:51 | <@ToxicFrog> | But if you ulimit it to, say, 1GB of VM... |
18:51 | | Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has joined #code |
18:51 | <@McMartin> | 700M, actually. 1GB is the entirety of RAM. |
18:53 | <@ToxicFrog> | Aah. |
18:53 | <@ToxicFrog> | (I'm used to running these things on Orias, which normally has 3GB) |
18:53 | <@ToxicFrog> | (but not right now, because I've had to send 2GB of memory back for RMA and for some reason another gigabyte won't work without one of those two sticks beside it ;.;) |
18:59 | <@MyCatVerbs> | McMartin: there's an RTS option to set the maximum heap size. |
19:01 | <@MyCatVerbs> | http://haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html <- this whole section is somewhat useful, though pretty much everything in there is presented elsewhere in the manual in more detail (in particular, the profiling stuff). |
19:05 | <@MyCatVerbs> | When you're running just the Euler stuff, I'd suggest running with +RTS -H256m -M768m -RTS |
19:06 | <@MyCatVerbs> | -H gives the starting heap size, -M the upper limit on it. |
19:09 | | Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>] |
19:10 | <@McMartin> | Aha, keen |
19:10 | | * McMartin has long used similar tricks with Java. |
19:11 | < SmithKurosaki> | god people are stupid |
19:13 | <@MyCatVerbs> | Should that be parsed as ((god people) are stupid) or (god (people are stupid))? |
19:14 | < SmithKurosaki> | the latter mcv |
19:17 | < simontwo> | or (god people are) stupid |
19:18 | < SmithKurosaki> | god, people are stupid |
19:18 | < SmithKurosaki> | there, make sense? |
19:25 | <@MyCatVerbs> | Yes. |
19:32 | < simontwo> | does that make sense to people? you gotta nod, or else I don't know. |
19:32 | < simontwo> | (MIT lecturer on Programming Paradigms on YouTube says that all the time) |
19:39 | <@Vornicus-Latens> | What'd they do? |
19:47 | < simontwo> | what'd who do? |
19:47 | < simontwo> | I think it was just a demonstration of advanced tics. |
19:51 | < SmithKurosaki> | good, we have comprehension |
19:57 | <@Vornicus-Latens> | Smith: the stupid people. |
19:57 | < SmithKurosaki> | ?/ |
19:58 | <@Vornicus-Latens> | you said "god people are stupid". I was wondering what provoked this sudden outburst of obviousness. |
20:00 | < SmithKurosaki> | on freenode, there is one guy on #fedora who has been asking to be spoonfed instructions for java and flash for about an hour, and we are all getting quite annoyed |
20:00 | < SmithKurosaki> | like, i do the same thing, but only if i dont understand whats going on / am concerned i will fuck it up / dont have webste to go on |
20:04 | < SmithKurosaki> | he is claiming newbie now though, so i can kind of understand, but i wasnt this bad |
20:18 | | Irssi: #code: Total of 24 nicks [10 ops, 0 halfops, 0 voices, 14 normal] |
20:24 | < simontwo> | so... people who use IRC should be put in a sandbox with AIs for the first five years. :-P |
20:24 | < SmithKurosaki> | not what im saying at all |
20:25 | < SmithKurosaki> | (otherwise i would still have another 4 and half years where i have to talk to bots instead of people (i know) |
20:28 | <@Vornicus-Latens> | I once went into #debian with a question that went "I am getting this thing showing up on my terminal every few seconds, and I have no idea what it is, and it doesn't google because of all the personal stuff in here, can you figure out what I'm looking at?" |
20:28 | <@Vornicus-Latens> | And got answers that went "are you a troll?" |
20:29 | < SmithKurosaki> | poor you |
20:29 | < SmithKurosaki> | i wasnt on irc when i started with ubuntu, so i had to bother people on msn, that wasnt fun, i left it alone for liek a month and then i got back into it and it was awesome |
20:30 | | Vornicus-Latens is now known as Vornicus |
20:42 | | * Vornicus tires to figure out some bash for this: he has a bunch of files named for instance bottom-half.ps, and wants to generate from them files named for instance bottom-half.png |
20:42 | <@Vornicus> | I have the command to gs put together. |
20:42 | < jerith> | Vornicus: man basename |
20:42 | <@Vornicus> | jerith: swank. |
20:43 | < SmithKurosaki> | oh linux, being able to re-extension files harmlessly <3 |
20:43 | < jerith> | You can also use bash variable-fu, but I can never remember the operators. |
20:44 | < jerith> | ${filename%%.ext} will strip it. |
20:46 | < jerith> | ${filename/%.ext/.newext} will replace it. |
20:46 | <@Vornicus> | ...that's just madness. I'm gonna go with basename. |
20:46 | < jerith> | But I prefer $(basename $filename .ext).newext |
20:46 | < jerith> | It's a little more explicit. |
20:47 | < jerith> | Although $() is a bashism and `` is more portable. |
20:48 | < simontwo> | I heard someone disliking `` for being deprecated. |
20:48 | < jerith> | Especially in Ubuntu, which uses dash insead of bash for /bin/sh |
20:48 | < simontwo> | oh. |
20:48 | < jerith> | I don't think `` is deprecated. |
20:48 | < simontwo> | $ uname -a; echo $SHELL |
20:48 | < simontwo> | Linux hastur 2.6.28-11-generic #42-Ubuntu |
20:48 | < simontwo> | /bin/bash |
20:49 | < jerith> | It's tricky to nest, though. |
20:49 | < SmithKurosaki> | you have hastur as a hostna,e? |
20:49 | < simontwo> | err, never mind. I don't use /bin/sh :P |
20:49 | < jerith> | simontwo: That's /bin/sh, not /bin/bash -- the latter is bash. |
20:49 | <@TheWatcher> | As long as he doesn't have three machines on the same LAN called that, he's okay |
20:50 | < jerith> | simontwo: You do itf it's the #! line in a script (which it often is) and cron runs it. |
20:50 | < simontwo> | jerith, point taken. |
20:50 | < jerith> | Lots of people get bitten by that. |
20:51 | < jerith> | I try to avoid bashisms on general principle, but there are many cases where the clarity is worth it. |
20:51 | | * Vornicus wonders why the fuck "man for" doesn't give me documentation for for, dammit |
20:51 | < jerith> | $() to reduce escaping hell, for example. |
20:52 | <@Consul> | We need unix apps called wich and cave, just so we can issue commands like "man wich" and "man cave". |
20:52 | < jerith> | Vornicus: It's a builtin, which means it's part of the shell's doc rather than a separate command. |
20:53 | <@ToxicFrog> | Which is stupid~ |
20:53 | <@ToxicFrog> | Especially since bash_builtins(1) seems to have gotten merged into bash(1) at some point. |
20:53 | <@Consul> | Well, I guess there is "man which", isn't there/ |
20:53 | <@Consul> | ? |
20:54 | | * ToxicFrog uses bashisms all the times, but also starts all his scripts with #!/bin/bash |
20:54 | < jerith> | ToxicFrog: Not if it's smart enough to give you the man page for the current shell instead of hardcoding one. |
20:54 | <@ToxicFrog> | jerith: er? |
20:55 | < jerith> | ToxicFrog: I'm theorising. |
20:55 | <@ToxicFrog> | My complaint is that all the shell documentation, including all of the builtins, is one huge man page. |
20:55 | < jerith> | Also: |
20:55 | < jerith> | root@OpenWrt:~# ls /bin/bash |
20:55 | < jerith> | ls: /bin/bash: No such file or directory |
20:55 | < jerith> | Not everything has bash. |
20:55 | <@ToxicFrog> | Thus, for any builtin, you have to page through the Giant Man Page Of Doom to find it. |
20:56 | < jerith> | ToxicFrog: That's no different from awk or sed, though. |
20:56 | <@ToxicFrog> | At one point there was, for bash at least, a seperate page documenting only the builtins, but I can't find it anymore. |
20:56 | <@ToxicFrog> | awk and sed don't have 200+ pages of semantics documentation first, either~ |
20:56 | < jerith> | And manpages are generally viewed using less, which has search. |
20:56 | < jerith> | ToxicFrog: awk does... |
20:56 | | * Vornicus has no idea how to actually use less. |
20:57 | <@Vornicus> | for file in *.ps ; do gs -dSAFER -q -dBATCH -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=$(basename $file .ps).png $file; done # wheeeee |
20:57 | < jerith> | Vornicus: Many vi commands work. |
20:57 | <@Vornicus> | Oh, that helps. Now all I have to do is learn vi. |
20:58 | < jerith> | /foo and ?foo for searching (forward and backward respectively). |
20:58 | <@ToxicFrog> | jerith: awk starts around line 500. Bash starts around line 2500, and furthermore the builtins occur as words elsewhere in the text much more frequently, making / next to useless. |
20:58 | < jerith> | gg and G for start and end of file. |
20:59 | <@ToxicFrog> | Vornicus: pageup/pagedown, <number>g to seek to line, /foo and ?foo to search forward and backwards, -M to toggle prompt flavour |
20:59 | <@ToxicFrog> | I find that generally suffices. |
20:59 | <@ToxicFrog> | Oh, and > and < for start/end of file. |
20:59 | <@Vornicus> | aha |
21:00 | < jerith> | ToxicFrog: G?BUILTIN<enter> gets me to the builting section. :-) |
21:00 | < simontwo> | I like bash'es man file. whenever I have to do something significant in bash, it's either in the man page or in the TLDP HOWTO. |
21:01 | < jerith> | Anyways, there's a tool that needs to exists but doesn't: plain text search/replace. |
21:01 | < jerith> | simontwo: ABS |
21:02 | < jerith> | tldp.org/LDP/abs |
21:02 | <@ToxicFrog> | jerith: then you have a different man page than I do, because that doesn't even come close on mine. |
21:02 | < jerith> | ToxicFrog: That's the BSD one on macos. |
21:03 | < jerith> | It's wwhat I have handy. |
21:05 | <@ToxicFrog> | Aah |
21:08 | < simontwo> | jerith, ugh. I'd rather not. :P |
21:15 | | * Vornicus tries to think of names for the two kinds of steep edges in the N repertoire. |
21:17 | | * Vornicus decides sharp and wedge. |
21:39 | <@Vornicus> | There. 35 text files, 34 images. |
21:45 | < jerith> | One short? |
21:46 | <@Vornicus> | One is the basics: it sets up the size and scaling, and paints the background. |
21:47 | <@Vornicus> | So that all i have to do in the other 34 is include the first and tell it what to paint in the foreground. |
21:54 | <@ToxicFrog> | How do you do that inclusion? |
21:58 | <@Vornicus> | (base.ps) run |
22:02 | <@ToxicFrog> | Sweet. |
22:04 | | * Vornicus now gets to work on pygame. |
22:34 | | * TheWatcher bleghs at sorting controls |
22:42 | < simontwo> | in C, how do I know if a socket is closed? |
22:44 | <@TheWatcher> | If close(socketfd) returns 0, it closed. If it returns -1, errno contains the reason it didn't close |
22:45 | <@TheWatcher> | If you mean "how do I find out if the fd is still valid", you really need to refactor your code, because you should never be in a situation where you are unsure about whether a fd (or pointer) is stale or not. |
22:46 | < simontwo> | TheWatcher, how do I check if the remote end closed the connection? |
22:46 | < simontwo> | supposedly the fd is still valid, but I get a bunch of empty strings back when the other end disconnects me. :) |
22:47 | < simontwo> | although I don't know if empty input on recv() is an unambiguous indication of that. |
22:50 | <@ToxicFrog> | RETURN VALUE |
22:50 | <@ToxicFrog> | These calls return the number of bytes received, or -1 if an error occurred. The return value will be 0 when the |
22:50 | <@ToxicFrog> | peer has performed an orderly shutdown. |
22:50 | <@ToxicFrog> | If recv() returns 0, the socket was cleanly shut down at some point. |
22:50 | < simontwo> | oh, silly me. thanks. |
22:50 | <@ToxicFrog> | If it returns -1, check errno. |
22:51 | <@Vornicus> | Wait, what if you haven't received anything. |
22:52 | <@Vornicus> | I mean, look at IRC: most of the time recv doesn't get you anything. |
22:52 | <@ToxicFrog> | Then it blocks. |
22:52 | <@Vornicus> | .../ah/ |
22:52 | <@ToxicFrog> | If it's configured to be nonblocking, it returns -1 and errno is EAGAIN |
22:53 | < simontwo> | yeah |
22:53 | < simontwo> | and since I use an event library, I won't recv() unless there is something to recv(). |
22:54 | < simontwo> | I don't know if it's a hard guarantee, but that's the way it's supposed to work. |
23:14 | | * Vornicus pokes at pygame. |
23:15 | <@Vornicus> | c'mon, display. |
23:16 | <@Derakon> | What's it refusing to display? |
23:16 | <@Derakon> | (You remembered to refresh after blitting, right?) |
23:18 | <@Vornicus> | I am refreshing after blitting. |
23:18 | <@Vornicus> | Tiles. |
23:19 | <@Derakon> | Paste it? |
23:19 | <@Derakon> | Other things to check: make certain your rects are the right size; if you're drawing colors, remember the color ranges are [0, 255], not [0, 1]. |
23:19 | <@Vornicus> | http://paste.pocoo.org/show/121288/ |
23:20 | <@Vornicus> | Obviously not the entire cord. |
23:20 | <@Derakon> | Hmm...I'd avoid rotozooming if possible, since it's not a very good scaling algorithm. |
23:20 | <@Derakon> | Yeah. |
23:20 | <@Vornicus> | code* |
23:20 | <@Vornicus> | it's the only filtered one. |
23:21 | <@Derakon> | You're certain that you are performing blit calls? |
23:21 | <@Derakon> | ...yeah, you should be guaranteed to with that structure. |
23:21 | <@Derakon> | So I'd try removing the rotozoom. |
23:22 | <@Vornicus> | Hrmp. This worked in VornMoo. |
23:22 | <@Vornicus> | ...doh, figured it out |
23:22 | <@Vornicus> | what's 32/64? |
23:22 | <@Derakon> | Do tell. |
23:22 | <@Derakon> | 0 |
23:23 | <@Derakon> | Ahh, zero-size sprites. Always fun. |
23:23 | <@Vornicus> | Victoly |
23:25 | | You're now known as TheWatcher[T-2] |
23:29 | <@Vornicus> | http://www.flickr.com/photos/7861878@N06/3599293684/ |
23:30 | <@Derakon> | Awesome. |
23:31 | | You're now known as TheWatcher[zZzZ] |
23:31 | <@TheWatcher[zZzZ]> | Shiny, vorn :) |
23:32 | <@Derakon> | Incidentally, I'm mulling open-sourcing JBRL. |
23:33 | <@Vornicus> | Yay! |
23:33 | <@Derakon> | On the theory that making it into a marketable game is at least a year out, probably more, and practically speaking I don't want to be in the business of making videogames if I'm working alone. |
23:33 | <@Vornicus> | You are not whatshisname. |
23:34 | <@Derakon> | Toady. |
23:34 | <@Derakon> | No. |
23:34 | <@Vornicus> | Not Toady. |
23:34 | <@Vornicus> | Dammit what's his name. |
23:34 | <@Vornicus> | Cactus. |
23:34 | <@Derakon> | Oh, no, not him either. |
23:34 | <@Derakon> | I like a certain amount of polish in my work. |
23:37 | | * Vornicus is actually surprised at how little code he needed to write to get that done. |
23:38 | <@Derakon> | Pygame is very nicely compact. |
23:39 | < simontwo> | that guy who made an adventure game in five years? |
23:39 | <@Derakon> | No, that's Pixel. |
23:39 | | Consul_ [~dmlandrum@Nightstar-2808.dsl.sfldmi.ameritech.net] has joined #code |
23:39 | <@Derakon> | Cactus is a festering pit of creativity. He makes entire games in a day. |
23:39 | | Consul [~dmlandrum@Nightstar-833.dsl.sfldmi.ameritech.net] has quit [Ping Timeout] |
23:39 | <@Vornicus> | Granted they all /blow/, but that's not the point. |
23:40 | < simontwo> | I made several halves of games in a day or two and never an entire one. :-) |
23:40 | <@Vornicus> | Heh |
23:40 | < simontwo> | they are usually very lame. |
23:40 | | Consul_ is now known as Consul |
23:41 | <@Vornicus> | Toady is the nutbar behind Dwarf Fortress. |
23:41 | <@Derakon> | Who is quite willing to work alone on vast decade-long projects. |
23:41 | <@Vornicus> | Now if he would, you know, let more people into the code, it'd probably be better. |
23:43 | <@Derakon> | I am rather concerned about such things as documentation, maintaining code quality, maintaining a good direction for the project, and maintaining interest of course. |
23:47 | | * Vornicus hates working alone but needs specialists and a manager more than Another Programmer. |
23:48 | <@Derakon> | I assume that open-source projects basically work by people submitting patches, then more trusted people examining the patches before allowing them to be incorporated into the codebase. |
23:50 | <@TheWatcher[zZzZ]> | Depends. Often there's a core group of developers and they might accept patches. |
23:51 | <@Derakon> | Well, to be accepted into the core you have to be tested somehow, if only socially. |
23:51 | <@TheWatcher[zZzZ]> | For documentation, I always, and strongly, recommend heavy use of doxygen. |
23:52 | <@TheWatcher[zZzZ]> | (doxygen handles python code fine, too - there's no need for the tricks I need for using doxygen in perl) |
23:53 | <@TheWatcher[zZzZ]> | If you're serious, I'd also strongly recommend writing a complete style guide (and making sure your code adheres to it) before opening it. |
23:53 | | * Derakon nods. |
23:54 | <@Derakon> | Given that I'm at just under 4k lines of code not counting dynamically-loaded modules... |
23:54 | <@Vornicus> | Documentation is good for you. |
23:54 | <@Derakon> | It'd be over 4k before any opening anyway since there are some incomplete features that would need to be finished. |
23:54 | <@Derakon> | Yeah, but it's dull. |
23:55 | <@TheWatcher[zZzZ]> | Hence why I prefer to do as much as I can while I write the code >.> |
23:55 | <@Derakon> | Hmm...currently the codebase is 13.4% comments. |
23:56 | <@Derakon> | Which is a bit low for me, but it could certainly be a lot worse. Mostly what's missing is the high-level "This is what this class does, this is why this module is doing this" stuff. |
23:57 | | * TheWatcher[zZzZ] nods |
23:57 | <@TheWatcher[zZzZ]> | (now do you tell how much is comment, anyway?) |
23:57 | <@Derakon> | cat *py | grep -c '#' |
23:58 | | * Vornicus examines Vornball's active code, which has... no comments. But is only 30 lines long not counting the map of data file characters to tile types. |
23:58 | <@Derakon> | Hm. And 11% whitespace. cat *py | grep -cE '^\s*$' |
--- Log closed Sat Jun 06 00:00:01 2009 |