--- Log opened Tue Feb 20 00:00:30 2007 |
00:00 | < MyCatVerbs> | But thanks. Next time I'll definately use a little more patience. |
00:00 | <@ToxicFrog> | Top level, options, date input formats. |
00:00 | <@ToxicFrog> | Three pages. |
00:00 | <@ToxicFrog> | Wait, no, four. |
00:01 | <@ToxicFrog> | If you want more info than just "use @" |
00:02 | < MyCatVerbs> | ToxicFrog: well found. Absolutely nothing of the sort in sight on the box I'm ssh'd into. |
00:04 | <@ToxicFrog> | ...weirdness. |
00:04 | < MyCatVerbs> | This is on a RedHat box, couldn't tell you exactly which version. Literally the information is not there. |
00:04 | <@ToxicFrog> | This is on Fedora 5 and 6. |
00:04 | < MyCatVerbs> | Well, I'd use the term "sucktitude" instead, myself. |
00:06 | < MyCatVerbs> | "info date" shows up no such thing anywhere within the tree. I-search for the first instance of the '@' character and it turns up in an email list in the "Authors of `getdate'" node. |
00:08 | < MyCatVerbs> | Oh and "date -d @0" on this box exit(1)'s with the message "invalid date `@0'". So it looks like that feature isn't built in on here. |
00:09 | < MyCatVerbs> | Hell, it's not even supported in getdate(3). Perhaps whatever version of RedHat's being used here has an old, smelly version of glibc? |
00:10 | <@ToxicFrog> | ...weird. |
00:10 | <@ToxicFrog> | Do a uname -r and tell me what kernel it says you have. |
00:10 | <@ToxicFrog> | ...and a date --version, for that matter. |
00:11 | < MyCatVerbs> | 2.6.9-11.ELsmp |
00:11 | < MyCatVerbs> | Coreutils 5.2.1. "Copyright (C) 2004 Free Software Foundation." |
00:11 | <@ToxicFrog> | ...EL? Huh. |
00:11 | <@ToxicFrog> | # date --version |
00:11 | <@ToxicFrog> | date (GNU coreutils) 5.97 |
00:11 | < MyCatVerbs> | RedHat == teh suck, teh slow, teh old. |
00:12 | < MyCatVerbs> | Also, for all of these reasons, teh stable. :/ |
00:12 | <@ToxicFrog> | I thought they typically put "_RH#" on the kernel version, but that might be a Fedoraism. |
00:12 | <@ToxicFrog> | # uname -r |
00:12 | <@ToxicFrog> | 2.6.17-1.2187_FC5smp |
00:12 | < MyCatVerbs> | They might be locally built, I don't know. |
00:12 | < MyCatVerbs> | I strongly doubt it, though. Otherwise we'd surely have left 2.6.9 in the dust months back. |
00:15 | < MyCatVerbs> | Oh and bloody residential DSL. My ssh sessions keep dying. |
00:25 | <@ToxicFrog> | ...that's some pretty shitty DSL. |
00:25 | <@ToxicFrog> | I've seen SSH stay up through 100% packet loss. |
00:27 | < MyCatVerbs> | ToxicFrog: it's overspecced. Every now and then the SnR on the phone line drops and the link goes down entirely. |
00:28 | < MyCatVerbs> | Cue autorenegotiation, possibly a new dynamic IP address. Thank GNU for screen. x_x |
00:45 | | EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout] |
00:52 | | Jan[food] is now known as Janus |
01:07 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
01:07 | | mode/#code [+o Chalcy] by ChanServ |
01:08 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
01:09 | | Chalcy is now known as Chalcedon |
01:20 | | AnnoDomini [~farkoff@Nightstar-29085.neoplus.adsl.tpnet.pl] has quit [Quit: Some people find sanity a little confining.] |
01:32 | | Janus is now known as Jan[general] |
01:37 | <@ToxicFrog> | What the fuck. |
01:37 | <@ToxicFrog> | I can see the code being called right here in the debugger. |
01:37 | <@ToxicFrog> | "play cdaudio from 3 to 4 notify" |
01:37 | <@ToxicFrog> | And yet it doesn't go into the log. |
01:38 | <@ToxicFrog> | Oh, there it is. |
01:38 | <@ToxicFrog> | Odd. I wonder what I was missing before. |
01:39 | < MyCatVerbs> | ToxicFrog: disk buffer sync'd? |
01:46 | <@ToxicFrog> | Each call is open, write, close. |
01:46 | <@ToxicFrog> | So unless close() isn't flushing buffers... |
01:46 | | * ToxicFrog may have been looking at the wrong file ?? |
01:48 | < MyCatVerbs> | ToxicFrog: async mounts can still do that. =) |
01:48 | < MyCatVerbs> | ToxicFrog: this is why OpenBSD developers swear at you and throw shit at your head if you use them, hehe. |
01:57 | <@ToxicFrog> | This was on windows. |
01:57 | <@ToxicFrog> | No idea what mount options it approximates. |
01:58 | <@ToxicFrog> | Hmm. Ok, I think I see how to implement most of these functions. |
01:58 | <@ToxicFrog> | MCI_NOTIFY is going to be tricky, though. |
02:04 | | ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Client exited] |
02:05 | | ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code |
02:05 | | mode/#code [+o ToxicFrog] by ChanServ |
02:07 | | * ToxicFrog rummages around in the docs looking for something that will tell him how to send messages |
02:09 | <@ToxicFrog> | Hmm. SendNotifyMessage() is what I want, I think. |
02:10 | | * MyCatVerbs ponders. |
02:11 | < MyCatVerbs> | Does TA work on WinXP-SP2? |
02:11 | <@ToxicFrog> | Yes. |
02:11 | < MyCatVerbs> | This appears to be worth actually installing Windows for... |
02:11 | < MyCatVerbs> | Oh, cool. Righto. Mental note that I need either a few hard disk or a better ethernet card. |
02:12 | <@ToxicFrog> | ? |
02:14 | < MyCatVerbs> | ToxicFrog: I have about ten gigs of music on this thing and the disk itself is 40GB. |
02:15 | < MyCatVerbs> | The better ethernet card bit is because if I manage to get, say, a decent 3com card to replace the 8139 in my BSD machine, I'll be able to just leave the music on the BSD box (which has a *huge* hard disk) and play it directly from there with no issues. |
02:15 | < Vornicus> | TA comes on four CDs. |
02:15 | < MyCatVerbs> | Vornicus: only if you include the battle-thingy pack. Y'know, the one with all the maps. |
02:15 | <@ToxicFrog> | Two. |
02:15 | <@ToxicFrog> | Battle Tactics is forgettable. |
02:16 | < MyCatVerbs> | Besides, you can almost fit it all on one, if you cut the audio tracks. |
02:16 | < MyCatVerbs> | Not that you'd want to, they're awesome. |
02:16 | <@ToxicFrog> | The entire point of this project is not having to cut the audio. |
02:17 | <@ToxicFrog> | Actually, I can give you accurate sizes: |
02:17 | <@ToxicFrog> | - TA engine and core files: 80MB |
02:17 | <@ToxicFrog> | - singleplayer campaign: 144MB |
02:18 | | Reiver is now known as ReivOut |
02:18 | <@ToxicFrog> | - multiplayer maps: 95MB |
02:18 | <@ToxicFrog> | - movies: 100MB |
02:18 | <@ToxicFrog> | - TACC singleplayer: 115MB |
02:18 | <@ToxicFrog> | - TACC multiplayer: 150 |
02:20 | <@ToxicFrog> | So you can in fact fit all of TA + TACC, sans music, on a single CD. |
02:21 | <@ToxicFrog> | ...in fact. |
02:21 | <@ToxicFrog> | My mp3-encoded game rip is 40MB. |
02:21 | <@ToxicFrog> | No, 30. |
02:21 | <@ToxicFrog> | So you can *just barely* fit all of TA and TACC and all the movies and music on a single disc. |
02:21 | <@ToxicFrog> | Or at least, you'll be able to once I finish this patch. |
02:22 | < MyCatVerbs> | ToxicFrog: meh. DVD-Rs rule anyway. |
02:22 | <@ToxicFrog> | Also, do I take from your comments that you haven't actually played TA? |
02:22 | | Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout] |
02:23 | < MyCatVerbs> | But still, cool. |
02:24 | | Vornicus [~vorn@67.50.40.ns-3674] has joined #code |
02:24 | | Vornicus is now known as NSGuest-531 |
02:25 | | NSGuest-531 is now known as Vornicus |
02:25 | <@ToxicFrog> | Because if not...what is wrong with you? |
02:25 | < Vornicus> | if not what? |
02:25 | <@ToxicFrog> | <ToxicFrog> Also, do I take from your comments that you haven't actually played TA? |
02:26 | < Vornicus> | ah |
02:26 | < MyCatVerbs> | ToxicFrog: what? Of course I've played TA! I wouldn't be so well interested if I hadn't. |
02:26 | <@ToxicFrog> | 'kthen |
02:27 | <@ToxicFrog> | So. Let's see what I need to implement: |
02:27 | <@ToxicFrog> | - open |
02:27 | <@ToxicFrog> | - close |
02:27 | <@ToxicFrog> | - set time format ms |
02:27 | <@ToxicFrog> | - set time format tmsf |
02:27 | <@ToxicFrog> | - status mode |
02:27 | < Vornicus> | tmsf? |
02:27 | <@ToxicFrog> | - status track count |
02:27 | <@ToxicFrog> | - status track type |
02:27 | <@ToxicFrog> | - stop |
02:28 | <@ToxicFrog> | - play from <track> to <track> |
02:28 | <@ToxicFrog> | The last one is going to be tricky, because it needs to play asynchronously and raise an MCI_MMNOTIFY message when finished. |
02:28 | <@ToxicFrog> | I think it's track, milliseconds, frames. |
02:28 | <@ToxicFrog> | "msf" is milliseconds frames. |
02:28 | <@ToxicFrog> | "tmsf" is not documented. |
02:29 | <@ToxicFrog> | But it makes sense given how it's used. |
03:08 | | Jan[general] is now known as Jan[bathipoo] |
03:52 | | BlueTiger [BlueTiger@Nightstar-567.natsoe.res.rr.com] has joined #Code |
04:02 | | BlueTiger is now known as BlueTiger\AFK |
04:02 | | Jan[bathipoo] [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, les jouets de me, na?tre Clair enfant voire.] |
04:24 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
04:24 | | mode/#code [+o Chalcy] by ChanServ |
04:25 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
04:27 | | ReivOut is now known as Reiver |
04:32 | | BlueTiger\AFK is now known as BlueTiger |
04:45 | | ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
04:45 | | BlueTiger is now known as BT\UT2004 |
04:46 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
04:48 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
04:50 | | BT\UT2004 [BlueTiger@Nightstar-567.natsoe.res.rr.com] has quit [Quit: ] |
04:56 | | MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Ping Timeout] |
04:57 | | MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code |
05:18 | | MyCatVerbs is now known as MyCatBreaksHisComputer |
05:19 | | MyCatBreaksHisComputer [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Quit: need the keyboard] |
05:21 | | MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code |
05:21 | | MyCatVerbs is now known as MyCatBreaksHisComputer |
05:29 | | Reiver is now known as ReivOut |
06:01 | | ChalcyGone is now known as Chalcedon |
06:18 | | MahalOut is now known as Mahal |
06:25 | | MyCatBreaksHisComputer is now known as MyCatVerbs |
06:49 | | ReivOut is now known as Reiver |
07:18 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: ] |
07:34 | | MyCatVerbs is now known as MyCatStudies |
07:56 | | ErikMesoy|sleep is now known as ErikMesoy |
08:07 | | ErikMesoy [~ejm@Nightstar-3192.bb.online.no] has quit [Ping Timeout] |
08:19 | | Mahal is now known as MahalBEDDD |
08:23 | | Reiver is now known as ReivOut |
08:25 | | ErikMesoy [~ejm@Nightstar-3192.bb.online.no] has joined #code |
08:51 | | AnnoDomini [~farkoff@Nightstar-29085.neoplus.adsl.tpnet.pl] has joined #Code |
09:06 | | ErikMesoy [~ejm@Nightstar-3192.bb.online.no] has quit [Quit: Off to a *cabin* for several days - maybe I'll see you from time to time.] |
09:17 | | EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code |
09:18 | | ReivOut is now known as Reiver |
09:53 | | Vornicus is now known as Vornicus-Latens |
10:01 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Gone] |
10:50 | | You're now known as TheWatcher[wr0k] |
11:44 | | MyCatVerbs [~rb6822@Nightstar-18478.cs.bris.ac.uk] has joined #code |
11:48 | | Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has quit [Quit: Leaving] |
12:05 | | Raif [~corvusign@Nightstar-22484.hsd1.ca.comcast.net] has quit [Killed (NickServ (GHOST command used by Raif_))] |
12:05 | | Raif_ [~corvusign@Nightstar-22484.hsd1.ca.comcast.net] has joined #Code |
12:05 | | Raif_ is now known as Raif |
13:04 | | EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout] |
13:06 | | MyCatVerbs [~rb6822@Nightstar-18478.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!] |
13:16 | | EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code |
13:31 | | gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code |
14:09 | | Reiver is now known as ReivZzz |
--- Log closed Tue Feb 20 15:03:34 2007 |
--- Log opened Tue Feb 20 15:06:53 2007 |
15:06 | | TheWatcher[wr0k] [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code |
15:06 | | Irssi: #code: Total of 7 nicks [1 ops, 0 halfops, 0 voices, 6 normal] |
15:06 | | mode/#code [+o TheWatcher[wr0k]] by ChanServ |
15:07 | | Irssi: Join to #code was synced in 25 secs |
15:07 | | MahalBEDDD [~Mahal@Nightstar-4998.worldnet.co.nz] has joined #Code |
15:08 | | ReivZzz [~reaverta@IRCop.Nightstar.Net] has joined #Code |
15:11 | | AnnoDomini [~farkoff@Nightstar-29085.neoplus.adsl.tpnet.pl] has joined #Code |
15:12 | | Chalain [~chalain@Admin.Nightstar.Net] has joined #Code |
15:12 | | Raif [~corvusign@Nightstar-22484.hsd1.ca.comcast.net] has joined #Code |
15:12 | | jerith [~jerith@IRCop.Nightstar.Net] has joined #Code |
15:12 | | ServerMode/#Code [+o Chalain] by Troika.TX.US.Nightstar.Net |
15:13 | | mode/#code [+o Chalain] by ChanServ |
15:14 | | jerith is now known as NSGuest-543 |
15:44 | | You're now known as TheWatcher |
16:20 | | MyCatStudies [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer] |
16:21 | | MyCatStudies [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code |
16:24 | | NSGuest-543 is now known as jerith |
16:34 | < jerith> | So, I found myself looking idly at static class variables in php. |
16:35 | | * jerith tries to scrub the dirt off his brain. |
16:35 | < jerith> | s/idly/with an idly-considered purpose in mind/ |
16:38 | < jerith> | Hmm, writing a parser in Python. |
16:40 | < jerith> | But first, Tea! |
16:40 | < jerith> | The clearly superior beverage! |
16:57 | | Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has joined #code |
16:57 | | mode/#code [+o Pi] by ChanServ |
17:00 | < jerith> | Ah, *that's* the problem. Vim's regexen are different to Python's. :-( |
17:22 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
17:52 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Gone] |
17:53 | | MahalBEDDD is now known as Mahal |
18:27 | < jerith> | I have no idea what to call this function I've just inveted. |
18:27 | < jerith> | +n |
18:27 | < jerith> | It's sort of like anti_map(). |
18:27 | < jerith> | It takes an item of data and a list of functions |
18:27 | < jerith> | (possibly with additional data) |
18:28 | < jerith> | And applies them one after the other to the data. |
18:28 | < jerith> | def chain_call(str, mappings): |
18:28 | < jerith> | for mapping in mappings: |
18:28 | < jerith> | str = mapping[0](str, *mapping[1:]) |
18:28 | < jerith> | return str |
18:29 | | gnolam is now known as Mechagnolam |
18:32 | | Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code |
18:34 | < jerith> | Suddenly I'm pining for sexps. |
18:36 | | * Janus is sure he's reading that wrong, but can't figure out how. |
18:38 | < jerith> | s-expressions. |
18:38 | < jerith> | Lisp. |
18:39 | | Mahal is now known as MahalWORK |
19:03 | | MyCatStudies is now known as MyCatVerbs |
19:06 | < MyCatVerbs> | jerith: (cons(cons(cons(cons(cons(cons(cons(cons(... |
19:22 | < MyCatVerbs> | 3ddeskd is sho damn shexeh. |
19:27 | | AnnoDomini [~farkoff@Nightstar-29085.neoplus.adsl.tpnet.pl] has quit [Killed (NickServ (GHOST command used by AbuDhabi))] |
19:27 | | AnnoDomini [~farkoff@Nightstar-29389.neoplus.adsl.tpnet.pl] has joined #Code |
19:36 | | Vornicus-Latens [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout] |
19:37 | | Vornicus-Latens [~vorn@67.50.40.ns-3674] has joined #code |
19:42 | < Janus> | May I ask a question about the best way to store a bunch of constant variables? |
19:43 | < jerith> | No. |
19:43 | | * jerith grins. |
19:43 | < jerith> | Ask questions about code, not questions about questions. ;-) |
19:43 | < Janus> | Alrighty. What's the best way to store a bunch of constant variables..? |
19:44 | < jerith> | In what language? |
19:44 | < jerith> | And "store" how? |
19:44 | < jerith> | Between function calls? Between runs of the app? Between different systems? |
19:46 | < MyCatVerbs> | Between your TOES! |
19:46 | < MyCatVerbs> | (use a microfiche) |
19:46 | < Janus> | C++. The variables would be used for stuff like... the names of certain sprite sheets, and other resource things. |
19:47 | | * Janus has a lot of overhead between his toes, so it wouldn't fit. |
19:48 | < jerith> | You're upside down? |
19:48 | < jerith> | (How else could you get overhead between your toes?) |
19:48 | < jerith> | Hmm... |
19:49 | < jerith> | I'd keep that in a config or data file of some kind. Load it into a resource class and pass ti around to whatever needs it. |
19:49 | < jerith> | Then again, I'm pretty much a dynamic-languages guy these days. |
19:50 | < Janus> | It's a double joint thing. I was thinking of using a static struct to put them in, but I'd have to recompile everytime to add or change anything. I guess a normal class would work much better then. |
19:51 | < jerith> | If in doubt, don't hardcode. |
19:52 | | GeekSoldier [Rob@Nightstar-3513.pools.arcor-ip.net] has joined #code |
19:54 | | GeekSoldier [Rob@Nightstar-3513.pools.arcor-ip.net] has quit [Quit: Download IceChat at www.icechat.net] |
19:56 | < Janus> | Thanks for the help, Sir jerith~ |
19:56 | | * jerith takes a bow. |
19:56 | | * jerith surreptitiously puts the bow back, hoping nobody noticed the pilferage. |
19:57 | < MyCatVerbs> | Janus: textuality principle (if Unix geekery's your thing) says you should make all files simple plaintext unless there's a specific reason for them not to be. In this case, a *very* simple and starightforward config file format sounds like it'd suffice. |
19:57 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
19:58 | | mode/#code [+o Chalcedon] by ChanServ |
19:59 | < Janus> | Aye-aye then. |
19:59 | | * Janus googles Unix, whatever that is. |
20:00 | | * jerith giggles. |
20:02 | <@ToxicFrog> | ... |
20:03 | | * AnnoDomini laughs out loud. |
20:03 | < jerith> | (I'm assuming that was irony rather than ignorance...) |
20:05 | < Janus> | (Of course, irony... I know all about his Unix business~) |
20:11 | < MyCatVerbs> | Janus: testuality principle (if Eunuchs geekery's your thing) says I WILL CUT YOUR BALLS OFF! |
20:11 | | * jerith tries to parse that in a meaningful way. |
20:13 | | * Janus regrets using Google Image. |
20:16 | <@ToxicFrog> | And making your files plaintext is a good idea whether you're on UNIX or not. |
20:17 | <@ToxicFrog> | Personally, I (unsurprisingly) favour Lua for this; it's much easier to use for this than XML/ |
20:21 | <@ToxicFrog> | Somewhere I have a C library kicking around that uses liblua to implement hash tables and persistent config files. |
20:22 | < jerith> | If your data's complex enough, you could look for a YAML library or something. |
20:23 | < MyCatVerbs> | YAML? |
20:26 | < jerith> | !stfw yaml |
20:26 | < jerith> | Aww, no bot. :-/ |
20:27 | < jerith> | YAML Ain't a Markup Language. |
20:27 | < jerith> | Sort of a superset of JSON. |
20:27 | < Vornicus-Latens> | YAML: a data serialization language. Looks kinda like ini, really |
20:27 | < jerith> | Arbitrarily nestable, basic data types include hashes and arrays. |
20:28 | < jerith> | Anyways, bedtime for me. |
20:28 | < jerith> | G'night all. |
20:28 | < MyCatVerbs> | Nini. Sleep well. |
20:28 | < Janus> | nighty-nite, Sir. |
20:30 | <@ToxicFrog> | 'night, jerith. |
20:31 | <@ToxicFrog> | YAML, IME, falls into the same problem as XML. |
20:32 | <@ToxicFrog> | That is, it doesn't do anything you can't do with lua_Tables, and does it with a vastly larger and more complicated and hard to use library and API. |
20:33 | < MyCatVerbs> | S-expressions! S-expression! |
20:33 | < MyCatVerbs> | Make the whole work look like LISP! |
20:33 | <@ToxicFrog> | You could do that, too. |
20:34 | <@ToxicFrog> | Nice and easy to parse. |
20:34 | < MyCatVerbs> | Nigh-incomprehensible to human eyes, but still beautiful. |
21:00 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
21:00 | | Forj [~Forj@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: Gone] |
21:13 | | EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout] |
21:14 | | Mechagnolam is now known as gnolam |
21:15 | | Vornicus-Latens is now known as Vornicus |
21:16 | | Vornicus is now known as NSGuest-548 |
21:16 | | NSGuest-548 is now known as Vornicus |
21:16 | | EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code |
21:23 | < MyCatVerbs> | ...is there any type system on Earth in which you can define a function of type x which returns a function (or a function pointer) of type x? |
21:23 | < MyCatVerbs> | Without having to poke a hole in it, ? la void*. |
21:24 | < Vornicus> | I'm not sure what you just asked. |
21:24 | < Vornicus> | If you want static typing of function pointers, C and C++ both do that. |
21:25 | < Vornicus> | except for the whole "I can't build functions on the fly" thing. |
21:25 | < MyCatVerbs> | Vornicus: function f, when called, might return either g or h depending on some internal condition. |
21:25 | < Vornicus> | okay. |
21:26 | < MyCatVerbs> | Vornicus: functions g and h might return (f or h) and (f or g) respectively, depending on some internal condition. |
21:26 | < Vornicus> | It can be done. |
21:26 | < Vornicus> | I think anyway. |
21:26 | < MyCatVerbs> | You have a state machine which is doing this: func = f; while (condition) { func = func(); } |
21:27 | < MyCatVerbs> | Vornicus: I don't know of a way to make it legal in any type system, except for in C by using a void* to work around the type system. |
21:28 | < Vornicus> | I don't see why you can't do it in C. |
21:29 | < MyCatVerbs> | Vornicus: try writing the function pointer decleration without resorting to returning a (void*) and you'll soon see what I mean. |
21:29 | | * Vornicus tries |
21:29 | < Vornicus> | ...oh, shit, it's recursive, isn't it. |
21:29 | < Vornicus> | ...you can possibly do some sort of wacky encapsulation in C++. |
21:30 | < MyCatVerbs> | Vornicus: yeah, hence my pondering. I don't know of any type system that lets you get away with it whatsoever. :/ |
21:31 | < Vornicus> | Lisp can get away with it, but I don't know if you can really count that as a type system. |
21:31 | < Vornicus> | indeed, you can get away with it in any dynamically typed language that lets you throw around functions as first class objects. |
21:32 | < MyCatVerbs> | I think there's an outside chance that there's a way to write it in ML/Haskell, but I think that if you actually fed that train of symbols into the compiler you'd cause the type inference mechanism to go into an infinite loop or something. |
21:32 | | EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout] |
21:33 | | You're now known as TheWatcher[afk] |
21:33 | < Vornicus> | You have to wrap it in a class in Java or C++ - conveniently, Java has some abstract class sugar that can do it. |
21:34 | < MyCatVerbs> | Yeah, classwrapping makes it easier, at the albeit of being only second-class ;) |
21:42 | <@ToxicFrog> | MyCatVerbs: depends on what you mean by "type system" |
21:42 | <@ToxicFrog> | Lua and I think Bash can both do that asily. |
21:44 | | EvilDarkLord [~jjlehto3@Nightstar-2194.vipunen.hut.fi] has joined #code |
21:44 | < MyCatVerbs> | ToxicFrog: ...bash has first-class functions? |
21:45 | < MyCatVerbs> | Or do you just do something like "FUNCNAME = f" "while (( blah )) FUNCNAME = $FUNCNAME(x)" ? |
21:45 | < MyCatVerbs> | Though, if you were doing that, I'd have to point out that bash doesn't have a type system *at all*. :/ |
21:47 | | * Vornicus tries to figure out how to store combinators in Python. |
22:10 | <@ToxicFrog> | I think it does, yes. |
22:10 | <@ToxicFrog> | And as I said, this depends on what you mean by type system. |
22:11 | | You're now known as TheWatcher[T-2] |
22:11 | <@ToxicFrog> | Bash is strongly typed, but weakly bound and with unsigned functions. |
22:11 | <@ToxicFrog> | Just as Lua. |
22:13 | | You're now known as TheWatcher[zZzZ] |
22:14 | <@ToxicFrog> | This seems like kind of a poor way to implement a state machine, though. |
22:14 | <@ToxicFrog> | You don't return the functions and use an external loop. |
22:14 | <@ToxicFrog> | You just use tail calls. |
22:16 | | Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has joined #code |
22:25 | | * MyCatVerbs facepalms. |
22:25 | < MyCatVerbs> | Tail calls? TAIL CALLS! AAAAAA! Of course, I'm embarrassed that didn't occur to me. |
22:45 | | Takyoji [~Takyoji@Nightstar-25280.dhcp.roch.mn.charter.com] has joined #code |
22:46 | < Takyoji> | Apparently I was able to make the 'RewriteRule' command to work yesterday, but I screwed it up and don't know what is wrong. The case is, I'm trying to rewrite a URL of ^store/category/(var 1) to ^store/categories.php?name=(var 1) |
22:47 | < Takyoji> | I'm trying this: RewriteRule ^store/category/.*$ /store/categories.php?name=$1 [QSA,L] |
22:58 | | timelady [~romana@Nightstar-14612.lns7.adl2.internode.on.net] has joined #Code |
22:58 | | timelady [~romana@Nightstar-14612.lns7.adl2.internode.on.net] has quit [Connection reset by peer] |
23:00 | | timelady [~romana@Nightstar-14612.lns7.adl2.internode.on.net] has joined #Code |
23:05 | | AnnoDomini [~farkoff@Nightstar-29389.neoplus.adsl.tpnet.pl] has quit [Quit: If nothing we do matters, all that matters is that we do.] |
23:46 | | MyCatVerbs is now known as MyCatDoesNotSleep |
23:50 | | ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Ping Timeout] |
--- Log closed Wed Feb 21 00:00:30 2007 |