←2004-05-27 2004-05-28 2004-05-29→ ↑2004 ↑all
00:08:49 <lament> i think 999 would be a good point.
00:09:01 <lament> So the system is decimal overall, but with a larger unit of 999
00:09:58 <lament> 0, 1, 2, ..., 10, 11, 12, ... 99, 100, 101, ... 997, 998, A1, A2
00:12:41 <fizzie> base-42 with 42 suitable digit symbols might be nice too.
00:12:53 <lament> bah
00:13:07 <lament> speaking more seriously, base 12 would be excellent.
00:15:53 <mooz-> how is 12 better than 6?
00:16:11 <lament> mooz-: shorter numbers, obviously
00:16:17 <lament> mooz-: also divisible by four which is nice
00:16:34 <lament> sufficiently close to 10 so that we know it would work well
00:31:44 <lament> hm, is there a cpu tarpit?
01:21:50 -!- cedricshock has joined.
02:29:43 -!- calamari_ has joined.
03:20:37 -!- Toreun has quit ("Download Gaim: http://gaim.sourceforge.net/").
03:20:58 -!- Toreun has joined.
03:39:36 -!- calamari_ has quit (Read error: 110 (Connection timed out)).
07:22:24 -!- cmeme has quit (Remote closed the connection).
07:26:11 -!- cmeme has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
09:02:09 -!- kosmikus|away has changed nick to kosmikus.
09:14:55 -!- lament has quit (Remote closed the connection).
09:16:34 -!- cedricshock has quit ("Leaving").
09:20:38 -!- lament has joined.
10:27:03 -!- Keymaker has joined.
10:46:21 <fizzie> morning.
10:46:39 <Keymaker> :)
10:47:27 <Keymaker> dcb been here?
10:58:45 <fizzie> nope.
10:59:00 <Keymaker> ok'
10:59:00 <fizzie> "what, we others are not good enough for you?"
10:59:06 <Keymaker> hehe
10:59:39 <Keymaker> noo, i just want to change a couple of words with him, that guy seems to be genius
11:05:38 <mtve> so we are.
11:05:49 <Keymaker> ok ok :)
11:06:09 <Keymaker> we - 1 to be exact, i'm not too bright
11:06:29 <Keymaker> :)
11:10:30 <fizzie> /me is relatively away. trying to teach myself dsp here, since the person who wrote this library I'm supposed to convert from floating-point math to integer math (to run on the phone, you see) doesn't work for us any longer.
11:11:51 <Keymaker> ok, good luck
11:35:40 <fizzie> the dsp guide is very encouraging. "Warning! Don't try to understand the shape of the real and imaginary parts: your head will explode!"
11:35:58 <Keymaker> :)
11:59:56 <Keymaker> Hmmm, really strange, one cd I bought smells like chicken noodles.. *confused*
12:47:24 <Keymaker> Hmmm, it's Back to the Future time. See you in the future.
12:47:27 <Keymaker> Or past.
12:47:27 -!- Keymaker has quit.
14:51:51 -!- grumpy_old_one has joined.
15:47:00 -!- cmeme has quit (zelazny.freenode.net irc.freenode.net).
15:47:00 -!- edwinb has quit (zelazny.freenode.net irc.freenode.net).
15:47:52 -!- cmeme has joined.
16:00:35 -!- edwinb has joined.
17:25:24 -!- kosmikus has changed nick to kosmikus|away.
18:47:31 -!- calamari_ has joined.
20:07:15 -!- Keymaker has joined.
20:07:27 <Keymaker> hiya
20:09:40 <calamari_> hi keymaker
20:09:44 <Keymaker> hi
20:13:26 <fizzie> evening.
20:14:27 <Keymaker> evening
20:14:32 <Keymaker> been here the whole day? :)
20:15:30 <calamari_> well, the c parser is pretty much done
20:16:20 <Keymaker> hmmm, what the parser means?
20:17:16 <calamari_> keymaker: it takes a c source file and decides what the tokens are .. like "int" "main" "(" ")" "{" .. etc
20:17:19 <fizzie> depends on your definition of being.
20:17:35 <Keymaker> ah
20:18:00 <Toreun> calamari_ : what are you going to use this C parser for? another C compiler?
20:18:14 <fizzie> remember to parse 'a+++++b' to 'a', '++', '++', '+', 'b' (instead of a ++ + ++ b)
20:18:17 <calamari_> yeah.. I've never written a c compiler before
20:18:37 <calamari_> it does that.. but I can double check :)
20:19:21 <Toreun> fizzie: stuff like that is one of the reasons I never finished a non-esoteric compiler
20:20:30 <fizzie> probably most parsers would do it like that, the latter choice needs more intelligence. (and goes against the Standard.)
20:20:38 <calamari_> the way I did the operators was reading 2 characters at a time, then checking in a string like this "++--+ - (etc)" it will find a match with 2 chars before a match with one.. it recognizes the space as a wildcard
20:22:39 <calamari_> it worked fine BD BD BE (or ++ ++ +)
20:23:15 <calamari_> with spaces it will do a++ + ++b
20:23:47 <calamari_> iirc, with c you use the largest operator that matches
20:25:06 <fizzie> the Standard says, and I quote ISO/IEC 9899:1999, chapter 6.4, section 4: "If the input stream has been parsed into preprocessing tokens up to a given character, the next preprocessing token is the longest sequence of characters that could constitute a preprocessing token."
20:25:23 <fizzie> plus one exception to that.
20:25:39 <calamari_> so, what I said in better english :)
20:26:34 <calamari_> what is the exception?
20:26:47 <fizzie> the exception is: "a header name preprocessing token is only recognized within a #include preprocessing directive, and within such a directive, a sequence of characters that could be either a header name or a string literal is recognized as the former."
20:27:56 <calamari_> ahh.. I won't be supporting #includes so I'm good
20:28:10 <Toreun> a c compiler without #includes?
20:28:13 <fizzie> then it's not a C compiler you're writing.
20:28:22 <calamari_> at least not in the normal way.. because bf doesn't really work well with file i/o :)
20:28:42 <Toreun> this c compiler is in bf?
20:29:10 <calamari_> toreun: not yet.. can't bootstrap until I finish
20:29:38 <fizzie> is this a 'c compiler compiling to brainf*ck' or a 'c compiler written in brainf*ck compiling to foo'?
20:29:44 <calamari_> toreun: I did the bfbasic compiler, so once I get past all the extra expression stuff in c it shouldn't be much different
20:29:54 <Toreun> oh, ok
20:29:57 <calamari_> fizzie: 'c compiler compiling to brainf*ck'
20:30:05 <fizzie> ah. that makes more sense.
20:30:06 <Toreun> ooh that's interesting
20:30:15 <Keymaker> interesting :)
20:30:17 <Toreun> does it optimize?
20:30:22 <calamari_> of course not :)
20:30:27 <Toreun> good
20:30:53 <fizzie> someone (maybe you?) was talking about creating a brainf*ck target for gcc. although I think that might be even harder to write than a simple "C" compiler.
20:30:57 <calamari_> I had a breakthrough on how I would handle memory and pointers, so I decided to go for it
20:30:58 <Toreun> though having loops upon loops upon loops would definitely be fun
20:31:08 <calamari_> fizzie: yeah, that was me.. I gave up on the idea
20:31:26 <fizzie> anyway, I wouldn't want to have to create a Standard-conforming C compiler.
20:31:43 <calamari_> fizzie: I checked gcc, sdcc, tcc, lcc.. none were easy to write a backend for
20:32:18 <fizzie> for a nice example of the language used in the Standard, see http://gehennom.org/~fizban/tmp/restrict.html
20:32:53 <calamari_> fizzie: I'm trying my best not to do things intentionally against the standard (i.e. void main()), but at the same time I'm leaving things out
20:33:32 <calamari_> fizzie: so if someone wants to add on, they can
20:34:26 <calamari_> anyhow.. the memory system is basically a giant array on top of memory. I think I'm going with 32-bit pointers
20:35:01 <calamari_> that way I can go to any memory cell I want without < > headaches
20:36:16 <calamari_> goto's will be handled similarly to bfbasic, but I think I'll make them 16-bit. function names will be 6 characters long and follow the same idea
20:37:02 <Keymaker> is 'bfbasic' some program released?
20:37:31 <calamari_> yeah, http://lilly.csoft.net/~jeffryj/compilers/bfbasic/bfbasic.html
20:37:37 <Keymaker> cheers
20:38:13 <calamari_> I wrote it in java.. that was so much easier than c
20:38:34 <fizzie> what are you writing this c compiler in, then?
20:38:42 <calamari_> c this time
20:39:26 <Keymaker> this sounds like really hard job to do, how long you've been working on it?
20:39:34 <calamari_> two days
20:39:40 <Keymaker> ok
20:39:58 <Keymaker> well, good luck with it :)
20:40:24 <calamari_> yeah.. it shouldn't be as bad as last time, because most of the bf code has already been written
20:40:27 <calamari_> thanks tho :)
20:41:51 <Toreun> what memory limitations are you gonna have? I notice your basic one only supports 256 variables
20:41:57 <Toreun> (if any)
20:43:52 <calamari_> toreun: 32-bit memory, variable names will be stored in some perverted kind of linked list (no structs), so hopefully no limit there. 65536 labels per function
20:46:27 <Toreun> is there a standard for that?
20:46:48 <calamari_> for what
20:48:33 <calamari_> actually 65534 labels, because 0 would be reserved for exit and 1 for return
20:50:03 <calamari_> hmm.. 0 could be a function call instead, that would handle exit
20:50:20 <calamari_> still deciding on certain things ;)
20:51:07 <calamari_> also, I'm not sure how big a stack I'll need
20:51:30 <Toreun> whoops I just made a stupid mistake with the arguments for my bf interpreter
20:51:58 <Keymaker> what kind of?
20:52:10 <Toreun> rewriting my interpreter with the debugging dump
20:52:25 -!- cedric_ has joined.
20:52:44 <calamari_> toreun: but, hopefully to answer your question, there isn't much of a standard for memory size anyways, is there?
20:53:09 <Toreun> true. wow, 16 people in this room, is that a record or something
20:53:27 <calamari_> toreun: the program just grows with > to the right.. it's up to the bf interp/comp to handle big memory
20:53:46 <fizzie> the Standard specifies a few lowest possible limits for c.
20:55:21 <fizzie> 127 nesting levels of blocks, 63 nesting levels of conditional inclusion, 12 pointer, array, and function declarators (in any order) modifying an arithmetic, structure, union or incomplete type in a declaration, 63 nesting levels of parenthesized declarators within a full declarator.
20:56:25 <calamari_> what are blocks.. is that what I'm calling a function call?
20:56:52 <fizzie> anything with {}s probably. I'll look at the formal definition soon.
20:56:56 <fizzie> 63 nesting levels of parenthesized expressions within a full expression, 63 significant initial characters in an internal identifier or macro name (you'll be failing this?).
20:57:03 <calamari_> that's okay.. not a big deal
20:57:16 <fizzie> something broken in my pdf, makes no sense, apparently few lines are missing.
20:58:00 <fizzie> erh, ok.
20:58:10 -!- calamari- has joined.
20:58:18 <calamari-> argh :)
20:58:30 <Toreun> calamari, you've been cloned
20:58:35 <calamari-> yeah,.. I was thinking about handling longer function names but it would slow things down a lot
20:59:44 <calamari-> I use the name to emulate a jump (checks each label until it finds the one matching the call)
20:59:44 <fizzie> "31 significant characters in an external identifier (each universal character name specifying a short identifier of 0000FFFF or less is considered 6 characters, each universal character name specifying a short identifier of 00010000 or more is considered 10 characters, and each extended source character is considered the same number of characters as the corresponding universal character name, if any)"
21:01:28 <fizzie> 127 function parameters in a function/macro call or a declaration.
21:02:11 <fizzie> nice lists of requirements there.
21:02:27 <calamari-> then I won't be following the exact c standard
21:02:44 <fizzie> remember to implement trigraphs, everyone loves those.
21:02:44 <calamari-> maybe I couldn't call it c then? :)
21:03:00 <calamari-> the person that loves them can implement them, then ;)
21:04:04 <fizzie> hey, it's a simple thing to do, just translate trigraphs to "real characters" in some suitable preprocessing phase.
21:04:11 <calamari-> I just want to get things working first before adding features (like bfbasic last time, it started off way primitive)
21:05:08 <fizzie> (actually the only sensible suitable stage is before anything else, trigraphs need to be replaced before any other processing takes place.)
21:05:17 <Toreun> how are floats being implemented?
21:05:44 <Toreun> you gonna create a float library for bf?
21:06:06 <fizzie> too bad there isn't a trigraph for ';', otherwise the comp.lang.c practice of writing ;-less valid C programs would be a lot easier.
21:06:44 <fizzie> maybe I should shut up about Standard C, it's not that esoteric after all.
21:07:03 <calamari-> toreun: they're not being implemented
21:07:38 <calamari-> here's a question
21:07:48 <calamari-> how can I do signed variables
21:09:03 <calamari-> I was thinking of doing it the asm way, but there are problems with it, because on negative numbers + and - are swapped
21:09:27 <fizzie> "the asm way"?
21:10:30 <fizzie> how do you store larger-than-char variables anyway? as consecutive bytes in the brainf*ck array?
21:11:30 <fizzie> I am thinking your compiler will possibly generate rather large brainf*ck files.
21:11:48 <calamari-> fizzie: yeah , "consecutive" isn't right next to each other tho, because there is overhead in the bf array
21:12:00 <calamari-> yeah they will be huge :)
21:12:22 <calamari-> so you guys need to start writing bf code optimizers :P
21:13:13 <calamari-> I think it will be even worse than bfbasic, because of the extra mmemory/array limits I imposed on bfbasic
21:14:44 -!- calamari_ has quit (Connection reset by peer).
21:15:09 <fizzie> I was supposed to write a scheme interpreter in postscript once.
21:15:20 <fizzie> but that's still in the 'planning' stage mostly.
21:15:55 <fizzie> there were few ways I could "cheat", like use the built-in gc provided by recent enough postscript environments, but then it wouldn't run in all printers.
21:20:31 <fizzie> hey, one of our local tv channels will show the 'dark star' movie.
21:20:52 <Keymaker> now?
21:21:01 <fizzie> tomorrow.
21:21:05 <Keymaker> ok
21:21:13 <Keymaker> better remember :)
21:21:29 <fizzie> although I think they (or some other channel) showed it relatively recently.
21:21:35 <fizzie> and it made ~no sense anyway.
21:21:39 <calamari-> fizzie: thanks for the c specs, btw. I probably won't end up following them, but at least I can make a better note in the docs of where things are lacking
21:22:15 <fizzie> I'm rather sure that not even 'gcc -ansi -pedantic -trigraphs' follows the spec to the letter.
21:28:10 <fizzie> well, actually I was reading from the c99 spec, and gcc even officially only partially support that.
21:28:41 <fizzie> I wonder where I have misplaced my (non-physical) copy of c89/c90.
21:47:19 <calamari-> bbl
21:47:20 -!- calamari- has quit ("Leaving").
21:48:33 <fizzie> what a noisy channel this has become. where are the weeks of silence we used to have?
21:48:45 <lament> do you miss them so much?
21:48:52 <lament> Cause if you do, we could +q everybody.
21:49:40 <Keymaker> :)
21:50:05 <fizzie> ah right, +q, that funky danced-ircd feature.
21:50:30 <fizzie> we don't have it over there in ircnet.
22:05:06 <lament> hm
22:05:37 <lament> is there only one optimizing brainfuck compiler?
22:06:31 <fizzie> there can be only one.
22:08:30 <lament> i'm serious!
22:08:34 <lament> very!
22:09:28 <mtve> http://www.nada.kth.se/~matslina/awib/
22:10:05 <lament> that one doesn't really optimize much
22:11:26 <fizzie> I seem to recall a javascript thing did pretty nice "code optimization" for the 'trace' command output.
22:15:28 <fizzie> like, when I input "++++[>+<-]" and press 'execute-trace', it outputs "p[0] += 4 (= 4)" "p[1] += p[0] (= 4)" "p[0] = 0" into the trace window.
22:16:01 <fizzie> it doesn't do anything _too_ clever, though, and I haven't looked at the actual interpreter itself. is at http://home.planet.nl/~faase009/Ha_bf_online.html anyway.
22:18:17 <lament> yes.
22:20:50 <fizzie> oh, there's a "compile to C" button.
22:20:58 <fizzie> hasn't even noticed.
22:20:58 <lament> yes.
22:21:01 <lament> yes.
22:21:07 <fizzie> s/has/had/
22:21:24 <lament> yes.
22:35:36 -!- Toreun has quit (Read error: 104 (Connection reset by peer)).
22:38:33 <Keymaker> hmmm
22:38:46 <Keymaker> I think I'll go, good night everyone. :)
22:38:53 -!- Keymaker has quit.
23:33:39 -!- dbc has joined.
23:34:06 -!- dbc has quit (Client Quit).
23:42:15 -!- cedric_ has changed nick to cedricshock.
←2004-05-27 2004-05-28 2004-05-29→ ↑2004 ↑all