00:00:00 --- log: started forth/05.09.07 01:15:05 --- join: amca (n=plump@as-bri-4-1-141.ozonline.com.au) joined #forth 02:11:43 --- quit: amca ("d34d") 02:47:11 --- join: onetom_ (n=tom@ns.dunasoft.com) joined #forth 02:47:11 --- quit: onetom (Read error: 104 (Connection reset by peer)) 03:04:34 --- quit: onetom_ (niven.freenode.net irc.freenode.net) 03:04:34 --- quit: warpzero_ (niven.freenode.net irc.freenode.net) 03:04:34 --- quit: skylan (niven.freenode.net irc.freenode.net) 03:04:34 --- quit: thinfu (niven.freenode.net irc.freenode.net) 03:04:34 --- quit: ianp (niven.freenode.net irc.freenode.net) 03:04:34 --- quit: Raystm2 (niven.freenode.net irc.freenode.net) 03:04:54 --- join: thinfu (i=thin@bespin.org) joined #forth 03:04:54 --- join: onetom_ (n=tom@ns.dunasoft.com) joined #forth 03:04:54 --- join: warpzero_ (n=warpzero@wza.us) joined #forth 03:04:54 --- join: Raystm2 (n=Raystm2@adsl-68-95-254-73.dsl.rcsntx.swbell.net) joined #forth 03:04:54 --- join: ianp (n=ian@inpuj.com) joined #forth 03:04:54 --- join: skylan (n=sjh@dialup-216-211-47-87.tbaytel.net) joined #forth 03:04:54 --- mode: irc.freenode.net set +o thinfu 05:54:40 --- join: PoppaVic (n=pete@0-1pool74-101.nas24.chicago4.il.us.da.qwest.net) joined #forth 05:55:13 G'day 06:01:12 --- join: PoppaVic_ (n=pete@0-1pool73-192.nas24.chicago4.il.us.da.qwest.net) joined #forth 06:01:23 --- quit: PoppaVic (Nick collision from services.) 06:01:26 --- nick: PoppaVic_ -> PoppaVic 06:14:58 --- quit: madwork ("?OUT OF DATA ERROR") 06:15:10 --- join: madwork (n=foo@derby.metrics.com) joined #forth 06:18:29 --- join: YoyoFreeBSD_ (n=yoyofree@219.144.137.51) joined #forth 06:24:23 --- quit: ccfg ("leaving") 07:18:32 --- join: virl (n=hmpf@chello062178085149.1.12.vie.surfer.at) joined #forth 07:34:20 --- quit: skylan (niven.freenode.net irc.freenode.net) 07:34:20 --- quit: warpzero_ (niven.freenode.net irc.freenode.net) 07:34:20 --- quit: thinfu (niven.freenode.net irc.freenode.net) 07:34:20 --- quit: ianp (niven.freenode.net irc.freenode.net) 07:34:22 --- quit: Raystm2 (niven.freenode.net irc.freenode.net) 07:34:22 --- quit: onetom_ (niven.freenode.net irc.freenode.net) 07:34:22 --- quit: Snoopy42 (niven.freenode.net irc.freenode.net) 07:34:27 --- quit: madwork (niven.freenode.net irc.freenode.net) 07:34:27 --- quit: Ray_work (niven.freenode.net irc.freenode.net) 07:34:28 --- quit: YoyoFreeBSD_ (niven.freenode.net irc.freenode.net) 07:34:28 --- quit: crc (niven.freenode.net irc.freenode.net) 07:34:28 --- quit: Quartus (niven.freenode.net irc.freenode.net) 07:34:28 --- quit: OrngeTide (niven.freenode.net irc.freenode.net) 07:34:29 --- quit: slava (niven.freenode.net irc.freenode.net) 07:34:29 --- quit: madgarden (niven.freenode.net irc.freenode.net) 07:34:29 --- quit: PoppaVic (niven.freenode.net irc.freenode.net) 07:34:29 --- quit: geoffb (niven.freenode.net irc.freenode.net) 07:34:30 --- quit: derv0 (niven.freenode.net irc.freenode.net) 07:34:32 --- quit: I440r (niven.freenode.net irc.freenode.net) 07:34:32 --- quit: docl (niven.freenode.net irc.freenode.net) 07:36:07 --- join: derv0 (n=derv0@proxy1.nscl.msu.edu) joined #forth 07:36:07 --- join: I440r (n=I440r___@rrcs-24-242-160-169.sw.biz.rr.com) joined #forth 07:36:07 --- join: docl (n=docl@67-138-198-36.bras01.mcl.id.frontiernet.net) joined #forth 07:38:08 --- join: Snoopy42 (i=snoopy_1@dsl-084-058-134-150.arcor-ip.net) joined #forth 07:38:11 --- join: thinfu (i=thin@bespin.org) joined #forth 07:38:11 --- join: onetom_ (n=tom@ns.dunasoft.com) joined #forth 07:38:11 --- join: warpzero_ (n=warpzero@wza.us) joined #forth 07:38:11 --- join: Raystm2 (n=Raystm2@adsl-68-95-254-73.dsl.rcsntx.swbell.net) joined #forth 07:38:11 --- join: ianp (n=ian@inpuj.com) joined #forth 07:38:11 --- join: skylan (n=sjh@dialup-216-211-47-87.tbaytel.net) joined #forth 07:38:11 --- mode: irc.freenode.net set +o thinfu 07:38:18 --- join: madwork (n=foo@derby.metrics.com) joined #forth 07:38:18 --- join: Ray_work (n=vircuser@adsl-66-139-199-228.dsl.rcsntx.swbell.net) joined #forth 07:38:21 --- join: crc (i=crc@70.16.152.203) joined #forth 07:38:30 --- part: derv0 left #forth 07:38:54 --- join: slava (n=slava@24.43.80.35) joined #forth 07:42:14 --- join: Quartus (n=trailer@ansuz.pair.com) joined #forth 07:42:22 --- join: PoppaVic (n=pete@0-1pool47-233.nas30.chicago4.il.us.da.qwest.net) joined #forth 07:43:11 --- join: OrngeTide (i=orange@rm-f.net) joined #forth 07:43:16 hmm... wtf? 08:42:04 dead day. 08:52:19 --- join: geoffb (n=geoff@adsl-69-110-115-185.dsl.pltn13.pacbell.net) joined #forth 09:10:34 good day 09:15:46 hiya! 09:16:19 been tinkering like mad 09:18:09 --- nick: Raystm2 -> nanstm 09:21:12 I've also been doing a lot of cogitating on dlsym and dynamic-linkage (plugins) 09:32:20 hi docl hi PoppaVic :) 09:32:25 hope ya'll are well 09:32:58 so far 09:34:43 --- join: virsys (n=virsys@or-65-40-182-100.dyn.sprint-hsd.net) joined #forth 09:39:21 --- quit: OrngeTide ("work") 10:01:02 hi Ray_work, PoppaVic 10:01:23 damn, docl - yer slow. I'm ready for a nap 10:01:29 sorry 10:01:44 I just go afk too much 10:02:11 I'd had a few things to ask, and I can no longer recall most. 10:02:18 hmm, dynamic-linkage 10:03:07 lemme' spin you up to speed... 10:03:12 ok, shoot 10:03:32 http://rafb.net/paste/results/6jbo6o19.html 10:03:46 http://rafb.net/paste/results/grOfO837.html 10:03:59 http://rafb.net/paste/results/uYj6VA79.html 10:04:07 Those three are current NOW. 10:04:28 ok, reading them 10:04:49 I'm still trying to cogitate plugins (not too ugly) and a few other details. 10:05:02 note some term changes 10:05:49 also added a few typedefs and macrodefs 10:05:55 cool 10:06:14 I see there's cell, double, and float categories 10:06:55 yeah, and recall 'float' is generally C doubles - not 'float' - I add no support for the silly 'float' types 10:07:20 k 10:07:50 added LLONG as well: I found I'd a gap that was silly in hindsight. 10:08:16 is long the same as double? or twice double? 10:08:20 I still have no "GOOD" idea for exceptions. 10:08:47 a long is supposed to be twice as powerful as an int, but it varies like 'short' 10:09:16 Idid NOT add support for insane C "long doubles" 10:10:23 I'd appreciate if you considered 'exceptions' from the VM-over-C and console-i/o as well as "what the hell is a string"? 10:10:39 any of those three would be interesting 10:11:09 hmm 10:11:14 you'll note I've still zero syscalls enumerated 10:11:23 --- join: JasonWoof (n=jason@pdpc/supporter/student/Herkamire) joined #forth 10:11:23 --- mode: ChanServ set +o JasonWoof 10:12:25 well, strings generally are arrays of characters. but there could be multi-array strings 10:13:26 this is all a bit over my head, but I'm trying :) 10:13:57 exceptions are like errors? 10:14:10 yeah. char* and wchar_t* are a huge bother with me. But, that's akin to source versus I/O 10:14:28 or are exceptions more akin to inlined code? 10:14:34 exceptions are SORTA' like errors in-search-of-resolvers 10:14:43 ok 10:15:04 so more like if it's not in this list, maybe check the other list 10:15:10 I'm not all that excited by them, but I see no alternatives that are more clean. 10:16:27 sorta': you "throw" an exception, and run a list of resolvers until you hit the end and universal-handling. But, it doesn't help me envision how to reset the stacks ON handling (I already know a global nuke means reset-all) 10:17:21 I may even be over-complicating the issues, but even he underlying machine has a stack or 2 concealed 10:17:46 you can make as many stacks as you want with memory, right? 10:17:56 I'd frankly prefer to ignore exceptions 10:18:07 sure, a stack is all idealistic 10:18:50 try to ignore exceptions for now - it sure makes my own head ache 10:19:06 hehe 10:19:45 I'd just about bet we'd need to store the engine states and recover to that state plus IP incrementing. (on exception) 10:20:18 It's not remotely pretty, and I've never appreciated them 10:20:30 yeah, multitasking can be a pain 10:20:41 oh, far worse 10:20:50 I can task in the dark, dude 10:21:39 What exceptions do is - apparently - remember universal-state; and reset the engines up & down as well as Ip to run a handler. 10:22:07 tasking is almost 100% "context" issues. 10:22:18 ..that and mutex 10:23:04 --- log: started forth/05.09.07 10:23:04 --- join: clog (i=nef@66.114.33.57) joined #forth 10:23:04 --- topic: 'Forth: One language, many dialects. #forth - general forth discussion. #c4th - ColorForth. #retro - RetroForth. #c4th-ot - social channel. #1xforth - a secret channel for 1xforthers. #concatenative - the category of language that forth belongs to (sorta).' 10:23:04 --- topic: set by crc on [Sat Jul 23 13:29:38 2005] 10:23:04 --- names: list (clog @JasonWoof virsys geoffb slava Ray_work madwork skylan ianp nanstm warpzero_ onetom_ @thinfu Snoopy42) 10:23:21 --- join: crc (i=crc@pool-70-16-152-203.phil.east.verizon.net) joined #forth 10:23:56 --- join: I440r (n=I440r___@24.242.160.169) joined #forth 10:24:08 --- join: docl (n=docl@67.138.198.36) joined #forth 10:26:41 --- join: virl (n=hmpf@chello062178085149.1.12.vie.surfer.at) joined #forth 10:28:10 --- join: PoppaVic (n=pete@0-1pool67-162.nas22.chicago4.il.us.da.qwest.net) joined #forth 10:28:27 --- join: saon (i=1000@c-24-129-89-116.hsd1.fl.comcast.net) joined #forth 10:29:23 goddamnit *sigh* either the telco or isp is insane today 10:29:56 I don't know, I got disconnected too 10:30:01 ahh 10:30:21 well, anyway - any comments - and you can use email - are appreciated. 10:30:50 ok 10:31:20 not sure I have enough background in the subject to contribute anything worthwhile though 10:32:20 I think I may ignore exceptions for now... But, I am strongly of the opinion that chars, strings we compile, display or interpret AFTER core-compile may well be better if we get past ascii. 10:32:35 is i/o a lot different on different machines? 10:32:41 the latter may not be an issue 10:33:09 i/o can be ascii or you end up with various uniFOO interfaces 10:33:51 I'm pretty well sure we need the syscalls to start with essentials and then get more and more complex. 10:33:54 but it's all strings, right? 10:34:02 actually, no. 10:34:13 there is no "string" type in C 10:34:20 just concept 10:34:29 so, I'm suggesting we think it over deeply. 10:35:05 zstrings (ala C) and cstrings (ala' forth) are both half-assed. 10:35:54 so far, I've held off on a "litS" & "litC" 10:36:17 literal string or char? 10:36:20 I don't think that will last too long, and you really can't do much without strings. 10:36:23 yeah. 10:37:27 anyway, I think I'll go chow and snooze. You can see the basic headers I uploaded - and no changes as of now. 10:37:40 mailto:pfv@hypercon.net 10:37:45 alll right, cya 10:38:08 ok. Stay well... It's not all umbrella-drinks ;-) 10:38:11 --- quit: PoppaVic ("Pulls the pin...") 10:40:34 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 11:02:39 --- quit: onetom_ (Remote closed the connection) 11:02:51 --- join: onetom (n=tom@ns.dunasoft.com) joined #forth 12:01:51 --- join: Amanita_Virosa (n=jenni@CPE0000e812679b-CM000a7362da55.cpe.net.cable.rogers.com) joined #forth 12:05:41 hi all 12:06:12 --- quit: Amanita_Virosa (Client Quit) 12:30:52 hi slava 12:31:09 I'm excited to be back online after a week 13:21:58 slava, did you improved factors speed? 13:22:08 yup 13:22:16 i got the raytracer down from 102 seconds to 50 13:22:21 working on further improvements right now 13:22:30 getting it as fast as ocaml is extremely difficult though... 13:22:56 how fast is ocaml? 13:23:45 it runs the test in 1.2 seconds 13:24:17 which test? 13:24:55 raytracer 13:24:56 http://www.ffconsultancy.com/free/ray_tracer/code/1/ray.ml 13:25:36 here is my factor version: http://paste.lisp.org/display/11440 13:27:01 hmm.. it seems longer 13:27:59 well, if you find a way to make it shorter, i'd be interested 13:34:23 sry, factor isn't my language. 13:34:39 make a forth version 13:34:57 although it will be longer 14:00:44 --- join: OrngeTide (i=orange@rm-f.net) joined #forth 14:12:16 indeed, i'd be interested to see if its possible in forth at all 14:14:22 slava: you wrote an ml implementation in factor? 14:14:43 no 14:14:51 i ported the raytracer 14:15:28 i guess a forth version is possible, you'd just have to figure out where to deallocate memory by hand 14:15:39 or reuse memory 14:16:07 yeah 14:16:11 memory management is fun 14:16:18 and distracting :) 14:16:27 much like the internet... 14:16:33 * JasonWoof tryes to get started on work 14:56:34 --- quit: nanstm ("User pushed the X - because it's Xtra, baby") 14:57:06 --- join: Raystm2 (n=Raystm2@adsl-68-95-254-73.dsl.rcsntx.swbell.net) joined #forth 15:15:46 --- quit: Ray_work ("Stupid NetSplit") 15:32:35 --- join: madgarden (n=madgarde@London-HSE-ppp3545852.sympatico.ca) joined #forth 15:32:41 hi madgarden 15:33:53 hi ya slava 15:56:47 --- join: crc2 (i=crc@pool-151-197-3-212.phil.east.verizon.net) joined #forth 15:57:07 --- quit: crc (Nick collision from services.) 15:57:09 --- nick: crc2 -> crc 15:57:11 --- mode: ChanServ set +o crc 16:00:04 --- quit: crc (Read error: 104 (Connection reset by peer)) 16:04:31 --- join: crc (i=crc@pool-70-20-244-124.phil.east.verizon.net) joined #forth 16:04:49 --- mode: ChanServ set +o crc 17:04:57 --- join: Quartus (n=trailer@209.68.1.162) joined #forth 17:18:04 hi Quartus 17:27:38 --- join: saon2 (i=1000@c-24-129-89-116.hsd1.fl.comcast.net) joined #forth 17:43:36 Hi Slava. 17:44:29 What's up? 17:44:39 shaved 10 seconds off the raytracer. 17:47:41 --- join: amca (n=plump@as-bri-4-1-8.ozonline.com.au) joined #forth 17:48:01 Neat. 17:48:31 Gday 17:48:40 Quartus: Did you get my msg yesterday> 17:48:59 ? 17:50:05 No, I didn't. 17:50:15 ok 17:50:34 You know that challenge you gave me of the self incrementing word? 17:50:48 I remember. 17:51:02 Well I did it at the weekend 17:51:09 Let's see. 17:51:17 Nopaste it or direct? 17:51:38 Nopaste? 17:51:41 That is, nopaste. 17:51:49 :) 17:53:59 http://rafb.net/paste/results/YDKChb83.html 17:54:28 Also had a work on a table creating word, but just in the interpreter 17:54:48 I did some experimenting and there is an error I dont understand 17:58:01 Looks good. Look up the Standard word +! , though. 17:59:19 Ah. Yes, I forgot that one 17:59:52 : foo create 256 0 do I c, loop hex 0deadbeef , decimal ; 18:00:05 *the terminal*:7: Undefined word 18:00:05 : foo create 256 0 do I c, loop hex 0deadbeef , decimal ; 18:00:05 ^^^^^^^^^ 18:00:05 Backtrace: 18:00:05 $F6BE1DCC throw 18:00:05 $F6BED7F0 no.extensions 18:00:29 thats the error I get and I dont know why 18:00:31 Your hex is in the wrong spot. 18:00:48 Maybe you're thinking of my (hex) word. 18:01:15 : hex 16 base ! ; 18:01:23 immediate 18:01:23 That's hex, alright. 18:01:24 Is how it is defined in gforth isnt it? 18:01:29 immediate? no. 18:01:31 define it to be immediate 18:01:35 slava: ah, yes, forgot 18:01:38 : (hex) 16 base ! ; immediate 18:02:02 That's not how I've got it set up, but that will set the base to hex for you in this case. 18:02:13 Don't redefine HEX, though. 18:02:22 What would be a good way of naming my hex word? 18:02:29 Quartus: I was just thinking that 18:02:40 I posted my (radix) and (hex) and (binary) and so forth back a ways, when we were chatting. 18:02:41 slava: Hi 18:02:50 In this case, I'd do 18:02:52 hex 18:02:54 ah! [hex]? 18:03:03 : foo ...... 0deadbeef .... ; 18:03:13 It means using the hex value for 256, but that'd be the only change. 18:03:43 amca, the confusion for me in a [hex] word would be that if I overlooked it inside of foo, I wouldn't realize that the base is now 16 for the subsequent definition. 18:03:54 My (hex) is next-word-only. 18:04:35 Ah, I see 18:04:45 * amca scans the logs 18:08:28 what extension for forth filenames do you ppl tend to use? 18:08:39 .fs is the convention for gforth. 18:09:33 * amca nods. 18:10:03 I use .f or .rf for normal files and no extension on blockfiles 18:10:19 But Im trying to write implementation independant forth for the moment. Ive been using .forth currently 18:10:36 Seems long to me. .f is what I've seen most. 18:10:41 crc: what does the r stand for in .rf? 18:10:44 Gforth doesn't require .fs anyway. 18:10:50 retro :) 18:10:59 hehe of course 18:11:16 so you use .f for portable code and .rf for non portable code? 18:11:26 I used to 18:11:42 .fs in Gforth is short for 'forth sequential', as opposed to 'forth block' (.fb) 18:11:46 --- quit: OrngeTide ("i think i fixed irssi to work") 18:11:50 --- join: OrngeTide (i=orange@rm-f.net) joined #forth 18:11:51 most of the time I use .f now (shorter, less typing, no conflicts with realplayer on Windows...) 18:12:02 --- quit: OrngeTide (Client Quit) 18:12:16 Quartus: Ah, I see 18:12:24 I didnt realise that 18:12:24 --- join: OrngeTide (i=orange@rm-f.net) joined #forth 18:12:28 .f is quite reasonable. 18:12:36 I've also seen .4 and .4th. 18:12:52 That is usually with the 4th implementation isnt it? 18:12:56 Like in pfe 18:13:02 You've lost me. 18:13:34 Apparently pfe uses an implmentation of Forth called 4th? 18:13:50 News to me. pfe is written in c as far as I remember, if you're talking about Draheim's. 18:13:57 Ill have to change my False extensions from .f to .false 18:14:06 There's a Forth target compiler named 4th, but in an file extension it's just short for "Forth". 18:14:08 Portable Forth Enviroment 18:14:34 Ah. I thought I had read somethere that 4th was an unusual dialect of Forth 18:14:56 At any rate, .f is the one I've seen most, historically. 18:15:04 It really, really, really doesn't matter. :) 18:15:22 I know. :) 18:16:35 utils.f:3: Undefined word 18:16:35 parse-word evaulate r> base ! 18:16:35 ^^^^^^^^ 18:16:38 oops 18:16:58 Any idea how I can fix that? 18:17:01 I'm not using fixed-width fonts here in irc. What word is it highlighting? 18:17:10 evaluate 18:17:11 sorry, evaluate 18:17:17 it's a spelling error :) 18:17:24 lmao 18:17:25 oops 18:17:42 You mean I have to know English to program Forth! :P 18:18:06 --- quit: OrngeTide ("won't come back until I have an irc client that works") 18:18:39 Worked! :) : foo create 256 0 do I c, loop (hex) 0deadbeef , ; ok 18:19:05 Good. 18:19:08 Yay! :D 18:19:13 The dump worked too 18:19:34 bar 256 chars 1 cells + dump <-- is that good style or is there better style? 18:19:58 Why are you dong 1 cells + ? 18:22:46 For the 0deadbeef at the end of the allot 18:23:05 256 chars + 0deadbeef , 18:26:46 http://rafb.net/paste/results/o0E4wt39.html 18:26:49 using +! 18:29:20 Good. 18:29:55 :D 18:31:45 --- join: OrngeTide (i=orange@rm-f.net) joined #forth 18:31:56 Hmmm. no, bad. Im leaving an address on the stack each time it executes 18:32:12 one too many dup's 18:32:13 : inc create , does> dup @ . 1 swap +! ; 18:32:28 yep 18:32:39 I just deleted it in my code before I checked here :) 18:32:43 :) 18:33:10 so does +! not consume the address? 18:34:28 it does 18:34:47 I must be missing something then ... 18:34:49 stack: n a -- 18:34:56 * amca looks at his code 18:35:25 Ah! Now I get it 18:36:25 I had to have the extra dup when doing 'Ill have to change my False 'dup @ 1 + swap !' because @ and ! consume two and +! only consumes one addr's 18:36:38 s/ 'Ill have to change my False/ 18:36:41 s/ 'Ill have to change my False// 18:38:10 --- quit: virsys ("bah") 18:48:04 Quartus: How does http://rafb.net/paste/results/ZqwmmO27.html look for my lookup table code so far? 18:49:31 The ! should be c! 18:50:56 sorry, phone. Let me see. 18:51:41 Should be 'tablesize chars'. And I don't recommend factoring when it's just one word like that. 18:52:02 sorry, mis-read it. + ! ... well. Maybe. 18:52:15 But it's not !. It's c!. 18:53:15 And it needs a 'chars' too. 18:53:31 ah, yes 18:53:39 And I'm wrong about the 'chars' in the first definition. Sorry. Tired. 18:54:11 np 18:54:45 http://rafb.net/paste/results/FVj4xz77.html look beter? 18:54:48 (better) 18:55:08 Have I got the order of the stack params okay? 18:56:26 It is ( what where -- ) isnt it? 18:56:37 or is it ( where what -- ) ? 19:11:06 More mad phoning. Sorry. what where. 19:11:10 --- join: virsys (n=virsys@or-65-40-182-100.dyn.sprint-hsd.net) joined #forth 19:13:35 --- quit: virl (Remote closed the connection) 19:32:11 --- quit: virsys (Read error: 54 (Connection reset by peer)) 19:36:47 --- join: virsys (n=virsys@or-65-40-182-100.dyn.sprint-hsd.net) joined #forth 19:39:43 amca, remember private messages don't arrive unless you register your nick. 19:45:08 * amca nods 19:45:11 I havent sent any 19:45:47 Did you see my code in http://rafb.net/paste/results/FVj4xz77.html ? 19:46:14 --- quit: saon2 ("Lost terminal") 19:52:21 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 19:53:46 --- join: Snoopy42 (i=snoopy_1@dsl-084-058-137-203.arcor-ip.net) joined #forth 19:54:30 Yes I did. Yes, it's ( what where -- ). 19:55:38 So was the order of the stack params okay? 19:58:07 Looked ok. 19:58:22 cool 20:01:05 Is this okay http://rafb.net/paste/results/2qVC9W61.html ? 20:01:49 all the *? words are defined 20:10:34 Does it work? 20:10:36 Test it. 20:12:02 Okay as in is it a good approach to use? 20:13:55 The good approaches are the ones that work. Interactively test that one. 20:14:22 Yep, doing that now 20:14:28 And it isnt working 20:15:59 Cause I missed a drop 20:16:13 Change that, test again. 20:16:44 doing 20:23:26 --- quit: crc (Read error: 110 (Connection timed out)) 20:24:07 --- quit: warpzero_ (Client Quit) 20:25:23 --- join: warpzero (n=warpzero@wza.us) joined #forth 20:25:32 LOL 20:25:37 I used and instead of or 20:25:42 Bingo. 20:26:35 Geez, I thought I would be past silly coding mistakes like that by now 20:27:02 Apart from that, is the approach Ive used okay, or is there more elegant approaches? 20:27:05 Writing this sort of thing, you can code one test, test it interactively, combine it with another, test that, and so on. 20:27:43 That word is reasonably short, and works. If it had to be really high-speed I'd optimize it with a lookup table, but we talked about that before. 20:28:08 yep 20:28:17 well, works when you use or, anyway. :) 20:28:25 hehe 20:28:29 * amca shakes his head 20:28:39 That is something even a BASIC user should have spotted 20:28:40 I'd probably put the ORs after each pair of tests, instead of bunching them up at the end. 20:29:18 good point 20:29:37 It would make maintenance slightly easier -- maybe. I don't know. It's just my initial take on it. 20:29:54 Also, doesn't fill the stack as much. 20:30:09 : whitespace? ( char -- flag ) 20:30:09 dup cr? 20:30:09 over nl? or 20:30:09 over tab? or 20:30:09 over space? or 20:30:11 nip 20:30:13 ; 20:30:29 that looks much better 20:31:31 So another think to keep in mind when writing words is minimising stack space? 20:31:39 You can tighten that up a bit, make it swap space? or and take out nip . 20:32:10 amca, yes. 20:33:59 http://rafb.net/paste/results/3M42vf51.html 20:34:12 It appears to work 20:34:38 Good. 20:36:27 Quartus: for assigning the lookup table values, I was thinking that I could have a file listing the location and the value in ascii (one pair a line) and have a word read it in and change those values in the table. 20:37:07 Or would it be best to have the location/value pairs in the file as binary? 20:37:33 No need to use binary, but I'd inline them in the source instead of reading them in from a file, at least initially. 20:37:47 ok 20:38:23 I was also thinking of creating a word that takes a lookup table and creates a reversed lookup table. 20:38:25 You can use REFILL to read successive lines of source, or prefix each pair with a helper word that does the table update. The latter option is what I'd use. 20:42:02 why not just suffix each line with 'foo ltable!' where foo is a lookup table? 20:42:25 Because you might change that later. 20:42:32 hmm 20:42:52 Better to define a helper word, maybe a single-character. 20:42:58 * amca nods 20:43:15 that parses the two words and adds it to a created table? 20:43:30 Right. 20:43:31 (the two words being location and value) 20:43:40 cool 20:43:57 In this case you'd be using Forth as its often advertised -- to create an application-specific high-level language, and then write your app in that. 20:44:52 Id have to do something like 'parse parse swap my-table ltable!'? 20:45:26 or should the number be in "value location" order rather than "location value" order? 20:46:48 It's up to you; whatever works best. Let the system do the work for you if you need to parse numbers and characters. 20:47:20 char X 225 set or the like. 20:47:27 * amca nods 20:47:55 where set is the word that adds the char? 20:49:32 so 'set' would be more like 'swap mytable ltable!' 20:49:33 Right. 20:49:44 Or re-order it so you don't need the swap. 20:49:52 * amca nods 20:50:34 Do you find "value location" just as easy to parse? 20:53:38 Well, 'value location' is the same as 'what where' which is the ordering for !, so yes. 20:53:54 * amca nods 20:54:15 Coming from infix languages, Im more used to the other. :) 20:56:32 By including the table in the source, and letting the intepreter handle input, you have the flexibility to use char, hex values, decimal, binary, named constants, whatever you like. 20:57:10 * amca nods 20:57:43 So Forth coders tend to not seperate code and data as much? 20:59:43 That's too broad of a generalization. Where it's productive to let the interpreter do the work, that's what you should do. Where it makes more sense to store data externally, that's what you should do. 21:00:29 ok 21:01:12 Forth gives you the power to dynamically compute data structures at compile-time, so that happens quite a lot. 21:01:49 If you were working in C, and needed to pre-compute a table, you'd write one program to generate the table, and then run that and #include that table in another source file, and compile that. 21:02:04 In Forth you can do it in one pass. 21:02:29 :) 21:11:35 What should be the value of DOS chars that dont have a Windows equivelant? Should they be translated into a '?'? 21:13:02 For example? 21:15:14 there is no CYRILLIC CAPITAL LETTER DJE in the windows table, but there is in the dos table 21:16:19 http://www.kostis.net/charsets/cp1251.htm and http://www.kostis.net/charsets/cp866.htm for the codepages 21:16:43 actually I may have it the pother way around 21:17:02 I'd make the value of an unknown a configurable parameter. 21:18:15 fair enough 21:19:41 You can included a named constant as a value in your table, if you use the technique I described. 21:20:32 I was thinking of defining 'unknown' as a constant 21:24:05 what would you call the Russian DOS to Windows codepage lookup table? 21:24:24 like what word would you name it as? 21:31:52 Something really descriptive, probably. 21:32:03 On a good day ;) 21:32:11 hehe 21:32:22 russ-dos-win is my terse version 21:32:40 russian-dos-to-win is my vebose ver 21:32:46 Which do you prefer? 21:32:59 Or do you want russian-dos-to-win-codepage? 21:33:36 They have codepage numbers, maybe include those directly? 21:34:42 russ-dos866-win1251? 21:35:08 IBM866>WIN1251 maybe. 21:35:14 Ah 21:35:16 I see 21:35:20 russ- isn't needed, there isn't a germ- or swed- version after all. 21:36:17 Do you want it in capitals? 21:36:55 IBM is an acronym. WIN is up to you. 21:37:04 I was thinking of using '`' for the word to add it to the table, so you would have something like '32 32 `' 21:37:05 It's another one of those unimportant things. 21:37:32 Of course, yuou wouldnt bother with space char 21:37:45 Assuming they're the same, no. 21:38:03 If I did have to specify it, though, I'd use BL. 21:38:57 * amca nods 21:39:22 you okay with having the table values in hex, or do you want dec? 21:44:00 amca, they can be in base 3 if you like. 21:44:11 Go nuts. :) 21:44:39 hehe 21:45:14 A lot of the letter translations are sequential, so Im gonna make a fill-ltable word and use a loop 21:45:27 --- quit: docl (zelazny.freenode.net irc.freenode.net) 21:45:30 that reminds me, older releases of Lisp Machine Lisp used base 8 by default for number entry. 21:45:43 O_O 21:46:00 Why did ppl use octal instead of hex in earlier times? 21:46:14 well, 8-bit bytes were not common until relatively recently. 21:46:32 x * 3 bit bytes were more common? 21:46:36 yes. 21:46:41 odd 21:46:43 on the PDP-10, words were 36-bit 21:46:47 A 9-bit byte is 3 octal digits. 21:46:54 so it was common to dump them as 12 octal digits 21:46:59 * amca nods 21:47:16 Also, some machine codes make sense in octal. 21:48:21 x86, for instance. 21:59:05 --- join: docl (n=docl@67-138-198-36.bras01.mcl.id.frontiernet.net) joined #forth 22:07:20 --- quit: amca (Read error: 113 (No route to host)) 22:19:34 --- quit: JasonWoof ("off to bed") 22:39:19 --- join: YoyoFreeBSD_ (n=yoyofree@219.145.80.169) joined #forth 23:59:59 --- log: ended forth/05.09.07