--- Log opened Mon May 26 00:00:29 2008 |
00:09 | <@Vornicus> | ARG WHY CAN'T I CONCENTRATE ON THIS |
00:38 | <@Raif> | Because you have ADD. |
00:38 | <@Raif> | And possibly ADHD, its hyperactive cousin. |
00:38 | <@TheWatcher> | because the Intertrons are using their distraction ray on you |
00:38 | <@Vornicus> | All right, point |
00:44 | <@Raif> | You're not supposed to know about my distraction ray. |
00:45 | | * Shoukanjuu puts a sniper cannon shell through Vornicus' cockpit |
00:45 | | * Shoukanjuu becomes a Sergeant |
00:45 | <@Vornicus> | ow |
00:46 | < Shoukanjuu> | Chromehounds, brother to Armored Core 4 :O |
00:46 | < Shoukanjuu> | Not only that, but you don't need to be a Newtype to play |
00:46 | | Raif_ [~corvusign@Nightstar-25074.hsd1.wa.comcast.net] has joined #Code |
00:46 | | * Raif_ distracts you. |
00:46 | <@Vornicus> | ;_; |
00:46 | <@Raif> | Hah, there are two of me! |
00:46 | < Raif_> | No there aren't. |
00:47 | | * Raif_ disappears. |
00:47 | | Raif_ [~corvusign@Nightstar-25074.hsd1.wa.comcast.net] has left #Code [] |
00:47 | <@Raif> | Descartes was a bastard. |
00:51 | <@gnolam> | "The mailman lied about his vasectomy, therefore I am"? |
00:54 | | You're now known as TheWatcher[t-2] |
00:54 | < Shoukanjuu> | XD |
00:57 | | You're now known as TheWatcher[zZzZ] |
02:17 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?] |
02:42 | | Serah [~Z@Nightstar-5401.atm2-0-1041217.0xc329e232.boanxx12.customer.tele.dk] has joined #Code |
02:42 | | mode/#code [+o Serah] by ChanServ |
06:00 | | AnnoDomini [AnnoDomini@Nightstar-28972.neoplus.adsl.tpnet.pl] has joined #Code |
06:00 | | mode/#code [+o AnnoDomini] by ChanServ |
06:07 | | Serah [~Z@Nightstar-5401.atm2-0-1041217.0xc329e232.boanxx12.customer.tele.dk] has quit [Quit: Don't try to read the quit message, that is impossible. Instead only realize the truth; "there is no quit message" and you will see it is not you who read the quit message but the quit message who reads you.] |
06:27 | | Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has quit [Quit: Leaving] |
06:35 | | GeekSoldier [~Rob@Nightstar-9937.dip.t-dialin.net] has joined #code |
06:35 | | mode/#code [+o GeekSoldier] by ChanServ |
06:55 | | * Vornicus fiddles, discovers that there's really only one thing that he needs anything more than a simple list of stars for, makes it a function, has done with it. Dammit, why did it take that long to figure that out? |
06:56 | < Shoukanjuu> | It's always the simple things we miss |
06:57 | <@Vornicus> | also, it seems like there should be a function called minmax. |
06:57 | <@Vornicus> | that gives both the min and the max at the same time. |
06:58 | <@Vornicus> | cuz it'd be useful. |
06:58 | < Shoukanjuu> | noway |
06:58 | < Shoukanjuu> | That makes too much sense |
06:59 | | * Vornicus writes his own. |
07:00 | < Shoukanjuu> | You don't know the forces you're tampering with, Vorn! You'll destroy us all! |
07:00 | <@Vornicus> | HA! You just say that because you wish you'd thought of it first! |
07:02 | < Shoukanjuu> | No, not really |
07:02 | < Shoukanjuu> | Because even if I did, what would I do? Ask someone else to do it for me? |
07:03 | <@Vornicus> | http://rafb.net/p/MOTnSt36.html <--- voila. |
07:03 | <@Vornicus> | I need to do it in one pass because iterables don't survive to get a second pass. |
07:04 | <@Reiver> | I was about to ask why it did the first if statement, yeah |
07:04 | <@Vornicus> | The first if statement is to fill the low and high with the first thing |
07:05 | <@Vornicus> | I probably should do it with a next() instead. |
07:05 | <@Reiver> | Yeah, I know. I was mostly wondering why it didn't do that before the loop. |
07:05 | <@Reiver> | If the variables evaporate then that explains it~ |
07:06 | < Shoukanjuu> | Right, well I'm going to go lurk again until I can say something moderately funny about something else I can't understand |
07:07 | <@Reiver> | You don't understand that bit of code, Shoukanjuu? |
07:08 | < Shoukanjuu> | I understand what it does and how it does, thus this moment barely fits into the criteria for my lurking to stop |
07:16 | | Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has joined #code |
07:16 | | mode/#code [+o Kazriko] by ChanServ |
07:21 | | * Vornicus fiddles with iterators, trying to clean that up a bit. |
07:22 | <@Vornicus> | ...actually, no, that's fine |
07:24 | <@Vornicus> | the alternative is a try/catch, and I don't care that much |
07:25 | <@McMartin> | Yeah, the only thing missing is a next. |
07:28 | <@Vornicus> | http://rafb.net/p/PtUmuO52.html <--- yeah. |
07:28 | <@Vornicus> | oh, cute |
07:29 | <@Vornicus> | >>> max([]) |
07:29 | <@Vornicus> | Traceback (most recent call last): |
07:29 | <@Vornicus> | File "<stdin>", line 1, in <module> |
07:29 | <@Vornicus> | ValueError: max() arg is an empty sequence |
07:29 | <@Vornicus> | > |
07:30 | | * Vornicus decides to keep his original, because he finds it Sensible. |
07:30 | <@McMartin> | Er, by next I meant "like the C continue" |
07:31 | <@Vornicus> | ah, well |
07:31 | <@Vornicus> | that's called continue in Python too |
07:32 | <@McMartin> | Aha. Circuit crossed with Perl. |
07:32 | | * Vornicus just changes the second and third ifs to elifs. |
07:33 | <@McMartin> | Is that safe? |
07:33 | <@McMartin> | What if both are updated? |
07:33 | <@McMartin> | That *shouldn't* happen, but... |
07:33 | <@Vornicus> | Then your ordering is on drugs, and I can't guarantee anything. |
08:24 | | You're now known as TheWatcher |
09:25 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code |
09:25 | | mode/#code [+o gnolam] by ChanServ |
09:27 | | Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has quit [Quit: Leaving] |
09:27 | | Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has joined #code |
09:27 | | mode/#code [+o Kazriko] by ChanServ |
09:49 | | Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has quit [Client exited] |
09:50 | | Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has joined #code |
09:50 | | mode/#code [+o Kazriko] by ChanServ |
13:18 | | AbuDhabi [AnnoDomini@Nightstar-29768.neoplus.adsl.tpnet.pl] has joined #Code |
13:19 | | AnnoDomini [AnnoDomini@Nightstar-28972.neoplus.adsl.tpnet.pl] has quit [Ping Timeout] |
14:57 | <@ToxicFrog> | Vornicus: re initialization: why not initialize them to +/- infinity rather than to none? |
14:57 | <@ToxicFrog> | Then you don't need the first if. |
16:08 | | Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout] |
17:06 | | You're now known as TheWatcher[afk] |
17:29 | < Shoukanjuu> | white courtesy phone? o-o |
17:31 | <@ToxicFrog> | Yes. |
17:32 | <@ToxicFrog> | .new, :load, :save, :delete, :get, :put. Am I missing anything from a library to manipulate packed data chunks? |
17:33 | <@ToxicFrog> | Er. Packed files containing data chunks. |
17:34 | < Shoukanjuu> | My pizza hasn't arrived. *panics* |
18:03 | | AbuDhabi is now known as Steve |
18:25 | | You're now known as TheWatcher |
18:30 | | Vornotron [~vorn@Admin.Nightstar.Net] has joined #code |
18:30 | < Vornotron> | ToxicFrog: beacause it's not necessarily numbers |
18:30 | < Vornotron> | Tuples and strings also have orderings, and don't compare to numbers |
18:32 | <@ToxicFrog> | Aah |
18:37 | | Vornotron is now known as Vornicus |
18:43 | <@ToxicFrog> | The libres API is giving me some issues. |
18:47 | <@ToxicFrog> | At the moment I have: |
18:47 | <@ToxicFrog> | .new - create a new resfile object |
18:48 | <@ToxicFrog> | :load, :save - fill a resfile with the contents of something, and write those contents to something. Question: what is "something"? filename? buffer? file-like object? All of the above? |
18:48 | <@ToxicFrog> | :get, :put - accessors for chunks within the resfile. |
18:49 | <@MyCatVerbs> | ToxicFrog: duck-wise, anything that can be written into and read from? |
18:49 | <@ToxicFrog> | :delete - free all resources associated with a resfile |
18:49 | <@ToxicFrog> | MyCatVerbs: yeah, that's "file-like object" |
18:49 | <@ToxicFrog> | But do I also want to permit people to pass in filenames, rather than res:load(io.open(foo))? |
18:49 | | * MyCatVerbs ponders. |
18:49 | <@ToxicFrog> | What about buffers in memory rather than duck files? Or should they just use struct.cursor() for those? |
18:50 | <@ToxicFrog> | ...actually, yes they should |
18:50 | <@MyCatVerbs> | I'm thinking maybe keep it as file-like-object, and let people open filenames and create cursors for things that aren't actually file descriptors, rather than hacking in special cases just to make things terser. |
18:50 | <@ToxicFrog> | Similarly, should people be able to pass extra arguments to .new() to create and load in one operation? |
18:50 | <@MyCatVerbs> | Thus keeping it all nicely orthogonal, as it were. |
18:51 | <@ToxicFrog> | conversely, should a .load function be exported which implicitly allocates a new resfile? |
18:51 | <@MyCatVerbs> | No and kinda-no, respectively. |
18:51 | <@ToxicFrog> | The main advantage of permitting filenames is that I suspect this is how it's going to be used most of the time. |
18:51 | <@MyCatVerbs> | Not unless there's some horrific performance to be gained in the former case, and yes but call it something different in the latter. |
18:51 | <@ToxicFrog> | You have a file on disk, you want to manipulate it. |
18:52 | <@ToxicFrog> | It also means you're guaranteed closure of the file in a timely manner. |
18:52 | <@MyCatVerbs> | You want .load-creating-new-file to be greppably different from .load-without-creating-file |
18:52 | <@ToxicFrog> | The latter is a method. |
18:52 | <@ToxicFrog> | rh = res.load("foo.res") |
18:52 | <@ToxicFrog> | vs |
18:52 | <@ToxicFrog> | rh = res.new(); rh:load("foo.res") |
18:53 | <@ToxicFrog> | And then there's the whole read-on-access vs read-on-open mess. |
18:53 | <@MyCatVerbs> | Still, you don't want to implicitly allocate new files on disk. |
18:54 | <@ToxicFrog> | Uh, when would that happen? |
18:54 | <@MyCatVerbs> | How about rh = res.loadFromFile("foo.res") |
18:54 | <@ToxicFrog> | The only operation here that does any sort of write to disk is :save |
18:54 | <@MyCatVerbs> | "conversely, should a .load function be exported which implicitly allocates a new resfile?" <-- I thought by "resfile" you were referring to an object in the filesystem. |
18:54 | <@ToxicFrog> | A new resfile object in memory. |
18:54 | <@MyCatVerbs> | Aight. |
18:55 | <@ToxicFrog> | so that you can res.load(filename) as a shortcut for saying res.new():load(filename) |
18:55 | <@MyCatVerbs> | I'm not familiar with the language you're using. Can you dispatch based on the type of an object? |
18:56 | <@ToxicFrog> | I'm trying to balance here performance, similarity to other libraries (and thus user expectation of semantics), and how the library will most commonly be used here, and it's a headache. |
18:56 | <@MyCatVerbs> | How important are the performance issues, anyway? |
18:57 | <@MyCatVerbs> | Also, I'd say if you're totally stuck then just write two or three smallish utilities that work on the resource files and base the API decisions on whatever turns out to be most convenient while writing them. |
18:58 | <@ToxicFrog> | Well, the performance question here is whether it's better to load the entire file into memory on open, thus immediately releasing the file on disk; or to hold the file open on disk and read only as required |
18:58 | <@ToxicFrog> | Or to provide both options, as, say, load/save vs open/close. |
18:59 | <@ToxicFrog> | They're very important on memory-constrained systems (ARCHIVE.DAT approaches 300MB when loaded), but not, I think, much otherwise, unless disk is slow and your usage pattern is interested in the metadata but not the actual file contents. |
19:00 | <@ToxicFrog> | Concerning dispatch based on the type of an object - there's no static dispatch, since it's dynamically typed, but dynamic dispatch is easy. |
19:09 | | AFKSkull [~none@Nightstar-7066.dyn.optonline.net] has quit [Ping Timeout] |
19:10 | | AFKSkull [~none@Nightstar-7066.dyn.optonline.net] has joined #code |
19:34 | | GeekSoldier [~Rob@Nightstar-9937.dip.t-dialin.net] has quit [Ping Timeout] |
19:59 | | GeekSoldier [~Rob@Nightstar-10879.dip.t-dialin.net] has joined #code |
19:59 | | mode/#code [+o GeekSoldier] by ChanServ |
20:56 | | Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout] |
20:59 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Ping Timeout] |
21:01 | | gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code |
21:01 | | mode/#code [+o gnolam] by ChanServ |
21:02 | | Vornicus [~vorn@Admin.Nightstar.Net] has joined #code |
21:02 | | mode/#code [+o Vornicus] by ChanServ |
21:10 | | ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Ping Timeout] |
21:12 | | ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code |
21:12 | | mode/#code [+o ToxicFrog] by ChanServ |
22:04 | | Steve is now known as AnnoDomini |
22:21 | | * McMartin disassembles some non-Java-made Java bytecode to track down a bug which turns out to actually be in the data files. |
22:21 | <@McMartin> | Yey self-modifying code |
22:37 | | Reiver [~reaverta@Admin.Nightstar.Net] has quit [Ping Timeout] |
22:37 | | RBot [~Reiver@Nightstar-11031.xdsl.xnet.co.nz] has joined #Code |
22:37 | | DiceBot [~Reiver@Nightstar-11031.xdsl.xnet.co.nz] has quit [Ping Timeout] |
22:38 | | RBot is now known as DiceBot |
22:39 | | Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code |
22:39 | | mode/#code [+o Reiver] by ChanServ |
22:43 | | AnnoDomini [AnnoDomini@Nightstar-29768.neoplus.adsl.tpnet.pl] has quit [Quit: Why is there a jalapeno in the Aegean Sea?] |
22:47 | | Attilla [~The.Attil@194.72.70.ns-11849] has quit [Quit: <Insert Humorous and/or serious exit message here>] |
22:51 | | Serah [~Z@87.72.35.ns-26506] has joined #Code |
22:51 | | mode/#code [+o Serah] by ChanServ |
22:56 | | Attilla [~The.Attil@194.72.70.ns-11849] has joined #code |
22:56 | | mode/#code [+o Attilla] by ChanServ |
22:59 | | Attilla_ [~The.Attil@194.72.70.ns-11849] has joined #code |
22:59 | | Attilla [~The.Attil@194.72.70.ns-11849] has quit [Ping Timeout] |
22:59 | | Attilla_ is now known as Attilla |
23:00 | | mode/#code [+o Attilla] by ChanServ |
--- Log closed Tue May 27 00:00:35 2008 |