00:00:00 --- log: started forth/04.11.16 00:06:35 --- quit: mur_ (Remote closed the connection) 00:07:08 --- join: mur (~mur@mgw2.uiah.fi) joined #forth 00:36:47 --- join: qFox (C00K13S@82-169-140-229-mx.xdsl.tiscali.nl) joined #forth 00:36:56 --- join: mur_ (~mur@mgw2.uiah.fi) joined #forth 00:39:16 --- quit: mur (Read error: 60 (Operation timed out)) 01:06:13 who has xperience w/ BIOS mangling ? 01:33:08 --- quit: qFox ("this quit is sponsored by somebody!") 01:56:59 --- quit: mur_ (Remote closed the connection) 01:57:45 --- join: mur (~mur@kyberias.uiah.fi) joined #forth 02:26:34 --- quit: warpzero (Excess Flood) 02:27:27 --- join: warpzero (~warpzero@dsl.103.mt.onewest.net) joined #forth 02:32:18 --- quit: Serg_penguin ("go off to swap some hardware") 02:41:14 --- join: Serg_penguin (~z@212.34.52.140) joined #forth 04:06:52 --- join: crc (crc@02-049.149.popsite.net) joined #forth 05:12:22 --- join: wincent (~wincent@void-109.pmnet.uni-oldenburg.de) joined #forth 06:13:15 --- quit: I440r_ ("Leaving") 06:27:56 --- join: ows (~ows@a81-84-114-211.netcabo.pt) joined #forth 06:45:39 --- quit: arke ("time to go to school - I'll be on and off for the next 9 hours") 07:01:02 --- nick: madwork_ -> madwork 07:04:21 --- quit: crc ("Time for bed... Goodnight!") 07:07:23 --- part: Serg_penguin left #forth 07:17:50 --- join: fridge (~fridge@dsl-220-253-75-214.NSW.netspace.net.au) joined #forth 08:50:04 --- join: Herkamire (~jason@h000094d30ba2.ne.client2.attbi.com) joined #forth 09:11:14 I just wrote a word-wrapping "more" for output on a small LCD panel, heh. 09:11:53 --- join: guest806 (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 09:11:56 --- nick: guest806 -> arke 09:11:59 --- mode: ChanServ set +o arke 09:12:30 hi 09:22:28 hi, "ARKE" 09:23:04 * fridge snorts 09:24:29 --- join: slava (~slava@CPE00096ba44261-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 09:27:22 hi slava!!!!11111111111oneoneoneoneoneoneone 09:29:21 o, i c how ti is... iam not teh 1337 enuf 4 u!!!11 dont say hi to ME then byatch!!!!!!!!1!1!!! 09:29:55 hi madwork ;) 09:30:10 ;P 09:30:12 arke arke arke 09:30:15 how my heart pines for thee 09:30:50 oh slava my dear 09:30:54 i admit my fear 09:30:56 of confessing my love 09:31:08 i'm going to a lecture 09:31:09 bbl 09:31:11 to the soap called dove 09:31:19 lol 09:31:21 for it lubes well on me 09:31:28 and should thus lube well on thee 09:31:46 will you not probe mine? 09:31:54 i promise it shall be fine. 09:32:02 * arke bows 09:35:37 --- join: qFox (C00K13S@82-169-140-229-mx.xdsl.tiscali.nl) joined #forth 09:36:41 qfox the dutch 09:36:46 sir 09:36:46 how i love you so much 09:36:49 oh.. 09:37:14 it only does waver 09:37:19 when i see sir slava 09:37:24 ...that didn't rhyme too well 09:37:40 I had a better one earlier :) 09:37:59 ok... i'm sure you do ;) 09:39:23 ^_^ 09:39:44 yeah 09:39:50 i had a whole love poem for slava 09:40:08 8 lines ..... :) 09:40:27 * qFox happy he's not slava 09:40:32 he left after that, but I don't know if he was disgusted, or if he's masturbating right now. 09:40:37 :) 09:40:45 i'd guess teh first. 09:46:16 :) 09:48:39 --- quit: robert ("leaving") 09:50:20 lol 09:50:24 its my fault :) 09:50:36 i could ban him. 09:50:41 should I? 09:50:43 do I have a reason? 09:50:44 ;) 09:53:38 why would you ban him for something YOU caused either way? 09:53:39 :) 09:53:56 maybe you should run for US president in 4 years 09:53:58 ;) 09:54:03 because I'm evil? >:) 09:54:10 hehehe 09:54:11 :) 09:54:15 naah, I'll be in germany. 09:54:19 3 hour drive from you. 09:54:21 and I like driving. 09:54:34 thank god for crappy public transportation 09:54:41 will make it quite hard to figure out where i'm stuck now 09:54:42 :p 09:54:45 ^_^ 09:55:17 where do you live in NL? 09:55:30 far far away from the german border 09:55:49 well, thats still "next door" for american terms, but hey :p 09:57:19 hehe. 09:57:24 on the coast, eh? 09:57:32 near it yes 09:57:55 fun 09:58:00 hrm. 09:58:08 probably not too far from where tim nietz lives 09:58:12 * arke sigh 09:58:17 or albert van der hoorst 09:58:18 :) 09:58:22 tim nietz? 09:58:27 euh... 09:59:44 ^_^_^^^^^__^_^__^^_^___^_^^_6__^^__^^_^_^__^_^^^_^_^__^_^_^_^_^_^: 10:00:08 (group of asians. one of them is being rearended) 10:00:15 lol 10:00:31 --- join: I440r_ (mark4@216-110-82-59.gen.twtelecom.net) joined #forth 10:01:03 huh, wtf is buoyancy 10:02:34 --- join: DirN (~bsex@horizon.fasthost.net) joined #forth 10:06:34 like 10:06:44 when something is floating on water, its buoyant 10:06:58 oh 10:07:11 hm ok appearantly thats included in hl2 now :p 10:12:02 hehehe ^_^_^_^_^_^____^_^_^_^_^_^^_^_^__^^_^^_^6_^__^_^_^__^^__^_^_^_^__^_^___^__^_^___^ 10:12:25 DirN: hi, may I ask who you are? :) 10:13:08 --- quit: arke ("CGI:IRC (EOF)") 10:14:18 arke, where have disappeared to? 10:15:42 ASau: he left, how can he answer your question? 10:15:50 logs. 10:16:20 hm. dirn new here? :) 10:17:36 gosh, 3 ppl asking me if i'm new here.. #forth must be desperate for newbies 10:17:47 desperate? 10:17:53 :) 10:18:07 i'd say we were friendly towards newcomers... 10:18:16 no. just always interested in new blood :) 10:18:21 fresh meat! 10:19:13 there's a bunch of regulars here. and a bunch of ppl that regularily idle here, so new nicks stand out quite fast 10:19:33 and um, yeah, as you noticed, we tend to welcome them :) 10:21:49 :P 10:26:02 --- nick: ender`zzz -> ender`work 10:29:29 so are u new to forth coding or an old hand ? 10:30:41 i know forth 10:31:26 would I be committing fraud if I modified what version my webserver reports itself as, in order to pass an external security audit? 10:34:01 --- quit: DirN ("DirN") 10:48:06 --- join: TheBlueWizard (TheBlueWiz@modem-145.nyc-tc03b.fcc.net) joined #forth 10:48:13 fridge: does the audit say you have to have a certain version? or that you must display a certain version 10:48:58 I once had to hack apache to display "Unknown Webserver 1.0" 10:49:08 just how serious is this "security audit" ? 10:49:10 :\ 10:50:19 lol 11:31:44 Hello wizard 11:34:32 mur terve :) 11:34:54 mitä kuuluu TheBlueWizard 11:37:06 well, I'm doing fine.....for now 11:38:08 when I get the chance, I may work on some isforth coding....among other things. Right now, chillin' here plus Web surfing. Later, I will wash my clothes 11:40:31 ja sinä? 11:40:53 (and you? for those who can't read Finnish) 11:44:22 ups :) 11:44:27 * mur on hidas :) 11:44:54 rakas vie aikani :) 11:48:48 * TheBlueWizard smiles re: mur saying he's slow 11:49:40 um...I tried to figure out "vie aikani", but I couldn't quite decipher it...."(something) fair-like?" 11:57:42 --- join: solar_angel (~jenni@Toronto-HSE-ppp3704838.sympatico.ca) joined #forth 12:25:08 --- join: WhidbeyIslndr (~ulicip@032-262-118.area1.spcsdns.net) joined #forth 12:36:42 --- join: [1]WhidbeyIslndr (~ulicip@032-262-118.area1.spcsdns.net) joined #forth 12:44:03 --- join: guest586 (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 12:46:06 --- quit: guest586 (Client Quit) 12:46:16 --- part: [1]WhidbeyIslndr left #forth 12:50:17 --- quit: WhidbeyIslndr (Read error: 104 (Connection reset by peer)) 12:53:38 --- quit: scope (Read error: 104 (Connection reset by peer)) 13:04:11 --- join: guest739 (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 13:05:05 hi everybody 13:05:15 hi slava solar_angel TheBlueWizard 13:05:17 --- nick: guest739 -> arke 13:05:22 --- mode: ChanServ set +o arke 13:05:43 hi arke 13:05:52 :) 13:05:54 hows life? 13:08:03 arke hiya 13:09:37 decent :) 13:10:17 :) 13:10:23 hi TheBlueWizard :) hows your life? 13:12:12 I'm doing fine....for now 13:13:23 :why only for now? :/ 13:16:30 um....long story 13:16:47 which I wouldn't want to discuss here 13:18:58 --- quit: arke ("CGI:IRC (EOF)") 13:29:52 big google is watching you! 13:31:20 me? 13:31:27 yes sir 13:31:37 yes miss 13:31:52 vie = takes 13:31:54 aika = time 13:32:51 qFox: heh....I haven't mentioned my situation online or any obviously recordable media...so, Google ain't watchin' me :) 13:33:30 mur: ah....kiitos :) 13:33:49 * mur on HYVIN hidas :) 13:34:26 google is still watching you :( 13:34:59 ha ha....oletko varattu? (are you occupied?) 13:35:20 * TheBlueWizard decides qFox is working for Google ;) 13:35:28 cool! 13:38:34 --- join: arke (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 13:38:48 --- mode: ChanServ set +o arke 13:39:26 arke hiya again 13:40:08 TheBlueWizard, varattu = taken by some girl / boy 13:40:12 dating 13:40:15 but, kyllä 13:40:21 hi 13:40:24 occupied as busy = kiireinen 13:40:29 hurried 13:40:31 litearlly 13:40:56 oh....hehe...I use the Finnish/English dictionary...not the best way to go at it...but I tried :) 13:42:51 hmm...I looked up on kiireinen..."hurried", "in a rush"...well, I was thinking of "busy" 13:47:07 --- join: allefant (elias@L0651P25.dipool.highway.telekom.at) joined #forth 13:47:12 --- join: rsync (~pavel@CPE000c41aac435-CM00111ae4f4cc.cpe.net.cable.rogers.com) joined #forth 13:53:30 is there a way to do programmed jumps in C? 13:53:55 programmed jumps? 13:53:56 like... 13:54:02 goto label; label: 13:54:03 ? 13:54:08 no like 13:54:11 ohhh 13:54:21 jmp addy+val where val is input 13:54:22 like a function pointer table? 13:54:26 yep 13:54:43 how 13:54:45 (functionptr+val)(); 13:54:48 gcc has a GNU extension that lets you do that 13:54:59 nah, you don't need extensions for it 13:55:22 I forgot what is the exact syntax for doing that. But note it is not ANSI conformant at all! 13:56:13 well, for jumps, its an extension 13:56:19 for calls its normal ANSI C 13:56:26 for jumps, you do goto &&value; 13:56:37 gforth uses that technique 13:56:44 there's suspiciously alot knowledge about C in this channel 13:56:45 :p 13:57:20 lol 13:57:30 qFox: some of us do know C, for sure....nothing suspicious about that! 13:57:39 i see 3 responses about a quite complicated task in c :p 13:57:45 * TheBlueWizard decides qFox is NOT working for Google after all :) 13:57:49 thank you 13:57:50 :D 13:58:14 :) 13:58:23 I used to be a C junkie before I discovered forth 13:58:27 so gimme a break ^_^ 13:58:29 you mean longjmp? that's in the C standard.. 13:58:36 my first forth used it 13:58:46 (for exceptions) 13:59:32 no, not jongjmp either :) 13:59:50 setjump and longjump are different from programmable gotos 14:00:20 setjump and longjump are just nasty 14:00:34 agreed 14:00:35 they are nice.. goto between functions :) 14:00:36 bye guys 14:00:41 i might be back in a moment 14:00:42 and people abuse them for everything from task switching to exception handling 14:00:46 and it's always hacky and nasty. 14:00:50 allefant: evil BASIC programmer!!!!! 14:00:58 my exception handler isn't hacky 14:01:03 --- quit: arke ("CGI:IRC (EOF)") 14:01:10 it calls setjmp, and any exception jumps there 14:01:14 I partly disagree...setjump and longjump are good for fast rewind back to starting points 14:01:22 without needing an extra if 14:01:45 yeah. they have their uses, just as goto does 14:02:39 hm, BASIC.. that reminds me, i also use setjmp/longjmp to implement GOSUB in a C->BASIC translator :) 14:04:03 that is, BASIC->C 14:04:24 heh 14:04:34 interesting approach...though I don't think that's necessary (then again....of course I assume the BASIC being translated to C is that classic blah blah variety, not the Visual Basic type) 14:04:38 goto is sensible... 14:04:46 but setjump/longjump are messy 14:04:54 you never know exactly how it's going to work internally 14:04:57 or how much it'll smash the stack 14:05:59 wtf do setjump/longjump do 14:06:12 solar_angel: they are not intended for "arbitrary" use...basically, you have to be aware of the stack pattern of function calls. Once you have that down pat, setjmp and longjmp aren't too bad 14:07:16 can you even do gotos in C 14:08:04 TheBlueWizard - well, okay, i agree... but at the lower level, there's still no telling how much havoc it can cause 14:08:11 warpzero: the actual implementation detail: setjmp saves the stack pointer, instruction pointer, and a few other critical registers, to a setjmp struct that you hands to it. Longjmp simply reload the registers with the values from the struct. In effect, this resets the stack pointer and the instruction pointer so that you "long jump" back to "starting point" right after the setjmp point 14:08:12 don't even TRY to use it with alloca() 14:08:21 warpzero - and yes, C has a goto. 14:08:47 TheBlueWizard - which works great as long as you're not doing too much optimization :P 14:09:03 warpzero: goto is a standard C statement...been there for AGES! (since K&R days :) 14:09:11 i did not know 14:09:17 solar_angel: yup...right 14:09:49 TheBlueWizard - the more you know about low-level gory details, the more afraid you get of longjmp 14:10:56 is alloca in the C standard? 14:11:02 ha ha....I ain't afraid of gory stuff (looking at my hands drenched in bloody bits) 14:11:28 TheBlueWizard - right... i'm just saying that you're likely to feel the same way, assuming that. 14:11:29 not sure if alloca is a C standard now....in the past, IIRC it isn't. 14:11:38 alloca was a standard at one point in time 14:11:46 i think it's considered deprecated and/or flat out dangerous now though 14:11:55 i know i never wanted to use it.. i think it doesn't work with msvc or something 14:12:07 longjmp works everywhere 14:12:24 well, it works in gcc *and* MSVC, at least 14:12:26 alloca can be dangerous (easily misused...in fact I think it is worse than setjmp/longjmp) 14:12:39 * warpzero goes and grabs a C book 14:13:05 TheBlueWizard - agreed. it's even more dangerous when used WITH longjmp :P 14:13:18 setjmp/longjmp are standard C routines....if a proper (ANSI) C compiler chokes on that, complain! :) 14:13:28 * TheBlueWizard nodsnodsnods 14:14:09 though I've forgotten why it is so...I never have used alloca in ages....did use setjmp/longjmp on a couple occasions 14:14:36 both do a lot of really nasty low-level stack manipulation 14:14:43 it's almost as bad as FORTH :P 14:15:04 ahha 14:15:13 K&R 1 says not to use goto 14:15:46 of course 14:15:53 everything about C says not to use goto 14:16:02 goto is used only by total novice and total expert programmers :P 14:16:10 and very little in the middle 14:16:25 i only use it in some standard situation, like break from a double loop 14:16:36 wtf happens if you goto a different function lol 14:16:41 breaking from a double loop, and doing staged-cleanups 14:16:44 warpzero - you can't 14:16:46 warpzero: um, goto is "strongly discouraged" (and rightly so)....but there are a lot of examples where goto simplifies the coding enormously, and is appropriate. Experienced programmers know when to use it....or not 14:16:56 TheBlueWizard - exactly. 14:17:45 solar_angel: you sounds like a seasoned C programmer...and take that as a compliment 14:17:59 thanks :) 14:18:26 actually... i'm an old C++ programmer that gave up due to language feature creep and switched to modernized C. 14:18:49 heh 14:20:05 okay how do i load all of stdin at once 14:20:52 while ((c = fgetc(stdin))>=0) buf[i++]=c; 14:21:10 heh...I loathe C++....its syntax is awful overall, and trying to keep track of EXACTLY what the f*** it is going on is so much headache (like, did you know that parentheses can be redefined?!) that it is not worth learning at all in my book 14:21:35 [15:20:54] heh...I loathe C++....its syntax is awful overall, and trying to keep track of EXACTLY what the f*** it is going on is so much headache (like, did you know that parentheses can be redefined?!) that it is not worth learning at all in my book 14:21:41 quoted for the truth 14:22:00 allefant: that dies when stdin closes though 14:22:10 TheBlueWizard - yes, i redefined parentheses (and square brackets) on a regular basis 14:22:10 redefining things should appeal to forth programers :) 14:22:16 that wasn't the bad part about C++ though 14:22:52 the thing that got me sick of it was the forced bindings to libstdc++ (ewwww, stl, it didn't even exist when i started using C++) 14:23:04 --- quit: warpzero (Remote closed the connection) 14:23:13 that, and the increasing assumption that we really want things to be RTTI-compatible. 14:23:23 and C++'s RTTI system SUCKS beyond measure 14:23:32 i miss the template system though 14:23:47 --- join: warpzero (~warpzero@dsl.103.mt.onewest.net) joined #forth 14:23:57 there should be a C with some of the useful features added 14:24:01 heh....oddly enough, back then when I was going at reinventing C language (on paper) of sorts, I selected a simple extension here (like putting const expression just so to replace those annoying #define ones)...later another small extension, and so on. I notice what I am getting starts to resemble C++. Surprised, I sat back and thought it over in my mind 14:24:08 warpzero: yes, not sure how else you can read of stfin 14:24:14 d 14:24:38 whoops 14:24:45 i just got xchat to crash 14:24:54 well... i used to use C++ as an extended C compiler 14:25:11 (i like being able to define my variables where i use them, that's what started me on it then... but C99 fixed that in C) 14:25:21 I eventually realized that C has too much "issues" to be adequately "extended" in a sensible manner, so it is necessary to change the C language somewhat to make the extending work better, unfortunately. Then I got busy with other things and I never pursed that line further 14:25:29 solar_angel: i like the // comments 14:25:43 yes, i always have to fix variable declaration when trying to compile my code with gcc < 3.0 or with msvc 14:25:46 warpzero - GCC has had // comments in C since even when i started 14:25:54 yeah but 14:26:05 im trying to write portable C here 14:26:21 i write portable C. GCC compiles for pretty much everything :P 14:26:25 C99 should be portable enough.. 14:26:34 yes, C99 is pretty portable. 14:26:49 does MSVC >6 support C99 features? 14:27:03 6 is the newest i've used, and it's really old 14:28:10 it's the main reason i need code to stay backwards compatible, gcc 2.95 users i could always tell to upgrade 14:28:20 i don't know... i don't really bother with MSVC 14:28:26 if i need windows, i just run it through mingw 14:30:31 --- join: arke (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 14:30:49 http://www.digitalmars.com/d/intro.html some things of this look nice 14:31:44 muahahahaha lol lol it sucks sooo much with netscape :) 14:31:45 D? 14:31:51 D has it's advantages... 14:31:54 --- quit: arke (Client Quit) 14:31:59 but the implementation leaves a lot to be desired. 14:32:30 solar_angel: yeah...but one disadvantage is that garbage collection is required, which makes it unsuitable for some development 14:32:51 oh, didn't know about garbage collection in D.. sounds bad to me 14:33:29 well... GC is a mixed bag. 14:33:52 i never seem to have problems with memory allocation 14:34:12 i'm just spoiled on my old C++ data structures library 14:34:17 i never had memory allocation problems with that 14:34:40 it's something i miss now that i'm back in C... but G++ has taken a bunch of wrong turns that i just can't abide. 14:35:35 heh...C++ library is quite rich...and for those quite knowledgeable with all those routines, programming can be sweet, at times (disclaimer: I never wrote a C++ program more than a simple "Hello World!" C++ style) 14:35:38 hm, i never could get myself around to use C++, when I try i just fall back to C - all the class initialization stuff you have to type 14:35:59 allefant: read(1 14:36:06 TheBlueWizard - my hatred for the C++ standard library knows no bounds. 14:36:40 (1? 14:37:21 allefant: read(1, bleh) 14:37:36 hmm...ok 14:38:30 ah, 1 is stdin 14:39:04 true, so you can of course use all the file functions with it 14:39:37 --- join: arke (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 14:39:44 but its breaking on \n 14:39:58 what is so bad in particular about the C++ standard? (oh, and i wrote about as much C++ as TBW) 14:40:39 the C++ standard was constantly changing under me as i used it 14:40:53 and no two compilers implemented the same version 14:40:53 warpzero: what should it do? 14:41:03 read bleh bytes then stop 14:41:36 --- mode: ChanServ set +o arke 14:41:45 I don't like C :) 14:41:58 smalltalk is better 14:42:01 and forth is even better 14:42:08 same with lisp 14:42:10 solar_angel: i see. i guess that is also related to the binary-incompatibility problem.. C++ libraries need to wrap everything in extern "C" or something 14:42:15 or rather, the general concept thereof ^_ 14:42:38 warpzero: hm, don't know. i still think a simple for() loop and fgetc should work 14:42:55 allefant - no... the extern "C" wasn't hard to work through 14:43:05 the language changed 14:43:11 i've been using C++ for a really long time 14:43:31 allefant: that causes the program to terminate 14:43:35 when its out of data 14:43:50 and it is still a pain though :) 14:44:01 warpzero: use feof 14:44:09 arke: ? 14:44:14 whoops, time to go 14:44:17 .. 14:44:20 nevermind 14:44:21 --- quit: solar_angel ("later") 14:44:24 bye solar_angle 14:44:29 angel* 14:44:31 lol 14:44:38 where did that slava go? argh! :) 14:44:43 arke: read seems to be working 14:45:05 do you mean, the loop terminates, or the program? 14:45:12 :) 14:45:34 allefant: the program, getc() on a dead stream will cause some signal... 14:46:10 while read() on a dead stream just returns 0 14:46:15 ah 14:46:51 signal(SIG_PIPE, SIG_IGN) would help maybe 14:47:07 aah i see 14:47:11 :) 14:47:48 arke: and getc is stupid because its inefficient as all fuck 14:48:05 i never care about that :P 14:48:32 explains why my forth implementation compiles so slow i guess 14:49:14 should replace the dictionary loop with some binary or hash search 14:50:25 yeap 14:50:33 binary searches rock 14:51:33 hehe. 14:51:51 if you have THAT much stuff in your dictionary, then you really need to rethink 14:52:21 is NULL a language keyword 14:52:40 or is it a stdlib define 14:53:33 NULL is a #define macro...customarily defined as either ((void *)0) or ((char *)0) 14:54:06 NULL is a define in stdio.h 14:54:22 I forgot what is the "final" definition of NULL nowadays...just find some standard .h file and stare at it :) 14:54:24 usually the former :) 14:54:24 what should i use for void * x = 0; 14:54:38 NULL :) 14:54:44 bleh 14:55:17 warpzero: modern C compiler will complain about that....type void *x = NULL; instead 14:55:45 it wont complain about 14:55:51 void *x = 0x00000000 :) 14:55:56 really? 14:56:03 void *x = '\0'; wonder if it complains about that 14:56:43 hmm 14:56:52 i need a parameterized macro 14:56:58 but ive forgotten how 14:57:46 ah ha 14:57:57 arke: I think it should complain...then again, hafta look at C language specification to make sure of that myself :) 14:58:56 anyone have a good C debug macro 15:00:13 mine is quite simplistic: #define D(x) x in debug mode, and #define D(x) in release mode 15:00:28 and D(printf("...", ...)) in code 15:00:32 I used to have a few nice homegrown debug macros...have long not used them since then thanks to interactive debuggers 15:00:39 --- join: Raystm2 (Rastm2@AC86D472.ipt.aol.com) joined #forth 15:00:55 TheBlueWizard: well i have #define DEBUG(m) fprintf(stderr, "... %s:%i %s\n", __FILE__, __LINE__, m); 15:01:22 though I'd recommend that you use assert() macro...it is a modern C macro...useful for debugging 15:01:26 but itd be nice to be able to do stuff like DEBUG("%i" i); 15:01:42 you could write a function with ... parameter 15:02:22 hmm 15:02:26 hm, just, how to pass __FILE__ and __LINE__.. 15:04:06 hm 15:04:10 how do you do ... with the pp 15:04:14 just a quick Hello, as I set up for the new DSL connection tomorrow. :) 15:04:23 i guess, either use gcc variable argument macros, or use (()) 15:04:33 i.e. D((x)) 15:04:39 allefant: __FILE__ and __LINE__ are special pseudo macros that the C compiler automatically replace every time they are found 15:04:51 that will allow passing all the params i think 15:05:16 yep, i've seen them used in fortify 15:05:57 #define DEBUG(x) debug_func(__FILE__, __LINE, x) 15:06:08 DEBUG(("%s %d", x, y)) 15:06:47 hm, no 15:06:52 that will include the extra ( ) 15:07:07 for example, if printf("%s (%i): %s\n", __FILE__, __LINE__, "bad args in foo"); is found on line 453 in file bar.c, then the compiler will generate printf("%s (%i): %s\n", "bar.c", 453, "bad args in foo"); 15:07:23 --- join: saon (Ecoder@c-24-129-95-254.se.client2.attbi.com) joined #forth 15:07:41 wait a sec 15:07:51 allefant: that's one weakness of #define macro...you can't pass arbitrary numbers of arguments 15:07:53 hows does #defien DEBUG((x)) work 15:08:01 warpzero: it doesn't.. 15:08:05 i was thinking wrong 15:09:11 --- quit: arke ("CGI:IRC (EOF)") 15:09:19 if you pass something in () to a macro, it will keep the (), and not split at every , 15:09:24 but that won't help in thiscase 15:09:40 yeah it will 15:10:21 it would evaluate to: debug_func (x, y, ("%d", 5)) 15:10:24 which doesn't compile 15:10:43 or, at least, not with the right result 15:11:37 if you need it to only compile with gcc, you can use the gcc variable macro arguments 15:11:45 no check this out 15:13:10 #define DEBUG(x) fprintf(stderr, "... %s:%i ", __FILE__, __LINE__, ); fprintf x; fprintf ("\n"); 15:13:59 ah, yes, of course, i think that was what i was thinking of :) 15:14:02 not bad, if you remember to pass the extra pairs of parentheses 15:15:04 though 15:15:08 i still need the stderr 15:16:00 hm, could write your own debug(char const *str, ...) function 15:16:19 which would just call vfprintf(stderr, varargs) 15:16:52 no __LINE__, __FILE 15:17:09 just for the fprintf x 15:17:20 my_debug x 15:21:09 ? 15:22:41 #define DEBUG(x) fprintf(stderr, "... %s:%i ", __FILE__, __LINE__, ); my_debug x; fprintf ("\n"); 15:22:49 --- quit: saon ("Leaving") 15:22:49 like that.. 15:23:22 and int my_debug(char const *str, ...) {...varargs setup stuff.. return vfprintf(stderr, varargs); } 15:25:31 would you write that up for me 15:25:34 i'd like to see it 15:26:39 the varargs stuff? 15:27:05 --- join: tathi (~josh@68.81.250.90) joined #forth 15:27:14 yeah 15:27:19 like write up a demo 15:28:52 #define D(x) sprintf x; fprintf(stderr, "... %s:%i %s\n", __FILE__, __LINE__, bug); 15:29:07 thats what ive got now 15:29:27 so you D((bug, "message")) 15:29:54 int my_debug(char const *f, ...) {va_list args; va_start(args, f); int i = vfprintf(stderr, args); va_end (args); return i;} 15:30:01 and the above #define 15:30:08 should allow D(("message")) 15:31:21 wait a sec 15:31:59 what the shit 15:32:29 how the fuck does that work 15:35:05 need to #include 15:35:13 oh, and vfprintf(stderr, f, args) 15:35:34 what the hell 15:35:38 i dont understand how this works at all 15:36:25 C functions taking variable number of arguments? 15:36:39 no 15:36:52 how you can vfprintf(stderr, f, args...) 15:37:20 oh, just like above.. the code should work as is after removing typos 15:37:46 va_start converts the variable arguments into "args", no idea how that is implemented 15:38:01 vprintf takes a va_list 15:38:07 yeah hmm 15:38:23 your #define is still wrong 15:38:40 or at least still stupid 15:39:08 yeah. needs the (( )) 15:39:09 hmm maybe not though 15:40:29 c r evil! 15:42:28 yeah its still wrong allefant 15:42:32 #define D(x) fprintf(stderr, "... %s:%i ", __FILE__, __LINE__); dprint x; fprintf (stderr, "\n"); 15:42:41 int dprint(char const *f, ...) { 15:44:52 hm 15:45:16 fprintf needs a stream name 15:45:29 yes, stderr 15:45:52 then the string f 15:46:03 then the va_list as 3d param 15:46:13 i got it working 15:50:36 :) 15:51:10 only one change to make it compile with no warning/errors with -ansi -pedantic -Wall 15:51:48 hm, -pedantic is evil 15:52:25 --- quit: qFox (Read error: 104 (Connection reset by peer)) 16:02:40 warpzero: looks good.. just the function shouldn't go into a header 16:03:08 that is, if you want to include it in multiple files 16:03:18 why not 16:03:30 the linker will complain about double symbols 16:03:46 since it is included with every .c file which includes debug.h 16:03:59 oh well 16:04:11 unless, you use inline, but -pedantic won't allow that :P 16:04:28 hm, or static inline even 16:05:00 wait 16:05:06 you cant use static on -pedantic 16:05:14 !? 16:05:26 static, yes, just not inline 16:05:33 not sure if static alone would help 16:06:24 yeah it must 16:06:41 the proper way would be, put the function into debug.c, and include that when linking :) 16:06:47 i know shut up 16:07:02 then i wouldve had to dcc send you twice 16:07:09 heh 16:07:58 also 16:08:07 ive written whole apps before 16:08:14 with #include a.c 16:08:22 fuck the linker 16:08:25 heh 16:08:57 splitting it into headers helps with compile times 16:09:10 compile times are for losers 16:09:10 --- quit: rsync (Read error: 104 (Connection reset by peer)) 16:09:45 bah. i must look at gcc's precompiled headers, wonder how much they will speed it up 16:11:32 --- quit: allefant ("time to go") 16:15:41 --- quit: tathi ("leaving") 16:24:22 --- quit: Raystm2 (Read error: 104 (Connection reset by peer)) 16:24:31 aftool.c:31: warning: pointer of type `void *' used in arithmetic 16:24:36 dammit 16:25:05 how do you increase a void* by int 16:28:06 recast it as char * and do the pointer arithmetic, then cast it back to void *? 16:32:25 do you even need to cast it back 16:32:37 yeah 16:32:45 on sun IIRC the CC bitches when you do that 16:33:46 hi 16:34:15 slava 16:34:17 sup 16:41:04 not much 16:41:15 i've thought of a neat trick that might make my GC more efficient 16:43:46 well, gotta go...all bye 16:44:00 --- part: TheBlueWizard left #forth 16:54:03 --- join: Sonarman (~matt@adsl-209-233-52-30.dsl.snfc21.pacbell.net) joined #forth 17:02:48 --- join: hefner (~hefner@pool-151-196-40-51.balt.east.verizon.net) joined #forth 17:07:13 --- part: hefner left #forth 17:13:17 >> shift right is high-to-low right 17:19:35 rifhgt 17:52:15 --- quit: ows (Excess Flood) 17:52:15 --- join: ows (~ows@a81-84-114-211.netcabo.pt) joined #forth 17:52:15 --- quit: cmeme (Broken pipe) 17:53:01 --- join: cmeme (~cmeme@216.184.11.2) joined #forth 17:56:48 --- join: crc (crc@04-108.149.popsite.net) joined #forth 17:57:23 man, I really want to just work on herkforth 17:57:27 but I've got work todo 17:59:15 hi Herkamire 18:03:08 hi slava 18:03:51 what's new? 18:04:43 --- join: madgarden (~madgarden@Ottawa-HSE-ppp4084027.sympatico.ca) joined #forth 18:05:05 hey madgarden you should add an entry about forthy to the concatenative languages wiki 18:05:15 madgarden (~madgarden@Ottawa-HSE-ppp4084027.sympatico.ca) has joined #forth 18:05:19 you live in ottawa? 18:05:30 slava, I suppose I could, but Forthy is not really a language. 18:05:33 No, Kitchener. 18:05:41 where is that? 18:06:19 Ontario, about 1 hour southwest of Toronto. 18:06:26 --- quit: crc ("Time for bed... Goodnight!") 18:09:38 --- join: futhin (thin@bespin.org) joined #forth 18:09:38 --- mode: ChanServ set +o futhin 18:09:56 hi futhin 18:10:10 ^^;; 18:10:32 o.O 18:10:35 o.o 18:10:39 x.x 18:10:56 so what is everybody coding these days? 18:11:20 some chicken salad 18:12:05 i wrote -10,000 lines of code today 18:24:31 uh 18:24:32 ummm 18:25:17 slava: herkforth is coming along. I got code working to read/write from/to the HD... yesterday I think 18:25:33 cool 18:25:37 I hope to start working on saving and loading herkforth to/from the HD 18:25:41 tonight 18:25:45 i've been working on my stack checker and compiler 18:25:50 in the middle of some work atm though 18:25:53 fun 18:35:49 slava, you wrote 10,000 lines of code today? 18:36:34 no, removed 10,000 lines 18:37:29 How many lines are you at now? 18:38:57 around 30,000 18:40:57 That's quite a reduction then. 18:42:21 good job slava 18:42:34 reducing the code is always a good thing :D 18:45:13 --- join: arke (f2@bespin.org) joined #forth 18:45:16 --- mode: ChanServ set +o arke 18:46:46 hi arke 18:50:12 hi slava, what a joyous event 18:50:29 to see you here, full of consent 18:50:43 (hint: your turn for the next 2 lines) 18:53:15 we must now attempt to prevent 18:53:33 futhin from trying to present 18:54:13 ? 18:59:45 futhin, who is a certain sexy man 19:00:03 saw his mother and he just ran 19:00:09 brb, dinner :) 19:08:51 http://groups.google.ca/groups?hl=en&lr=&selm=86frec%24366%244%40supernews.com 19:15:19 slava: -10,000 lines from what? factor? 19:15:59 slava: :) 19:16:31 herkforth doesn't even have that many words 19:16:49 yup 19:16:58 well, i remoevd the java implementation 19:19:06 you implemented java? 19:19:35 of factor 19:19:47 ahh 19:19:49 using C now right? 19:20:13 herkforth source is currently 8540 words 19:21:08 1422 different ones (including numbers) 19:21:47 my C runtime has 7000 lines 19:22:05 heh :) that's an interesting statistic. seems I use a word or number on average 6 times. 19:22:45 how did you calculate it? 19:23:37 export (which exports all source blocks to a directory called "out") 19:23:40 then cat out/??? | sed -e "s/[][&^':\`] //g" | wc 19:23:55 it also exports the dictionary 19:24:06 wc out/dictionary 19:24:15 showed that I had 1422 lines in the dictionary 19:25:31 anyway, now I'm going to write some code to save herkforth to disk. 19:36:15 --- quit: futhin ("leaving") 19:44:45 --- quit: Herkamire ("booting herkforth") 20:05:45 --- quit: wincent (Remote closed the connection) 20:17:58 --- quit: slava ("Leaving") 20:46:39 --- quit: ows ("Client Exiting") 20:55:50 --- join: Raystm2 (Rastm2@AC83C8D1.ipt.aol.com) joined #forth 21:38:56 --- nick: ender`work -> ender`sleep 21:43:45 --- join: Herkamire (~jason@h000094d30ba2.ne.client2.attbi.com) joined #forth 21:49:15 --- quit: Raystm2 (Connection reset by peer) 21:50:47 --- join: Raystm2 (Rastm2@AC83C8D1.ipt.aol.com) joined #forth 22:10:02 --- quit: Sonarman ("leaving") 22:32:05 --- join: Serg_penguin (~z@212.34.52.140) joined #forth 23:08:20 --- quit: Herkamire ("bed") 23:46:38 wait a sec 23:46:44 how do you perform a non-local goto in C 23:52:00 rm -rf /coding/c 23:52:02 ;)) 23:52:09 thanks for the help 23:52:29 * Serg_penguin never coded in C lo-o-ong time ;)) 23:52:50 coz c=a+++b ;) 23:53:35 actually, if i need GOTO i'd better rethink my proggie 23:53:51 for what reason do you need it ? i may try to rethink 23:59:25 --- quit: ender`sleep (Success) 23:59:59 --- log: ended forth/04.11.16