00:00:00 --- log: started forth/06.04.28 00:12:01 --- join: amca (n=plump@as-bri-1-49.ozonline.com.au) joined #forth 00:18:37 --- join: ecraven (n=nex@ns.AHL.Uni-Linz.AC.AT) joined #forth 00:18:48 good morning, forthers 00:20:25 assuming i have two lists, current: '(a b c d e) and wanted: '(c b a d e), how do i find a series of primitive operations (these are predefined, things like swapping two values or duplicating / dropping) that transforms the first into the second? 00:24:11 ecraven: Are the lists implemented as arrays? 00:24:58 Or is it pushed onto the stack? 00:25:23 not necessarily.. i want to compile Scheme to Forth, and i need to find a general way to reorder values on the stack do get the sequence i need 00:25:36 do you know about any papers dealing with this? 00:26:26 Well the basic Forth tutorials deal with manipulating the order of stack items, such as "Starting Forth" 00:26:59 the problem is i need an automatic way to do this. 00:27:29 Automatic way? As in a predefined function that aalready sorts the items on the stack in that order? 00:27:37 function = word 00:27:59 more like a function that gives me a sequence of words that would reorder the stack in the correct way 00:28:39 So the stack diagrsam you want is ( a b c d e -- c b a d e ) ? 00:28:59 in this case yes, but it could be anything.. 00:29:06 ( a b -- b b a b a) 00:30:38 With Forth words the stack diagrams are usually static. 00:31:34 Do you want the documentation for the stack manipulation functions? 00:31:38 i know, the idea is that i want to compile Scheme to a stack machine (~ forth) 00:33:28 so if i know that my scheme functions will need the stack to look like '( b b a b a) but at the point of call the stack is actually '(a b), then i have to reorder the stack, so the compiler should insert whatever words are necessary to get this done 00:34:03 How will the compiler know which stack pattern is required? 00:34:53 by analysing the function... 00:35:08 Which function? 00:35:08 (+ a (+ b c)) will give '(b c a) 00:35:13 the one i am compiling 00:35:47 * amca ponders 00:36:17 Will you be implementing the scheme programs in memory as a linked list of cons? 00:36:18 ;) sorry if i explain badly 00:36:23 yes 00:36:52 but my main problem is an algorithm to do this general stack reordering, i can't find anything on this anywhere :( 00:37:25 There is no "general" stack reordering as far as I know apart from the basic DUP, SWAP, DROP, ROT etc operators. 00:38:16 amca: yes, so i need to have an algorithm that provides me with a sequence of these instructions.. 00:38:35 I thought (+ a (+ b c)) would give (in infix) b + c + a ? 00:38:57 for example, (a b -- a a b b) will give me '(DUP TUCK DUP) or something like that 00:39:13 (+ a (+ b c)) corresponds to (a + (b + c)) 00:40:23 * amca is thinking 00:42:00 Well I think that you would need a sophisticated algorithm to take in a stack diagram and apply it to the Word's stack input 00:43:11 yes, that's what i'm aiming at.. seems this is quite complicated.. strange that noone has done this before 00:43:15 Why dont you just have the Forth program recursively go over the cons's and execute the primitives (like +) as Forth Words? 00:44:28 because the VM won't be forth, but a general stack architecture, and i'd like native code, not interpreted 00:44:41 I think others have done LISPs implemented in Forth, but I cant see why they would need to dynamically rearrange stack stuff. 00:45:17 Ah. So you want to compile the scheme program to binary? 00:46:24 So does the compiler need to be written in the VM's instructions? Can I ask what VM it is? 00:47:24 Or can it be a cross compiler? 00:49:10 it'll be both, as i need a cross compiler to compile the compiler into the VM 00:49:31 and the vm isn't done yet, but it'll be a lot like forth, only with some support for Schemey things 00:49:50 Ah 00:50:26 So you are using Forth to implement the cross compiler in, am I correct? 00:51:36 i'll probably have the cross-compiler in ordinary scheme ;) 00:51:44 lol 00:51:53 You like things simple, eh? ;) 00:51:54 i'm just asking in #forth, because people here know so much about stack machines, and noone else seems to do :( 00:53:24 Maybe Im too naive, but to me the basic psuedo-code of a scheme compiler would be "evaluate cdr; compile car; compile cdr" 00:54:16 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 00:54:27 you need to treat special forms and macros, but it's not very hard without optimisation etc.. 00:55:00 Special Forms are symbols with side -effects arent they? 00:56:10 The details for handling each special form or macro would be ineither evaluate or compile 00:56:17 not necessarily, IF is a special form, because it can't be treated like other function calls 00:56:26 ok 00:57:22 Well when it encounters a "if" it would probably just compile it in. 00:58:10 exactly.. that's why it's special, and not like other functions 00:58:46 the stack diagram I would think for an "if" word would be something like ( true-cons false-cons boolen-cons -- result ) 00:59:28 that would only work if i were interpreting.. which i'm not ;) 01:00:31 Do you know about how other LISP compilers work? 01:01:53 (I dont myself) 01:03:30 not a lot, but i'm reading things about it.. 01:03:37 anyway, have to go, thanks a lot for the help! 01:03:46 Sorry I couldnt help better! 01:04:47 --- quit: ecraven ("bbl") 01:15:53 good morning 01:16:02 Evening 01:16:34 he wants to do a lisp in forth? 01:17:21 * amca nods 01:17:25 With it compiled 01:18:27 But because you can do stuff like execute lisp data as programs, I dont see how you could completely have it in native code, especially with selection statements relying on i/o results. 01:18:41 And then you come to Macros 01:19:30 I've taken a look at a couple of lisp books online that my brother sent me links to but I haven't actually tried to learn it. 01:19:59 I think of it as the inverse of Forth. :) 01:20:10 I mean it is much more complex than that. 01:22:13 my sleep schedule is messed up again. I went to bed at about 5 AM yesterday, got up for a few hours and went back to sleep and woke up again around midnite. 01:22:30 Ouch! 01:22:44 What sleeping pattern would you prefer? 01:22:59 o.O 01:25:02 I usually go to bed around 10 or 11 PM. But I was updateing my web server with some new content, added another domain name for it. 01:26:22 Ah 01:26:45 Yeah, computers can really eat up time like that 01:27:26 getting accounts with two new payment services and installing the forms for the buy buttons took a while. 01:29:27 Time consuming or more complecated than expected? 01:29:30 plus when mozilla saves a web page it puts the images in a directory and I had to copy those too, it changes the source for images and style sheets. 01:29:42 (complicated) 01:33:25 in about 4 hours I'll have some food cooked. I put a beef stew in the crock pot. 01:34:04 That is what Im no good at with cooking - waitinf 01:34:08 (qaiting) 01:34:12 erp 01:35:20 this is pretty simple, there's a package of sauce, a pack of potatoes, and a bag of meat and veggies. just dump in the pot and cook for 4 hours, add the potatoes and cook another 30 minutes. 01:37:39 with 2 1/2 cups water 01:43:23 Why cook the potatoes only 30 and everything else longer? 01:43:56 so they won't get overdone? I just read the directions on the package 01:45:07 Ah. hehe 01:45:18 What temp is it cooked at? 01:45:43 its the high setting on the crockpot, just enough to keep it at boiling 01:47:21 What is the difference between simmering and boiling? 01:48:30 am I a chef? not really :) 01:48:41 lol 01:59:20 running YOU there is a phpAdmin update 02:01:50 just restarted apache 02:13:49 --- quit: snowrichard ("Leaving") 04:29:12 --- join: PoppaVic (n=pete@0-1pool64-34.nas22.chicago4.il.us.da.qwest.net) joined #forth 04:34:47 --- quit: amca (Read error: 113 (No route to host)) 05:46:28 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 06:15:23 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 06:17:32 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 06:28:16 --- join: madwork (n=foo@derby.metrics.com) joined #forth 06:37:25 --- quit: snowrichard (Remote closed the connection) 06:41:17 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 06:49:23 --- join: Cheery (i=Henri@a81-197-22-81.elisa-laajakaista.fi) joined #forth 07:18:11 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 07:18:25 lo, tathi 07:18:34 hey 07:21:34 I've got a file for you to peer at.. 07:22:44 http://rafb.net/paste/results/3HUhD660.html 07:24:14 I'm trying to codify an extensible, interpretable "layer" for stack-entry/object typing/handling. 07:24:48 I'd thought of piling param into the dstack, but it ends up fairly nasty. 07:26:24 "piling param into the dstack" ? 07:27:06 oh, I'd thought of forcing the VM "stacks" to hold and treat everything, lower and lower - but you'd STILL end up needing a C interface. 07:28:09 so what ARE your VM stacks going to hold? 07:28:30 I am considering those "objects" 07:28:46 ..based on those, you can do most anything. 07:29:49 I was trying to avoid stackframes, structs-on-stacks, guessing and misinterpretations. 07:30:37 yeah...have fun with that. 07:30:50 I thought that'd be the comment ;-) 07:30:57 * tathi got fed up with C again 07:31:02 hehe 07:31:21 --- quit: crc (Read error: 110 (Connection timed out)) 07:31:30 I'm going back to a Forth that's tied closely to my platform, and make it do what I want. 07:31:41 Okeydokey 07:31:44 Build it up, and then cross-compile to other platforms later. 07:31:51 uh-huh ;-) 07:33:02 It's going pretty well, so far. 07:34:06 well, if you get there before me - file-attach me an email ;-) 07:34:35 Yeah, we'll see. Early days yet. 07:35:17 I sure think we need SOMETHING 07:35:53 ..basically "something" needs to deal with .o files, and that itself is a diseased-slut. 07:36:04 Heh. 07:36:40 I feel like I know how to do pretty much everything that I want. 07:37:10 And have coded samples at some point for most pieces 07:37:40 But it's a lot of stuff 07:38:10 --- join: JasonWoof (n=jason@c-71-192-33-206.hsd1.ma.comcast.net) joined #forth 07:38:11 --- mode: ChanServ set +o JasonWoof 07:38:30 I just need to keep working away at it until I get it all together in one Forth 07:39:03 Instead of flitting all over the place, doing lots of little separate projects. 07:40:12 Hopefully this time I can stay focused enough to do that :) 07:42:20 hi tathi hi PoppaVic hi everybody else.arke 07:42:47 hi Ray 07:44:11 * Ray_work goes backto work. :) 07:50:59 brb - recycle 07:51:01 --- quit: PoppaVic ("Pulls the pin...") 07:52:44 --- join: PoppaVic (n=pete@0-1pool47-147.nas30.chicago4.il.us.da.qwest.net) joined #forth 07:53:23 tathi: it's those goddamned "issues" and "brushfires" - shit, they are worse than aligators. 07:54:22 Yeah. Fortunately, they're your issues and brushfires, not mine. :) 07:54:42 tathi: right, you've yer OWN - all because we lack a base. 07:55:36 that filed I rafb'd? I'm thinking about using macros like FICL did - for multistate interpreting. 07:55:44 filed/file 07:56:06 That was such a CLEVER use of cpp 07:56:06 The only issue I have is that it is going to take longer than I'd like to code the things that I want to code. 07:56:12 hehe 07:56:22 yeah, FICL has some nice bits 07:56:48 sure, we ALL want to "get busy" - it's those damned 'gators snappin' at yer ass that make you want large-bore weapons. 07:58:27 It's like that idiotic gcc front/back end thing... Yer still talking "translators" - and not shell/interactive - so most FORTH(s) are out in the cold. 07:58:46 ok, whatever you say 07:59:09 * PoppaVic sighs 07:59:13 Have fun. 07:59:18 Yeah, I'm going back to coding -- I want to finish adding input history today. 07:59:32 not using the history lib? 07:59:57 (I don't like it, but it IS "there") 08:00:07 No 08:00:58 I'm writing this in Forth, with no libraries, and hand-translating to asm for the initial binary. 08:01:03 ahhhhhh 08:01:16 tathi: ouchies 08:01:32 It has been surprisingly painless so far. 08:01:54 tathi: until you start porting or interfacing 08:02:21 Well, I'm not doing that until it's all written and can bootstrap itself 08:02:43 tathi: ahh, backing off from embedded? 08:03:18 So it will just be a matter of writing the back end of the compiler to handle whatever other platform 08:03:41 oh, lord... what do _you_ mean by "backend"? 08:03:57 the bits that do the actual assembling/compiling 08:04:04 ahhhhh 08:05:10 Yeah, I got depressed and iked, (then amused), by the GCC idea of front/back ends... It was like a "LameForth" 08:05:17 iked/irked 08:05:48 instead of stacks, they just sub in trees and traversals. 08:06:13 yeah, it's the traditional way to write a compiler 08:06:17 see any text on compiler construction 08:06:51 I know 08:07:06 yet, we both know forths are not "traditional" 08:07:20 oh. yeah. 08:07:22 well, they have their OWN traditions, anyway 08:07:42 hmm...yeah...I'm not too well up on those. 08:07:58 I only discovered forth abokt 5 years ago 08:08:29 I'm not that against RPN, but I also recall writing many words that looked ahead for adjectives/operators/etc 08:08:47 it merely changes the way you view "source" 08:09:47 Yeah, that's one really nice thing about Factor -- once you have anonymous code blocks as objects, you don't have to do that so much 08:11:38 I dunno, I didn't much care for Factor... Must be me, or the docs or mindtwists. 08:13:07 I prefer to try really, really HARD to treat 'C' as my "portable macro-assembler".. Where that leads is often amusing or depressing 08:13:26 yup 08:14:02 I do, as a general principle, want to stonewall every one of the fuckin' C-commies. 08:15:04 I can't remotely blame K&R - they wrote a _tool_ - like forth... But, these committee-fucks... *sigh* I can't stand shit that can't report what it should. 08:16:49 That file I pasted? Well, it dhould not matter where we run - it should work.. We should then focus on "faster" or "smaller". And, that's where I want to get metabuilder to slip in. 08:17:17 right 08:17:43 basically, we want a meta[interpreter, compiler] - rooted in C. Although, we should prolly think of .o 08:19:11 heh - the ball-kicker being: we KNOW there are ten-tons of C libs and headers around. 08:48:45 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #forth 08:58:05 --- quit: GoHst16 (Remote closed the connection) 09:12:58 --- join: Snoopy42 (i=snoopy_1@dslb-084-058-191-191.pools.arcor-ip.net) joined #forth 09:33:22 --- quit: Cheery (Read error: 104 (Connection reset by peer)) 10:30:53 --- join: Ray-work (n=Raystm2@adsl-68-89-124-38.dsl.rcsntx.swbell.net) joined #forth 10:30:54 --- quit: Ray_work (Connection reset by peer) 10:34:27 --- join: segher__ (n=segher@dslb-084-056-166-207.pools.arcor-ip.net) joined #forth 10:36:54 --- quit: PoppaVic ("Pulls the pin...") 10:45:18 --- quit: segher_ (Read error: 110 (Connection timed out)) 11:18:09 --- quit: JasonWoof (Read error: 110 (Connection timed out)) 11:25:05 --- join: JasonWoof (n=jason@pdpc/supporter/student/Herkamire) joined #forth 11:25:05 --- mode: ChanServ set +o JasonWoof 11:25:49 what the heck happened to my home computer? 11:27:11 good thing I copied my work files onto my laptop 13:01:01 yikes JasonWoof! good job saving that work. 13:30:12 --- quit: timlarson_ ("Leaving") 13:33:34 course I can't get at my e-mail... 14:07:26 --- quit: madwork ("?OUT OF DATA ERROR") 14:08:57 --- join: thinkinginbinary (n=thinking@phoenix.thomastuttle.mooo.com) joined #forth 14:09:15 Quartus: Hey. 14:33:41 --- quit: JasonWoof ("going home") 14:35:34 --- join: crc (i=crc@pool-70-110-208-55.phil.east.verizon.net) joined #forth 14:35:35 --- quit: charles` (Remote closed the connection) 14:35:54 --- mode: ChanServ set +o crc 15:34:40 --- quit: thinkinginbinary ("Leaving") 17:01:54 hi crc 17:13:44 --- quit: tathi ("leaving") 17:22:13 --- nick: segher__ -> segher 17:24:41 --- join: Amanita_Virosa (n=jenni@adsl-69-154-178-250.dsl.hstntx.swbell.net) joined #forth 17:26:36 hi slava 17:32:08 i like my new compiler. its much more elegant than the previous few reworkings 17:32:22 and the design is getting simpler 17:32:24 new compiler? 17:32:50 i redid a large part of factor's compiler to facilitate better optimizations 17:33:16 i'm going to work on floating point stuff now 18:06:11 --- quit: madgarden (Read error: 104 (Connection reset by peer)) 18:07:09 --- join: madgarden (n=madgarde@Toronto-HSE-ppp3712957.sympatico.ca) joined #forth 18:21:50 --- join: JasonWoof (n=jason@c-71-192-33-206.hsd1.ma.comcast.net) joined #forth 18:21:50 --- mode: ChanServ set +o JasonWoof 18:37:22 --- quit: snowrichard ("Leaving") 18:39:19 --- quit: uiuiuiu (Remote closed the connection) 18:39:21 --- join: uiuiuiu (i=ian@dslb-084-056-229-066.pools.arcor-ip.net) joined #forth 18:59:07 --- quit: Amanita_Virosa ("Wewps.") 19:35:09 --- quit: warpzero (Read error: 104 (Connection reset by peer)) 19:37:09 --- join: warpzero (n=warpzero@wza.us) joined #forth 21:06:28 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 21:36:21 --- quit: snowrichard ("Leaving") 22:03:41 hi 22:04:58 morning 22:05:23 virl: what do you think of SMP? 22:07:45 well, I can't say it clearly, but it's probably nice to execute a program parallel, the big minus is the overhead of coordinating everything. 22:08:33 I only heard/saw some horror programs where the code was longer for SMP than for one cpu. 22:10:01 well, say you have 32 cores 22:13:56 then you have probably 31 one real cores because one you need for managment 22:15:20 not really, the scheduling workload is distributed 22:16:03 you can take advantage of SMP just by using OS threads 22:21:09 well, I don't have a smp system, so I can't really say something about it. 22:22:06 i have one, and factor only uses one cpu 22:27:36 --- quit: tiff (Read error: 104 (Connection reset by peer)) 22:27:55 --- join: Raystm2 (n=Raystm2@adsl-69-149-38-124.dsl.rcsntx.swbell.net) joined #forth 22:45:37 --- quit: Raystm2 (Read error: 104 (Connection reset by peer)) 22:45:38 --- join: Raystm2_ (n=Raystm2@adsl-68-95-253-247.dsl.rcsntx.swbell.net) joined #forth 22:48:53 so splitting it into different threads would do it, but which part do you want to split? 22:51:02 well, just break problems up into hundreds of sub-tasks 22:51:05 and let the scheduler handle it 22:51:11 use message passing to co-ordinate activity 23:38:35 --- quit: JasonWoof ("off to bed") 23:54:42 --- join: Cheery (i=Henri@a81-197-22-81.elisa-laajakaista.fi) joined #forth 23:59:59 --- log: ended forth/06.04.28