00:00:00 --- log: started forth/05.09.01 00:00:18 why would the be different than in other Forths? 00:00:31 R@ 00:00:34 R> 00:00:36 >R 00:01:17 2R> 00:01:46 I figured out what I did wrong. 00:02:10 the interpret vs the compile time actions of r> seem to be different 00:02:47 When I type 1 >r into the interpreter, I get a " Invalid memory address" error 00:03:34 but if it is a definition, it works 00:04:24 Any idea why that would be? 00:04:41 ("is in a defnition", that should have been) 00:05:26 umm 00:05:54 when you put a number on the return stack in a definition, you have to use it up before that definition exits 00:06:12 because there needs to be a return address there when you exit 00:06:43 well, interpretively, you exit a definition every time you hit enter 00:06:56 * amca nods 00:06:59 I see, thanks :) 00:07:05 :^) 00:20:38 Is there a version of pick that copies instead of moves a value in the stack? 00:24:37 there are the words THIRD and FOURTH in SwiftForth 00:24:46 which go along with OVER 00:25:24 you could just read the definition of OVER in your system and sythasize it by creating a version of OVER which takes a paramer 00:25:43 that instead of locals? 00:26:08 That's an idea. I think Ill implement a ver of THIRD. 00:27:18 hehe. OVER in gforth is in assembly. :) 00:27:19 : OVER 1 PICK ; 00:27:42 PICK does copy 00:27:44 doesn't it? 00:27:46 ? 00:28:06 4 8 12 16 00:28:32 3 PICK . 4 00:28:32 yep :) 00:28:34 .S 00:28:41 4 8 12 16 00:28:42 so that was what I was looking for :) 00:28:52 :^) 00:28:57 I was doing >r over r> swap 00:30:18 Ah, I misread the ANS def of PICK 00:30:29 ok 00:31:31 I thought it said "Remove xu. Copy the xu to the top of the stack." instead of "Remove u" 00:44:57 I'm getting tierd. good night 00:44:58 --- quit: LOOP-HOG ("ChatZilla 0.9.61 [Mozilla rv:1.7.1/20040707]") 00:46:49 night! 00:54:03 --- quit: Quartus (Remote closed the connection) 02:03:09 --- quit: OrngeTide ("gone") 02:47:13 --- quit: amca ("d34d") 03:25:00 --- quit: virsys (Read error: 54 (Connection reset by peer)) 03:26:05 --- join: virsys (n=virsys@or-65-40-180-29.dyn.sprint-hsd.net) joined #forth 03:30:06 --- quit: virsys (Read error: 104 (Connection reset by peer)) 03:32:17 --- join: virsys (n=virsys@or-65-40-180-29.dyn.sprint-hsd.net) joined #forth 05:35:48 --- join: PoppaVic (n=pete@0-1pool46-71.nas30.chicago4.il.us.da.qwest.net) joined #forth 05:37:42 G'day 05:49:31 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 06:15:47 --- quit: tathi ("leaving") 06:47:10 --- join: Quartus (n=trailer@ansuz.pair.com) joined #forth 06:47:34 hiya pv 06:47:44 howdy, docl 06:47:54 Got some more work fone with the header ;-) 06:47:59 done, two 06:48:01 cool 06:48:56 FOVM=48; defaults=512 06:49:16 FOVM? 06:49:39 http://rafb.net/paste/results/mem8jo25.html 06:49:49 It's becoming interesting. 06:50:34 --- nick: Raystm2 -> nanstm 06:52:28 yeah, it looks neat 06:52:52 neat? 06:52:58 It's getting there... I think it might work as well for a synthetic-assembler as for forthish 06:54:39 Basically, I've just assumed there is a whole shitload of hidden support in any etched-chips anyway. 06:56:47 the comments give it a sense of purpose, but I'm still not quite sure what it does 06:58:03 it's a header for a c program? 06:58:20 how does it go with asm or forth? 06:58:24 it doesn't do anything - yet. Trying to hammer down structures/types 06:58:52 ah ok 06:59:11 ahh, "asm" - what asm? ;-> I'm working up a C interface for a vm we can use for several areas and multiple interfaces. 07:00:21 My basic assumption is: we are a vm/emulator, and have no idea of the platform/cpu - but we can sure use a uniform-interface. 07:00:51 and, C is prolly the way to make the essentials "uniform" 07:01:22 so compile this natively to a given platform and you have it 07:02:14 yah, add funcs for opcodes and syscalls and it's the GLUE that manages any given 'thread'/process using the vm 07:02:52 ok, so the opcode stuff comes later. the header is what makes that part work 07:02:52 My usual approach to any problem is begin with typedefs, structs and defines. 07:02:58 yessir 07:03:48 We'll end up with a few func-proto published soon, and then the rest is up to the codes and lists - the "engine" 07:04:51 What we'd want is for implementors to write consistent "glue". 07:05:49 And, so we trade time for smaller-images. So what? Done properly, code can be "decompiled" right out to a native-binary. 07:06:29 cool 07:07:02 Basically, the energy spent here should get us a system for writing forthlike vm systems - which can decompile out to console/source or to a file/native. 07:08:31 I'm going to add a "CELL *regs;" and do some changing, too. This should let us extend a decompiler/translator/native-code translator to support just about anything. 07:23:42 --- join: sproingie (i=foobar@64-121-15-14.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com) joined #forth 07:23:52 shit.. I am soooo lagged today 07:24:52 Ping reply from docl : 62.31 second(s) 07:34:03 hehe 07:34:36 I'll have to race out soon: Ma' wants to go shoppin', but the header is looking even better. 07:34:48 cool 07:34:55 FOVM=52; defaults=512 07:35:25 http://rafb.net/paste/results/kP1oOJ29.html 07:36:32 I want to stick some default func-ptr into the fovm_default struct, and I'd need tidy typedefs, but otherwise - we are about ready for func-proto. 07:37:58 looks like you've got a pretty good start 07:38:36 I sorta-almost understand it :) 07:39:24 yeah. I think it might work pretty well, although I'm thinking of losing 'IP' for my old "commonforth" paradigm that was easier to read. 07:39:46 ..or adding a few macros for it, anyway 07:40:25 hmm, the program image cell? 07:40:30 forth high-level words are "LOL" (list of lists), etc. 07:40:54 hehe 07:41:02 yeah, the cell and /image' is not an issue. 07:41:31 it's just that as you delve into interpreting or compiling them, you can get waaaaayyyyy confused 07:42:00 maybe the defines will live in the default-code file. 07:47:28 I'm starting to realise how much in common computer languages have. they all have if, while, for, function, and some kind of input and output. everything else is just some fancy custom macro. even compiling is just a matter of when you choose to translate it to machine code. 07:47:44 damn straight 07:47:57 dynamem, devices, etc 07:49:01 THe whole interpreter/emulator/compiler mess is simply made ugly and filesystems/drivers/devices make it worse. 07:49:54 the mess is kind of distracting 07:50:08 on any doze "drive:path" system, we could fake it all, including the backslashed-paths 07:50:46 functions are just improved gotos, for is an improved while. i/o is improved memory. "improved" just means a few features added for convenience. 07:51:04 yes, the distractions are - near as I can tell - why folks scream and cry and then give up and write whackiness 07:51:07 --- join: JasonWoof (n=jason@pdpc/supporter/student/Herkamire) joined #forth 07:51:07 --- mode: ChanServ set +o JasonWoof 07:51:20 mornin JW 07:51:40 hi jas 07:53:06 I just realised, bash is just as powerful, ultimately, as any other language. maybe a bit slower, but whatever the job it can be done. 07:53:25 sorta'-kinda', yeah 07:53:35 there's probably even macros if you know how to use them 07:53:45 remember: there bash is 100% an interpreter 07:53:54 there/that 07:53:59 yeah 07:54:06 it's like BASIC 07:54:20 ..and less portable 07:54:33 hmm 07:54:47 less easy to port? 07:54:54 anything can be ported 07:55:00 this is why I keep beating on my Metabuilder ideas 07:55:17 no, not everything can be ported. You need an underlayer of glue. 07:55:42 ok, translated, cloned, whatever. functionality can be transferred 07:55:51 translated/emulated, sure 07:56:05 all the bash functionality could be written in forth 07:56:19 or "forthISH", yeah 07:57:12 but it's true that in the absence of such a system, bash scripts are only as portable as bash itself. 07:57:23 yup 07:57:32 like make or sh or perl 07:57:57 anyway, lemme' go get this shopping-expedition outta' the way. Back later. 07:58:00 --- quit: PoppaVic ("Pulls the pin...") 08:10:24 bash wouldn't be terribly useful on systems that don't do commandline arguments 08:11:39 also, I consider the power of a language, not whether you _can_ do things in it or not, (as you can do most anything in most any language if you put enough energy into it) but rather on how easy it is to do things 08:12:11 sure, you can do anything in bash 08:12:20 Speuler wrote a forth interpreter in it 08:12:52 but to me, the measure of the power of eg bash is what sort of lengths you have to go to to get it to do something like that 08:13:36 and of course it's totally subjective. 08:14:04 mostly in what sorts of things you think it ought to be able to do easily, and what programming techniques you consider easy 08:14:16 eg most people couldn't care less how hard it is to write a forth interpreter 08:26:30 I just got a copy of bashforth. I should look through and see how hard it is 08:26:55 I'm betting bash in forth is easier than vice versa 08:27:09 certainly more efficient 08:28:55 technically speaking unlambda and brainfuck are as powerful as any other language 08:29:06 yeah 08:29:31 are there macros in bash that would let you extend it like forth? 08:29:32 turing equivalence isn't much to go with 08:29:41 there's constructs in bash that aren't seen in many other languages 08:30:09 i use this idiom a lot: cat foo | grep blah | while read line; do abc; xyz; done 08:30:31 only other language i've seen with that kind of expressivity is icon 08:30:41 maybe haskell if you can deal with the bondage and discipline 08:30:52 sproingie: bf is definitely not as powerful as others by my measure 08:31:21 JasonWoof: in a purely technical sense tho, it can do anything 08:31:37 sproingie: yeah, but as I expressed above... so what? most languages can do anything 08:32:01 JasonWoof: my point exactly. turing equivalence and a dollar won't get you a coffee at starbucks 08:32:02 it's not a good measure of power if most languages get the same score... 100% 08:32:54 i used to have a book that demonstrated distributed object oriented applications in almost pure korn shell 08:32:58 yeah. but to me the piping and command-line args are really interesting. 08:33:10 with just one java class used to give you a portable "socket" command 08:33:16 oh, bash is great for running programs 08:33:27 it had an ORB written in pure korn shel 08:33:29 it makes a lot more sense to my brain to think of them like apps, spitting out data, taking it in, and doing stuff to it 08:33:35 it was really insane. but lots of fun. 08:33:49 my perl is generally a bit bash-like 08:34:11 as is mine 08:34:17 but i miss pipes in perl 08:34:34 perl6 is supposed to have 'em ... perl6 is supposed to be all-singing and all-dancing and so on 08:34:35 can't you just do: system("foo | bar") ? 08:34:46 yes, but then i'm not really writing perl 08:34:59 because you have to quote it? 08:35:03 big deal 08:35:05 I use system a lot 08:35:16 because i can't use a single character to pipe it into a function or arbitrary loop 08:35:24 perl you have to quote system()s but not regexs 08:35:29 i have to set up popen and treat it as file i/o and so on 08:35:36 true 08:35:49 and it's the other way round with regexs 08:35:53 they're annoying in bash 08:35:56 icon looks really nice, but it's a complete orphan 08:36:44 FOO="`echo "$FOO" | sed -e 's/foo/bar/g'`" 08:36:45 python has generator expressions. as usual they're almost what i want, except for being deliberately crippled 08:37:10 python does that to me a lot. introduces great features, but guido thinks they might actually become useful so he cripples them before that happens 08:37:40 man, I was noticing how much I was getting done earlier because I hadn't gotten on irc 08:37:51 irc does that 08:38:13 but if you think it's bad, muds are worse 08:38:23 * sproingie was reading about scheme macros, while the folks on #scheme argue about weird minutae 08:38:30 hehe 08:38:40 yup they do that 08:38:54 i stopped doing muds years ago. too frustrating to see 'em stuck in such simplistic code 08:38:56 somtimes I wonder if even they know what they're saying 08:39:25 yeah, it's really way more low-tech than it could be 08:39:28 i could write a better mud codebase in a week than most, but that would be like 1% of the picture. superior technology won't make people come to your mud 08:39:36 true 08:39:36 or even download and use it 08:39:46 docl: play[ed] discworld mud? 08:39:53 I logged in once 08:40:07 right now I usually get lost on the two towers lpmud 08:40:38 I do like the discworld books 08:40:53 yeah :) the books are good too 08:41:06 i thought of hacking on some C or C++ mud just to have something to do 08:41:16 but for the most part their licenses are just asinine 08:41:28 oh yeah 08:42:18 I figure on making a pd mud codebase at some point, possibly forth if I can get a handle on it 08:42:34 "if there's the possibility that you might make a cent from anything related by six degrees to this code, you are forbidden from using this" blah blah 08:43:18 there's better uses for your time 08:43:47 docl: if you're into muds, may as well just for yourself. but the mud community puts technology really low on the deciding factors list 08:43:48 LambdaMOO is less restrictive. TinyMUSH might be as well 08:44:28 yeah, you're probably right. however if I populate it with orcs and weapons, I might attract a crowd 08:44:41 mush has anti-commerce clauses in it too, tho i think some variants are more free. mush's codebase is best improved however with rm -rf 08:44:45 with MOO close behind 08:45:00 hehe 08:45:26 DGD is about the only "mud driver" really worth keeping around and expanding on 08:45:28 lpmud is fairly good. they based a real language on LPC 08:45:47 pike, which is gpl 08:45:55 yah, pike's ok. not spectacular, but not bad 08:46:09 MOO's better in some ways, but it's painted into a corner syntax-wise, very hard to expand 08:46:16 right 08:46:29 i've made heroic efforts to expand the MOO language. it's hard 08:46:31 should have gone the MUCK route with a forthy syntax 08:46:50 but as a beginner language, MOO is very nice. i've taught people how to program with it 08:47:07 cool 08:47:08 and its VM isn't too bad, very simple hackable design 08:47:16 very similar to python's vm 08:47:18 that's good 08:47:46 ok, i gotta get going 08:47:48 * sproingie waves 08:47:51 ok, see ya 08:50:41 just looked up fluffos that discworld mud uses. 08:50:45 says you can't make money with it 08:51:40 yeah. diku-based? 08:54:47 dunno, I lost interest at the copyright notice 08:55:04 I'll just play, and not hack on it 08:55:07 it's an lpmud 08:55:14 hehe 09:11:37 wow 09:11:43 sometimes when you move you find really cool stuff 09:11:57 just found a really nice pair of pants 09:15:33 So, when's the Hurricane Katrina TV movie coming out? 09:58:46 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 10:08:10 --- join: PoppaVic (n=pete@0-1pool47-126.nas30.chicago4.il.us.da.qwest.net) joined #forth 10:09:02 whazoo. (got that shopping done, anyway) 10:16:32 http://www.rafb.net/paste/results/9oSNre35.html 10:16:49 Revision of somebody else's snippet, does a simple convert of two characters in a string. Any comments? 10:17:03 I'm hoping to show him a reasonable way to approach it. 10:17:13 Bear in mind it's just an introductory exercise. 10:19:12 two chars is 1 shy of a zstring ;-) Same is true with an nstring 10:19:45 add one, and yer zstring can play bisexual 10:19:59 add a uint-leader, and yer nearly golden 10:20:10 PoppaVic, you've completely lost me, I'm afraid. 10:20:21 Quartus: strings are like that. 10:20:27 I hope not. 10:20:33 there is no "string" per-se 10:20:45 there are just structs/open-ended-structs 10:20:57 Ok. But the code, looks clear enough? Simpler way to do it? 10:21:32 I looked briefly at it, it seemed very verbose. What are you inputs and outputs (format) 10:22:08 It's all about one definition, convert-buffer. It converts two specific, pre-defined characters in a string to two other specific, pre-defined characters, in place. 10:22:15 looks reasonable to me 10:22:22 (c1 c2 --- string) ? 10:22:31 The stack diagram is there. ( c-addr u -- ) 10:22:41 oh.... it's a tr/xlator 10:22:58 I wrote a nested conditional version first, didn't like the way it looked, so went with a case statement. 10:23:37 Simpler would be to write 'bounds' without 'char', and to use 'loop' instead of '1 chars +loop', but I went with the portability. 10:23:46 I'd recommend either vars on the stack - or a struct. 10:24:29 thus, ...... myrule cvt_buffer 10:24:30 Certainly I'd suggest something other than a case statement for a general-purpose translator, which this isn't. 10:25:14 sorry, I get waay difficult with structs. Even the C-boys like to holler 10:26:32 Back when chars were always one byte, 'bounds do i c@ ... loop' was an even nicer idiom. This way, with the 1 +loop, isn't too horrible though. 10:27:09 er, '1 chars +loop', that is. 10:28:59 Thanks for the feedback, tathi, PoppaVic. 10:29:04 np 10:29:20 btw, picked up 'Hacker's Delight, Henry S. Warren, Jr. Great book. 10:38:48 http://www.rafb.net/paste/results/ZMu7ty98.html 10:39:44 oops 10:40:04 I'd still use a struct and ptr, but I like the "clean" 10:43:56 s/swap/over/g 10:44:14 Quartus: above is my hack of the convert-buffer thing 10:44:23 not bad at all 10:44:34 just factored it the way I thought to 10:44:41 yep 10:44:48 not sure it's the best approach 10:44:56 I'd factor a bit more, but I'd also be adding a new defining-word, too 10:45:06 I'm not entirely happy with my solutions for multiple conditions 10:48:01 laters, guts 10:48:04 guys, two 10:48:07 --- quit: PoppaVic ("Pulls the pin...") 11:32:02 --- join: onetom_ (n=tom@ns.dunasoft.com) joined #forth 11:40:29 JasonWoof, interesting approach. 11:46:13 --- quit: onetom (Read error: 110 (Connection timed out)) 12:04:05 I would question the meaningfulness of the names you've chosen. 12:06:47 herkforth convention is to use -foo instead of (foo) for internal functionality... 12:06:55 so I suppose they're not too meaningful... 12:08:20 cvt-pick and cvt-char maybe? 12:09:40 Does that accurately describe either one? There's two conditions, split out over two words, one of which calls the other. 12:12:31 well, the top one takes addr char and converts the char if it's old-pick 12:12:48 and the next one takes addr char and converts the char if it's either old-flush or old-pick 12:12:58 So really hard to name. 12:14:00 exactly 12:14:12 oh. that was me explaining why I thought those two names made sense. ;-) 12:14:32 I just prepend - when it does the unnamable 12:14:38 ah :) 12:15:26 those two words aren't useful outside cvt-buf 12:16:07 so I guess it's just as well not to clutter the namespace 12:16:12 That's not to say they shouldn't have meaningful names. If I find I can't name a factor well, it probably doesn't warrant being a factor. 12:17:41 I've thought like that before 12:17:51 currently, I often factor more anyway 12:18:14 because I think it helps with redability (including me reading it carefully to get the bugs out) 12:18:27 and I think makes the control flow easier to understand 12:18:48 although you can work some of those wonders with indenting and comments 12:19:05 I stopped worrying about namespace clutter once I discovered the joys of module/end-module. 12:19:27 so... it's just my style I guess 12:19:37 I don't fiddle with whitespace, or have mid-line comments 12:21:07 Mid-line? Yes, that would be nasty. 12:21:19 mid-def 12:22:03 Ah. Ok. 12:22:22 my forth does the formatting for yout 12:22:24 you 12:22:27 including line breaks 12:23:25 That'd take some getting used to for me. 12:23:32 I dislike being edited. :) 12:23:36 yeah 12:23:58 oh, it doesn't change anything you've made 12:24:04 it's just there's only certain things you can do 12:24:33 It'd be an uphill selling job. I prefer non-restrictive environments. 12:24:41 96 minutes left to pack, and counting... 12:25:11 yaeh 12:25:20 well, yours is restricted in different ways 12:25:35 gotta choose your battles 12:26:03 Restricted how? 12:26:29 can't run stuff from the editor 12:26:44 well, I can't be sure, I don't know your environment 12:27:00 You're right about that; I don't integrate an editor. 12:27:31 you certainly have a point too though 12:27:46 many programmers will be quite put off because it's tailored to my style not theirs 12:28:03 Well, I assume you made it with yourself in mind. :) 12:28:13 certainly 12:28:28 and there's a bunch of stuff that I'll probably do, but haven't yet 12:28:38 priority goes to what I find most useful 12:28:46 since it's mostly me using it at this point 12:29:50 the line breaks between definitions will be under user control when I finish rewriting the editor 12:31:38 My thinking in using CASE was to show a simple structure that could be trivially expanded on if more translation conditions needed to be added. 12:31:58 yeah 12:32:05 I didn't :) 12:33:02 if it got bigger I wouldn't do it either of our ways 12:33:14 I'd make a table of old/new pairs 12:34:15 I would, too. This snippet is a revision of a first-effort from a new Forther. 12:34:30 A table would be overkill for two conditions, unless you knew it was going to grow. 12:35:18 yep :) 12:35:23 ok, I gotta get back to packing 12:35:36 people coming in 1.5 hours to move boxes 12:36:02 Ok. Good luck. 12:50:45 --- join: amca (n=plump@as-bri-3-136.ozonline.com.au) joined #forth 12:51:08 --- nick: amca -> amca|busy 12:59:55 it's close, but I think I'll make it 13:00:14 JasonWoof: Thanks for your ver of convert-buffer too 13:03:08 'bounds' is an old Forth word, commonly found. In its classic form it's ": bounds over + swap ;", but that assumes that 1 chars = 1. For portability you need to define it as I've done, and do a '1 chars +loop'. 13:04:14 Ah 13:04:14 JasonWoof uses for next, and assumes that 1 chars = 1, which is generally valid. 13:04:50 Achieving portability here is trivial, though. 13:05:29 I thought you'd be interested in the tester module, too. Lets you code in-line tests. 13:05:46 Yes I would be, pls 13:05:51 It comes with gforth. 13:06:15 Ah. Cool. Ill check it out 13:08:26 What would you say was the major design approach difference in your code compared to mine? I want to know so I can see how my design decisions compare to more experienced forth coders 13:08:45 Well, what stands out for you, comparing yours and mine? 13:09:29 The stack manipulation is a lot less complicated 13:09:50 The use of the case statement, like I said before 13:09:59 You said that before? 13:10:49 --- join: Ray_work (n=vircuser@adsl-66-141-164-113.dsl.rcsntx.swbell.net) joined #forth 13:10:50 in PM 13:11:12 Didn't make it. They're blocing pm's from unregistered nicks. Should be something in your status window. 13:11:23 :) 13:11:25 oops 13:11:26 hi all 13:11:27 I see 13:11:29 Hi Ray_work. 13:11:52 May I paste the msgs in here or should I use nopaste? 13:11:58 msgs? 13:12:11 PMs that didnt make it 13:12:20 If you like. 13:12:21 msgs = messages 13:12:24 Go ahead. 13:12:28 Thanks :D 13:12:38 Doing the string converter to a new string I discovered some important things, like copying a s" as soon as possible to a new buffer. :) 13:12:39 You used case instead of if-else-then's for increased simplicity/clarity of code? It looks simpler anyway than if-then-else. 13:12:44 Im happy for as much help as I can get, so feel free to pass it around. :) (If I was gonna release it, it would be under GPL anyway.) 13:13:39 * Ray_work has no else or case in cf :( 13:13:40 I de-factored the really basic idioms that you'd factored out, eliminated most of the stack manipulations, reduced the nested conditional to a case/end-case. 13:14:32 Made it portable for different char sizes. 13:14:57 Restructured the loop so that the loop counter itself iterates over the addresses of the chars in the string. 13:15:07 That last one is a big difference. 13:15:20 Would you say the use of the direct address indexing in the loop was what allowed the minimal stack manipulation? 13:15:40 That's a big part of it, the other being the use of case/endcase. 13:15:52 * amca|busy nods 13:16:31 I think my approach was based too much on array indexing 13:16:34 And this one can be easily expanded to add new conditions, though it's clear that any large-scale translator would be table-based. 13:16:50 ok, I'm going to pack up my computer now 13:16:55 I'll be back online on the 7th 13:16:56 I think I basically was converting array indexes into forth code 13:17:03 JasonWoof: Good luck 13:17:05 good luck with the move... 13:17:34 yeah, the weather is a bit hot, but nothing compaired to what it was last time 13:17:56 --- quit: JasonWoof ("offline until Sept. 7th") 13:23:40 I just tried Jason's code in gforth; it bombs out. Looking to see why. 13:24:33 I was just about to look at it to check it out 13:25:14 is -word a convention of forth coders? 13:25:19 Ok. Both his swaps need to be overs. 13:25:22 No, it's his convention. 13:25:43 Common usage says that a word beginning with - is the reverse of the same word without it. Like ROT and -ROT. 13:26:15 Ah 13:26:42 Im finding his code much more obscure than yours or mine 13:27:07 The fact that it didn't work would suggest it's overly complex. 13:27:20 * amca|busy nods 13:28:47 Ill try rewriting the convert & copy to another buffer version of the word using the approach in your code. 13:28:51 I'm hoping, though I may be biased about my own code, that the version I wrote is at least somewhat self-documenting. 13:28:58 * amca|busy nods 13:29:05 That is why it is les obscure :) 13:30:03 Ive got a q related to the lookup table code 13:30:57 Ok. 13:31:42 If I do ": create 256 chars allot does> ;", will that allocate the lookup table space and on subsequent usage of the new word defined as a lookup table, return the address of the table? 13:32:32 What you just wrote redefines create, which I don't think is what you're after. 13:33:05 oops 13:33:08 I assume you meant ": mytable create 256 chars allot ;" or similar. 13:33:35 * amca|busy nods 13:33:45 --- join: snoopy_16 (i=snoopy_1@dsl-084-058-146-185.arcor-ip.net) joined #forth 13:34:11 "does> ;" isn't needed. If you're not going to expand the does> clause, it can be left out. 13:34:33 And after you do "mytable ltbl", when you do "ltbl" it pushes the address of it on the stack? 13:34:48 Yes. 13:35:10 A does> clause that does something more useful, like calculate a requested offset, would be better. 13:35:20 Ah. I didnt realise that was the default action with create in a word def. 13:35:36 The default action of a create word is to leave its dataspace address on the stack. 13:36:04 cool 13:36:51 Is it possible to have something like "any-other-word ... does>"? 13:37:36 subsequent usage of ltbl wont create new space will it? 13:38:51 I don't understand what you mean by the first question, but as to the second, no. The allot happens during the execution of 'mytable'. 13:39:31 Ah. silly me 13:39:51 I got mytable and ltbl mixed up 13:40:19 can you use does> to modify any word other than create>? 13:40:24 (create) 13:40:35 That's implementation-dependent. Strictly speaking, no. 13:40:48 But to be clear, does> doesn't modify create. It modifies words created by create. 13:41:00 * amca|busy nods 13:41:12 Thats where my mind keeps getting confused 13:41:19 I keep mixing up the two 13:41:28 That's one of the hurdles -- understanding how things happen temporally in Forth. 13:41:58 * amca|busy nods 13:42:25 The usual idom for create is ": foo create ( do some data initialization ) does> ( perform some action on the associate data ) ;" 13:42:50 But you can break that up into two parts -- ": foo create ( data init ) ; : bar does> ( perform action) ;" 13:43:41 I mention this because it can seem to a newcomer that create and does> have to be a matched pair inside a definition, like BEGIN and AGAIN. They don't. 13:44:06 * amca|busy nods 13:44:20 That's why I asked if DOES> works on any other word 13:44:41 It only works on CREATEd words. But in some implementations that may include variables and constants and values. 13:44:54 etc. 13:45:17 So with the second way, would you do something like "foo myvar myvar bar"? 13:45:20 * amca|busy nods 13:46:09 No, you'd do "foo myvar bar" 13:46:18 Ah 13:46:21 DOES> always (only) acts on the most recently CREATEd word. 13:46:41 If you really want your head to hurt, study the WEIRD entry in coretest.fs until you see what it's doing. 13:46:55 Here it is (five lines): 13:47:01 { : WEIRD: CREATE DOES> 1 + DOES> 2 + ; -> } 13:47:01 { WEIRD: W1 -> } 13:47:01 { ' W1 >BODY -> HERE } 13:47:01 { W1 -> HERE 1 + } 13:47:01 { W1 -> HERE 2 + } 13:47:03 Also foo myvar would already have pushed the addr onto the stck wouldnt it? 13:47:22 amca|busy, no. foo creates myvar. Myvar will not push its own addr onto the stack until it is executed. 13:47:23 what do { } do? 13:47:31 I see 13:47:34 The { and } are from tester.fs. 13:48:02 so is the '->'. 13:48:08 * amca|busy nods 13:48:28 WEIRD creates words that have a does> action that has a does> action. 13:48:40 Which is weird, so it's well-named. 13:48:45 holy... 13:50:02 It's in tester.fs because a Standard system has to allow this. It also has to allow a CREATEd word to have its does> action set more than once, which the subsequent tests check for. 13:50:32 In this weird example, the created word W1 subsequently modifies its own does> action. 13:51:44 I dont think I will try to get my head around this until I know forth better :) 13:51:48 Heh. 13:51:48 Ok. 13:52:07 It's not a particularly useful technique, but it is weird. 13:53:00 hence the name :) 13:53:08 A Forth hack :) 13:53:19 Some examples of create might help. A primitive definition of VARIABLE is ": variable create 0 , ;" 13:53:29 See if you can define CONSTANT using create. 13:53:36 --- quit: Snoopy42 (Read error: 110 (Connection timed out)) 13:53:50 --- nick: snoopy_16 -> Snoopy42 13:54:26 ": constant create ," but obly cause that example is in startingforth :) 13:54:30 (only) 13:54:39 Is it? Because it's incomplete. 13:54:46 ";" 13:54:50 Still incomplete. 13:54:51 Test it. 13:54:55 ok 13:55:21 ": constant create , does> @ ;" 13:55:25 Better. :) 13:55:31 --- quit: Ray_work ("Stupid NetSplit") 13:55:47 :) 13:55:59 My memory filtered out that nasty does> ;) 13:56:04 How about a word that creates counters that start at zero, and self-increment each time they're used? 13:56:17 Im sgetting an better hand;le on does> now though 13:56:47 Well I have to get offline now, but next time Im online (Tues?) Ill have some code on that for you :) 13:56:55 Ok :) 13:57:14 my mind already has an idea how to do it, but must be off :) 13:57:16 seeya! 13:57:19 ciao. 13:57:30 --- quit: amca|busy ("d34d") 14:06:56 --- join: zoly (n=l@p549DEBCE.dip.t-dialin.net) joined #forth 14:07:10 g'day 14:08:03 Hi zoly. 14:08:07 Hello. 14:08:14 hi all 14:08:25 --- join: Ray_work (n=vircuser@adsl-66-141-164-113.dsl.rcsntx.swbell.net) joined #forth 14:08:47 we had to bring the corporate system down. but I'm back. 14:09:24 Aww yea, fight the man! Bring the corporate system DOWN, brother!! 14:09:53 Hell no, we won't go! Hell no, we won't go! 14:10:11 um Where was it we were going? 14:10:17 To work? 14:10:24 Hell no, we won't go! Hell no, we won't go! 14:10:27 Hell no, we won't go! Hell no, we won't go! 14:10:28 XD 14:10:57 So, I've been having crazy thoughts of tokenized source code and smart delimiters lately. 14:11:21 people here are speculating whether the new orleans will be called "next orleans" or "last orleans" 14:11:46 i proposed to rename the current one "new venice" 14:12:18 If they want to resurrect it, they really ought to spend some effort into creating a mega-dam around the whole city. Either that, or raise it up above sea level! 14:12:29 no. build it on poles 14:12:39 --- join: ayrnieu (n=julian@ip68-13-110-105.om.om.cox.net) joined #forth 14:12:52 ...wouldn't that be raising it up above sea level? 14:12:53 or floating islands 14:13:17 in a way yes. i assumed you mean, land fill, increasing land level 14:13:39 Well, I was thinking springs... but it's all the same! 14:13:45 dig holland deeper, fill in new orleans :) 14:14:54 venice is very attractive to tourists 14:15:01 it's gonna be one great big casino paddle wheel steamer when they're finished. 14:15:17 with gondolas in the channels 14:15:20 to pay fo rit alll. 14:15:33 very romantic 14:15:56 but possibly venice is doomed 14:16:02 * Ray_work hears romantic mandelin music. 14:16:16 new orleans could be build as sort of permanent new venice 14:16:17 yes I saw that PBS special 14:16:37 floating houses and such 14:16:55 netherlands has a lot of those 14:16:58 it's pronounced N'Or leeens. but spelt "New Venice" 14:17:43 boats, do you mean boats? 14:18:02 yes, too. 14:18:15 some are not even able to move on their own 14:18:24 and are more house than boat 14:18:25 * Ray_work thinking "stop building on below sea level marshes" would be a prudent plan. 14:18:40 ah okay I got it. 14:19:11 you would have to pull them somewhere to if you want to move 14:19:58 like out to sea? :) 14:20:10 be good for oil riggers. 14:21:51 i read a book once. as result of 3rd world war (world against switzerland...) the swiss became a sea nation 14:22:00 with a feared navy :) 14:22:12 ahahahahah 14:22:20 that's great. 14:22:20 their whole country was afloat 14:22:24 was it a parody? 14:22:36 not really. just a unlikely setting 14:22:41 right 14:23:01 the reason was because of the concentration of financial wealth 14:23:09 I figured. 14:23:20 and because their mountains had been all converted to bunkers, 14:23:23 all the poor against the banks 14:23:38 rest of world bombed the mountains away 14:23:52 forcing the swiss to new estates 14:23:58 international waters 14:24:24 thus they had lots and lots of small floating platforms, interconnected 14:24:34 cool. 14:24:37 and the whole arrangement made their country 14:25:11 AND they were finally able to float thier own currency :) 14:25:27 the notion of "feared swiss navy" was just sooo bizarre ... 14:25:33 hehe 14:26:31 --- quit: Quartus (Remote closed the connection) 14:27:08 now that could be one way to combat rising ocean levels 14:27:42 DR. PEPPER cans 14:27:52 strung together. 14:28:22 mass fabricate low cost floaters 14:28:41 foamed concrete, maybe 14:28:41 ya 14:28:57 concrete soaks up water doesn't it? 14:29:15 oh that'sright there are water proof types. 14:29:18 there are ships with concrete hulls 14:29:30 probably depends on the type of concrete 14:29:34 otherwise , right I was gonna say. 14:29:56 there IS plenty of concrete under water. 14:30:08 water proof concrete goes back to roman times 14:32:42 would be consistent with the concept of working along with natural forces, not against them. 14:33:59 lets see whether we can use Forth for it 14:34:34 * Ray_work writing customer ticket... 14:34:44 colorforth... 14:34:51 something only WE can do. 14:34:52 btw, anyone knows the MCC "Smart" microcar? 14:37:01 there are several model. this is one: http://macmerc.netium.com.pl/fotosy/new01/mcc_smart_coupe_02_800x600.jpg 14:37:32 this is the common model: http://www.eufahrzeuge.com/bilder/smart2.jpg 14:38:10 they use Forth for balancing the turbo loader 14:38:47 t-20MIN and counting, initiate closing proceedures. Closing proceedures are currently inititiated, please be aware that the Ray_work unit will be in and out for the next 20 minutes. 14:39:10 neat looking 14:39:13 "ugly" car 14:39:20 what's the big deal about it? 14:39:39 low consummation. very compact. decent performance 14:40:05 a 180 horse power model exists... 14:40:17 giving the low weight, that one is a rocket 14:40:21 elect.? 14:40:36 the standard model has 62 hp 14:40:54 which still gives it a remarkable acceleration 14:41:45 they passanger cell survives head-on collision with a speed of about 40 mph 14:41:49 passenger 14:44:49 now that's excellent 14:46:49 for compact cars, indeed. passenger safety is usually the crux with them 14:47:13 ya 14:47:24 they say, "we don't want to lose our customers in case of an accident" 14:48:12 Bold statment, I like that. 14:48:25 Thanks for pointing it out. 14:48:47 i mentioned them because they use Forth in the production line 14:48:59 better, in the post-production phase 14:49:07 Ok, now I like them as well. :) 14:49:58 hmm. i said that before ... 14:50:07 just before your "t-20MIN and counting" statement 14:50:15 sorry, the ray-work unit is trying to shut the store. 14:50:27 may be distracted easily. 14:50:27 4 lines above your "what's the big deal about it?" 14:50:49 crunching numbers now. 14:51:02 * zoly has a computer for this 14:51:14 :) 14:51:25 you must have a very hip and up to date boss. 14:51:28 I do not. 14:51:38 /dict boss 14:52:21 334 Moby Thesaurus words for "boss": 14:52:23 * Ray_work doesn't understand "/dict boss" 14:52:26 crackerjack 14:52:28 :) 14:52:40 el heffe 14:52:41 hegemon 14:53:17 ah. slave driver 14:53:26 :) 14:53:49 running creditcard machine tacked to wall brb 14:54:58 capo 14:55:34 el capitain. 14:55:50 Sir 14:55:59 master 14:56:07 Mister 14:56:12 honcho 14:56:17 head cheese 14:56:23 Mr Big 14:56:29 bwaba 14:56:31 bwana 14:56:33 Top dog 14:57:02 Ken ( hehe my bosses name) 14:57:26 oops it's five must go home bye 14:57:31 --- quit: Ray_work ("Stupid NetSplit") 14:58:00 some irc channels have bots which understand dict for dictionary lookup. otherwise, there is a unix dictionary client by the name of dict 15:08:17 --- nick: crc2 -> crc 15:08:20 --- mode: ChanServ set +o crc 15:16:11 --- quit: madgarden ("?OUT OF DATA ERROR") 15:17:09 --- join: madgarden (n=madgarde@Kitchener-HSE-ppp3577151.sympatico.ca) joined #forth 15:31:21 --- join: Quartus (n=trailer@ansuz.pair.com) joined #forth 15:35:37 --- join: onemanarmy (n=zoly@p549DEBCE.dip.t-dialin.net) joined #forth 15:35:48 --- part: zoly left #forth 15:35:59 --- quit: onemanarmy (Client Quit) 16:06:39 --- nick: nanstm -> Raystm2 16:16:36 --- quit: ayrnieu ("Lost terminal") 16:19:29 --- join: ayrnieu (n=julian@ip68-13-110-105.om.om.cox.net) joined #forth 16:40:09 --- quit: saon (Nick collision from services.) 16:40:12 --- nick: saon_ -> saon 16:40:40 --- join: saon_ (n=saon@c-66-177-224-235.hsd1.fl.comcast.net) joined #forth 17:15:13 --- quit: ayrnieu (Read error: 110 (Connection timed out)) 17:23:40 --- join: ayrnieu (n=julian@ip68-13-110-105.om.om.cox.net) joined #forth 17:49:09 --- quit: YoyoFreeBSD_ (Read error: 110 (Connection timed out)) 17:51:25 --- join: PoppaVic (n=pete@0-1pool47-193.nas30.chicago4.il.us.da.qwest.net) joined #forth 17:52:25 tathi: you up? 17:53:01 yup. what are you doing here at this time of day? ;) 17:53:34 oh, watchin' tv, beating the headers/enum. I went over 64, but I added a lot of mickey-mouse. 17:54:16 What's the scoop on the zflag "stack"? Who decided to push in another bit? OR when to test? 17:54:29 huh? 17:55:17 I'm trying to understand where and when a zero/one gets shoveld into the flags-stack or tested/retrieved. The test/retrieve I suspect is part of an op. 17:55:18 * tathi switches brain out of Verilog mode... 17:55:33 ..but, who decides to shovel a bit intothat stack? 17:55:49 ah. comparison ops push a bit onto the flag stack 17:55:56 rather than leaving -1/0 on top of data stack\ 17:56:02 ahhhhh, implied-automagic! 17:56:20 OK.. I think I understand. 17:56:30 conditional branches then check the top of flag stack and pop it. 17:56:43 http://rafb.net/paste/results/U3fPHA46.html 17:56:47 basically all I did was move flags from the data stack to their own stack. 17:56:52 I believe I am understanding much better. 17:56:56 so they're "out of the way" 17:57:08 added the opcodes enumeration to header. 17:57:50 I went also with the assumption that call/fcall is reversed by the latter ret-ops? 17:58:42 yes, if I understand you right. 17:58:53 exxcellentt ;-) 17:59:42 ohhhh...have you ever done any asm programming? 17:59:52 long,LONG ago. 18:00:13 Z80, 6510, and 286 - over a decade ago 18:00:44 well, call/return are pretty much the same on any processor. 18:00:50 yep 18:01:09 I just wanted to insure they were related, although widely apart 18:01:37 oh, yeah. call is common, so I wanted to make it fit in the small slot. 18:01:45 cool 18:02:07 oh, did you see http://josh.qualdan.com:3/svn/fovium/ops-by-function ? 18:02:19 I tried to sort them by function, regardless of which opcode numbers I had assigned. 18:02:20 just a sec, lemme recheck 18:03:14 hmm, yeah - and I forgot I had it while offline. 18:04:06 That also helps, perhaps, with the binary and/or stuff - maybe. Not sure. 18:05:01 I could finish stack commenting them, if you like 18:05:22 nah.. lemme struggle a bit. Is the enum-stuff looking sensible? 18:05:39 think so. 18:05:54 I like your capitals "Z", "AT", etc. 18:06:11 thanks, it's a bitch making it sensible and C-happy ;-/ 18:06:31 yeah. C would be so much better if you could use any character in an identifier :) 18:07:08 or, at least something more than a mere _0-9 NON-leading 18:07:28 the logicals basically just do a bitwise AND (OR, XOR) between the top two stack items, and leave the result 18:07:32 ( a b -- c ) 18:07:43 and there are versions for data and flag stacks 18:07:44 tathi: just - 18:07:49 tathi: and i'd be happy 18:08:02 * tathi agrees with warpzero 18:08:03 then i could have variable-names-like-this 18:08:08 underscores suck :( 18:08:14 yarly 18:08:14 shift 18:08:19 no one wants to press the shift key 18:08:24 Iwas thinking FS ops... How often do folks need to mulch (f1 f2 - f3) ? 18:08:59 F12 almost always is your windowmanager 18:09:42 the xor strikes me as extreme. Seems like &/| should cover f1f2--f3 18:10:03 isn't XOR ^ and ^^ 18:10:24 in my language xor will probably be called 'xor' 18:19:36 PoppaVic: yeah, don't need xor. 18:19:53 and the others are probably rare. 18:20:46 ok, even 100 opcodes 18:21:14 Covers every damn think I can imagine using or having to add later. 18:21:24 :) 18:21:48 well, life truly sucks when you gotta' write tight-ass forth that should have been asm/c 18:26:40 PoppaVic: anything else? I'm about ready to call it a day. 18:26:56 nah. Thanks - sleep well. Talk to you tomorrow! ;-) 18:27:09 yup. 18:27:21 --- quit: tathi ("w00t.") 18:29:44 OK, I too shall Call(Knight) 18:29:48 Stay well, folks 18:29:51 --- quit: PoppaVic ("Pulls the pin...") 18:45:25 --- join: tgunr (n=davec@66.160.179.246) joined #forth 19:18:48 --- quit: crc (Read error: 110 (Connection timed out)) 20:19:53 --- join: saon___ (n=saon@c-66-177-224-235.hsd1.fl.comcast.net) joined #forth 20:22:40 --- join: saon__ (n=saon@c-66-177-224-235.hsd1.fl.comcast.net) joined #forth 20:23:00 --- quit: saon (Nick collision from services.) 20:23:11 --- nick: saon__ -> saon 20:26:24 --- quit: saon_ (Read error: 110 (Connection timed out)) 20:29:36 --- quit: virsys (Read error: 60 (Operation timed out)) 20:31:54 --- quit: ayrnieu (Read error: 110 (Connection timed out)) 21:03:17 --- join: ayrnieu (n=julian@ip68-13-110-105.om.om.cox.net) joined #forth 21:04:47 Hi all. 22:18:53 --- quit: sproingie (Remote closed the connection) 23:37:29 --- join: virsys (n=virsys@or-65-40-181-16.dyn.sprint-hsd.net) joined #forth 23:59:59 --- log: ended forth/05.09.01