00:00:00 --- log: started forth/09.08.07 00:28:15 --- quit: impomatic (Read error: 110 (Connection timed out)) 01:45:24 --- quit: gnomon (Read error: 110 (Connection timed out)) 04:25:19 --- join: aguaithefreak (i=aguai@220-136-124-203.dynamic.hinet.net) joined #forth 05:54:00 --- join: ehird (n=ehird@91.104.243.206) joined #forth 06:21:39 --- join: impomatic (n=John@nat65.mia.three.co.uk) joined #forth 06:23:24 GeDaMo: : tho 1000 /mod ?dup if recurse [char] , emit 0 <# # # # #> type else 0 .r then ; 06:32:56 <# # # # #> ;; that sure does make sense 06:53:06 <# starts number to string conversion, # converts one character, #> ends conversion and returns a pointer to the string 07:01:46 makes sense 07:01:56 seems like it could be less repetitive 07:04:50 --- join: crc (n=crc@216.1.43.130) joined #forth 07:07:37 <# # # # #> looks slightly better than 10 /mod 10 /mod 0 .r 0 .r 0 .r :-) 07:12:09 Better than something like 3 #, though? 07:17:08 I don't think there's any elegant way to do it 07:27:01 impomatic: er, really? 07:27:14 number→string conversion is very trivial iteratively 07:28:20 in C, it'd just be `while (i) { i, r = divmod(i, 10); putchar("0123456789"[r]); }` with a provision for 0; I don't know enough Forth to translate that in a pinch 07:29:49 It's easy to do plain number -> string conversion in Forth too. 07:30:03 The code above has 1000 separators. 07:30:13 123456789 tho 07:30:24 123,456,789 ok 07:31:15 --- join: nighty^ (n=nighty@x122091.ppp.asahi-net.or.jp) joined #forth 07:32:49 --- quit: nighty_ (Client Quit) 07:34:02 impomatic: of course 07:34:11 I just mean that <# # # # #> would be better as something like 3 # 07:41:16 --- join: GeDaMo (n=gedamo@212.225.115.96) joined #forth 07:59:17 --- join: Jafferey (n=username@122-49-166-144.ip.adam.com.au) joined #forth 08:08:31 GeDaMo: : tho 1000 /mod ?dup if recurse [char] , emit 0 <# # # # #> type else 0 .r then ; 08:11:10 --- join: kar8nga (n=kar8nga@a-22.vc-graz.ac.at) joined #forth 08:21:26 (impomatic's line got me thinking newbie thoughts...) ?dup is quite weird; I can't think of many situations when it'd be useful. Maybe I'm just doing things wrong, though; ( a b -- if(a=b) then 1 else a 0 ) would be useful for me, and a definition for that would likely be ugly enough that it's probably a Bad Thing; that varying stack effect is incredibly suspicious. But I do seem to do "dup 0 = IF drop ... ELSE ... THEN"; perhaps I'm just thinking too general. 08:30:08 --- quit: Jafferey ("Leaving") 08:31:00 --- join: gogonkt_ (n=info@218.13.58.229) joined #forth 08:32:44 impomatic: I told you it involved loops :P 08:42:49 --- quit: gogonkt (Read error: 110 (Connection timed out)) 08:55:38 --- quit: kar8nga (Remote closed the connection) 09:21:35 --- join: gnomon (n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com) joined #forth 10:12:02 --- quit: gogonkt_ (bartol.freenode.net irc.freenode.net) 10:12:14 --- join: gogonkt_ (n=info@218.13.58.229) joined #forth 10:30:27 --- join: ehird_ (n=ehird@91.105.86.99) joined #forth 10:40:11 --- join: Maki (n=Maki@dynamic-78-30-139-176.adsl.eunet.rs) joined #forth 10:47:50 --- quit: ehird (Read error: 110 (Connection timed out)) 11:03:19 --- join: TheSneakster (n=nobody@71-94-35-188.static.trlk.ca.charter.com) joined #forth 11:03:22 omgz 11:03:25 :) 11:03:36 : forth .' Is Great! ' ; 11:03:48 --- quit: crc_ (Client Quit) 11:03:59 :-) 11:04:55 does this channel have a forth interpreting bot ? 11:05:53 Hmmm ... don't think so 11:14:17 --- join: probonono (n=User@unaffiliated/probonono) joined #forth 11:17:26 * TheSneakster is sad 11:17:41 Why so? 11:17:49 no forth bot on channel ;( 11:18:18 You could always try writing one. In Forth :P 11:18:31 hmmmm 11:18:46 might be an interesting exercise 11:19:13 provided there is a forth available that can manage IRC connection 11:20:07 I've seen Forth with Telnet somewhere 11:20:13 You might be able to use something like nc 11:21:08 I would suggest blocking redefinitions if you're making a Forth bot. Otherwise everyone will be redefining stuff and nothing will behave as expected. 11:21:36 Welcome to Forth! :P 11:23:04 Redefinition is fine, but not for an IRC bot. :-) 11:24:39 visual forth? 11:24:55 impomatic... maybe set a fence 11:25:03 and people can make new defines or clear them 11:25:10 back to defautls 11:25:19 hmm block redefinitions ? 11:25:23 that should be interesting 11:25:39 There have been multi-user Forths 11:25:55 You could create a user for each unique chatter name 11:26:31 well that might be easier 11:28:03 well now 11:28:14 Chuck Morris's company is still around ? 11:28:26 Who's Chuck Morris? 11:28:31 Chuck Moore 11:28:33 my stupid fingers 11:28:35 Yes 11:28:42 I want new ones 11:28:46 they don't always type what I think 11:28:57 http://www.colorforth.com/ 11:29:58 k ty 11:47:37 --- join: gnomon_ (n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com) joined #forth 11:50:56 --- quit: gnomon (Read error: 104 (Connection reset by peer)) 11:51:18 Obviously there can be more than one LEAVE in a DO LOOP. Is it normal to resolve the first LEAVE to jump to the second (if there is one), the second to the third, etc so the LOOP only has to resolve one? 11:53:07 --- nick: gnomon_ -> gnomon 11:53:37 I thought LEAVE just popped the saved instruction address off the return stack 11:53:44 to exit the loop 11:54:17 LEAVE is supposed to work like C's 'break', isn't it? 11:56:16 Yes 11:56:47 Yes, and then jumps to the first instruction after the end of the loop. 11:56:53 But when leave is compiled it doesn't know where it needs to jump to. 11:58:17 So the jump is compiled without the destination, and LOOP fills in the destination 11:58:37 Presumably the loop compilation data on the return stack contains a count of LEAVEs which have to be patched 12:03:30 --- quit: ehird_ () 12:04:22 http://www.taygeta.com/forth/dpansa3.htm#A.3.2.3.2 12:09:44 ah, I see 12:10:15 forgot about compile time behavior 12:10:53 I'm rather rusty on Forth 12:11:10 Actually, the loop compilation data wouldn't be on the return stack, it'd be on the control stack - which could be the data stack, the return stack, or somewhere else :P 12:11:21 GeDamo: why not a linked list for the LEAVE's 12:11:30 that Loop can just follow down and patch all 12:11:53 Possible 12:11:55 each LEAVE would replace the control stack copy 12:12:01 But why not just use the stack? 12:12:04 with link 12:12:45 leave stacks it's patch addy's ? 12:12:49 but where ? 12:13:00 and how does Loop know how many to patch ? 12:13:18 : LEAVE save-loop-sys AHEAD restore-loop-sys leave-count-1+ ; 12:13:26 Something like that 12:13:31 if LEAVE makes a linked list 12:13:45 then the very first leave is still 0 12:13:49 Linked list means allocating memory 12:13:54 no no 12:13:55 no 12:13:58 in the dictionary 12:14:08 And since you're compiling into the dictionary ... 12:14:09 only the first LEAVE has 0 addy 12:14:16 gotta run 12:16:50 Actually, if the jmp instruction you compiled contained a whole address, you could use that as the linked list 12:18:44 GeDaMo, great idea, thanks :-) 12:18:53 Which one? 12:20:00 Making a linked list of the leaves using the unresolved address, then resolving them all with LOOP 12:20:07 Ah, ok :) 12:20:33 Also TheSneakster's idea I think, reading back 12:20:42 A combination :P 12:21:04 Unless that's what he meant 12:21:19 --- join: ehird (n=ehird@91.105.86.99) joined #forth 12:22:32 Actually, I think that /is/ what he meant - I just wasn't understanding :P 12:36:36 impomatic: looking at Gforth's leave, it has an error message "leave-stack full" 12:38:10 yep, that's what I meant :) 12:38:25 sorry, I just got back from errand to the bank 12:38:59 Sometimes I'm a little slow :P 12:45:03 microsoft OBJ format for binaries used to work like that, BTW 12:45:31 linked list of entries for a given symbol needing resolving 12:45:40 and the symbol table only pointed to head of that list 12:46:07 the links being stored in the unresolved address field 13:26:57 --- quit: gogonkt_ (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: madgarden (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: TheSneakster (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: GeDaMo (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: madwork (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: Quartus` (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: Def (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: aguaithefreak (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: probonono (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: mathrick (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: ENKI-][ (bartol.freenode.net irc.freenode.net) 13:26:58 --- quit: ment (bartol.freenode.net irc.freenode.net) 13:26:59 --- quit: uiu_ (bartol.freenode.net irc.freenode.net) 13:26:59 --- quit: ehird (bartol.freenode.net irc.freenode.net) 13:26:59 --- quit: nighty^ (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: Maki (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: impomatic (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: cmeme (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: tarbo (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: gnomon (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: _Jordan_ (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: kleinjt (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: slava (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: crc (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: nothingmuch (bartol.freenode.net irc.freenode.net) 13:27:49 --- quit: schme (bartol.freenode.net irc.freenode.net) 13:27:50 --- quit: nottwo (bartol.freenode.net irc.freenode.net) 13:27:50 --- quit: malyn (bartol.freenode.net irc.freenode.net) 13:28:03 --- join: slava (n=slava@li13-154.members.linode.com) joined #forth 13:28:03 --- join: ehird (n=ehird@91.105.86.99) joined #forth 13:28:03 --- join: gnomon (n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com) joined #forth 13:28:03 --- join: probonono (n=User@unaffiliated/probonono) joined #forth 13:28:03 --- join: TheSneakster (n=nobody@71-94-35-188.static.trlk.ca.charter.com) joined #forth 13:28:03 --- join: Maki (n=Maki@dynamic-78-30-139-176.adsl.eunet.rs) joined #forth 13:28:03 --- join: gogonkt_ (n=info@218.13.58.229) joined #forth 13:28:03 --- join: GeDaMo (n=gedamo@212.225.115.96) joined #forth 13:28:03 --- join: nighty^ (n=nighty@x122091.ppp.asahi-net.or.jp) joined #forth 13:28:03 --- join: crc (n=crc@216.1.43.130) joined #forth 13:28:03 --- join: impomatic (n=John@nat65.mia.three.co.uk) joined #forth 13:28:03 --- join: aguaithefreak (i=aguai@220-136-124-203.dynamic.hinet.net) joined #forth 13:28:03 --- join: schme (n=marcus@sxemacs/devel/schme) joined #forth 13:28:03 --- join: madwork (n=madgarde@204.138.110.15) joined #forth 13:28:03 --- join: madgarden (n=madgarde@CPE001d7e527f89-CM00159a65a870.cpe.net.cable.rogers.com) joined #forth 13:28:03 --- join: ENKI-][ (n=weechat@c-71-234-190-248.hsd1.ct.comcast.net) joined #forth 13:28:03 --- join: mathrick (n=mathrick@users177.kollegienet.dk) joined #forth 13:28:03 --- join: malyn (n=malyn@unaffiliated/malyn) joined #forth 13:28:03 --- join: Quartus` (n=Quartus`@74.198.12.4) joined #forth 13:28:03 --- join: Def (n=joe@c-68-84-166-52.hsd1.mi.comcast.net) joined #forth 13:28:03 --- join: nottwo (n=trannie@designvox-gw.iserv.net) joined #forth 13:28:03 --- join: tarbo (n=me@unaffiliated/tarbo) joined #forth 13:28:03 --- join: ment (i=thement@ibawizard.net) joined #forth 13:28:03 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 13:28:03 --- join: uiu_ (n=ian@schihei.net) joined #forth 13:28:03 --- join: _Jordan_ (n=jcooper@173-45-228-22.slicehost.net) joined #forth 13:28:03 --- join: kleinjt (n=kleinjt@lug-0.csse.rose-hulman.edu) joined #forth 13:28:03 --- join: nothingmuch (n=nothingm@nothingmuch.iinteractive.com) joined #forth 13:28:03 --- mode: irc.freenode.net set +o slava 15:39:48 --- log: started forth/09.08.07 15:39:48 --- join: clog (n=nef@bespin.org) joined #forth 15:39:48 --- topic: 'Welcome to #forth. We discuss the Forth programming language and a variety of technical subjects. Introduction and Helpful Reading: http://forthfreak.net/index.cgi?FnFC | ANS/ISO Forth Standard doc: http://tinyurl.com/nx7dx | Gforth compiler: http://tinyurl.com/s8uho | http://quartus.net/search | Paste: http://forth.pastebin.ca | http://www.isforth.com' 15:39:48 --- topic: set by I440r on [Fri Feb 13 08:39:24 2009] 15:39:48 --- names: list (clog gnomon probonono TheSneakster gogonkt_ nighty^ schme madwork nothingmuch kleinjt _Jordan_ uiu_ cmeme ment tarbo nottwo Def Quartus` malyn mathrick ENKI-][ @slava madgarden) 16:24:42 --- join: aguaithefreak (i=aguai@114-44-3-211.dynamic.hinet.net) joined #forth 16:52:50 --- quit: TheSneakster (Read error: 110 (Connection timed out)) 17:53:45 --- join: crc (n=charlesc@c-68-80-139-0.hsd1.pa.comcast.net) joined #forth 18:39:35 --- join: TheSneakster (n=nobody@99.23.242.198) joined #forth 18:39:35 --- quit: Quartus` (Read error: 104 (Connection reset by peer)) 18:52:02 --- join: Quartus` (n=Quartus`@74.198.12.4) joined #forth 18:57:42 --- nick: gogonkt_ -> gogonkt 21:25:56 --- join: SneakyB (n=nobody@adsl-76-231-251-35.dsl.chi2ca.sbcglobal.net) joined #forth 21:27:08 --- quit: TheSneakster (Connection timed out) 21:34:48 --- quit: probonono (wolfe.freenode.net irc.freenode.net) 21:34:48 --- quit: ment (wolfe.freenode.net irc.freenode.net) 21:34:48 --- quit: mathrick (wolfe.freenode.net irc.freenode.net) 21:34:48 --- quit: ENKI-][ (wolfe.freenode.net irc.freenode.net) 21:34:49 --- join: ment_ (i=thement@ibawizard.net) joined #forth 21:35:06 --- join: mathrick (n=mathrick@users177.kollegienet.dk) joined #forth 21:35:11 --- join: probonono (n=User@unaffiliated/probonono) joined #forth 23:46:25 --- nick: ment_ -> ment 23:59:59 --- log: ended forth/09.08.07