00:08:49 i think 999 would be a good point. 00:09:01 So the system is decimal overall, but with a larger unit of 999 00:09:58 0, 1, 2, ..., 10, 11, 12, ... 99, 100, 101, ... 997, 998, A1, A2 00:12:41 base-42 with 42 suitable digit symbols might be nice too. 00:12:53 bah 00:13:07 speaking more seriously, base 12 would be excellent. 00:15:53 how is 12 better than 6? 00:16:11 mooz-: shorter numbers, obviously 00:16:17 mooz-: also divisible by four which is nice 00:16:34 sufficiently close to 10 so that we know it would work well 00:31:44 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 morning. 10:46:39 :) 10:47:27 dcb been here? 10:58:45 nope. 10:59:00 ok' 10:59:00 "what, we others are not good enough for you?" 10:59:06 hehe 10:59:39 noo, i just want to change a couple of words with him, that guy seems to be genius 11:05:38 so we are. 11:05:49 ok ok :) 11:06:09 we - 1 to be exact, i'm not too bright 11:06:29 :) 11:10:30 /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 ok, good luck 11:35:40 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 :) 11:59:56 Hmmm, really strange, one cd I bought smells like chicken noodles.. *confused* 12:47:24 Hmmm, it's Back to the Future time. See you in the future. 12:47:27 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 hiya 20:09:40 hi keymaker 20:09:44 hi 20:13:26 evening. 20:14:27 evening 20:14:32 been here the whole day? :) 20:15:30 well, the c parser is pretty much done 20:16:20 hmmm, what the parser means? 20:17:16 keymaker: it takes a c source file and decides what the tokens are .. like "int" "main" "(" ")" "{" .. etc 20:17:19 depends on your definition of being. 20:17:35 ah 20:18:00 calamari_ : what are you going to use this C parser for? another C compiler? 20:18:14 remember to parse 'a+++++b' to 'a', '++', '++', '+', 'b' (instead of a ++ + ++ b) 20:18:17 yeah.. I've never written a c compiler before 20:18:37 it does that.. but I can double check :) 20:19:21 fizzie: stuff like that is one of the reasons I never finished a non-esoteric compiler 20:20:30 probably most parsers would do it like that, the latter choice needs more intelligence. (and goes against the Standard.) 20:20:38 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 it worked fine BD BD BE (or ++ ++ +) 20:23:15 with spaces it will do a++ + ++b 20:23:47 iirc, with c you use the largest operator that matches 20:25:06 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 plus one exception to that. 20:25:39 so, what I said in better english :) 20:26:34 what is the exception? 20:26:47 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 ahh.. I won't be supporting #includes so I'm good 20:28:10 a c compiler without #includes? 20:28:13 then it's not a C compiler you're writing. 20:28:22 at least not in the normal way.. because bf doesn't really work well with file i/o :) 20:28:42 this c compiler is in bf? 20:29:10 toreun: not yet.. can't bootstrap until I finish 20:29:38 is this a 'c compiler compiling to brainf*ck' or a 'c compiler written in brainf*ck compiling to foo'? 20:29:44 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 oh, ok 20:29:57 fizzie: 'c compiler compiling to brainf*ck' 20:30:05 ah. that makes more sense. 20:30:06 ooh that's interesting 20:30:15 interesting :) 20:30:17 does it optimize? 20:30:22 of course not :) 20:30:27 good 20:30:53 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 I had a breakthrough on how I would handle memory and pointers, so I decided to go for it 20:30:58 though having loops upon loops upon loops would definitely be fun 20:31:08 fizzie: yeah, that was me.. I gave up on the idea 20:31:26 anyway, I wouldn't want to have to create a Standard-conforming C compiler. 20:31:43 fizzie: I checked gcc, sdcc, tcc, lcc.. none were easy to write a backend for 20:32:18 for a nice example of the language used in the Standard, see http://gehennom.org/~fizban/tmp/restrict.html 20:32:53 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 fizzie: so if someone wants to add on, they can 20:34:26 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 that way I can go to any memory cell I want without < > headaches 20:36:16 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 is 'bfbasic' some program released? 20:37:31 yeah, http://lilly.csoft.net/~jeffryj/compilers/bfbasic/bfbasic.html 20:37:37 cheers 20:38:13 I wrote it in java.. that was so much easier than c 20:38:34 what are you writing this c compiler in, then? 20:38:42 c this time 20:39:26 this sounds like really hard job to do, how long you've been working on it? 20:39:34 two days 20:39:40 ok 20:39:58 well, good luck with it :) 20:40:24 yeah.. it shouldn't be as bad as last time, because most of the bf code has already been written 20:40:27 thanks tho :) 20:41:51 what memory limitations are you gonna have? I notice your basic one only supports 256 variables 20:41:57 (if any) 20:43:52 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 is there a standard for that? 20:46:48 for what 20:48:33 actually 65534 labels, because 0 would be reserved for exit and 1 for return 20:50:03 hmm.. 0 could be a function call instead, that would handle exit 20:50:20 still deciding on certain things ;) 20:51:07 also, I'm not sure how big a stack I'll need 20:51:30 whoops I just made a stupid mistake with the arguments for my bf interpreter 20:51:58 what kind of? 20:52:10 rewriting my interpreter with the debugging dump 20:52:25 -!- cedric_ has joined. 20:52:44 toreun: but, hopefully to answer your question, there isn't much of a standard for memory size anyways, is there? 20:53:09 true. wow, 16 people in this room, is that a record or something 20:53:27 toreun: the program just grows with > to the right.. it's up to the bf interp/comp to handle big memory 20:53:46 the Standard specifies a few lowest possible limits for c. 20:55:21 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 what are blocks.. is that what I'm calling a function call? 20:56:52 anything with {}s probably. I'll look at the formal definition soon. 20:56:56 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 that's okay.. not a big deal 20:57:16 something broken in my pdf, makes no sense, apparently few lines are missing. 20:58:00 erh, ok. 20:58:10 -!- calamari- has joined. 20:58:18 argh :) 20:58:30 calamari, you've been cloned 20:58:35 yeah,.. I was thinking about handling longer function names but it would slow things down a lot 20:59:44 I use the name to emulate a jump (checks each label until it finds the one matching the call) 20:59:44 "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 127 function parameters in a function/macro call or a declaration. 21:02:11 nice lists of requirements there. 21:02:27 then I won't be following the exact c standard 21:02:44 remember to implement trigraphs, everyone loves those. 21:02:44 maybe I couldn't call it c then? :) 21:03:00 the person that loves them can implement them, then ;) 21:04:04 hey, it's a simple thing to do, just translate trigraphs to "real characters" in some suitable preprocessing phase. 21:04:11 I just want to get things working first before adding features (like bfbasic last time, it started off way primitive) 21:05:08 (actually the only sensible suitable stage is before anything else, trigraphs need to be replaced before any other processing takes place.) 21:05:17 how are floats being implemented? 21:05:44 you gonna create a float library for bf? 21:06:06 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 maybe I should shut up about Standard C, it's not that esoteric after all. 21:07:03 toreun: they're not being implemented 21:07:38 here's a question 21:07:48 how can I do signed variables 21:09:03 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 "the asm way"? 21:10:30 how do you store larger-than-char variables anyway? as consecutive bytes in the brainf*ck array? 21:11:30 I am thinking your compiler will possibly generate rather large brainf*ck files. 21:11:48 fizzie: yeah , "consecutive" isn't right next to each other tho, because there is overhead in the bf array 21:12:00 yeah they will be huge :) 21:12:22 so you guys need to start writing bf code optimizers :P 21:13:13 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 I was supposed to write a scheme interpreter in postscript once. 21:15:20 but that's still in the 'planning' stage mostly. 21:15:55 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 hey, one of our local tv channels will show the 'dark star' movie. 21:20:52 now? 21:21:01 tomorrow. 21:21:05 ok 21:21:13 better remember :) 21:21:29 although I think they (or some other channel) showed it relatively recently. 21:21:35 and it made ~no sense anyway. 21:21:39 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 I'm rather sure that not even 'gcc -ansi -pedantic -trigraphs' follows the spec to the letter. 21:28:10 well, actually I was reading from the c99 spec, and gcc even officially only partially support that. 21:28:41 I wonder where I have misplaced my (non-physical) copy of c89/c90. 21:47:19 bbl 21:47:20 -!- calamari- has quit ("Leaving"). 21:48:33 what a noisy channel this has become. where are the weeks of silence we used to have? 21:48:45 do you miss them so much? 21:48:52 Cause if you do, we could +q everybody. 21:49:40 :) 21:50:05 ah right, +q, that funky danced-ircd feature. 21:50:30 we don't have it over there in ircnet. 22:05:06 hm 22:05:37 is there only one optimizing brainfuck compiler? 22:06:31 there can be only one. 22:08:30 i'm serious! 22:08:34 very! 22:09:28 http://www.nada.kth.se/~matslina/awib/ 22:10:05 that one doesn't really optimize much 22:11:26 I seem to recall a javascript thing did pretty nice "code optimization" for the 'trace' command output. 22:15:28 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 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 yes. 22:20:50 oh, there's a "compile to C" button. 22:20:58 hasn't even noticed. 22:20:58 yes. 22:21:01 yes. 22:21:07 s/has/had/ 22:21:24 yes. 22:35:36 -!- Toreun has quit (Read error: 104 (Connection reset by peer)). 22:38:33 hmmm 22:38:46 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.