00:00:00 --- log: started forth/06.06.29 00:32:32 --- quit: segher_ (Read error: 104 (Connection reset by peer)) 00:36:09 --- join: zpg (n=user@smaug.linux.pwf.cam.ac.uk) joined #forth 00:38:47 --- join: segher (n=segher@dslb-084-056-132-071.pools.arcor-ip.net) joined #forth 02:42:25 --- join: Cheery (i=Henri@a81-197-32-96.elisa-laajakaista.fi) joined #forth 02:45:38 --- join: nighty (i=nighty@sushi.rural-networks.com) joined #forth 02:50:39 --- quit: Cheery (Read error: 104 (Connection reset by peer)) 03:54:37 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 03:58:11 hi tathi 03:58:41 hi 03:59:08 hi all 04:00:43 hey arke 04:02:01 :) 04:07:42 hi arke 04:07:51 how is it going? 04:09:57 ok 04:10:01 tired 04:10:01 :) 04:10:41 are you working on something at the moment, some project? 04:11:00 yes 04:11:06 digital signal processing stuff 04:11:17 enhancing my little framework app for testing 04:13:49 in what do you solve this? 04:13:59 ? 04:14:03 what do you mean? 04:14:29 in what did you program that? 04:15:23 C+SDL 04:16:05 so you simulate that and then you print it via SDL on screen? 04:16:24 yep 04:16:41 i dont have this in place righ tnow but im gonna make it such that it simulates a VST host 04:16:44 have you a screenshot or something compareable? 04:16:46 VST is a plugin format for audio stuff 04:16:52 eh, no 04:16:53 hehe 04:17:10 yes, I know what VST is 04:17:24 so right now it just has a process a single sample fucntion 04:17:26 I do something compareable here with csound 04:17:41 what im gonna do is add a console to it (easy part, i can retrofit it to a previous program which provides this) 04:17:54 then, im gonna make a vst host out of it :P 04:17:58 without gui 04:18:03 so it just has the parameters 04:18:37 will probably make it have 3 screens 04:18:47 ok, nice. 04:18:49 one with the parameters, one with an oscilloscope, one with an fft meter 04:19:44 well, I'm currently working on a presentation program coded in retro. 04:19:56 fun 04:20:48 on the way I build some x interfacing words. 04:22:06 and I'm working on xell, a little bit. 04:25:46 * zpg works out 9a^2 - ab, eventually 04:26:30 nice going :) 04:28:42 though my first working was: 04:28:49 swap dup dup * 9 * rot rot * - 04:28:58 then i recalled the advice to factor out first 04:29:00 @) 04:29:31 beginning to get an inkling for how to see these as postfix 04:30:01 that's good 04:30:27 using isForth too, works well under Linux 04:30:57 gforth grumbled when i tried to compile it via ssh yesterday 04:31:37 on Linux? 04:31:40 yes 04:31:46 odd stuff 04:31:52 huh 04:32:13 tried to make locally (normal user access only on this box) -- i.e., ./configure && make -- but in vain 04:32:38 need to re-download it but can paste in the error if you like. google had no matches. 04:32:59 I know it has trouble on some systems 04:33:20 bitrot, I guess 04:33:33 they ought to make a new release :) 04:33:37 hehe 04:33:48 do you use ppcLinux btw? 04:34:03 yeah, Gentoo 04:34:11 (if i recall correctly, you wrote the isForth port?) 04:34:22 yup 04:34:26 * zpg nods 04:34:34 by port i assume i'm to think re-write 04:34:56 yes 04:35:07 :) good work 04:35:18 i've been debating going OSX -> NetBSD on the iBook 04:35:30 but they function pretty similarly -- there are only a few differences in the forth source 04:35:56 ah ok 04:35:56 but I don't know anyone who actually uses PPC linux, so I'm not going to maintain it any more 04:36:02 :) 04:36:05 btw: 04:36:06 gforth: main.c:779: check_prims: Assertion `prim_len>=0' failed. 04:36:06 make: *** [kernl16b.fi-] Aborted 04:37:01 hmm 04:38:15 my diagnosis precisely 04:44:48 that's coming from this command: ? 04:44:49 ./gforth --die-on-signal -m 4M -p ".:~+:." -i kernl32b.fi -e 3 exboot.fs -e 'fpath= .|~+|.' -e 's" mach16b.fs"' ./kernel/main.fs -e "save-cross kernl16b.fi- /usr/local/bin/gforth-0.6.2 bye" 04:44:56 or something like it? 04:46:06 yes 04:52:50 yeah...I don't know enough about gforth internals to know why that would happen 05:03:15 --- join: I440r (n=mark4@24-177-235-246.dhcp.gnvl.sc.charter.com) joined #forth 05:09:18 hi I440r 05:09:31 tathi: no worries, as I'm sure I440r will be glad to hear, isForth is working smoothly 05:10:43 You'd do well to have gforth running too, to give you a sense for whether what you're doing is because of you, or because of the implementation. 05:11:37 indeed 05:11:43 gforth running on the iBook at home 05:12:20 zpg, are only coding in ans forths? 05:12:29 cool :) 05:12:39 working smoothly where ? 05:13:13 lol 05:13:20 where it isn't 05:15:50 * zpg is connected via putty to a linux box, running isForth and Emacs 05:15:59 ok 05:16:02 virl: just learning the forth basics 05:16:20 which i think are ANSfied 05:16:33 isforth isnt ansified 05:16:38 aha. ok, well when you want use ans forth 05:16:46 what are the differences? 05:16:55 different dialects 05:17:12 ans forth is chock full of bullshit stuff that "fixes" things 05:17:12 ah ok. what does isForth base its dialect on? 05:17:16 that were never broken 05:17:31 Please note I440r's opinion is not universally shared. :) 05:17:34 its very very loosly based on an 83 standard forth for dos 05:17:40 ah ok 05:17:47 I440r, which things are broken after ans forth? 05:17:50 i was thrown by a couple of win32 forths this morning which didn't recognise .s 05:17:53 im anti ans forth - so is chuck :P 05:18:07 zpg, you can write a .S if it isn't available. 05:18:13 heh, well language designers usually cringe at standards 05:18:19 original c vs explosion of ansi 05:18:31 oh you mean it was a case-sensitive mistake? 05:18:46 Oh, perhaps. But that's not what I meant; I mean you can implement it. 05:19:40 by printing via . until the stack is empty (False) 05:19:40 ? 05:19:48 zpg, well is ans is also fat, which comes into my way. 05:19:53 Well, that eats the values as it displays them, so no. 05:20:12 duhh, good point. 05:20:22 * zpg hits his head against a conveniently local brick wall 05:20:36 It's not a trivial beginner exercise, but it's an interesting one. 05:20:36 i'll get there eventually 05:21:27 * zpg nods 05:22:24 incidentally, how frequently are variables employed in forth? 05:22:50 Memory and variables are used quite a lot, just not generally to pass parameters between words. 05:22:54 For that, there's the stack. 05:23:06 ah ok 05:23:28 well, I use them quite often. things like the display ptr in xlib you want not to keep allways on the stack. 05:23:54 Global state is usually kept in memory. 05:25:48 yeah 05:29:39 --- nick: Raystm2 -> nanstm 05:31:44 zpg - http://www.complang.tuwien.ac.at/forth/gforth/Known-problems.html 05:33:18 thanks trying to re ./configure 05:35:07 : .s depth dup BEGIN dup WHILE 1- rot >r REPEAT drop BEGIN dup WHILE 1- r> dup . swap REPEAT drop ; 05:35:22 or something like that, anyway :-) 05:35:42 cripes 05:36:16 well it's a _lot_ easier if your stack is addressable... or you're okay with using pick 05:37:06 : .s depth 0 ?do i pick . loop ; 05:37:19 zzpg in isforth do 05:37:21 see .s 05:37:21 that's the wrong order though 05:37:34 ./configure CC="gcc -DNDEBUG" 05:37:35 FSVO 'wrong' :-) 05:37:36 ^^ worked 05:37:53 ayrnieu: heh 05:38:08 ayrnieu, yea that looks like the one in isforth :) 05:38:13 : .s depth 0 swap ?do i pick . -1 +loop ; 05:38:16 or something 05:38:34 depth 1- then, i guess 05:39:15 or perhaps you have a system like mine, where you happily can underflow the stack :-) 05:40:04 heh 05:40:32 : .s dp@ dp0 @ ?DO i ? /cell +LOOP ; 05:40:47 for a "traditional" forth 05:41:25 traditional ? 05:41:32 "old-fashioned" 05:41:39 f83, f79, fig 05:41:48 :-) 05:41:51 f83 didnt have cell words 05:42:12 yeah sure. for f83: 2 CONSTANT /cell 05:42:25 no cell, cell+ etc etc 05:42:45 yeah, because cells _had_ to be 16-bit 2-complement 05:42:47 how much items do you normally push on the stack? 05:42:55 it did as soon as you defined them, I440r ; the part you can't as simply define is the Forth system design that segher's .s makes use of 05:42:57 @all 05:43:30 ayrnieu: which of the three -- the first is completely portable :-) 05:43:47 ayrnieu, back then nobody worried about cell sizes 05:43:57 a byte was 8 bits a word was 16 and a dword was 32 05:44:18 and even 8 bit machnes ran 16 bit forths 05:44:29 so cell sizes were almost always 16 bits 05:44:29 virl: per definition, you shouldn't normally handle more than 3 stack entries, 5 or so at most for things like complicated string handling words 05:44:40 segher, I know. 05:44:55 virl: but _in total_, you can push quite a lot of stuff on the stack, in most modern forths 05:45:19 i only added cell words to isforth under protest lol 05:45:36 i only do TO under protest 05:45:52 I only asked how much you push normally on the stack to find an average value 05:45:55 it is soooo non-fortish 05:46:09 ? 05:46:33 in an average program, what's the maximum consumed stack space? 05:46:42 <-- are you asking that? 05:46:55 how many asm lines -- roughly -- is isForth? 05:47:07 virl: IIRC extending isforth takes 11 cells on the data stack, and 13 on the return stack 05:47:20 zpg in the kernel its like 85% asm 05:47:22 no, what's the peak of maximum pushed stack items(cells) is it 4, 5, or 16? 05:47:27 the extensions ar 100% forth 05:47:36 for an average forth program 05:47:50 tathi you measured that ? lol 05:47:51 segher: translation from virl-speak: yes 05:48:05 I440r: yeah, I was curious 05:48:12 so I put in an optional stack max-depth checker 05:48:23 virl: when running my OF, you often use about 60 data stack items, and about as many return stack items 05:48:23 tathi so was i but i never bothered heh 05:48:31 I440r: ah ok, so how many lines are the 85%? 05:48:36 im planning on putting profiling info into isforth 05:48:38 virl: lots of string handling though, and recursive stuff 05:49:02 oh.. oh my god. 60 stack items! 05:49:02 all i need is a count cell added to the header for every word that gets incremented every time its used 05:49:32 virl: like i said, recursively splitting a string in parts, etc 05:49:53 zpg erm do a wc -l :) 05:50:05 and i have 512 entries per stack anyway -- one memory page per stack :-) 05:50:09 cd isforth/src/kernel 05:50:14 wc -l * 05:50:25 segher, you have a sick forth system. 05:50:34 ;-) 05:50:48 i judge roughly 5k 05:50:55 virl: it's the boot firmware, it's a bit different than a hosted forth, heh 05:50:59 I440r: yeah sorry, had a chance to wc finally 05:51:27 5676 total for *.asm *.1 05:51:35 i.e., excluding Makefile 05:52:08 virl: it's not like most computers these days are short on memory 05:52:47 smallest dimms are 512MB yeah 05:52:51 tathi, ok, but so much items on the stack. that's something I can't really imagine. 05:52:52 and 64 32-bit cells is still only 256 bytes 05:53:02 64-bit cells 05:53:09 ok, 512 bytes then :) 05:53:17 :-) 05:53:56 virl: well, you don't have to imagine them all at once :) 05:53:59 just a few at a time 05:54:21 it's something I don't do.. 05:56:50 ok, so. note: allow in xell big stacks. 05:58:23 am I baffling? 05:59:27 baffling, adj: making great mental demands; hard to comprehend or solve; "a baffling problem"; "I faced the knotty problem of what to have for breakfast" 05:59:33 hmm...yup :) 06:00:10 well, that's not good :-| 06:00:53 *grml* 06:00:59 mostly joking 06:01:19 I don't see why you care what size the stacks are though 06:01:24 so given the disagreements over ANS voiced earlier, are there a number of concurrent dialects or is it a case of quite a homogenised base pre-ans ? 06:01:48 i.e., a there a number of dialects still in regular use? 06:02:06 sure 06:02:10 yep, they are 06:02:16 I use one. 06:02:39 ...? 06:02:53 zpg dont worry about that detail too much 06:02:56 Forth is more those 'dialects' than this ANS thing 06:02:58 the standard isn't actually that hard to comply with 06:03:04 ask a new question, zpg, like "what Forth do you use?" 06:03:10 but there are a lot of small free-software forths that don't bother or don't want to 06:03:17 ah ok 06:03:32 I440r: completely, this is a case of curiosity 06:03:32 isforth is almost ans compliant - im sure if someone wanted to make it compliant they wouldnt have that much trouble :) 06:03:35 small and good forths 06:03:44 I440r: still screwing on the training wheels 06:04:13 this sounds like a prolog situation 06:04:24 quite a lot of common ground, differing specifics 06:04:35 prolog and forth and scheme have similar boats, although perhaps for different reasons. 06:05:30 * zpg nods 06:06:23 for forth it's more that forth coders tend to write their own forth 06:08:14 but if you've curiousity about ANS Forth, read the standard draft. It has capability and sensibility. 06:08:52 ok shall look into it 06:08:58 thanks for the advice 06:09:02 (everyone) 06:09:18 *arr* my forth will blow ans forth away ;-) 06:09:28 heh 06:10:00 heh? 06:10:52 you do not want a piece of virl 06:12:10 heh, wtf? 06:12:19 oh dear 06:12:21 * zpg ducks 06:16:26 --- quit: ccfg ("leaving") 06:18:47 --- quit: saon (Read error: 104 (Connection reset by peer)) 06:18:49 --- join: saon (i=1000@c-71-199-235-144.hsd1.fl.comcast.net) joined #forth 06:52:09 --- join: ccfg (n=ccfg@dsl-roigw1-fe8ade00-21.dhcp.inet.fi) joined #forth 06:52:31 --- join: PoppaVic (n=pete@0-1pool47-61.nas30.chicago4.il.us.da.qwest.net) joined #forth 07:02:49 --- join: Ray_work (n=Raystm2@199.227.227.26) joined #forth 07:08:56 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 07:12:36 --- quit: PoppaVic ("Pulls the pin...") 07:14:18 --- join: Ray-work (n=Raystm2@199.227.227.26) joined #forth 07:32:36 --- quit: Ray_work (Read error: 110 (Connection timed out)) 07:47:44 --- quit: gnomon (Read error: 110 (Connection timed out)) 07:55:26 here's the retroforth version: 07:55:28 : .s 10 for here r 1- cells + ! next 10 for here 10 r - cells + @ dup . next ; 08:21:31 --- quit: zpg (Read error: 104 (Connection reset by peer)) 08:28:24 or better yet, using the latest features of 9.2: 08:28:26 [[ 10 for here r 1- cells + ! next ]] 08:28:26 [[ 10 for here 10 r - cells + @ dup . next ]] 08:28:26 swap 08:28:26 : .s [ compile compile ] cr ; 08:42:42 --- join: zpg (n=user@smaug.linux.pwf.cam.ac.uk) joined #forth 08:42:44 re 08:45:13 --- join: nighty_ (i=nighty@sushi.rural-networks.com) joined #forth 08:59:04 --- quit: nighty (Read error: 110 (Connection timed out)) 09:10:12 --- part: zpg left #forth 09:11:00 --- join: ASau (n=user@home-pool-170-3.com2com.ru) joined #forth 09:11:09 Dobry vecer! 09:21:56 terve 09:30:01 Anything new here? 09:37:50 docl does retroforth have : pad here 80- + ; ?? 09:47:03 I'm so happy I got finally the Xft bindings working, oh my god now I have a headache. 09:59:07 : pad here 1024 + ; is how retro defines it 09:59:41 ok so why does .s not ue pad ? lol 09:59:54 heh, guess it could 10:00:03 lol 10:00:29 s/here/pad and it works :) 10:00:36 ya 10:00:48 ok now you have to credit me as a developer :) 10:00:49 lol 10:02:18 oh no, you're not releasing it public domain? I'll have to stick with the here version :P 10:03:00 lol 10:03:58 i forget what the song was but buddy guy has only written ONE song himself. the day he went to record it someone told him he should make some monor change to the lyrics which he agreed was better 10:04:08 the other guy got ALL the credits for writing the song 10:04:27 ouch 10:04:30 yup 10:15:12 : flip ( x1 ... xn n -- xn ... x1 ) 10:15:18 now define that :-) 10:15:29 and no temporary storage heh 10:23:28 er, isn't that just 10:23:34 : flip 1 DO I ROLL LOOP ; 10:23:35 ? 10:24:12 0 ?do 10:24:16 but yeah 10:24:22 cool eh :-) 10:24:46 quadratic in n of course, but who cares 10:25:48 oh. I didn't realize 0 ROLL was legal 10:25:58 it's noop 10:26:42 yeah, I guess that's the usual implementation 10:27:00 ans defines it like that 10:27:08 the standard draft says "an ambiguous condition exists if there are less than u+2 items on the stack before ROLL is executed" 10:27:13 older standards too i believe 10:27:45 look at A.6.2.2150 10:27:48 oh, ok. 10:28:00 on gforth 0 ROLL underflows if you have only one stack item 10:28:08 but it's a noop if you have at least two 10:28:41 yeah, you need x0, and 0 10:29:02 it rolls u+1 elts 11:07:00 got it 11:07:02 : nswap dup for r> rot >r >r next >r swap r> for r> r> swap >r next ; 11:07:02 : roll 0; repeat dup nswap 1- 0; again ; 11:07:02 : flip >r r for r> r> tuck >r >r r - roll next rdrop ; 11:14:24 yecch, temp storage is much easier 11:14:34 : store for r cells here + ! next ; 11:14:34 : unstore for r cells here + @ next ; 11:14:34 : flip >r r store r> unstore ; 11:17:31 here's how I defined .s in a system where there's no way to find out the depth of the stack: 11:17:44 : -.s dup stack-plug = ?; >r .s r> dup . ; 11:18:02 stack-plug is a weird number that I put on the stack at the begining of my program 11:18:17 ?; means "if exit then" 11:19:52 that works 11:22:22 oops, that - shouldn't be there 11:22:28 : .s dup stack-plug = ?; >r .s r> dup . ; 11:55:08 whats ?; ? 11:55:15 oh 11:55:35 ?; is just a renaming of ?exit 11:59:36 : .s dup stack-plug =if ;then >r .s r> dup . ; is the retro version 12:01:51 what is stack-plug ? 12:02:14 a wierd number placed on the stack before the rest 12:02:34 : stack-plug 11111111 ; or something 12:03:21 why ? 12:03:41 so it will let you show only numbers above it 12:04:15 and if you see that value somewhere else ? 12:04:20 on the stack i mean 12:04:39 then it starts a new line for .s I guess 12:04:54 does .s show the entire stack ? 12:05:20 all except stack-plug (and anything above it) 12:05:33 s/above/below 12:06:03 btw is that how yo do constants ? 12:06:10 : some-constant some-literal ; ? 12:07:39 I think that does the same thing. there's a constant word though. 12:07:53 10 constant a 12:08:13 k 12:09:26 Better to use CONSTANT, it may produce optimized code. 12:09:37 I440r: read everything I said... I answered all your questions in my original post 12:10:08 I440r: I explained what ?; and stack-plug were, and that this was for a system where there's no way to tell how deep the stack is 12:10:21 i missed it and im not quite 100% atm lo 12:10:31 i had 5 wisdom teeth removed yesterday :P 12:10:41 and no I don't define constants with : 12:10:49 5? 12:10:51 heh 12:10:54 ouch 12:10:54 yup 12:10:55 5 12:11:10 from what? 12:11:20 ? 12:11:29 my jawbones lol 12:11:40 how'd you manage to grow 5? 12:11:55 its not uncommon im told 12:11:56 He's clearly a Sasquatch. 12:12:03 lol 12:12:03 he's very wise :) 12:12:09 Not any more. 12:23:40 does anybody know why a C structure which should be 12 Bytes big when using the sizeof operator of C and then when you allocate that in a forth word using create and allot it gives you it gives you after executing a C function through a ffi using pointer created by the create word an ugly segfault. 12:24:25 huh? 12:24:41 wise; wisdom teeth; he doesn't have them any more 12:25:16 so, I mean this bit: "using create and allot it gives you it gives you after executing a C function" 12:28:50 virl: you're working on ffi stuff under retro, right 12:29:18 oh, sorry, net connection died momentarily 12:30:17 docl, yes, I'm I don't think the ffi is broken. somehow I don't understand this C function 12:30:58 ah, shit. 12:31:54 it gives you after executing a C function through the retro ffi an ugly segfault. 12:32:45 hmm. can you paste it somewhere so I can look at it? 12:35:11 all, or only the part that matters? 12:35:44 try the latter 12:36:08 ok, then that matters. 12:36:18 http://www.rafb.net/paste/results/rEslYn10.html 12:42:32 I don't think that helps 12:43:29 try the whole thing 12:44:24 so you want to see the whole code? 12:44:32 yeah 12:47:59 how is setuid supposed to work? 12:48:02 what's the hidden catch? 12:48:06 it never *@&#$ works for me 12:48:08 http://www.rafb.net/paste/results/zS9jPi85.html 12:48:15 I do: chgrp jason sus 12:48:23 I do: chmod 4750 sus 12:48:34 (chown root sus) 12:48:48 but it executes as user jason 12:48:58 --- quit: madwork (Read error: 110 (Connection timed out)) 12:49:00 well, as whoever's executing it 12:49:25 I do: chgrp wheel sus 12:49:40 I _know_ I'm in the wheel group 12:49:56 and it's confirmed by the fact that it lets me execute the file (which is only executable by owner and group) 12:50:01 but it does not switch my user id 12:50:37 the script creates a file (which is owned by jason) the script runs id (which displays jason) and the script runs "apm -s" which says "Operation not permitted" 12:57:57 what's the secret? does setuid not work for shell scripts? 12:59:06 --- join: zpg (n=user@81-179-160-43.dsl.pipex.com) joined #forth 12:59:09 evening all 13:00:36 hi zpg 13:02:19 hi docl 13:10:47 virl: why 'create fontcolor 8 allot'; didn't you say it's a 12-byte structure? 13:11:00 somehow font is getting changed before it is called in the last line. 13:12:54 it's changed during the definition of test 13:13:23 --- join: madwork (n=foo@derby.metrics.com) joined #forth 13:18:23 virl: http://www.rafb.net/paste/results/iRha0K97.html gets around the problem, but I still don't know what causes it. 13:20:21 the basic problem was that the font variable was no longer a valid pointer by the last function. 13:33:01 what the fuck? 13:35:31 another solution to the problem is simple 22 allot 13:36:12 I knew that one before I asked, only to get that why this happens. 13:36:18 22 allot where? 13:38:24 this one: create fontcolor 22 allot 13:39:29 and I can't say why this works every other values which are lower than 22 don't work 13:39:39 could it be something screwy with zt? 13:39:55 I can't say I understand how that works, but it looks like it's alloting space and then de-alloting it later 13:40:15 I'm not at all clear when "later" is 13:40:17 de allocating space? 13:40:45 at the moment it doesn't gets deallocated, for that this code should work ;-) 13:40:47 yeah, allot with a negative value 13:41:02 hmm? 13:41:05 allot what? 13:41:42 the word 'zt'. 13:41:55 it's defined (for 901-hosted) at rx/rx.forth, starting at line 147 13:42:56 and I'm wondering if maybe it's not changing here when it frees the space so that something overwrites font 13:43:39 ok, I check what that line, because I don't know what you mean 13:45:07 ehm, why should be that a problem? zt makes only a zero terminated string out of a counted one 13:46:07 ok, just checking. 13:46:16 because it's :: make later free ; 13:46:37 and I wasn't sure when the free actually happens 13:47:50 --- quit: timlarson_ ("Leaving") 13:49:10 why you weren't sure when it happens? 13:51:47 well, 'later' postpones the execution of the rest of the word until its caller finishes executing, right? 13:52:40 ok.. 13:53:40 so when you call zt from the command line, what is the caller? 13:53:46 does the "later" part just happen right away? 13:55:44 if it doesn't happen until the end of the source line or something like that, it could certainly cause the kind of problems that you're seeing 13:56:04 well I don't think that's the problem 13:56:07 but as I said, I don't know retroforth very well, so I'm probably just inventing imaginary problems :) 13:56:59 sorry for sidetracking the conversation 14:00:47 you're probably right 14:02:39 --- quit: docl ("Leaving") 14:06:05 well, when it has an effect then the pointer doesn't change 14:09:48 sorry, I didn't follow that 14:10:45 oh, you mean that changing 'here' wouldn't change the pointer in 'font'? 14:21:12 virl: you could try 14:21:26 : zt over + 0 swap c! ; 14:21:51 er, no, I take that back 14:22:42 : z" " over + 0 swap c! ; 14:22:50 you could use that instead of " where appropriate 14:23:00 I bet that would fix it 14:23:43 good evening 14:24:13 ah, the author himself :) 14:24:44 if you use 'later' in a word that was called straight from the interpreter, when does the later part happen? 14:25:39 after the rest of the line is processed 14:26:00 e.g., : foo clear later bye ; 14:26:05 foo words cr cr cr 14:26:27 foo is called, the screen gets cleared, control passes back to the interpreter 14:26:39 words cr cr cr each get called in turn 14:26:54 then when nothing remains, the rest of foo is run 14:28:16 ok, that's the problem virl is having then 14:28:39 zt uses later 14:28:58 ahh, part of 'zt' :) 14:29:12 what is virl's problem 14:29:27 disp @ 0 " times,charter-62:bold" zt XftFontOpenName variable: font 14:29:49 then at some point later the value in the font variable was getting overwritten 14:30:05 I just suggested : z" " over + 0 swap c! ; 14:30:18 oops, supper, bbiab 14:37:55 ok, then I'll test that. 14:40:13 arg, ok it fix it. fuck, arg, grrr, why the hell something. 14:40:33 virl: easy enough: call later directly at the interpreter 14:41:07 disp @ gc @ disp @ " *-helvetica-*240-*" zt XLoadFont later XSetFont 14:41:14 disp @ 0 " times,charter-62:bold" zt XftFontOpenName later variable: font 14:42:00 that does what? executing XSetFont after freeing the stuff? 14:42:41 I think you should document that evil behaviour of zt 14:42:51 calling later a second time reverses the top entries on the return stack 14:42:53 virl: I will 14:44:35 well it does a nice segfault. 14:44:47 it worked for me :( 14:45:42 http://rafb.net/paste/results/4P6xLY56.html 14:46:03 http://retroforth.org/sample.png is the screen shot 14:47:50 yellow? oh man, and here it's green 14:48:19 my color mappings may be different than yours 14:49:34 I find it interesting 14:49:54 that they aren't only a little bit different 14:51:11 well, when this gets finished retro has a working x11 interface and second it has a presentation program so more software for your user contribution section ;-) 14:51:42 cool 14:51:59 nice :) 14:52:14 more stuff in forth is always good 14:53:21 --- join: nizchka (n=Computer@a101127.upc-a.chello.nl) joined #forth 14:53:23 sry, crc your version of solving this worked. I was only to dumb again to correct some lines 15:04:09 virl: ok 15:08:13 --- part: nizchka left #forth 15:12:24 --- quit: zpg (Read error: 110 (Connection timed out)) 15:12:27 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-147-056.pools.arcor-ip.net) joined #forth 15:20:42 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 15:20:51 --- nick: snoopy_1711 -> Snoopy42 15:22:40 --- join: zpg (n=user@81-178-73-233.dsl.pipex.com) joined #forth 15:30:05 --- join: virsys (n=virsys@or-71-53-74-48.dhcp.embarqhsd.net) joined #forth 15:36:55 is there something equivalent to .s that displays the return stack? 15:37:37 eh, .s isn't for the return stack 15:37:42 that' s the data stack 15:38:00 zpg: I don't think there usually is 15:38:20 virl: i'm looking for something that does for the return stack what .s does for the data stack (i.e., printing it) 15:38:25 tathi: ok, thanks 15:38:37 factor has one :) 15:39:13 ehm, zpg that's difficult also senseless. 15:39:54 well, it'd be nice to see what's happening on the return stack to clarify some code 15:39:56 it's neither difficult nor senseless 15:39:57 it makes only sense when you do that in a word definiton 15:40:15 * zpg scratches his head 15:40:32 segher, ok it's not difficult. but it makes not much sense. 15:40:56 why? 15:40:57 you have two stacks. how can it make sense to be able to dump on out, and not the other? 15:41:43 zpg, it makes only sense when you debug a word which throws too much on the return stack. 15:41:45 i'm looking at Do...Loop and the words I and J. an example of a multiplication table uses I and J in a slightly confusing way, so i'd like to see what's happening behind the scenes 15:42:03 because everything which is pushed on the return stack gets executed. 15:42:06 the "sense" would be to try and increase understanding 15:42:11 virl: you can call it from within a definition 15:42:16 hrm? 15:42:45 segher, what do you exactly mean. I think we are losing sync 15:43:05 zpg, keep at it; you'll soon find all the debug aids you long for aren't required. You'll reach a threshold point where you simply don't need them anymore. 15:43:20 : some-buggy-word bla bla bla .rs bla bla bla ; 15:43:38 from what i just read in Brodie, one can use the return stack within a definition to juggle parameters. do...loop maintains the current iteration count there. these are what i'm aiming to look at. 15:43:49 ok, zpg, then you could display the tos of the return stack 15:44:43 * zpg nods 15:44:46 zpg, yep that's true but at the end of the definition it should be empty because the interpreter calls the next adress on the return stack and then a segfault could happen 15:45:06 yep, just wanted to check what was happening from within a definition 15:45:37 well then, I don't know if it's avaible where you are but r . should do it. 15:45:49 : TABLE CR 11 1 DO 11 1 DO I J * 5 U.R LOOP CR LOOP ; 15:45:55 it's a nice quick check. of course it's not _needed", but neither is "swap" 15:45:57 i find the above a little confusing with its use of I and J 15:49:33 * zpg blushes 15:49:41 just re-read the page and clarified the above 15:51:05 --- quit: nighty_ (Read error: 104 (Connection reset by peer)) 15:55:44 I suggest that a word with a nested loop very likely needs factoring. 15:56:14 yeah confusing 15:56:49 At any rate, I and J are your mechanisms for investigating the return stack (though it isn't necessarily on the return stack that DO/LOOP stores its parameters, though it's common). 15:56:57 took me a while to realise what Brodie was saying about the (limit index) pair are on the return stack, then you enter the inner loop, and its (limit index) are placed on top, so i points to the inner index, j to the outer index. 15:56:59 anything that uses DO .. LOOP needs refactoring :-) 15:57:32 Counted loops are sometimes handy, but it's hard to follow when they're nested. Except in the rare case where it's preferable or necessary, I factor. No more than one loop per word. 15:57:35 segher: what ought one use instead? 15:57:41 BEGIN ... 15:57:50 not always as handy 15:57:56 ah ok 15:57:59 but more efficient :-) 15:58:10 i'm just working my way through Starting Forth at the moment, so taking words as I find them :) 15:58:21 DO/LOOP can be thought of as shorthand for all of the BEGIN DUP >R 1- ... R> UNTIL nonsense you'd have to do to replicate a counted loop. 15:59:01 ah ok 15:59:05 many many times almost all of that is unneeded in your loop though 15:59:15 zpg, beware of Starting Forth; as Elizabeth Rather said recently, it contains some extremely dated ideas about how Forth is implemented. 16:00:45 * zpg lets out an "oi!" and warbles 16:00:58 the floating point chapter was a slog 16:01:30 any suggestions for a better tutorial / online book would be appreciated. beginning to get to grips with postfix and the stack. 16:01:44 *i'm beginning .... 16:04:44 Hmm, there are a couple of books online, I'd need to chase them up to give you a reference. But anyway Starting Forth won't hurt you unless you take what it says as being cast in stone. It assumes a 16-bit Forth, a certain threading model, a certain memory layout, specific stack behaviour of things like DO, and other things like that which, although accurate for a certain very outdated model of Forth, do not hold 16:05:32 This is a recent book on Forth: http://www.mpeltd.demon.co.uk/arena/ProgramForth.pdf 16:05:35 i see. 16:05:37 * zpg looks 16:05:58 --- nick: nanstm -> Raystm2 16:07:00 ah yes, i read the second and twenty-first chapters of Pelc yesterday 16:07:04 (printer constraints) 16:08:33 Only prints chapters with the digit '2' at the beginning? :) 16:13:33 heh indeed 16:13:37 well - read 1 on screen 16:13:41 printed 2 for lunch break 16:13:54 but scanned through contents and thought 21 might be interesting (Q-and-A on forth) 16:15:10 I can't vouch for the book, but Pelc is a clever fellow; it stands a good chance of being worthwhile. 16:19:58 good stuff 16:20:02 he does say, btw: 16:20:21 "Starting Forth – Leo Brodie Sadly out of print, but if you find a copy, especially of the second edition, buy it. A web version by Marcel Hendrix is described as a tribute to this great book." 16:20:22 & 16:20:56 seems to offer it up as a starting point still; not sure where he places his own book 16:21:37 ah --> " If you are a novice programmer (or indeed at all interested in the craft of programming) read this book alongside “Starting Forth” and “Thinking Forth” by Leo Brodie." 16:22:10 implication, non-programmers should look at both, programmers needn't. 16:28:33 zpg, I can't agree with his Starting Forth recommendation; I understand why he makes it, as there really isn't another book to point at, and there are some good things about it, but nevertheless I advise caution. 16:29:06 The very earliest chapters of SF are non-partisan, and might serve as an rough introduction to the layman. 16:29:34 yeah that's what i've found so far 16:29:53 It was a wonderful book for its time, but that time is unfortunately well past. 16:29:53 the floating point stuff i found, as i said, a little hard to stick with 16:31:50 * zpg nods 16:34:59 time to sleep and look at this stuff on the morrow 16:35:08 thanks for your help again 16:35:09 k. 16:35:13 No problem. 16:36:24 night 16:36:25 --- quit: zpg ("ERC Version 5.0.2 $Revision: 1.726.2.10 $ (IRC client for Emacs)") 16:47:16 --- quit: Hobart (Remote closed the connection) 17:21:42 --- quit: crc (Remote closed the connection) 17:31:44 --- join: ASau` (n=user@home-pool-170-3.com2com.ru) joined #forth 17:31:45 --- quit: ASau (Read error: 104 (Connection reset by peer)) 17:33:33 --- nick: ASau` -> ASau 17:39:50 --- quit: virl (Remote closed the connection) 18:09:45 --- quit: Jim7J1AJH (Read error: 104 (Connection reset by peer)) 18:10:30 --- join: Jim7J1AJH (n=jim@221x115x224x2.ap221.ftth.ucom.ne.jp) joined #forth 18:22:16 --- quit: virsys (Read error: 104 (Connection reset by peer)) 18:24:14 --- join: virsys (n=virsys@or-71-53-74-48.dhcp.embarqhsd.net) joined #forth 18:40:33 --- quit: tathi ("'night all") 18:56:34 --- quit: uiuiuiu (Remote closed the connection) 18:56:38 --- join: uiuiuiu (i=ian@dslb-084-056-224-123.pools.arcor-ip.net) joined #forth 19:17:14 --- quit: Zymurgy (clarke.freenode.net irc.freenode.net) 19:17:14 --- quit: OrngeTide (clarke.freenode.net irc.freenode.net) 19:17:14 --- quit: michaelw (clarke.freenode.net irc.freenode.net) 19:18:22 --- join: OrngeTide (n=orange@orangetide.com) joined #forth 19:18:22 --- join: Zymurgy (i=zymurgy@cat.delfax.net) joined #forth 19:18:22 --- join: michaelw (n=michaelw@lambda.foldr.org) joined #forth 19:19:15 --- join: OrngeTid1 (n=orange@orangetide.com) joined #forth 19:19:15 --- quit: OrngeTide (Read error: 104 (Connection reset by peer)) 19:36:25 --- quit: segher (Read error: 104 (Connection reset by peer)) 19:46:12 --- join: segher (n=segher@dslb-084-056-132-071.pools.arcor-ip.net) joined #forth 20:26:10 --- quit: madgarden (Read error: 104 (Connection reset by peer)) 20:34:45 --- quit: I440r ("Leaving") 20:37:03 "Forth is not just a language, it's an environment. You and the language become one and invade the machine." 20:46:47 --- join: Ray_work (n=Raystm2@199.227.227.26) joined #forth 20:46:47 --- quit: madwork (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: ccfg (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: diverge (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: Raystm2 (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: warpzero (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: michaelw (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: Zymurgy (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: OrngeTid1 (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: ASau (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: Snoopy42 (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: ohub (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: Jim7J1AJH (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: JasonWoof (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: [Shain] (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: segher (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: virsys (clarke.freenode.net irc.freenode.net) 20:46:47 --- quit: saon (clarke.freenode.net irc.freenode.net) 20:46:48 --- quit: Quartus (clarke.freenode.net irc.freenode.net) 20:46:48 --- quit: arke (clarke.freenode.net irc.freenode.net) 20:46:48 --- quit: crc_ (clarke.freenode.net irc.freenode.net) 20:46:48 --- quit: ayrnieu ("leaving") 20:46:49 --- join: JasonWoof (n=jason@pdpc/supporter/student/Herkamire) joined #forth 20:46:49 --- join: segher (n=segher@dslb-084-056-132-071.pools.arcor-ip.net) joined #forth 20:46:49 --- join: OrngeTid1 (n=orange@orangetide.com) joined #forth 20:46:49 --- join: michaelw (n=michaelw@lambda.foldr.org) joined #forth 20:46:49 --- join: Zymurgy (i=zymurgy@cat.delfax.net) joined #forth 20:46:49 --- join: virsys (n=virsys@or-71-53-74-48.dhcp.embarqhsd.net) joined #forth 20:46:49 --- join: Jim7J1AJH (n=jim@221x115x224x2.ap221.ftth.ucom.ne.jp) joined #forth 20:46:49 --- join: ASau (n=user@home-pool-170-3.com2com.ru) joined #forth 20:46:49 --- join: Snoopy42 (i=snoopy_1@dslb-084-058-147-056.pools.arcor-ip.net) joined #forth 20:46:49 --- join: madwork (n=foo@derby.metrics.com) joined #forth 20:46:49 --- join: ccfg (n=ccfg@dsl-roigw1-fe8ade00-21.dhcp.inet.fi) joined #forth 20:46:49 --- join: saon (i=1000@unaffiliated/saon) joined #forth 20:46:49 --- join: Quartus (n=trailer@CPE0001023f6e4f-CM013349902843.cpe.net.cable.rogers.com) joined #forth 20:46:49 --- join: warpzero (n=warpzero@66.109.132.242) joined #forth 20:46:49 --- join: [Shain] (i=steve@c-67-161-56-76.hsd1.ca.comcast.net) joined #forth 20:46:49 --- join: crc_ (i=crc@69.46.24.28) joined #forth 20:46:49 --- join: diverge (i=diverge@72.20.15.21) joined #forth 20:46:49 --- join: Raystm2 (n=Raystm2@adsl-68-95-251-194.dsl.rcsntx.swbell.net) joined #forth 20:46:49 --- join: arke (n=f2@bespin.org) joined #forth 20:46:49 --- join: ohub (n=oherrala@sikw1.oulu.fi) joined #forth 20:46:49 --- mode: irc.freenode.net set +o JasonWoof 20:47:20 --- join: segher_ (n=segher@dslb-084-056-143-252.pools.arcor-ip.net) joined #forth 20:48:10 --- quit: segher (Read error: 110 (Connection timed out)) 20:48:10 --- quit: madwork (Read error: 110 (Connection timed out)) 20:55:15 --- join: ayrnieu (i=julian@pdpc/supporter/sustaining/ayrnieu) joined #forth 20:56:14 : 3dup ( x1 x2 x3 - x1 x2 x3 x1 x2 x3 ) dup 2over rot ; 21:02:05 --- quit: Ray-work (Read error: 110 (Connection timed out)) 21:11:54 --- join: Ray-work (n=Raystm2@199.227.227.26) joined #forth 21:37:08 Quartus - it turns out that I lied ; I didn't get the second edition of Thinking Forth. I got the third edition, the '2004 edition'. 21:38:38 Ah -- I thought I asked about Starting Forth. I figured you'd get the newest Thinking Forth. 21:39:02 oh, maybe you did. I do in fact have the second edition of Starting Forth 21:39:18 The new Thinking Forth is primarily a cleaned-up version. 21:39:46 --- join: madgarden (n=madgarde@Toronto-HSE-ppp3712714.sympatico.ca) joined #forth 21:40:18 same as the last edition :-) 21:40:35 But now with added PDF freeness. :) 21:40:44 --- quit: Ray_work (Read error: 110 (Connection timed out)) 21:43:17 --- nick: [Shain] -> Shain 21:53:49 --- part: Raystm2 left #forth 21:54:05 --- join: Raystm2 (n=Raystm2@adsl-68-95-251-194.dsl.rcsntx.swbell.net) joined #forth 22:54:09 http://ripple.sourceforge.net/ 23:08:31 Dumb name, complicated setup. :) 23:42:43 I haven't tried it 23:42:54 a friend irl joined the dev team and told me about it 23:52:01 --- join: Cheery (i=Henri@a81-197-21-61.elisa-laajakaista.fi) joined #forth 23:53:04 Terve! 23:59:59 --- log: ended forth/06.06.29