00:00:00 --- log: started forth/05.03.20 00:05:41 --- join: hyrax_ (~chatzilla@adsl-64-219-100-33.dsl.lgvwtx.swbell.net) joined #forth 00:10:03 --- join: Topaz (~top@spc1-horn1-6-0-cust219.cosh.broadband.ntl.com) joined #forth 00:22:10 --- quit: hyrax (Read error: 110 (Connection timed out)) 00:43:04 --- quit: Topaz ("Leaving") 01:09:47 --- join: qFox (C00K13S@82-169-140-229-mx.xdsl.tiscali.nl) joined #forth 01:43:02 --- quit: zardon ("leaving") 01:58:15 --- quit: hyrax_ (Read error: 54 (Connection reset by peer)) 03:03:03 --- join: aum (~aum@60-234-138-239.bitstream.orcon.net.nz) joined #forth 04:18:24 --- join: Baughn (~svein@cloud.brage.info) joined #forth 05:56:58 --- quit: aum () 06:38:10 --- join: hyrax (~chatzilla@adsl-64-219-100-33.dsl.lgvwtx.swbell.net) joined #forth 06:38:33 join #gentoo-amd64 06:38:44 :) 07:14:02 --- join: BACbKA (~vassilii@CBL217-132-156-157.bb.netvision.net.il) joined #forth 07:14:16 is it legal for : to put things on the stack during the compilation? 07:15:15 (gforth does it, kforth doesn't do it) 07:15:27 : foo [ .s ] ; 07:17:50 hmm... the : itself? your foo example is ok. I don't think : should. 07:18:22 Because it is common to put something on the stack before a word, and use it in the word. 07:18:41 well, maybe on common, but it is done 07:19:21 Hyrax:I was used to doing this before, and suddenly I came to gforth which breaks it :( 07:20:17 just a moment I will switch compuiters 07:20:18 confusing... because then instead of LITERAL , you would have to say [ SWAP ] LITERAL , or some other nonsense. 07:20:19 --- quit: BACbKA () 07:33:49 --- join: BACbKA (vassilii@res2.iGuide.co.il) joined #forth 08:03:24 --- join: docl (~docl@dpcbw098235.direcpc.com) joined #forth 08:57:30 : chk-depth depth 0= IF ." sane" ELSE ." sick" THEN ; immediate 08:57:35 : nop chk-depth ; 08:58:35 Are systems that print "sick" standards-compliant? can somebody please give me a reference to the standard? (FYI: gforth 0.6.2 is "sick" as per the above) 09:01:23 minforth is "sick" 09:01:37 pforth yforth and kforth are "sane" :-) 09:18:33 --- join: tathi (~josh@pcp01375108pcs.milfrd01.pa.comcast.net) joined #forth 09:41:31 hi all 09:52:20 OK, I got it. The thing on the stack is legal and is called "colon-sys" in DPANS94. Yuck.... 09:54:04 eh? I've not seen that before. 09:54:41 well, I might have see reference to "colon-sys" but I've not seen compilers put it on the stack 09:55:59 : foo [ .s ] ; 09:56:11 : foo [ .s ] ; 09:56:25 <-Top ok 09:56:39 nothing on the stack, that is with SwiftX 09:56:49 : chk-depth depth 0= IF ." sane" ELSE ." sick" THEN ; immediate : nop chk-depth ; 09:57:06 This one gives "sick" for gforth and minforth 09:57:14 and "sane" for everything else I have tried 09:57:33 But yeah, the sick ones are compliant nevertheless 09:57:58 : chk-depth depth 0= IF ." sane" ELSE ." sick" THEN ; immediate : nop chk-depth ; sane ok 10:01:04 I guess you could maybe do ": : >r ;" and ": ; r> POSTPONE ; ; IMMEDIATE" or some other convulated work around 10:01:46 --- quit: docl (Read error: 104 (Connection reset by peer)) 10:03:04 hyrax: this should be done with everyone doing colon-sys, and also you're assuming colon-sys 1 cell wide :-) 10:03:11 hyrax: I'd say smth like 10:04:09 BACbKA: when is this a problem, anyway? 10:04:26 tathi: I was teaching somebody forth today 10:04:50 tathi: showed : 1+! ( a -- ) dup @ 1+ swap ! ; 10:05:12 Well, you could do the sick/sane check, and determine how many cells colon-sys is, and then make the corrections in the overloaded : and ; 10:05:24 tathi: then showed how to do a creator for words like this along the following i/face 10:05:25 ' 1- modify!: 1-! 10:05:41 tathi: first with create (which the student got right away) 10:05:55 tathi: then I said -- watch this -- and wrote the following 10:06:13 : modify!, ( xtModifier -- ) 10:06:13 ['] dup compile, 10:06:13 ['] @ compile, 10:06:13 compile, 10:06:13 ['] swap compile, 10:06:14 ['] ! compile, ; immediate 10:06:19 : 1+! [ ' 1+ ] modify!, ; 10:06:39 then (again) I said "watch this" 10:06:41 and wrote 10:07:13 : modify!: ( xtModifier -- ) 10:07:13 : 10:07:13 postpone modify!, 10:07:13 postpone ; 10:07:13 ; 10:07:22 ' 1- modify!: 1-! 10:07:27 and it crashed ;-) 10:07:41 what works is : modify!: ( xtModifier -- ) >R 10:07:41 : 10:07:41 R> postpone modify!, 10:07:41 postpone ; 10:07:41 ; 10:08:33 hyrax: yeah 10:08:53 hyrax: pity there is nothing like limits.h in forth 10:08:56 huh. ok. 10:12:17 BACbKA: well, the sick/sane check could figure that out, but the equiv of limits.h would be better 10:21:02 hyrax: I can create smth like that myself: 10:21:15 variable sizeof 10:22:05 depth : TEST [ depth sizeof ! ] ; sizeof @ swap - emit 10:22:10 s/emit/./ 10:22:47 and use this to generate forth code producing 10:23:04 constant colon-sys-cells 10:23:13 etc for all other control structures 10:23:24 and then instead of >R : R> 10:23:31 one would do smth like 10:24:29 : my-word ... : colon-sys-cells roll ... 10:24:49 but a standard extension for those things would be great 10:26:07 --- nick: hyrax -> hyrax|afk 10:28:01 --- join: Zymurgy (thrud@TBay-ppp42352.sympatico.ca) joined #forth 10:36:08 --- quit: Zymurgy ("Leaving") 10:37:53 --- join: Zymurgy (zymurgy@TBay-ppp42352.sympatico.ca) joined #forth 10:47:41 --- part: Zymurgy left #forth 10:51:32 --- join: Sonarman (~snofs@adsl-64-160-165-139.dsl.snfc21.pacbell.net) joined #forth 11:06:08 --- join: Topaz (~top@spc1-horn1-6-0-cust219.cosh.broadband.ntl.com) joined #forth 11:21:42 --- quit: Topaz (Read error: 104 (Connection reset by peer)) 11:37:28 --- join: Topaz (~top@spc1-horn1-6-0-cust219.cosh.broadband.ntl.com) joined #forth 11:45:44 --- nick: hyrax|afk -> hyrax 11:46:34 hyrax: I have browsed some gforth-specific sources and the `info gforth' doc, and realized why the folks there don't suffer. They use to have a locals idiom to use in these cases, see the "Advanced macros Tutorial" in the info. Still insane imho. 11:47:54 I wonder if there is an easy way to re-write complicated macros with EVALUATE? 11:48:19 I've used evaulte for such things 11:48:28 evaluate 11:49:13 but if create words in an evaluate, they can't be located 11:49:41 so I've used interpret 11:51:59 eh, no forths on native x86_64 11:52:11 hyrax: say, how would you re-write modify!, ? 11:53:50 * hyrax is looking at modify! 11:54:22 hyrax: INTERPRET is no longer there... 11:57:14 eh... no gforth on cygwin either 12:01:46 ok, your modify!: works as on the forth I'm using 12:02:39 So modify!: just makes the resulting word do a store, but runs the modifier first 12:15:12 I'm not sure of a clean way to do it where the modifier xt is passed in on the stack, rather than eaten after the word 12:15:51 well, clean, as long as colon-sys is not in the way 12:22:08 I would think it's a fairly common implementation technique to a) use the data stack as the control-stack and b) place colon-sys there. 12:23:07 not sure how I would do. Normally I don't write words like modify!: 12:23:47 how I would do it 12:55:06 --- nick: hyrax -> hyrax|afk 13:17:51 --- quit: ooo (Read error: 110 (Connection timed out)) 14:35:53 --- nick: hyrax|afk -> hyrax 14:41:10 --- quit: qFox ("this quit is sponsored by somebody!") 14:47:29 I am in an immediate word. What string do I have to give to EVALUATE as if I put ['] DUP COMPILE, into my immediate word execution semantics? 14:48:04 (i.e., in order to have a call to DUP compiled into the currently compiled open definition) 15:03:04 ok, I pull it off 15:17:43 hyrax: want a generic macro generator that uses EVALUATE? 15:18:52 EH.. you read my mind. I was pulling a generic macro generator out of some stuff I did at work. (have to scrub it bit though, as it references too much stuff) 15:18:56 --- quit: Topaz (Remote closed the connection) 15:19:11 is 25 lines flood OK here? 15:19:45 uh, use a paste site, that is a bit much, plus paste site is easier to copy 15:20:02 http://rafb.net/paste/ 15:20:34 hyrax: http://www.tarunz.org/~vassilii/modifier-maker.fs 15:21:35 reload pls I have updated 2 comments 15:21:46 ok, that is better than mine. Mine evaluated it all on the HOST (as I was using on a cross compiler). On the target it was compiled though. 15:26:09 --- join: ooo (~o@dsl-olugw3p33.dial.inet.fi) joined #forth 15:26:18 ok, COMPILE:, eats till ; 15:26:24 aha 15:26:42 see 1+! is your friend to start with 15:27:36 you can also put 2DUP ." EVALUATE(" TYPE ." )" CR before the EVALUATE 15:30:48 I would be happy to do the buffer stuff not in the dictionary space, but I don't know how (short of dynamic memory extensions usage) -- things like PAD get stomped when compilation progresses 15:35:31 yah I ran into that problem on mine too... Hmm, my forth is choking on COMPILE,: 15:35:43 hyrax: how 15:36:22 --- join: aum (~aum@60-234-138-239.bitstream.orcon.net.nz) joined #forth 15:36:26 hold on, let me include instead of pasting it 15:36:37 hyrax: compiling COMPILE,: or running it? 15:36:50 compiling it 15:36:55 hmmmmmmm 15:37:22 it might be me, I'm going to include it and see 15:39:10 ok, it compiled now, I got a 1 15:39:54 hyrax: good. Does SEE work on your system? 15:40:40 hyrax: if yes, what do the SEE statements at the end produce? the thing similar to the 1st (commented out) line of the file? 15:41:11 not on this one, I'll have to copy a forth from a different computer to this one to get SEE 15:41:13 hyrax: meanwhile I have discovered that yforth goes bananas on this file :) never gets out of compilation of COMPILE,: 15:42:18 compile:, does not seem to like literals 15:42:34 compile,: I mean 15:46:33 hyrax: yeah, right now COMPILE,: W1 W2 W3 ; is just an alias to ['] W1 COMPILE, ['] W2 COMPILE, ['] W3 COMPILE, 15:46:54 yah 15:48:13 on my macro expander I modify SOURCE and let the compiler compile in the text 15:48:17 minforth has surprised me. Had no problems with [IF] and [ELSE], but choked on [ENDIF]... oooh, it should have been [THEN] !!!! 15:48:36 same here, I had the change [ENDIF] to [THEN] 15:49:05 but mine is not generic, only works on a cross compiler like SwiftX 15:49:27 I was trying to make mine generic when you asked me if I a generic one 15:49:53 hyrax: that is what I used to do on our own F83 system on the Hobbit computer... but I read DPANS as this is now kinda unwelcome :( 15:50:46 that == modifying source 15:51:56 Mine plays games with 'TIB, >IN, and #TIB 15:54:46 hehe... kforth didn't like it because it doesn't know HERE 15:55:58 http://rafb.net/paste/results/MLjW4w10.html 15:56:34 But that is only partial 15:58:43 I440r: I'm running Debian. Pity you don't have a package -- I would have had it installed and tried out already, as every other *forth* package :) 15:59:08 I440r: aha, I see -- it's x86 only 15:59:14 BACbKA, its not ready for packaging yet 15:59:20 actually its been ported to ppc too 16:01:34 The links session is impressive ;) 16:02:31 the dragon is nice, too 16:02:49 heh 16:03:11 ive never looked at my page with links 16:03:14 * I440r looks 16:03:45 it doesnt quite look right but its still ok :) 16:05:08 I440r: I first began learning forth back in the 6th grade, ie 1988 16:05:23 thats about when i learned it too 16:05:39 but i didnt like f83, prefered the flat files used in fpc 16:06:02 tom zimmer has featureitis tho and i cut is 284562456k f.com down to aobut 35k or something 16:08:50 I440r our Hobbit forth (/3.5 Mhz Z80) beat FPC (/25MHz AT286) pretty much consistently back in 1990 :) 16:09:21 we used subroutine threading and a lot of optimizations 16:09:36 OK, I've finished the readme 16:09:42 oh... im against that, isforth is 100% direct threaded 16:09:47 sub threading breaks see 16:10:00 and i consider see to be a neat debug tool 16:10:13 also helps remind you how word xyz is defined 16:10:55 I440r: remember -- these were the days w/o caches :) 16:11:25 :) 16:12:31 fetching nasm 16:14:00 running 16:14:00 I440r: does isforth run on amd64 yet? 16:14:33 I440r: you're a good boy, with >NAME NAME> 16:14:49 BEHEAD :-))) 16:15:27 ugh... no disasm of unnamed ones... 16:15:27 well, I installed nasm, so I'll try it 16:16:40 What is "MIMIV" in the upper right corner? it's not a valid Roman numeral at least... 16:17:11 hmm... ". . ?" 16:18:16 I440r: how do I source a forth file from the interpreter? 16:18:40 (w/o defining a string const with its name in the dictionary)? 16:19:39 well, it does not compile on amd64 http://rafb.net/paste/results/HNKt7m78.html 16:19:51 ld: warning: i386 architecture of input file `../kernel.o' is incompatible with i386:x86-64 output 16:23:08 IsForth -- another "sane" one (empty colon-sys) but YUCK!!! it doesn't accept uppercase :( 16:24:14 well, it does compile it, but I get segmentation fault when I go to run it 16:25:36 hyrax: yeah, I have seen the readme 16:26:29 well, the one compiled for i386 works. Interesting, that is only i386 binary that runs on my machine. :) 16:27:14 I guess that is because it does not link to any libraries and only uses syscalls 16:28:48 ok, extend worked, now I have a working isforth 16:29:45 BACbKA, fload 16:30:00 fload path/to/file/blah.f 16:30:05 or from the command line 16:30:12 ./isforth -fload src/blah.f 16:30:28 or you can put #! /path/to/isforth -sfload 16:30:44 as the first line of the source file and chmod +x that file and execute it directly 16:31:43 I440r: yeah, I had it figured out already from the extend script 16:31:54 :) 16:32:05 how fast a box do you run on ? 16:32:48 time ./extend > /dev/null 16:33:10 --- quit: tathi ("leaving") 16:33:24 real 0m0.089s ; user 0m0.083s ; sys 0m0.006s 16:33:37 i was gona suggest running the window.f and itowers.f stuff 16:33:58 assuming your not runiing from a screen session that is 16:34:11 screen is seriously broken and im not fixing isforth to cater to it 16:34:53 running in an rxvt, but the box is on the network 16:35:03 yea 16:35:07 rxvt should be fine 16:36:54 I440r: it chokes on my nasty code :) 16:37:02 misses bl in the dictionary 16:37:04 show me your nasty code ? 16:38:50 http://rafb.net/paste/results/L31i2P28.html 16:41:22 ok isforth doesnt use verbal pukeage like [char] 16:41:27 [char] x 16:41:35 use 'x' instead 16:41:38 note... not 'x 16:41:54 also s" will never be implemented in isforth :) 16:42:04 nor will evaluate 16:42:22 havent seen a postpone in there yet but if its there it wont work either 16:42:40 yea. you have a postpone :/ 16:43:00 oooh i see an anti ans item in your code hehe 16:43:22 you cant do r> at the start of a definition because on entry into ANY definition youc annot guarantee that the top item of the return stack is your return address 16:43:39 that is >r 16:43:51 I440r I am afraid you've misread the code around that >R 16:43:52 and if that was the only thing wrong with ans forth (which it isnt) i wouldnt use it 16:43:53 oh duh 16:43:57 im used to seeing 16:43:59 : blah 16:44:02 code starts here ; 16:44:06 not 16:44:18 : blah code 16:44:22 starts here ; 16:44:27 : is in a colon word 16:45:48 putting : inside a colon definition is perfectly valid :) 16:46:03 ive even seen 16:46:05 : : : ; 16:46:06 lol 16:46:07 except in retroforth, where it defines a new entry point :) 16:46:47 I'm afraid : : : ; is ambiguous as the 2nd inner colon creates an entry while the 1st has never been closed 16:47:12 no, the second does not 16:47:20 no : startsx a new definition. : is the name of that new definition : is compiled into taht definition and ; ends it 16:47:24 it creates an entry when the word is run 16:47:25 ? 16:47:26 nothing wrong with : : : ; 16:47:47 hyrax i believe he means you can create an entry point in the middle of a word 16:47:51 I440r oic, you say that : can be immediate 16:47:57 : blah ...... : foo ...... ; 16:48:14 blah executes both the code for blah and the code for foo. but you can also call just foo 16:48:17 i consider that bad form 16:48:22 foo should be factored out 16:48:27 oh, I've never seen : as immediate on any forth I've worked on 16:48:33 : isnt immediate 16:48:53 retroforth has an immediate : 16:48:57 : : : ; first colon starts a new definition called : 16:49:11 the third colon is compiled INTO the new definition and the ; finishes it 16:49:45 I440r: that code compiled and ran ok on SwiftForth 16:49:53 er yea i was talking about retro forth above lol 16:50:12 i consider retro's behaviour to be bad form 16:50:28 hyrax only on retro would it be broken :) 16:50:39 crc you should really change that btw 16:50:43 its very bad form 16:51:02 instead of creating an entry point into the middle of a definition you should do 16:51:07 : foo ...... ; 16:51:12 : bar ..... foo ; 16:51:14 One can always do : :: ; IMMEDIATE :) 16:51:29 not : bar ..... : foo ..... ; <-- this is burying the definition for foo!!!! 16:51:40 er : :: : ; IMMEDIATE 16:52:07 i would just do ' : alias :: immediate 16:52:08 --- quit: aum () 16:52:16 and make the alias an immediate word 16:52:17 OMG i have to teach in 9 hours... better go get some sleep 16:52:18 I440r: it allows me to do some things more efficiently 16:52:30 crc but more obfuscated 16:52:43 efficiency should always play second fiddle to readability 16:52:47 good night everybody 16:52:53 night BACbKA 16:53:07 bye 16:53:10 --- quit: BACbKA ("Leaving") 16:53:16 obfuscated forth? I'm shocked! How could anybody write obfuscated forth?!? :) 16:54:05 I440r: it's not more obfuscated to me 16:55:44 crc ok then :) 16:56:02 : : : ; <-- that would be totally obfuscated to someone who didnt know forth :) 16:56:54 yup 16:58:19 most forth is obfuscated to those you don't know forth. 16:58:49 :) 16:58:59 which is why they go screamin for mamma :) 17:00:59 * crc has been doing some work on an interactive fiction game in retroforth 17:05:37 sup i440r 17:07:42 warp! hi dood 17:12:33 d00d 17:12:38 --- quit: Baughn (Read error: 113 (No route to host)) 18:06:24 goodnight 18:49:40 --- quit: I440r ("brb") 18:50:48 --- join: I440r (mark4@rrcs-24-242-160-169.sw.biz.rr.com) joined #forth 19:41:08 --- quit: saon ("Lost terminal") 22:22:29 --- quit: Sonarman ("leaving") 23:26:53 --- quit: Herkamire ("leaving") 23:59:59 --- log: ended forth/05.03.20