--- Log opened Fri Jun 11 00:00:31 2010 |
00:01 | | Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has quit [[NS] Quit: Leaving] |
00:12 | | You're now known as TheWatcher[T-2] |
00:16 | | Attilla [Attilla@Nightstar-dda333fb.threembb.co.uk] has quit [[NS] Quit: ] |
00:19 | | RichardBarrell [mycatverbs@Nightstar-58acb782.cable.virginmedia.com] has quit [[NS] Quit: Zzzzzzzzzzzzzzzzzz.] |
00:22 | | You're now known as TheWatcher[zZzZ] |
00:28 | | * Vornicus-Latens partially decodes the file format for manufactoria levels. |
00:47 | | * Vornicus-Latens thinks, in fact, that he's got it. |
00:49 | <@Vornicus-Latens> | Yes. File format decoded. |
00:53 | <@Vornicus-Latens> | cells are of the format "<type><x>:<y>f<direction>;" type is: c for conveyor, b/r/g/y for writers of the appropriate color, p for b/r readers, q for y/g readers, i for bridges. x and y are vaguely global coordinates, counting left to right and top to bottom; the center of the board is 12:7. |
00:53 | <@Vornicus-Latens> | The direction for conveyors and writers is 0 for west, 1 for north, 2 for east, 3 for south; for readers, add 4 if yellow or blue are to the left; for bridges, double the /top/ conveyor's direction number, then add 1 if the bottom conveyor is east or south. |
00:55 | <@Vornicus-Latens> | er, are to the left/ccw of the "blank" output, for readers. |
01:09 | < Tarinaky> | Good morning. |
01:11 | | Vornicus-Latens is now known as Vornicus |
01:14 | <@Vornicus> | Good morning. |
01:16 | < Tarinaky> | Oh! New QI! |
01:27 | | Derakon[AFK] is now known as Derakon |
01:37 | | * Vornicus starts coding a manufactoria simulator, finds himself trying to do five things at once. |
01:45 | < Tarinaky> | Not good. |
01:59 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
02:02 | | * Vornicus tries to figure out what he's doing wrong. |
02:05 | <@Vornicus> | ...am I doing anything wrong? |
02:06 | <@Vornicus> | I am not. |
02:06 | <@Vornicus> | I just am using one of the more oddly-shaped ones, and the printout is confusing me. |
03:10 | <@Vornicus> | Okay, so far so good. |
03:21 | < Tarinaky> | Does anyone know if std::fstream is automatically optemised to do stuff like getting blocks at a time? |
03:22 | < Tarinaky> | *optimised |
03:22 | < Tarinaky> | Or am I expected to do that myself? |
03:22 | < celticminstrel> | Considering that it is built on a stream buffer... |
03:23 | < Tarinaky> | >.> just asking... |
03:23 | <@ToxicFrog> | Generally the OS handles that kind of thing. |
03:23 | < celticminstrel> | That too. |
03:23 | | * Vornicus wins. |
03:24 | <@Vornicus> | Okay, Manufactoria simulator in 110 lines of Python. Not too bad. |
03:30 | < celticminstrel> | What precisely does it do? |
03:31 | <@Vornicus> | Give it a board and a program and it will tell you the result and the number of ticks it took. |
03:45 | <@Vornicus> | Needs some more work - have to be able to tell it what level you're looking at and run acceptance tests, etc. |
03:59 | <@Vornicus> | And then if I get really crazy I can make it a debugger too. |
04:05 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
04:10 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
04:10 | | mode/#code [+o Vornicus] by 459AAEB09 |
04:23 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
04:47 | < Derakon> | Vorn: next step: give it a problem and have it find the solution for you~ |
04:47 | <@Vornicus> | Jesus |
04:55 | | * Derakon mutters at FTGL, which refused to build, apparently because sed doesn't work the way it expected it to. |
04:55 | < Derakon> | sed -i 's/%FTGL/FTGL/' html/*html |
04:55 | < Derakon> | sed: 1: "html/FTBBox_8h.html": extra characters at the end of h command |
05:06 | | * Derakon decides to try installing it via macports, meanwhile works on building boost on his other CPU. |
05:06 | < Derakon> | Yay multicore~ |
05:12 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!] |
05:18 | < McMartin> | o_O |
05:18 | | * McMartin passes Ofanim with something comparatively tiny. |
05:18 | < McMartin> | This can't possibly be right. |
05:18 | < Derakon> | Try it a few more times to do more randomized tests. |
05:19 | < McMartin> | Just passed five sets in a row. |
05:20 | < McMartin> | Yeah, there we go, I made it fail. |
05:30 | < McMartin> | It looks like I'm going to have plenty of room, though, as long as I don't have to deal with leading reds that are not representing the numeral zero. |
05:33 | <@Vornicus> | Clearing leading reds is not that hard/ |
05:33 | | * Tarinaky nnnrrrghs. I'm wonderign whether I need to re-write my data entry class to be more abstract in order to make serialisation/deserialisation easier. |
05:33 | < Tarinaky> | *wondering |
05:34 | < Tarinaky> | Of course, then I have the problem that I'm not sure how to go about that exactly :/ |
05:36 | < Derakon> | Yeegh, they're both still building. >.< |
05:40 | < Tarinaky> | I'm going to go install and play some Rome:Total War I think and come back to my code later >.> |
05:40 | < Tarinaky> | Bye. |
05:40 | < Derakon> | Have fun, and good luck. |
05:40 | < Tarinaky> | Cheers. |
05:41 | | Tarinaky [Tarinaky@Nightstar-25c793f0.adsl.virginmedia.net] has quit [Connection closed] |
05:55 | < McMartin> | There we go. |
05:55 | < McMartin> | Clearing reds isn't hard, but I don't have room for it with my routing. |
05:55 | < McMartin> | But all inputs seem to be well-formed, so that's OK. |
05:55 | < McMartin> | 99 parts, though. |
05:56 | < Derakon> | What's the environment variable for header file search paths when using Python setup.py build systems? |
05:57 | < Derakon> | Oh, wait, include paths are specified in the setup.py script. |
06:09 | | AnnoDomini [annodomini@Nightstar-e8d6fc17.adsl.tpnet.pl] has joined #code |
06:10 | | mode/#code [+o AnnoDomini] by 459AAEB09 |
06:14 | < Derakon> | Ergh. PyFTGL had goddamn better be a perfect font rendering solution, given how much of a pain it's being to install. |
06:15 | < Derakon> | Right now it's failing because -lGLU isn't working. |
06:16 | < McMartin> | o_O. -lGLU should be in your basic library path on, like, anything. |
06:16 | < Derakon> | Sure it's not in a framework instead? |
06:16 | < Derakon> | ld: library not found for -lGLU |
06:16 | < McMartin> | Oh. Right. OSX. |
06:16 | < McMartin> | Should just be part of -framework OpenGL |
06:17 | < Derakon> | Well, this is the commandline it's generating: g++-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc build/temp.macosx-10.6-i386-2.5/ftgl.o -lGLU -lGL -lfreetype -lz -lftgl -lboost_python -o build/lib.macosx-10.6-i386-2.5/FTGL.so |
06:17 | < Derakon> | So clearly I need to figure out how to change that to get it to use frameworks instead. |
06:35 | | Derakon is now known as Derakon[AFK] |
06:53 | | cpux is now known as shade_of_cpux |
07:21 | | Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Ping timeout: 121 seconds] |
07:22 | | Serah [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds] |
07:51 | | Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
08:45 | | You're now known as TheWatcher |
10:03 | <@Vornicus> | I ended up with 110 parts and a wrong answer for Ophanim. |
10:16 | <@Vornicus> | (it fails when A > B but digits(A) == digits(b) |
10:39 | | Tarinaky [Tarinaky@Nightstar-58238565.adsl.virginmedia.net] has joined #code |
10:48 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
10:50 | | You're now known as TheWatcher[afk] |
11:01 | | Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code |
11:11 | | Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Ping timeout: 121 seconds] |
11:14 | | Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code |
11:22 | < Rhamphoryncus> | Will my uptime exceed 30 minutes this time? Taking all bets! |
11:23 | < Rhamphoryncus> | Last boot had ram voltage two ticks higher. This boot the cpu voltage is one tick higher and the ram downclocked to 400 MHz. Next boot I'll try maxcpus=1. |
11:27 | < Rhamphoryncus> | oh, I also pulled out two sticks of ram |
11:28 | <@Vornicus> | Somewhere about three days ago I would have gotten a new computer. |
11:30 | | Alek [omegaboot@Nightstar-c5f3565b.il.comcast.net] has quit [[NS] Quit: beroot] |
11:31 | < gnolam> | Rhamphoryncus: Memtest was clean? |
11:31 | < Rhamphoryncus> | I haven't left it running in memtest for several hours yet |
11:31 | < Rhamphoryncus> | Short periods haven't shown any problems though |
11:32 | < Rhamphoryncus> | Honestly, I've never gotten anything good out of memtest86. Either it runs fine or the computer dies. No in between |
11:32 | | Alek [omegaboot@Nightstar-c5f3565b.il.comcast.net] has joined #code |
11:32 | < Rhamphoryncus> | Vornicus: half of it is new. I'm very tempted to replace the rest.. then start replacing the new stuff |
11:35 | < Rhamphoryncus> | I wasn't satisfied with the service I got either, which makes it harder |
11:42 | | Vornicus is now known as Vornicus-Latens |
12:16 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed] |
13:50 | < simon__> | has anyone here played with the Kademlia DHT protocol? |
14:04 | < simon__> | ah, never mind. something about calculating the distance between nodes, but I figured it out. |
14:44 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
16:28 | | Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Client exited] |
16:36 | | Tarinaky [Tarinaky@Nightstar-58238565.adsl.virginmedia.net] has quit [Connection closed] |
16:51 | | Attilla [Attilla@Nightstar-260a76ad.threembb.co.uk] has joined #code |
16:51 | | mode/#code [+o Attilla] by 459AAEB09 |
17:23 | | * ToxicFrog punches the windows API team in the balls over and over and over again |
17:23 | <@ToxicFrog> | In WHAT UNIVERSE is this a good idea: |
17:23 | <@ToxicFrog> | #define GetObject GetObjectA |
17:23 | <@ToxicFrog> | In a file included by <windows.h>, which is to say, everything! |
17:24 | <@ToxicFrog> | Hope you don't declare anything named GetObject anywhere in your code! |
17:58 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
18:10 | < celticminstrel> | Just don't include windows.h... either that or #undef it. |
18:12 | <@ToxicFrog> | celticminstrel: I'm writing a windows program. |
18:12 | <@ToxicFrog> | So that stuff kind of needs to be included. |
18:12 | <@ToxicFrog> | windows.h is implicitly included by basically everything ever, on windows. |
18:13 | < celticminstrel> | Except console applications, but I get your point. |
18:13 | < celticminstrel> | ^except some |
18:13 | <@ToxicFrog> | #undefing it is the solution, but it's a solution that wouldn't be necessary if the headers/API were written correctly. |
18:14 | <@ToxicFrog> | This is a console application. <windows.h> is necessary for Find* |
18:15 | <@ToxicFrog> | Which in turn is necessary because windows doesn't have ftw() or nftw(), because it has POSIX compliance on about the same level as a sack of mustelid corpses. |
18:16 | < celticminstrel> | What's ftw and nftw? |
18:17 | <@ToxicFrog> | file tree walk. You give it a path and a function, and it calls that function on every file and directory under the path. |
18:17 | <@ToxicFrog> | nftw is an upgraded version that supports pre- and post-order traversal and pruning. |
18:18 | < celticminstrel> | Huh. Interesting. |
18:18 | <@ToxicFrog> | In short, it's what you use any time you're writing a program that at some point, needs to do something to a directory tree. |
18:18 | <@ToxicFrog> | Unless you're on windows, in which case you get to write it yourself using FindFirstFile/FindNextFile and recursion. |
18:18 | < celticminstrel> | Well... I'd probably go for some higher level interface that provides a directory iterator... |
18:19 | <@ToxicFrog> | Wouldn't that be a lower level interface? |
18:19 | < celticminstrel> | Not really. |
18:19 | <@ToxicFrog> | How do you figure? You'd be manually recreating ftw. |
18:19 | < celticminstrel> | If C++ provided lambdas, then ftw would be more useful than a directory iterator. |
18:19 | < celticminstrel> | However, it doesn't. |
18:19 | < celticminstrel> | (Yet.) |
18:20 | < celticminstrel> | Basically, if the function is only a couple of lines, I'd rather not write a whole new function to pass to ftw. |
18:20 | <@ToxicFrog> | ...so instead you're writing your own version of ftw? |
18:21 | <@ToxicFrog> | Or you're using a queue and pushing more directories onto it as you find them? |
18:21 | <@ToxicFrog> | I can't see you coming out ahead. |
18:21 | < celticminstrel> | ...I said an iterator. |
18:21 | < celticminstrel> | Like in PHP. |
18:21 | <@ToxicFrog> | Is the assumption here that the iterator is recursive, then, and not just an iterable form of a dirent? |
18:22 | < celticminstrel> | Hm, good point... I had overlooked the "recursive" part... |
18:22 | <@ToxicFrog> | The whole point of ftw, and why you use it instead of just opendir/readdir, is that it recurses into subdirectories |
18:23 | <@ToxicFrog> | If you're using nftw, you get a bunch of other options (follow symlinks? cross mount points?) and a chance to inspect each directory before nftw recurses into it, and potentially skip it entirely. |
18:24 | < celticminstrel> | Yeah, okay; I probably wouldn't need to do that much, so I guess it'd be worth writing a function to pass in... though I usually try to keep away from using POSIX functions directly. |
18:26 | | aoanla [AndChat@37647E.0002A6.6691A5.D62075] has joined #code |
18:26 | < celticminstrel> | ...from 'man ftw'... "These functions are provided for compatibility with legacy code. New code should use the fts(3) functions." |
18:26 | < celticminstrel> | ...what? |
18:27 | <@ToxicFrog> | fts_* is basically your desired recursive iterator interface, AIUI. |
18:27 | < celticminstrel> | Yeah, seems like it. |
18:29 | <@ToxicFrog> | (incidentally, my copy of the man page doesn't have that notice; it simply notes that ftw has been deprecated in favour of nftw, as of POSIX.1-2008) |
18:29 | <@ToxicFrog> | I tend to prefer higher-order functions in general, s. |
18:30 | < celticminstrel> | s.? |
18:30 | <@ToxicFrog> | so. |
18:49 | | You're now known as TheWatcher |
19:35 | | aoanla [AndChat@37647E.0002A6.6691A5.D62075] has quit [[NS] Quit: ] |
20:10 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed] |
20:12 | | Derakon [Derakon@Nightstar-1ffd02e6.ucsf.edu] has joined #code |
20:12 | | mode/#code [+o Derakon] by 459AAEB09 |
20:17 | <@Derakon> | Okay, so. |
20:17 | <@Derakon> | I have a three-dimensional array of 0s and 1s. |
20:17 | <@Derakon> | I want to count the number of connected groupings of 1s -- the number of "islands" in the array. |
20:18 | <@Derakon> | I know a basic brain-dead approach to this, but is anyone aware of a performant method? |
20:18 | <@Derakon> | My brain-dead approach involves pushing all the 1s onto a stack, popping one, looking to see if there are any islands it's adjacent to, if so, add it to the island (and then merge islands as needed), if not, create a new island, repeat until stack is empty. |
20:19 | <@Derakon> | This involves N^2 comparisons, though it can be optimized with bounding boxes on the islands. |
20:46 | <@Vornicus-Latens> | Marching Cubes? |
20:47 | <@Derakon> | Mmm...maybe. |
20:47 | <@Derakon> | I'd have to have some logic for "this hull contains this point", though. |
20:47 | <@Derakon> | Since marching cubes would ignore points fully-contained by the island, and I need to know to skip those over. |
20:56 | | Tarinaky [Tarinaky@Nightstar-58238565.adsl.virginmedia.net] has joined #code |
20:58 | | * TheWatcher ponders something vaguely |
20:59 | <@TheWatcher> | Maybe I've read too much Pratchett over the years, but algorithm names are so dull. |
20:59 | <@Derakon> | Oh, awesome. Using numpy arrays, the square of the distance between two points is numpy.sum((p2 - p1)**2) |
21:06 | | Vornicus-Latens is now known as Vornicus |
21:07 | < McMartin> | Not bad at all. |
21:07 | < McMartin> | TheWatcher: One of Berkeley's Linear Algebra profs is the extremely Swedish Professor Lenstra. |
21:07 | < McMartin> | THE GRAHAM-SCHMIDT PROCESS sounds much better in an impossibly thick Swedish accent. |
21:08 | <@TheWatcher> | Snrk |
21:08 | <@TheWatcher> | I bet |
21:10 | < McMartin> | Wouldn't it be faster to start at a 1, and then floodfill out from it? |
21:10 | < McMartin> | That's four comparisons per 1, tops. |
21:10 | < McMartin> | (I guess that's still n^2 if N is the length of a side and not the number of 1s) |
21:11 | <@Derakon> | McM: hm, probably, yes. |
21:11 | | * Derakon eyes his Island class. |
21:11 | <@Derakon> | I guess I don't need this. |
21:12 | <@Derakon> | Now I just have to remember the proper way to do a floodfill. |
21:26 | <@Derakon> | Hrmph...surely there must be some way to index into a numpy array using another array. |
21:26 | <@Derakon> | But e.g. bar[[1, 2]] does not get me a single element (bar is a 2D array) |
21:35 | <@Derakon> | I wonder if there's a way to tell Numpy "get me the index of the first 1 in this array". |
21:39 | <@Derakon> | Does this look sane? http://pastebin.starforge.co.uk/307 |
21:40 | <@Derakon> | Hrm, that's going to insert the same point multiple times into the stack. |
21:40 | <@Derakon> | I should set to zero before insertion. |
21:41 | <@Derakon> | Like so: http://pastebin.starforge.co.uk/308 |
22:42 | <@Derakon> | Bah. This "pad with zeros" library I downloaded is slooooow. |
22:43 | <@Derakon> | One test of a 512x512x20 array takes 19.383s with padding and 2.637s without. |
22:43 | <@Derakon> | 'scuse me, 512x512x10. |
22:45 | < gnolam> | McMartin: Don't you mean Gram-Schmidt? |
22:45 | < gnolam> | Bork bork bork... |
23:22 | | AbuDhabi [annodomini@Nightstar-aa39fd47.adsl.tpnet.pl] has joined #code |
23:24 | | You're now known as TheWatcher[T-2] |
23:25 | | AnnoDomini [annodomini@Nightstar-e8d6fc17.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
23:26 | <@Derakon> | Night, TW. |
23:28 | | You're now known as TheWatcher[zZzZ] |
23:34 | < McMartin> | Perhaps I do! |
23:58 | | shade_of_cpux is now known as cpux |
--- Log closed Sat Jun 12 00:00:32 2010 |