00:00:00 --- log: started forth/06.01.08 00:10:00 --- join: zoly (n=l@p549DF0E7.dip.t-dialin.net) joined #forth 00:10:28 'morning 00:43:41 --- quit: asymptote ("Leaving") 01:02:26 --- quit: sproingie (Remote closed the connection) 01:25:28 --- part: zoly left #forth 01:33:06 --- join: Cheery (i=Henri@a81-197-18-99.elisa-laajakaista.fi) joined #forth 01:40:33 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 01:50:08 --- quit: snowrichard ("Leaving") 02:13:51 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 02:16:13 --- quit: snowrichard (Client Quit) 02:26:31 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 02:32:05 --- quit: snowrichard ("Leaving") 02:44:18 --- quit: nballen () 03:28:35 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 03:29:29 hi 03:35:21 --- quit: snowrichard ("Leaving") 03:37:03 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 03:39:40 hi 03:45:49 --- quit: snowrichard ("Leaving") 03:50:17 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 03:52:09 --- join: virl (i=core@62.178.85.149) joined #forth 04:02:00 jo 04:02:02 hi 04:14:19 --- quit: snowrichard ("Leaving") 04:46:50 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 05:09:11 --- join: PoppaVic (n=pete@0-1pool47-70.nas30.chicago4.il.us.da.qwest.net) joined #forth 05:36:24 --- quit: snowrichard ("Leaving") 06:26:32 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 06:27:43 hi 06:27:52 howdy 06:28:07 just finished putting up my new e-commerce site. 06:28:42 got some debugging help from folks in #lfd 06:28:44 nce 06:34:25 its http://richardsnow.net/store/index.php 06:47:50 --- quit: snowrichard ("Leaving") 06:50:16 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 07:02:58 --- quit: snowrichard ("Leaving") 07:26:32 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 07:30:21 --- quit: snowrichard (Client Quit) 07:31:06 --- join: Topaz (n=top@wlan-221.ecs.soton.ac.uk) joined #forth 07:33:40 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 07:48:12 --- quit: snowrichard ("Leaving") 07:51:23 --- quit: PoppaVic ("Pulls the pin...") 07:52:53 --- join: PoppaVic (n=pete@0-1pool74-50.nas24.chicago4.il.us.da.qwest.net) joined #forth 08:19:19 --- join: JasonWoof (n=jason@c-71-192-20-4.hsd1.ma.comcast.net) joined #forth 08:19:19 --- mode: ChanServ set +o JasonWoof 08:27:51 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 08:29:39 hi 08:30:29 Hi, snowrichard. 08:31:31 my new site: http://richardsnow.net/store 08:32:09 spent all night programming it. 08:34:28 Neat. 08:36:33 i like it 08:36:36 * saon browses aronud 08:36:39 around* 08:40:45 #lfd, #web folks had some helpful suggestions. 08:41:32 hows the image load time? I'm on adsl, 512K up 08:42:18 and running a music stream at the moment 08:42:35 Not too bad from here. 08:43:16 check back later... I am going to go pick up a friend for a visit. 08:43:21 --- quit: snowrichard ("Leaving") 09:07:48 --- quit: PoppaVic ("Pulls the pin...") 09:20:16 --- quit: Topaz (Remote closed the connection) 09:37:32 --- join: sproingie (n=chuck@64-121-2-59.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com) joined #forth 10:03:19 Has anybody seen holy grail of rapid development? 10:04:05 we are the knights who say XP! 10:04:16 Oh. 10:04:31 I thought they are in #windows -channel. 10:05:59 nono, the XP where you write tests for your code first, then when you slap together enough code to make those pass, your code must be pristine and flawless 10:06:43 the XP where requirements get renegotiated every week 10:28:34 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 11:09:52 sproingie: code written with unit testing in mind is cleaner than code without 11:09:59 testable code is less coupled and more fine-grained 11:11:00 slava: yah, i'm knocking down straw men. lot of XP seems to make testing a substitute for any other kind of soundness testing 11:12:00 that's an anecdotal claim 11:12:17 you cannot refute the validity of unit testing by saying that some people don't do other kinds of tests, therefore unit testing is bad 11:12:45 i was making a joke. unit testing is fine. it existed before XP and it'll survive XP 11:48:25 --- join: snoopy_1711 (i=snoopy_1@dslb-084-058-128-121.pools.arcor-ip.net) joined #forth 11:50:56 --- quit: Snoopy42 (Nick collision from services.) 11:51:25 --- nick: snoopy_1711 -> Snoopy42 12:15:20 --- quit: Cheery (Read error: 104 (Connection reset by peer)) 13:42:11 --- join: amca (n=plump@as-bri-3-48.ozonline.com.au) joined #forth 13:42:34 Hello 13:43:46 hi 13:44:04 How goes it? 13:46:24 What are you up to on the docs? Are they finished yet? 13:48:34 not even close 13:48:39 i've converted 5 chapters, 7 remaining 13:49:51 Well at least you are well through it then :) 13:52:35 --- join: knapjack (n=jack@ip29.qdsl.openaccess.org) joined #forth 13:53:05 Is it going okay? Having any problems? 13:53:09 Hey, I'm trying to replicate a difference engine without using roll. Any ideas? 13:53:15 yes its fine 13:53:17 * knapjack is a newbie 13:53:41 knapjack: Difference Engine? As in like what Babbage did? 13:53:45 Yep 13:53:50 cool :) 13:54:57 * amca doesnt know enough about the details of how the difference engine works 13:55:09 Not a big deal, really, just trying to wrap my brain around the concepts, and it's a lot of fun. My friend's dad indirectly challenged me to write a log function, so you know, I started from square one. 13:55:36 So, *very* basic difference engine using ROLL: 13:55:39 : 4roll 4 roll 4 roll 4 roll 4 roll ; 13:55:39 : cycle 4 0 do over + 4roll loop 4roll ; 13:55:59 Five numbers on the stack, top stack number will be the output. 13:56:27 so, something like '24 60 50 15 1' will generate x^4 with each cycle. 13:56:43 Why are you dealing with 4/5 numbers at a time on the stack? 13:57:09 Is this a Forth stack or a Difference Engine stack? 13:57:21 Difference engine works by adding a series of numbers in succession to build a table. 13:57:35 http://ed-thelen.org/bab/ 13:57:38 you ever done numerical analysis? 13:57:40 thanks 13:57:54 Nope. Not yet, anyway. ;) 13:58:12 Okay. It reminds me of something I did in uni 10 years ago >.> 13:58:26 Yeah, it's probably exactly what you did. 13:58:43 Im not *that* old ;) 13:58:47 heheh 13:58:53 So are you coding the difference engine in Forth? 13:59:34 Well, not exactly, but I'm trying to replicate the process. The idea that there are values that get added & cycled to produce this table. 14:00:56 So you are replicating the functionality of the difference engine in Froth? 14:00:59 er...Forth? 14:00:59 Yep 14:01:07 okay 14:01:26 I would recommend having the difference table in memory, not on the stack. 14:01:45 Ah, cool, something new to learn. 14:02:15 then to compute the differences, you load the values on the stack and do the individual subtractions 14:02:19 Even though I only care about the end result of the table? 14:02:34 --- quit: Quartus (Read error: 104 (Connection reset by peer)) 14:02:40 Ill show you how I would imagine a table to look like in memory 14:07:08 28 01 01 02 00 14:07:08 27 02 03 02 00 14:07:08 25 05 05 00 00 14:07:13 20 10 00 00 00 14:07:15 10 00 00 00 00 14:07:33 Anyone else have a comment on my idea? 14:08:05 where of course, memory increases down, and then to the right 14:08:59 knapjack: Which value would be the one you were interested in? 14:09:29 Let me see... 14:09:33 Would you be wanting to expand the taable up or down? 14:10:15 Compare your table with something like this: 14:10:17 : 4roll 4 roll 4 roll 4 roll 4 roll ; 14:10:17 : cycle 4 0 do over + 4roll loop 4roll ; 14:10:17 : steam 20 1 do cycle dup cr . loop cr ; 14:10:28 with five values on the stack. 14:11:13 knapjack: Which value would be the one you were interested in? The 02? 14:11:20 --- join: Quartus (n=trailer@CPE0001023f6e4f-CM013349902843.cpe.net.cable.rogers.com) joined #forth 14:12:08 That's what I'm trying to figure out given your table. 14:12:32 ok 14:12:53 The left column is the data you start with (x) 14:13:20 the next column is the first difference, and the following columns are successive differences 14:13:59 another way to show it is: 28 01 01 02 00 14:13:59 27 02 03 02 14:13:59 25 05 05 14:13:59 20 10 14:13:59 10 14:14:07 OK, so even though it's called a difference engine, I 14:14:14 'I'm actually just doing addition 14:15:28 so if I start with 0 6 6 1 0 I'll generate: 14:15:38 <5> 0 6 12 7 1 14:15:38 <5> 0 6 18 19 8 14:15:38 <5> 0 6 24 37 27 14:15:38 <5> 0 6 30 61 64 14:15:44 and I only care about the last value 14:15:57 the 64? 14:16:01 yep 14:16:07 Well, the last value in each row 14:16:18 so 1,8,27,64.... 14:16:21 And what do those values represent? 14:16:26 I'm generating a list of powers of three 14:16:32 via addition 14:17:35 If I'm interpreting things correctly, with the right five values I should be able to approximate any polynomial function. 14:17:51 (though it might take more than five values, but you get the picture) 14:18:36 I see. I found the part of the babbage page that you are refering to 14:18:54 Unfortunately I have to leave :( 14:19:00 Set the clock to 0 6 6 1 0 and I generate x^3, set the clock to 24 60 50 15 1 and generate x^4.... 14:19:11 No problem. Thanks anyway! 14:20:27 --- quit: amca ("gone") 14:21:47 --- join: asymptote (n=weldon@pool-151-200-126-4.res.east.verizon.net) joined #forth 14:39:48 --- join: TheBlueWizard (i=TheBlueW@ts001d0225.wdc-dc.xod.concentric.net) joined #forth 14:45:17 Hi. 14:46:34 Hi 14:51:16 hiya Robert :) 14:58:11 but but but... powers of three go 1 3 9 27 81 14:58:36 in trinary they go 1 10 100 1000 14:58:58 Did my x^3 not work? 14:59:35 Ah, not powers of three, think 1^3, 2^3, 3^3, etc. 15:00:02 oh 15:01:06 you want a list of cubes 15:01:30 : cube ( x -- x ) dup dup * * ; 15:01:52 asymptote: yes, but how do you do it without multplication? 15:02:15 geez... 15:02:42 you want to do powers without multiplication? 15:03:01 that's what knapjack is talking about 15:03:14 I missed the part where he didn't want to multiply 15:03:15 oh, you logged in after that 15:03:46 I'm kind of simulating a "difference engine" 15:03:59 : pointlessly-inefficient-cube ( x -- x ) dup dup 0 do over + ; 15:04:05 except that's still not a cube... 15:04:41 that's totally broken 15:04:49 I don't even understand what it's supposed to do 15:05:00 that's a square 15:05:07 add x to x x times 15:05:20 The previous code, putting 0 0 0 3 3 will generate a list of powers of three. 15:05:34 oh wait, there's two dups. I assume you meant to put a "loop nip" in there 15:05:46 ..skipping the first. 15:05:49 yes; fingers slower than brain sadly 15:06:37 knapjack: you interested in generating a table? or calculating a particular answer 15:06:58 diference engine is cool 15:07:05 Babbage's engine? 15:07:16 Actually getting to the point of generating log_10. 15:07:31 ..the "hard" way ;) 15:08:04 though, apparently there's no easy way, which is kind of fun 15:08:17 the easy way is to precompute a table 15:08:45 and you can actually approximate log10 very closely with log_2 and ln 15:08:47 oddly enough 15:08:59 both of which are easier to compute on a binary computer 15:09:03 and how would you compute the log table without a log or ln function? 15:09:48 well log_2 on a binary computer is pretty easy 15:10:00 That's where I'm headed. And I'm probably ill-equiped, but it's fun anyway. 15:11:00 ln you can approximate from several directions 15:12:19 I'm interested in log_2 on a binary computer. I just barely have an inkling of what it might look like. 15:12:48 HELP: flatten "( class -- seq )" 15:12:48 { $values { "class" "a class word" } { "seq" "a sequence of classes" } } 15:12:48 { $description "Outputs a sequence of classes whose union is the given class. Unless the given class is a union class, the output is just a singleton sequence consisting of the given class." } ; 15:12:52 oops 15:12:55 sorry 15:12:59 what i meant to paste, is this: 15:13:00 : log2 15:13:00 dup 0 <= [ "Input must be positive" throw ] [ 15:13:00 dup 1 = [ drop 0 ] [ 2 /i log2 1+ ] if 15:13:01 ] if ; 15:13:49 Using a binary representation on the stack? 15:13:52 well, log_2 (100...0) is the number of digits 15:14:12 and log_2(x * y) = log_2(x) + log_2(y) 15:17:31 So, log_2(2)=log_2(3)? 15:17:50 You lost me, I think. 15:18:21 no 15:18:31 log_2(2 * 1) = log_2(2) + log_2(1) 15:18:38 = log_2(2) + 0 15:18:40 = 1 15:19:18 Yeah, but you said log_2 (100...0) is the number of digits, so I thought 2 and 3 would have the same number of digits in binary. 15:19:40 The number of zeros 15:19:47 damn my carelessness... 15:19:55 AH, OK, gotcha.... 15:19:56 log_2(0b10) = 1 15:20:42 and log_2(5)? Sorry for the remedial math lesson.... 15:21:12 I think I was asleep that day in Algebra. :) 15:21:30 Who knew one day I would care about logarithms. 15:21:42 knapjack, well it's a question of how long you want to keep approximating it 15:21:55 5 = 0b110 = 11 * 10 = etc. 15:22:00 you break it down into numbers you can find the logs of 15:22:06 for as long as you want to approximate 15:22:40 Gotcha. So you're just using the factoring trick using binary numbers? 15:22:48 right 15:22:56 now 5 is a bad example I guess 15:23:00 I'm with you now. 15:23:01 but 0b1101110001011001010 15:23:48 --- quit: asymptote ("Leaving") 15:31:29 : mul ( x y -- product ) 15:31:30 dup 0= if drop drop 0 exit then 15:31:30 2 /mod >r if dup dup + r> recurse + exit then 15:31:30 dup + r> recurse ; 15:31:39 heh 15:31:47 just implemented by idea for doing multiplication in forth with adding and recursion 15:32:05 it's not well factored, but oh well 15:32:05 --- quit: virl ("Verlassend") 15:32:20 What does r> and >r do? 15:32:27 * knapjack is still a newbie 15:32:33 pushes the top value onto the rsting 15:32:39 ( r> puts it back) 15:32:49 I just used it to get that element out of the way for a sec 15:32:57 Ah 15:33:11 saves a lot of swap/over/rot junk 15:33:45 over is cool by me, but rot is very much not, and I try to avoid swap where I can 15:33:50 I need to figure out how to kill the over in mine. 15:34:04 over is fine 15:34:08 whoops, not over but roll... 15:34:23 wait... what does roll even do 15:34:28 I'm pretty sure it's quite evil 15:34:41 I'm happy with my multiply thing though 15:35:00 * TheBlueWizard comes in... 15:35:16 it recurses for each bit in the 2nd argument 15:35:21 24 60 50 15 1 15:35:21 ok 15:35:21 3 roll ok 15:35:22 .s <5> 24 50 15 1 60 ok 15:35:24 * TheBlueWizard reads the discussion about generating a list of cubes of 3 15:35:33 pushing the rstack for each bit that's set in the 2nd argument 15:35:59 It does seem quite evil. 15:36:09 oh, it moves the nth element down to the top 15:36:16 like pick except it removes it from down there 15:36:28 yeah, definitely don't use roll 15:36:36 Yep. I needed some way to cycle through all the elements. 15:36:43 no you don't 15:37:01 don't put keep them on the stack 15:37:01 Well, heh, that's true, but I don't know enough yet to avoid it. 15:37:02 * TheBlueWizard observes that (n+1)^3 - n^3 is 3n^2+3n+1, or 3n(n+1)+1, so only one multiplication would be needed 15:37:09 use memory 15:37:33 that's what amca said, but I haven't learned that yet. Yet. 15:37:44 * TheBlueWizard wonders whether that helps :) 15:37:55 knapjack: HERE gives you a pointer to free memery 15:38:01 , puts a value there 15:38:16 example: here 1 , 2 , 3 , 4 , 15:38:28 * TheBlueWizard also observes that : times3 dup dup + + ; 15:38:40 now the stack will have a memory address. The address will point to memory containing [1,2,3,4] 15:39:23 So how do I reference individual items in memory? 15:39:39 TheBlueWizard: I'm wondering if I could substitute "dup dup + +" for "dup +" in my MUL word above and use it to compute cubes 15:39:50 If I, say, wanted to add element 2 and 3, put the result back in 2 and leave 3 untouched. 15:40:15 result should go in 3 right? 15:40:29 BTW another aproach would be to have 4 variables 15:41:02 ok, so you have a pointer to the 0th element (containing 1) 15:41:13 add a bit to that address and it'll point to the next one 15:41:19 (how much depends on your cell size) 15:41:27 if it's a 32-bit forth then you'll add 4 15:41:37 if you don't know or care, you can use the forth word CELLS 15:41:43 or CELL 15:41:53 OK 15:41:56 in a 32-bit forth: : cells 4 * ; 15:41:57 I did not really follow the MUL code, but I believe you were trying to implement "Russian peasant method" for multiplication, which can be done with additions and division by 2 15:42:15 so, given your address, you could get the address for the last one with: 3 cells + 15:42:46 knapjack: you'd probably be better off with 4 variables though: variable v0 variable v1 variable v2 variable v3 15:42:56 hmmm... maybe not 15:42:58 an actual strength-reducing MUL that used shifts would be really keen 15:43:37 OK, the code I posted earlier, 0 0 6 4 17 generates 3x^2-5x+19 15:43:44 sproingie: not sure what that means exactly. but it sounds kinda like what mine does 15:43:55 That's the cool thing about the difference engine. 15:44:14 "2 /mod" can be easily implemented by a shift and mask: "dup 2 >> swap 1 and" 15:44:29 oops, thats "2 /mod swap" 15:44:42 or is it... /mod is confusing 15:44:58 i can never remember 15:45:25 : /mod ( x y -- remainder quotient ) 15:45:36 stack juggling tends to erase performance gain 15:45:40 I remember the results are in the opposite order as the symbols in the name 15:46:15 you're usually interested in the quotient first 15:46:28 right 15:46:37 so why don't they call it "mod/" ? 15:47:16 because you're doing the div first and getting the mod after 15:47:18 --- join: amca (n=plump@as-bri-3-152.ozonline.com.au) joined #forth 15:47:22 assuming you go in stack order 15:47:27 in factor /mod is ( x y -- quo rem ) 15:47:31 i find it more logical that way 15:48:06 slava: yeah, that way makes more sense, given the name. but apparently it tends to be more useful the other way around 15:48:14 knapjack: Hi again. Did you get it sorted? 15:48:23 Still kicking it around :) 15:48:34 I just think if you make a word that gives you -- rem quo ) it should be called mod/ 15:48:39 JasonWoof was just enlightening me on using memory. 15:48:49 knapjack: oh yeah, let me say a bit more 15:48:52 you wouldn't do a divmod if you weren't interested in both results, so in the end it's kinda arbitrary 15:49:31 words should not be named by how they are implemented 15:49:42 words should be named by what they do from an external perspective 15:49:48 ie when you use it 15:50:10 when I use /mod I don't care how it's implemented (so long as it's effecient and provides the correct result) 15:50:26 but I _do_ care that it's named in such a way that the meaning of the word I'm writing is clear 15:50:35 at which /mod is miserable. it's confusing 15:50:41 mod/ would be more clear 15:50:58 because it hints that I'm getting the modulus _then_ the remainder 15:51:25 knapjack: so you understand how you could calculate the addresses of the 4 cells in the memory allocated right? 15:51:31 yep 15:51:58 so what you need to do to calculate the next row in your big table is to start at the right end, and add that to the previous entry, storing the result in the last 15:52:12 then you need to do that same thing again, but starting one element to the left 15:52:27 so we can abstract this out into a word 15:53:18 : dif-next ( addr -- ) \ pass the right element of a pair. they will be added together, and the result stored at addr 15:53:48 dup cell - @ \ fetch the cell to the left 15:53:57 ever @ \ fetch this cell 15:53:58 + 15:54:13 swap ! ; \ store back to the address given 15:54:42 knapjack: does this make sense? did I use any words you don't know? 15:55:11 Just four or so. :) But it all makes sense. I'm going to need to do some experimenting to cement it into my brain. 15:55:30 oops, that should be "over" not "ever" 15:55:48 now I can guess the other three I hope: 15:56:06 cell, @, ! 15:56:18 : cell ( -- x ) \ return the number of bytes in a cell (4 for 32-bit systems, 2 for 16-bit systems etc) 15:56:31 : @ ( addr -- x ) \ return the cell at addr 15:56:42 : ! ( x addr -- ) \ store x at addr 15:56:59 (@ is pronounced "fetch" as it grabs things from memory and puts them on the stack) 15:57:12 likewise ! is "store" 15:57:28 not "at" and "bang"? ;) 15:57:47 we call them by their meaning not symbol 15:58:06 I was making a bad joke 15:58:13 --- join: nballen (n=nballen@adsl-69-111-249-96.dsl.renocs.pacbell.net) joined #forth 15:58:24 now the bit where I realize that I've factored that word quite badly 15:58:26 * amca applauds knapjack's futile attempts at humour. :) 15:58:32 hahaha 15:58:55 : diff-next dup cell - @ over @ + swap ! ; 15:58:58 that's a mouthful! 15:59:05 and hard to read 15:59:18 might be easier on us if we made a word like so: 15:59:46 : diff-get ( addr -- x y ) \ return the cell at addr and the cell before it 16:00:13 dup cell - @ 16:00:18 swap @ ; 16:02:03 : diff-next dup diff-get + swap ! ; 16:02:16 OK, here's a procedural question. I still want this thing to behave like a difference engine, so I want to pass it a handful of values (say, five) and set it in motion. I suppose I could prompt for the five values, but I'd really like to be able to pull six values from the stack, five for the rotors and the sixth for the value of x, set it in motion and have it spit out the result. With six values already on the stack, how do I manage the free a 16:02:46 lost everything after "free" 16:02:58 ...free address value? 16:03:23 "[...]manage the free a" 16:03:32 juggling six values on the stack. not my idea of fun. sure you want to use the stack? 16:03:52 you really shouldn't ever be passing 6 values on the stack to anything 16:04:05 where are you getting these values? 16:04:14 if they are from user input save them directly into the table 16:04:25 if not they're probably in memory already, and just copy them into your table 16:04:38 Ah, OK, I can see that. 16:04:55 for larger input data (like 6 values) you'd usually pass a pointer to them 16:05:31 so something like: : diff-engine ( addr x -- y ) \ addr points to table data 16:10:18 One more question, how do I free that memory when I'm done? 16:10:37 usually don't 16:11:01 if you want dynamic memory allocation use ALLOCATE and FREE 16:11:56 you can free it if you haven't put anything after it with ALLOT (passing a negative value) or possibly FORGET 16:12:15 I wouldn't sweat it though. it's only like 20 bytes 16:12:23 ...and I see something like '6 allocate' leaves three values on the stack. I get 0, probably some address, and 0. 16:12:34 JasonWoof: Would MARKER deallocte memory too? 16:12:36 Ah 16:12:49 knapjack: allocate gives you an address where you have some memory 16:13:12 : allocate ( size -- addr ) \ allocate a buffer at least size _bytes_ long and return it's address 16:13:59 amca: I think you could use FORGET and MARKER together to deallocate memory. although I've never used marker 16:14:08 something like this: 16:14:10 marker foo 16:14:15 Ah, shoot, gotta run. Catch you guys later. Thanks so much for the help! 16:14:26 1 , 2 , 33 , 444 , \ ... 16:14:30 ' foo forget 16:14:36 np 16:14:39 later 16:14:55 I think you use it: 16:15:00 marker foo 16:15:09 --- quit: knapjack () 16:15:12 1 , 4 , 5 , 6 , 16:15:15 foo 16:15:53 oh, you're right 16:16:01 just read the rest of what MARKER does 16:16:19 I think mine would work, but it's silly to do "' foo forget" when you can just do "foo" 16:17:52 yep 16:24:59 I was all excited about figuring out that implementation of multiply using the stacks and + 16:25:06 not it seems rather obvious 16:25:11 s/not/now/ 16:27:11 : * 1 swap [ 1 = [ dupd + ] when >r dup + r> ] each-bit nip ; 16:27:13 in factor 16:30:22 what's dupd? 16:31:44 fancy btw :) 16:32:00 : dupd >r dup r> ; 16:32:05 not defined that way, but has same behavior 16:32:17 i guess here i could have just used over 16:32:20 ok 16:32:36 so it gives 1 2 3 -- 1 2 2 3 ? 16:32:42 well, I'm off to earthdance 16:32:44 * JasonWoof waves 16:32:54 amca: yes 16:32:55 * amca waves back to JasonWoof 16:33:16 So alternatively : dupd over swap ; ? 16:33:26 yes 16:33:32 :D 16:33:45 * amca danes happily at being able to get stack ops a lot better these days 16:34:04 s/danes/dances/ 16:36:26 JasonWoof: in forth, would you ever define something like each-bit, but taking an XT instead of a quoted code block? 16:36:56 JasonWoof: or would you use immediate words, like (each-bit calls a block with 0/1 repeatedly, from least significant to most significant bit of the input value) 16:40:45 --- part: TheBlueWizard left #forth 16:45:10 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 16:47:02 hi 16:48:19 Hello 16:49:38 hey 16:50:04 music stream is up. dropped bit rate to 64K 16:50:40 It was buffering at my mom's house when I tried it. 16:50:43 So it works? 16:50:57 http://richardsnow.net:8000 16:52:11 * amca has no s/card working in Linux 16:52:13 slava: I would define words like each-bit if I had a need for them (rather than use immediate words) 16:53:57 I have done a new web site last night. http://richardsnow.net/store 16:54:21 * amca looks 16:54:23 hi crc 16:54:29 crc: what does your markup language look like? 16:54:45 presently it looks a lot like groff 16:54:53 * snowrichard need to get to sleep before midnite tonight :) 16:55:23 It's still evolving though 16:55:33 I used some sort of roff like word processor on my color computer years ago. 16:55:35 http://rf.fcode.org/doc/rdml-spec.html 16:55:57 then again on the VAX 16:56:03 color computer" 16:56:05 ? 16:56:25 It was a radio shack system. 128K ram, 6809 E processor. 16:56:55 crc: can i see your code for parsing it? 16:57:02 Used a unix like system called OS9 -- its still available (on Intel even) but its not free. 16:57:19 http://rf.fcode.org/get/repos/rdml/html/html.forth 16:57:29 that's the parse/generate html source 16:57:42 snowrichard: Looks nice and clean 16:58:02 the web site? 16:58:06 a good chunk of it is not specific to html though (I'm also working on exports to text, opendocument, and manpage formats) 17:00:33 I'm burning some incense. Hopefully it will improve the odor from the cats in here ;) 17:01:58 snowrichard: yep 17:02:38 the items wrap around. If you are on the first one and hit "Previous" it goes to the last one in the category. 17:02:58 good :) 17:03:17 that was a suggestion from a lady in Austin today. 17:04:12 #web and #lfd folks had some suggestions too. 17:04:43 Peter Paul and Mary version of blowing in the wind :) 17:05:06 wtf? 17:05:14 current song 17:07:05 ah 17:09:28 whiskey tango foxtrot 17:18:22 --- quit: tathi ("leaving") 18:00:12 hi 18:16:04 lo 18:17:00 crc: will you implement cross-referencing and search? 18:17:09 crc: it seems it would be difficult with your one-pass approach 18:17:38 slava: I may later 18:20:46 well I've phoned the usual suspects (family)... now I am back. 18:34:21 --- join: JokeR69 (i=LNIX@12-208-98-237.client.insightBB.com) joined #forth 18:48:58 --- quit: amca ("d34d") 18:56:08 --- join: madgarden_ (n=madgarde@London-HSE-ppp3546104.sympatico.ca) joined #forth 19:11:51 --- quit: madgarden (Read error: 110 (Connection timed out)) 19:19:12 --- quit: madgarden_ (Read error: 110 (Connection timed out)) 19:35:11 --- join: madgarden (n=madgarde@Kitchener-HSE-ppp3577807.sympatico.ca) joined #forth 20:51:11 --- part: snowrichard left #forth 21:35:44 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 21:48:00 --- quit: snowrichard (clarke.freenode.net irc.freenode.net) 21:48:26 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 22:38:21 --- quit: nballen () 22:40:56 slava: I think I'd make one creating word 22:41:06 (re: each-bit) 22:41:11 ah 22:41:18 would work something like this: 22:41:33 : foo [ ' 0word ' 1word each-bit 22:42:14 foo would then be defined so that it would take one argument and call 0word for each 0 bit and 1word for each 1 bit 22:43:57 I guess with a text-based forth you could make the syntax: 22:44:03 each-bit: foo 0word 1word 22:44:15 but I think it's clearer above, and even more so when displayed in color 22:44:31 (instead of the 4 symbols) 22:45:42 : 0. 48 emit ; 22:45:52 : 1. 49 emit ; 22:46:19 : b. [ ' 0. ' 1. each-bit 22:46:41 and there you have a binary number printer :) 22:56:33 --- quit: JasonWoof ("off to bed") 23:59:59 --- log: ended forth/06.01.08