00:00:00 --- log: started forth/02.08.23 00:07:19 Agreed. Night. 00:07:19 --- quit: Kitanin (Read error: 104 (Connection reset by peer)) 00:07:54 --- join: proteus (~proteusgu@24-197-147-197.charterga.net) joined #forth 00:07:55 --- quit: proteusguy (Read error: 110 (Connection timed out)) 01:06:38 --- quit: proteus (Read error: 110 (Connection timed out)) 01:07:13 --- join: proteus (~proteusgu@24-197-147-197.charterga.net) joined #forth 01:39:18 :( tnc always come very late 01:42:42 --- join: Kitanin (~clark@h-209-91-66-234.gen.cadvision.com) joined #forth 02:07:33 --- join: yeahright (~proteusgu@24-197-147-197.charterga.net) joined #forth 02:07:34 --- quit: Kitanin (Read error: 104 (Connection reset by peer)) 02:07:50 --- quit: proteus (Read error: 110 (Connection timed out)) 02:13:38 ly 03:07:37 --- quit: yeahright (Connection timed out) 03:35:32 --- quit: Robert ("reboot") 03:38:28 --- join: Robert (~Robert@robost86.tsps1.freenet6.net) joined #forth 03:42:52 --- join: Kitanin (~clark@h-209-91-66-234.gen.cadvision.com) joined #forth 03:46:00 --- quit: Robert (bear.openprojects.net irc.openprojects.net) 03:46:00 --- quit: Fractal (bear.openprojects.net irc.openprojects.net) 03:46:00 --- quit: futhin (bear.openprojects.net irc.openprojects.net) 03:46:00 --- quit: marekb (bear.openprojects.net irc.openprojects.net) 03:48:22 --- join: Robert (~Robert@robost86.tsps1.freenet6.net) joined #forth 03:48:22 --- join: Fractal (feud@h24-77-171-228.ok.shawcable.net) joined #forth 03:48:22 --- join: futhin (~thin@h24-64-175-61.cg.shawcable.net) joined #forth 03:48:22 --- join: marekb (~marekb@217.66.164.22) joined #forth 03:50:06 --- join: yeahright (~proteusgu@24-197-147-197.charterga.net) joined #forth 04:50:26 --- join: sif (~sifforth@ip68-9-70-120.ri.ri.cox.net) joined #forth 04:50:26 Type sif: (or /msg sif to play in private) 04:50:26 --- quit: Kitanin (Read error: 104 (Connection reset by peer)) 05:07:36 --- join: proteus (~proteusgu@24-197-147-197.charterga.net) joined #forth 05:07:40 --- quit: yeahright (Read error: 110 (Connection timed out)) 05:50:11 --- join: Kitanin (~clark@h-209-91-66-234.gen.cadvision.com) joined #forth 05:59:46 --- join: cleverdra (julianf@0-1pool36-229.nas2.florence1.sc.us.da.qwest.net) joined #forth 06:00:46 cleverdra: Hi :) 06:01:12 hello Robert. 06:01:20 how are you? =) 06:01:34 * Robert just got home with his new glasses :) 06:02:40 oh, cool! How well do you see, now? 06:03:59 - "well? what well? i c no well." - said robert ;) 06:04:28 * Robert can read now :P 06:04:35 Well, I could before, but not on distance. 06:04:51 anyway, im programming some image processing stuff 06:05:11 Cool :) 06:05:13 In Forth? 06:05:19 incase, i can hack ur spectacles. does it know 4th? ;) 06:05:27 sure 06:05:29 in TILE 06:05:42 :) 06:05:45 and ive just managed 2 read a pnm and write it out 06:05:51 Do you know any Linux Forth that can do gfx? 06:06:10 * Robert feels like playing. 06:06:11 tho, a 1M pnm read takes more than a second :( 06:07:26 --- quit: proteus (Read error: 110 (Connection timed out)) 06:07:55 --- join: proteus (~proteusgu@24-197-147-197.charterga.net) joined #forth 06:08:21 Robert - BigForth, iForth, SwiftForth, and some other commerical Forths probably have the lowest effort-threshold in getting graphics. 06:08:28 big4th has x11 interface 06:08:31 Well, I'm not sure about iForth; it may just have FFI 06:08:58 and does swift have linux version? 06:09:05 Which one would you recommend? 06:09:09 I want graphics in X. 06:09:19 In a simple way, if possible :) 06:09:20 Robert: none ;) 06:09:23 Bah. 06:09:31 How would you do graphics in Forth? 06:09:47 in an offline manner 06:10:09 What do you mean` 06:10:10 What do you mean?= 06:10:11 eg, iwould write a tcltk wrapper 06:10:15 grr... I can't type. 06:10:16 Hrm. 06:10:22 How would *I* do graphics? I'd pick a graphics system and get a Forth to talk to it. 06:10:23 what calls a forth pipeline.. 06:10:48 cleverdra: I just want to play, not put effort into it :) 06:10:58 Robert - then get BigForth 06:11:38 Okay :) 06:11:41 Thanks. 06:14:02 the current version of the pnm reader/write is 18lines in 4th.. 06:14:25 what is the type of stdin/stdout/stderr in C? 06:15:44 onetom - They are file discriptors, hence integers. 06:17:14 where r the defined? stdio.h? 06:17:30 Probably. 06:17:36 id like 2 print a welcome banner depending on the 06:17:46 existance of redirection 06:18:03 Test to see if stdin is a tty. 06:18:12 im tryin 2 achieve this v if (isatty(STDIN)) 06:18:26 #define STDIN 0 06:18:43 err, OK. 06:18:47 but it doesn work :( 06:20:17 'doesn't work' could mean a lot of things. To see what C thinks 'stdin' is, compile and execute: main () { printf("%d:%d:%d\n", stdin, stdout, stderr); } 06:20:31 typedef struct _IO_FILE FILE; 06:20:38 in stdio.h ... 06:27:06 hm hm cant retrieve filedescriptor from std* vars ;( 06:29:58 have you tried that C program? 06:30:11 suer 06:30:35 ht2:~# ./io 06:30:35 1074978912:1074979296:1074979680 06:30:46 they r FILE structures 06:32:01 huh, OK. Well, 0 is the file discriptor you want, anyway, so your problem is elsewhere. 06:32:11 If you really must check, also try 1 and 2. 06:41:08 hm, will test in a sec 06:58:51 --- quit: futhin (Ping timeout: 14400 seconds) 06:58:51 --- quit: Kitanin (Read error: 104 (Connection reset by peer)) 07:07:45 --- quit: proteus (Read error: 110 (Connection timed out)) 07:07:50 --- join: yeahright (~proteusgu@24-197-147-197.charterga.net) joined #forth 07:11:21 cleverdra: thx, 4 the assistance. STDOUT have 2 b tested, not STDIN as iwrotw 07:11:26 e 07:12:27 --- join: tathi (~josh@wsip68-15-54-54.ri.ri.cox.net) joined #forth 07:16:26 [04:25] eeeh, this 4th io is a crap... 07:16:26 [04:25] u cant redirect std output words 2 a file 07:16:26 [04:26] and u cant use WORD 2 parse from a memory area 07:22:55 heh 07:25:21 isnt there any effort on this topic? 07:26:04 its high time 2 do a tedious clean up amongst these words.. 07:26:43 What words? What Forth? 07:27:03 f83 07:27:08 TILE actually 07:27:13 * cleverdra shrugs. 07:27:35 but ans suffers from the same constraints 07:27:49 No, it doesn't. 07:27:59 why? 07:28:35 how can i redirect the output of emit type ? 07:28:49 they r defered, yes 07:28:58 You can't, in ANS. Nevermind, I'll accept that ANS suffers from these 'constaints'. 07:29:07 thats true, infact... 07:39:04 --- join: futhin (~thin@h24-64-175-61.cg.shawcable.net) joined #forth 07:39:42 cleverdra: it's "constraints" not constaints heh 07:43:31 random question: has anyone here used Tom Lord's "arch" revision control system? 07:43:55 I've gotten it, tathi, but haven't yet put it to any use. 07:45:28 I'm sort of looking for a new revision control system 07:45:58 ah, CVS isn't doing it for you? 07:46:57 I decided about 6 months ago that CVS just wasn't that cool 07:47:01 I've been using SVN 07:47:29 which is nice, but still isn't really finished 07:47:55 they're still doing a lot of work on it, and I keep getting different versions on different computers, and it's just getting to be a bit of a nuisance 07:48:25 gotta go 2 the shop. bbl 07:48:32 what do you look for in a revision control system? 07:48:33 later onetom 07:49:13 hm? 07:49:37 what do you look for in a revision control system? 07:49:41 I had some branches in CVS that were starting to be slow 07:49:53 branching and merging was a pain in the ass 07:50:11 SVN had some things that I wanted that CVS didn't 07:50:23 (though some of them don't work yet) :) 07:51:08 I've really liked SVN, I'm just getting tired of trying to keep up with it :) 07:52:21 I was hoping to use it at work once it hit 1.0, but I need anyone to be able to install updates to sites 07:52:41 and under SVN, only the owner of a working copy can do updates and commits 07:52:48 i don't know much about revision control systems... i think they are far too inefficient for collaborative coding (but they are the best out there right now i guess) 07:53:42 I don't know a hell of a lot either, mostly just use it for my personal stuff. 07:53:59 well i've never used it heh 07:54:14 i tried but fail 07:54:15 ed 07:54:35 its a pain 2 restructure the directories 07:54:37 I hadn't used them until fairly recently. Now I can't imagine how I survived without CVS :) 07:54:47 and renaming or moving files 07:55:10 onetom - how many times do you do that? 07:55:14 tathi: you used CVS on your own personal projects with nobody else doing any coding whatsoever ? 07:55:15 yeah, SVN is trying to address those issues 07:55:33 cleverdra: just 10-50 depends on 07:55:53 futhin - I've used CVS for my own personal projects with nobody else doing any coding whatsoever. 07:55:58 futhin: absolutely. that way I can break whatever I want 07:56:05 actually, I should get CVS again for that. 07:56:23 and still know that I can get a version that works if I need it for anything 07:56:58 tathi - arch seems to be a bit heavy, just looking at Tom Lord's other arch-ed projects. 07:57:11 or if I make a major architectural change, then decide 6 months later that I like the old way better, I can get it back 07:57:29 I basically use CVS instead of backing up all my projects :) 07:58:02 cleverdra: yeah, I was starting to get that impression. But I'll probably try it anyway. 07:58:15 * cleverdra nods. 07:59:17 code your own control revision system in forth! :D 07:59:20 heh 07:59:29 that's like the only way you are gonna get the features you want in a timely manner 07:59:51 writing a revision control system sounds hard 08:00:18 find a way to start of simple i guess 08:00:34 s/of/off 08:00:49 what does a revision control system DO ?? 08:00:53 hmm, subversion seems considerably diligent.. 08:01:02 (from the programmer's perspective) 08:02:30 it maintains a repository with all past versions of your project, so you can get at whatever you want 08:03:27 * futhin is working on an irc log processor in forth right now.. check it out at http://sempiternity.org/forth/irclog.f 08:05:46 i would love feedback 08:05:53 on the coding methodology, etc 08:05:56 ?public isn't finished 08:06:12 and the file reading & line reading code is probably false 08:06:28 and i forgot to put the variables in 08:07:31 --- quit: yeahright (Read error: 110 (Connection timed out)) 08:07:36 --- join: yeahright (~proteusgu@24-197-147-197.charterga.net) joined #forth 08:07:48 hi yeahright :) 08:09:35 : ,inform ." There were " @ . type ." messages." CR ; : about >in @ bl parse rot >in ! postpone sliteral ' postpone literal ; immediate 08:10:00 : inform about public ,inform about action ,inform about join ,inform about part ... 08:10:34 it could be inform" 08:10:49 hm 08:10:56 * cleverdra shrugs. 08:10:57 why isn't there one in front of public 08:11:02 There is. 08:11:11 ABOUT is the parsing-word 08:11:32 oh 08:11:42 about public ,inform 08:12:47 about ( compiletime: "name" -- ) ( runtime: -- c-addr n xt ) 08:13:32 well, it doesn't actually exist at runtime -- you know what I mean. 08:15:19 i wonder how to access a file in isforth or gforth 08:15:30 that file access code was ans forth or win32 forth 08:16:00 What you have should work under gforth. 08:16:08 hmm 08:16:26 even with endoffile? :) 08:16:50 : timestamp-offset line 7 + ; 08:17:05 that line is false heh 08:17:10 I don't know what you mean when you say 'endoffile' 08:17:59 well in the code i assume there's an endoffile? word that tells me if its end of file or not 08:18:04 oh, endoffile? No, that's different. 08:18:05 i guess i need to code it 08:18:59 It seems like a misnomer, since you don't seem to be dealing with a file anymore when testloop is entered -- just an address. 08:19:33 heh 08:19:52 the code is bad 08:20:06 i just wanted to do the ?public etc stuff first 08:20:08 well, incrementvariable is bad =) 08:20:11 * cleverdra nods. 08:20:50 it is? heh 08:21:31 : ++ 1 swap +! ; : 1+! 1 swap +! ; /me shrugs 08:21:57 well, ++ has a common meaning that is slightly different. 08:23:08 Anyway, it's nifty. 08:26:17 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 08:26:47 futhin: ur code is not bad. infact, its pretty good. no comments @ 1st glance. 08:27:06 cleverdra: but i want it to be readable 08:27:10 the words should mean something 08:27:18 1+! doesn't mean anything to the non-forth coder 08:27:25 (i'm going to be showing the code off to a friend) 08:27:29 after it's working 08:27:51 onetom: no comments should be necessary. if comments are necessary, then i'm doing something wrong already ;) 08:28:20 futhin: incrementandstore means nothing to the non-English speaker, and I'm grateful for the brevity of 1+! 08:28:55 XeF4 - close; the name is 'incrementvariable' 08:29:09 futhin: @2nd glance... well... :) not bad as a 1st hack 08:29:23 futhin - so, what are you going to call . ? 08:29:27 futhin: now, time 2 refine. thatis: factor more 08:30:21 onetom: yeah 08:30:28 cleverdra: heh 08:30:48 futhin: not comments mean: keep the docs separately from the src 08:31:02 no docs 08:31:04 gtg 08:31:05 bye 08:31:21 futhin: the shadow block mechanism - like in color4th - serves this purpose 08:31:48 * onetom is havin a lunch 08:41:15 --- join: Kitanin (~clark@h-209-91-66-234.gen.cadvision.com) joined #forth 08:47:45 Hi :) 09:05:56 --- nick: XeF4 -> XeF4pois 09:05:56 --- quit: Kitanin (Read error: 104 (Connection reset by peer)) 09:07:14 --- quit: yeahright (Read error: 110 (Connection timed out)) 09:07:56 --- join: yeahright (~proteusgu@24-197-147-197.charterga.net) joined #forth 09:57:33 --- quit: tathi ("Lost terminal") 09:59:44 --- join: tathi (~josh@wsip68-15-54-54.ri.ri.cox.net) joined #forth 10:06:33 --- quit: yeahright (Read error: 110 (Connection timed out)) 10:07:10 --- join: yeahright (~proteusgu@24-197-147-197.charterga.net) joined #forth 10:16:34 --- join: Kitanin (~clark@h-209-91-66-234.gen.cadvision.com) joined #forth 10:17:01 Morning, all... 10:39:39 --- nick: yeahright -> proteusguy 10:39:39 --- quit: Kitanin (Read error: 104 (Connection reset by peer)) 11:05:47 --- nick: XeF4pois -> XeF4 11:06:45 --- quit: proteusguy (Read error: 110 (Connection timed out)) 11:07:05 --- join: proteusguy (~proteusgu@24-197-147-197.charterga.net) joined #forth 11:09:04 --- quit: proteusguy (Remote closed the connection) 11:39:47 --- join: mark4 (~mark4@1Cust19.tnt2.bloomington.in.da.uu.net) joined #forth 11:40:14 nick I440r 11:40:14 argh 11:40:15 --- nick: mark4 -> I440r 11:40:31 Hehe ;) 11:41:20 --- quit: I440r (Client Quit) 11:41:28 --- join: I440r (~mark4@1Cust19.tnt2.bloomington.in.da.uu.net) joined #forth 11:42:26 x3f4 hi sorry i missed your message last nite, yea my motherboard likes its new box :) 11:47:06 er xEf4 even 11:47:15 argh 11:47:52 i¤¤=R! 11:48:05 Heh. 11:48:20 içç=R >:) 11:48:38 ya - i REALY should learn to type some day :) 11:48:41 ç doesn't look like a sun to me. 11:48:48 I440r: Learn to use tab :P 11:49:32 tabs SUCK 11:49:38 anyone who uses tabs SUCKS :P 11:49:46 tabs are evil 11:50:28 tabs are the only way to heaven 11:51:03 tabs make 11:51:18 your code 11:51:18 look 11:51:18 like this 11:51:18 all the 11:51:18 time 11:51:55 that is not 11:52:00 pleasing to 11:52:04 me either 11:52:07 but 11:52:15 it pleases 11:52:26 god 11:52:56 Uhm. 11:53:07 I440r: Ever heard of a thing called nickname completion? :P 11:54:02 all these other faiths are wrong. He counts the number of ctrl-I events a man is responsible for at the time of his death. 11:54:07 and that decides where you will go. 11:54:09 (or somesuch) 11:54:51 Robert: errr :) 11:55:12 brb 11:55:23 need to make coffee 11:56:40 :) 11:56:51 Uhmm.. 11:57:01 I tihnk IsForth should _allow_ tabs. 11:57:25 Not just give a stupid error when someone has a tab in the middle of a program. 11:58:24 Robert - so? Add a filter to the post-mmap code that translates tabs to spaces. 11:59:22 * Robert <-- lazy. 12:02:00 --- quit: cleverdra (Read error: 104 (Connection reset by peer)) 12:03:05 --- join: cleverdra (julianf@0-1pool36-229.nas2.florence1.sc.us.da.qwest.net) joined #forth 12:04:05 it does allow tabs 12:04:14 read the "todo" it says in there 12:04:20 Hmmm 12:04:23 What version? 12:04:26 "make isforth accept the evil tab.... done" 12:04:34 I440r - no it doesn't. 12:04:36 Hhhmmm... 12:04:41 since forever heh 12:04:42 I440r - the "todo" lies. 12:04:44 I've tried it in 1.08b 12:04:45 --- join: kc5tja (~kc5tja@user-24-214-86-42.knology.net) joined #forth 12:04:49 No! 12:04:51 hi 12:04:53 It doesn't work. 12:04:58 Hi kc5tja, onetom. 12:05:01 re 12:05:06 It gives me an unknown word error. 12:05:14 It looks like: 12:05:21 ? 12:05:22 When I try to compile a program. 12:05:24 err ill test it, ive changed the way fload works now so maybe accepting tabs is b0rked 12:05:25 VERY annoying., 12:05:33 lil Q: how can u retain 2 the std indentation in vi when ur editing a .c file? 12:06:03 onetom: Can you rephrase? 12:06:18 no :) 12:06:34 if i hit enter while editing a .c file in vi 12:06:36 Then I can't answer your question; it makes no sense to me. 12:06:54 it skips 2 the next line 12:07:19 What vi are you using? 12:07:26 but 8chars to the right from the beginning of the prev line 12:07:43 if it has started w if or for statements 12:07:52 vi lot.lot 12:07:56 the version in sid 12:08:08 Again, which vi? Elvis? VIM? nvi? 12:08:10 VIM - Vi IMproved 6.1 (2002 Mar 24, compiled Aug 13 2002 15:14:27) 12:08:14 OK, it's vim. 12:08:29 sure it is ;) 12:08:33 And you do *not* want it to auto-indent? 12:08:40 nooooo 12:08:46 onetom: You say that as if I should have known from the beginning. Why? 12:08:48 i want autoindentation 12:08:58 but the just the default type 12:09:06 That is the default type. 12:09:07 not the C type extra intelligent 1 12:09:25 Change your document type to "text" instead of "C". 12:09:34 haaa haaa ... 12:09:49 I <3 FORTH. 12:10:29 And I love you... 12:10:42 * Robert tries to write a Snakes game... 12:10:52 Hrm, how should I keep track on where the snake has been? 12:10:58 An array of coordinates? 12:11:06 se filetype=txt doesnt help... 12:11:19 (That is, the blocks the snake is on) 12:12:08 robert: in what environment? 12:12:36 onetom: Type :syn off to turn off syntax mode -- there is no plain text mode. That'll get you into "normal" VI mode. 12:12:51 onetom: What do you mean? 12:12:52 ucan apply deltacode 2 describe the monster 12:13:01 I'm doing this in text mode, IsForth. 12:13:06 tail-of-the-snake is a coordinate 12:13:08 Deltacode? 12:13:21 and the further points r just direction codes 12:13:33 left right up down 12:13:58 OK, in an array? 12:14:03 eg 12:14:26 variable tail-x 12:14:30 variable tail-y 12:14:49 variable body maxlen allot 12:15:02 variable head 12:15:13 shall i continue? 12:15:21 Uhmm.. 12:15:24 Nope. :) 12:15:29 Thanks. 12:15:40 but think of the number of snakes... 12:15:57 probably u have 2 use some OO concept... 12:16:22 put all the above in a structure.. 12:17:08 --- join: Kitanin (~clark@h-209-91-66-234.gen.cadvision.com) joined #forth 12:17:33 onetom: Nah, this is just something quick I'm making. 12:17:51 but r there 2 snakes or not? 12:18:05 Nope. 12:18:07 Just one snake. 12:18:23 anyway, what operation do u have 2 do on a snake? 12:18:52 What do you mean? 12:19:02 u have 2 grow it @ the head side 12:19:18 and have 2 shrink it at the tail 12:19:46 it it simply moves, both operations happen simulteniously 12:20:03 That's what I do. 12:20:12 so design/choose the data structure what represents the snake 12:20:43 as i could fit these operations 12:20:43 char *[maxsnakelen] 12:20:44 well 12:21:09 better 12:21:10 best 12:21:29 int head;int len; 12:22:34 i would use a linked list of coordinates for each cell of the snake and delete the tail and create a new head 12:23:09 I use onetom's solution... 12:23:16 I would cheat and just use an array (or linked list if you consider that wasteful) of pointers into the framebuffer 12:23:22 I440r: Got dynamic mem. managment yet? 12:23:28 (assuming you've some sort of framebuf) 12:23:42 I440r: sure! if u wanna waste memory and cpu cycles... 12:23:45 XeF4: I don't :) 12:24:32 robert isforth will have dynamic memory allocation etc wehn i do the next release heh 12:26:04 Bah, release it sometime :) 12:26:11 I don't want varpourware only :P 12:27:28 why not just use a freelist, allot and , ? 12:28:23 freelist? 12:28:42 A list maintaining chunks of memory and/or objects that are unused. 12:28:42 b'sides, the memory consumption of worms has a quite low upper bound, so you can just allot it all at once and allocate (fixed-size) elements from there 12:29:01 chucks of memory ;D 12:29:03 Hence it's name -- free-list. 12:31:01 I'm allot-ing a couple of bytes, and make a fifo list of directions. 12:31:27 fifo? 12:31:45 First in, first out 12:31:48 aka queue 12:31:50 u have 2 abuse both ends of the list 12:32:05 Frankly, I don't see that as a viable solution. 12:32:20 why do you need a list of direction vectors? are the worms to swing their hips around too? 12:32:28 kc5tja: the problem wasnt w the terminology ;) 12:32:40 I would use a simple array of coordinates, treated as a circular list. When the snake grows, just grow the bounds of the circular array. 12:32:42 kc5tja: but thx the explanation 12:37:45 circular arrays can be tricky to grow without decent mm 12:37:55 Pre-allocate the space. 12:38:11 There's no need for dynamically allocating circular buffers here. 12:38:20 sure, but never 4get the real problem! 12:38:29 we r talkin about a snake 12:38:46 there is no need for multiple buffers here, not even to support multiple worms. 12:38:48 The snake will never get longer than, worst case, 95 characters. 12:38:49 that wont be longer than the whole game area 12:39:23 what can b represented in some K usually 12:39:48 95? wtf r u talkin about? 12:40:14 windows 95? ;p 12:40:26 If I'm going to be treated this way, then I'll just leave. 12:41:19 :D if u take us serious, its better 2 leave i think 12:41:26 --- part: kc5tja left #forth 12:41:41 he seems upset today 12:41:45 Yeah... 12:41:49 can't say that I blame him 12:42:00 (well I could ,but I'd be lying) 12:42:01 menstruation or sg like that.. 12:42:04 Did I behave bad again, master? 12:42:19 no 12:42:26 twas me in theory 12:42:56 but hey, we r in a virtual world 12:43:45 every1 should learn 2 distiguish between "real" and "fake" abuse 12:45:18 but frankly, wtf is that 95? 12:45:29 reminds me of a story one Dane told me.. 12:45:31 80+25=105 12:45:57 --- quit: Kitanin (Read error: 110 (Connection timed out)) 12:46:29 he sat down in some bar in Prague, some USAians told him he was in their place. Mr Dane replied "suck my dick motherfucker" hoping they would distinguish real from fake abuse :) 12:46:50 (they didn't distinguish) 12:47:07 and any preconception is absurd coz there were no information about the "display" yet 12:47:41 but it has happend in the real wolrd 12:47:44 world 12:47:49 ehh... 12:47:52 but the worm can in theory spiral from 0,0 to 40,12 12:48:12 so that's 80*25 max 12:48:41 40,12? 12:49:01 why is the halfening? 12:49:13 4 12:49:22 dict spiral 12:49:57 aah 12:50:22 i simply imagined a sequention scanning 12:50:52 but thats also 80x25 (assuming the stnd txt mode) 12:50:59 *nod* 12:51:18 but you can't trap someone in tron by sequential scanning unless he's a really awful player 12:51:37 (whats aspect is 1:2. not ideal 4 such a game) 12:52:04 but we r talking about 1 snake @ the moment 12:52:24 so the absolute max = maxX *maxY 12:52:43 aspect can be 1x1 since there are chars that fill only the top half or only the bottom half or both 12:53:35 but then the dimensions of the game domain changes... 12:53:46 and that counts, not the display 12:53:57 so 80x50 12:54:03 eg 12:58:51 * XeF4 still thinks using an sequential array/list/whatever of coords is a bit silly/overkill 13:02:12 should be enough (for unlimited number of worms) to have a flat buffer of offsets to next worm element (and _perhaps_ but not necessarily player number) 13:02:25 plus head&tail pointers for each worm 13:03:07 --- quit: cleverdra ("Leaving") 13:05:16 has the advantage that you can for collisions quite easily (if the cell you're making the new head is nonzero, you have a collision) 13:14:57 I440r: What word can I use to get a charachter on the screen? 13:15:01 I440r: (IsForth) 13:21:38 Robert: u can also apply RLE on the direction list 13:21:49 Run Length encoding 13:22:18 n0 d0, n1 d1, n2 d2 ... 13:22:27 why is there a need for a direction list? (just curious) 13:22:51 where n is a "number of" and d stands 4 direction 13:23:06 XeF4: coz it could b shorter than coordinate pairs 13:23:23 and its also rotation invariant eg.. 13:23:38 could also be longer. 13:23:45 * onetom read image processing handouts last night ;) 13:23:54 XeF4: really? how? 13:24:41 i could easily miss some circumstance of course 13:25:12 im not a master of this problem domain 13:25:14 one: because d can be 1 often. 13:25:23 tho, id like 2 b :) 13:25:23 s/d/n/ 13:25:55 dont confuse the {(n,d)} solution w the original 1 13:26:19 I don't think I am. 13:26:26 the later is just RLE of the previous 13:27:04 the original - so 2 say - deltacode is always shorter than the {(x,y)} version 13:27:39 coz its enough 2 encode the possible 4 directions 13:27:51 that takes 2bits.. 13:28:17 the RLE solution is harder to do collision detection with 13:28:57 while every element in an xy list occupies @ least 2x7bits in case of 80x25 13:29:43 not much harder than the non-RLE, simple delta version 13:30:24 and collision detection must work on the game-domain not the snake domain... 13:30:30 the simple delta version can use the delta also as a pointer to the next list element 13:30:53 so list elements in the same screen position are always at the same address 13:31:10 so we just check if our list element is nonzero before we write to it 13:31:16 if it is, there is a collision. 13:31:22 show me an example data struct! 13:32:02 char deltas[yres][xres]; 13:32:06 or u know what? lets make a real prg 13:32:21 coz i can really imagine ur version 13:32:53 moment, downloading nasm 13:33:29 Hmmm... 13:33:54 I need to know how to get a charachter on the screen. 13:34:02 u gonna implement it in nasm? ;) 13:34:13 have a better suggestion? 13:34:14 Robert: how is ur version doing? 13:34:35 onetom: It's fine, I just need to detect collisions with yourself. 13:34:40 :D probably 4th? but asm will also do in such a simple situation 13:34:52 Otherwise it's fine. 13:35:09 Forth is nice for testing ideas, imo. 13:35:13 ah, w yourself! i forgot about it 13:36:07 * Robert should write a onetom-ish to english translator :) 13:38:12 Hmm... damn. 13:38:20 I need to solve this collide-with-self problem. 13:38:24 Any ideas? 13:38:34 do read the scrollback 13:39:31 bbl 13:39:40 gotta go rescue my sister, her car broke down :) 13:39:45 --- quit: I440r ("Reality Strikes Again") 13:39:57 XeF4: Scrollback? 13:42:47 hm. I forget how one gets keyboard input from the bios 13:45:21 ah = 0 / int 0x16 13:45:36 does that block? 13:45:43 Now al = ascii code, ah = scan code. 13:45:44 Yes. 13:45:49 ah = 1 does not block. 13:45:56 It returns zf = 0 if key is pressed. 13:46:01 is/was. 13:46:11 does it also return scan and ascii codes? 13:46:43 Not quite sure. I use them in combination, ah=1 for polling, and ah=0 for receiving the ascii/scan codes. 13:47:02 * onetom coding. hold on. 13:48:32 Uhmm.. is it BEGIN WHILE REPEAT or WHILE BEGIN REPEAT ? 13:48:46 begin while repeat 13:48:51 OK, thanks, 13:51:01 hmz. what other registers does int 16h destroy? 13:53:33 Not sure... 13:54:01 * Robert is NOT a robot with Ralph Brown's interrupt tables in his memory. 14:03:06 im ready w the framework 14:05:13 shall i ... ? 14:05:35 Hum? 14:07:29 shall i quote it? 14:07:36 6lines 14:11:20 Sure. 14:11:25 Just paste :) 14:13:20 XeF4: IIRC, ah=1 / int 0x16 does return scan and ascii codes, but doesn't remove the key from the buffer 14:13:58 tathi: That's correct. 14:14:04 That's why I use it for polling ;) 14:14:55 : render ; 14:14:56 : break-ln 2dup - max-x mod 0= if cr then ; 14:14:56 : blank dup maxlen ascii . fill ; 14:14:56 : display dup maxlen + swap begin 2dup = 0= while 14:14:56 dup c@ emit 1+ break-ln repeat 2drop ; 14:14:56 board blank render cr display 14:15:18 Robert: works semi-ok if you have a program that quits in less than 15 keypresses though ;) 14:15:31 14:15:38 the result is sg like: 14:15:40 .................... 14:15:40 .................... 14:15:40 .................... 14:15:40 .................... 14:15:40 .................... 14:15:41 .................... 14:15:43 .................... 14:16:54 tathi: Hehe, BIOS is wonderful :) 14:27:00 grmbl, "phase error detected at end of assembly", love nasm. 14:28:18 Hehe. 14:28:26 NASM doesn't love you back :) 14:31:26 and I see no list of nasm errors anywhere 14:32:43 Well, translated to english, that means "syntax error SOMEWHERE in your code". 14:33:02 no it doesn't 14:33:40 Something in that direction ;-) 14:33:49 syntax errors would be caught by the parser immediately 14:34:06 Well, not syntax error, but some undefined constant or so. 14:34:12 Something in that direction. 14:34:21 It's not very helpful. 14:39:19 --- quit: XeF4 (Remote closed the connection) 14:39:27 --- join: tcn (tcn@tc1-login6.megatrondata.com) joined #forth 14:39:47 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 14:40:04 hello 14:40:51 hi 14:41:44 XeF4: looks like "phase error" means that some symbol's address changed while nasm was trying to generate code...if that's helpful at all... 14:41:48 tcn: i was exploring TILE the last few days. its beautiful 14:41:57 Hi tcn. 14:42:19 tcn: beside it, ive hacked a pnm reader writer in TILE. it worx. 14:42:36 and now we r coding a snake :) 14:42:51 we: robert, xef4 & me 14:42:55 heh.. i've had phase errors.. 14:43:27 a snake game? 14:43:44 * Robert nods. 14:43:56 I'm coding it, they're helping me when I get stuck ;) 14:44:05 (I do that alot) 14:44:12 Never written a snake game before. 14:44:30 * Robert is starting to appreciate Forth's ease of development. 14:47:04 --- quit: tathi ("laters all...") 14:50:24 here's my x86 opcode table.. http://tunes.org/~tcn/pub/opcodes.html 14:51:50 * Robert checks it. 14:52:24 Fancy, colors! 14:53:55 finally makes sense, doesn't it? 14:56:01 I guess that's what I440r would call a sane opcode table. 14:56:20 Might be good when you're coding an assembler :) 14:56:33 * Robert usually uses the NASM opcode reference. 15:00:06 assembles unmodified with nasm0.98bf 15:00:22 robert: it isn't excactly right 15:00:25 consider that my disendorsement of 0.98.34 15:00:46 is that the one giving you phase errors? 15:00:49 yep 15:01:19 me too.. never seen it before. only got it to compile isforth or something.. otherwise 0.97 or 0.98 would do 15:01:32 but who cares, I'm writing my own assembler ! :) 15:04:56 not the nasm folks, apparently. 15:05:29 heh.. idiots 15:07:05 :) 15:08:15 --- quit: futhin (Ping timeout: 14400 seconds) 15:10:14 you got TILE working w/ X? 15:13:01 nooo :) 15:13:23 just cat pnm.fs x.pnm | forth > y.pnm 15:14:02 tho, it wouldnt b hard 2 interface w X 15:14:32 tho, X is not too simple... coz windowing is not simple 15:15:19 yup. X sucks. I think I said that already. 15:15:34 X is not simple because it has ~17(more?) years cruft 15:15:52 not just normal cruft but heavy duty academic grade cruft 15:16:44 I say, the screen has a 4/3 ratio, so have a square (3x3) on the left and a sidebar (1x3) on the right 15:17:03 a lot of games used to do that and it worked great 15:18:12 or better yet, abolish window overlap 15:20:22 or the square on the right for the left handed 1s, like me! ;) 15:21:27 snake code is 28lines now, but evolves slowly :) 15:21:42 infact, evolves fast, but grows slowly 15:21:56 AHA! I'm left handed, but always use the mouse with my right hand. so *that* is why my mouse control is so poor 15:22:02 * XeF4 can't believe he hadn't thought of that before 15:25:36 :)) 15:33:12 hmm. the AAM instruction is 324 012.. but the 012 could be 020 (hex), 002 (binary) 010 (octal) or anything I guess.. 15:39:30 ? 15:40:18 tcn: Yes. 15:40:23 Robert: lets use a wiki for such fast coding task 15:40:32 Robert: which 1 would u recommend? 15:40:36 I don't really know what a wiki is :) 15:40:50 cant believeee :)) 15:41:34 a website editable via any web browser 15:42:33 Hmmm.... OK. 15:42:47 Well, /me is almost done anyway. 15:42:55 I'll post my code for anyone to hack on. 15:42:56 lets use the 1 @tunes.org 15:43:03 Note: It's totally uncommented :D 15:43:11 mine too :) 15:43:26 but the wordnames r selfdocumenting 15:43:34 i hope so @least :) 15:44:01 it was also a chuck-style test 4 me 15:45:31 What do you mean? 15:45:56 u will c.. just wait some secs 15:46:12 Hehe, OK. 15:47:58 why do people hate forth? 15:48:20 do they? 15:48:24 * Robert doesn't hat forth. 15:48:27 Do you? 15:48:31 hate* 15:48:43 yah. i hang out with a bunch of C programmers. 15:48:53 they either don't know forth. or claim they know it and that they hate it. 15:49:15 You mean, they've SEEN it and they think they hate it? :P 15:49:28 i tell them my project will have a forth built into it and used for pretty much everything and they go "uggh!" 15:49:32 Robert: yah. 15:49:55 What is your project? 15:49:58 but i don't think they understand that you can redefine anything and that there are built-in stuff like exception handling and lambdas. 15:50:00 hm.. I know one guy who said he wouldn't touch forth because he still had trauma from the Mac bootloader Forth 15:50:19 Hehe. 15:50:34 robert, it's a multiuser object-oriented online game server. I inherit forth dictionaries to do the object-orientation part. and each object is basically a forth environment with the attributes stored in the heap. 15:50:38 OrngeTide: What's a lambda? :-) 15:50:44 :NONAME is like a lambda:) 15:50:55 And what is :noname? 15:50:58 a lambda is a function with no name in Lisp. 15:51:18 Robert: it's like : but instead of putting it in the dictionary it compiles to a scratch area and gives you the address of the function on the stack. 15:51:29 Oh, I see. 15:51:48 :NONAME + . ; 2 2 ROT ROT EXECUTE 15:52:06 That's very nice. 15:52:17 that would compile + . into a function. give you the pointer. EXECUTE pops a pointer and runs it. 15:52:21 Now I have something to throw in the face on all Lisp fanatics :P 15:52:29 Robert: yah. pretty slick if you want to use it with a CREATE table to handle events. 15:52:34 http://tunes.org/cgi-bin/TunesWiki?SnakeInForth 15:53:02 Robert: click on the (?) and copy your code in 15:53:21 Robert: u also have 2 add some additional text 15:53:33 OK. 15:53:43 I'll do that, soon. 15:54:01 Robert: so the wiki could render the src as code 15:54:17 'Forth Programmers Handbook' is the best forth book i've read so far. But i'm mainly interested in how a forth works and advanced forth features which is why i like the book. 15:55:06 tunes? I thought tunes was a C-based OS? 15:55:38 Heh. 15:55:50 Tunes is run by Lisp fanatics :) 15:56:06 ah. okay 15:59:17 robert: delta thingy worked nicely btw 16:02:37 well Forth is better than LISP without a doubt! 16:02:48 tcn: Some people won't agree to that :) 16:03:25 Grr.. 16:03:36 If anyone here is in #tunes, please ask water to remove the ban. 16:03:45 He's not really nice. 16:03:58 Robert: u have 2 indent code lines :/ its a bit inconvenient 16:04:17 Robert: tho, in vi u can say :%s/^/ / 16:04:28 What does that do? 16:04:55 replaces every line starting w a space 16:05:21 water BANNED you? haha 16:05:25 in other words: inserts a space in front of all line 16:05:53 tcn: Yes, heh. 16:06:00 Robert: why did he banned u? 16:06:02 tcn: Look at the "argumentation" before. 16:06:05 he WAS threatening me last time I was there.. I brought up database filesystems or something he doesn't like and he goes +O .. "grr" 16:06:19 00:49 < water> tunes.org is not resolving for me 16:06:19 00:49 < water> is anyone getting some similar result? 16:06:19 00:52 < water> neither is NAS... ok, that's more informative 16:06:19 01:02 < Robert> Hehe. 16:06:19 01:02 * Robert is on the tunes page atm. 16:06:21 01:02 < water> you could have just said "it works for me" 16:06:23 01:02 < Robert> I wanted to waste 0.1 seconds of your time. 16:06:26 01:03 < water> ok now it's up 16:06:28 01:03 -!- mode/#tunes [+o water] by ChanServ 16:06:31 01:03 -!- mode/#tunes [+b *!*Robert*@*.freenet6.net] by water 16:06:33 01:03 -!- Robert was kicked from #tunes by water [water] 16:06:36 See? 16:06:43 and you're still banned? 16:06:45 Kicking me for nothing. 16:06:55 Yes. 16:06:59 change your username. 16:07:18 Don't want to reconnect. 16:07:25 Besides, I don't want to do that. 16:07:41 /nick bannedRobert :) 16:08:08 Robert: what is ur editor? 16:08:23 vim 16:08:39 tcn, yah. no kidding. I'd rather write a Forth compiler than a Lisp compiler any day! 16:08:44 * OrngeTide is a little behind in the conversation. :) 16:08:47 Hehe. 16:09:05 A BrainFuck compiler is probably even easier. 16:09:08 I told him.. you guys work it out :) 16:09:14 But... it should be useful :) 16:09:26 You told water? 16:09:32 What did he say? 16:10:00 he didn't forget to unban you 16:10:17 Robert: upload ur snake while he lets u back in 16:10:43 I'll upload it in a few secs. 16:10:48 Just got to fix a few things. 16:10:53 k 16:11:54 onetom: do you want a badly coded deltasnake? 16:11:55 robert:? 16:12:09 people have always been struggling to make a lisp or scheme compiler that was usable. those poor souls. 16:12:16 ok, he won't let you back in 16:12:51 XeF4: Uhm... maybe I do :) What Forth is it written for? 16:13:01 tcn: How suprised I am. 16:13:05 Robert: nasm 16:13:06 if he reads our log he might not let me back in either 16:13:20 and it's awful, but onetom did ask 16:13:27 tcn: I bet his arguments are that I don't do any Tunes development. 16:13:36 XeF4: Ah, okay. 16:13:38 read the logs 16:13:38 Well sure :) 16:13:53 tcn: Huh? 16:14:14 http://tunes.org/~nef/logs/tunes/02.08.23 16:16:12 hrm. lemme see. what are some good primitives for my compiler. lets see. i need one to paste the contents of a dict entry into the code region. 16:16:15 Ah, OK. 16:16:24 or am i doing this weirdly? 16:17:01 you're not, but , is usually sufficient for bootstrap 16:17:23 or c, w, (append byte/halfword/word) 16:17:59 XeF4, well my system is like harvard architecture. no way to address the code region directly. 16:18:19 then how does the OS load executable images? 16:18:31 and i have a bunch of dict entries pre-defined that are bound to C subroutines. i also need a way to create dict entries because i can't access the code in them directly either. 16:18:39 XeF4, in unix it just mmap's it essentially. 16:18:59 indeed, so can't you just mprotect()? 16:19:13 or mmap() your own code arena 16:19:33 no. because i don't know the magic values for my virtual machine. 16:19:45 (it's a subroutine threaded forth) 16:19:59 magic values? 16:20:00 every "instruction" is just a C function pointer. 16:20:23 and those pointer values are not predicatable or portable. 16:20:52 so i can't write my compiler entirely in forth. i'm working on a base set of routines that will allow me to write a compiler mostly in forth. 16:21:21 plus i achive factoring this way. so i could later take my forth kernel and write a forth back-end for it and then i wouldn't need my c backend and VM. 16:21:29 ah. for a slight performance penalty, you could use a jumptable with fixed offsets 16:21:44 XeF4: could repeat the send? 16:21:51 xef4, well i can add new subroutine bindings on-the-fly. 16:22:46 it's a multiuser system. so an ordinary user won't have access to a SHUTDOWN word in thier dictionary. but if i'm an admin i would have that in my dictionary. :) 16:23:14 so it makes it hard to run shutdown as an ordinary user unless they run a word that was compiled by the admin and had shutdown in it. 16:23:27 XeF4: hmmmm.. how can 1 test it? under dos? 16:23:55 can you not #define a dictionary builder so the C compiler outputs the initial dictionary? 16:24:35 s/1/I/ 16:24:48 or a make_dictent(char *name, void *op); that gets used for init at boot time? 16:24:52 XeF4, that wouldn't allow me to add bindings on the fly. 16:25:08 and it's just as easy to shove the subroutines in the dictionary directly. it's a 4 line function. 16:25:13 one: in dos, yes 16:25:34 dinner! see ya 16:25:36 --- quit: tcn ("Leaving") 16:25:38 Orn: indeed, so I don't see the problem. 16:26:08 XeF4, yah. i have f_dict_primitive(struct f_context *fc, const char *NAME, int prio, void (*func)(struct f_context*)); 16:26:39 XeF4, but to create new dict entries i need to work out special routines. because in a normal forth you just grab a pointer and shove the data in yourself. i can't do that. 16:26:49 Just a little question: do I need to implement "food" in my Snakes game before I give it to you? 16:27:47 Good! 16:27:48 i think i'll be fine if i have an: add function, control-flow forward resolv, and cf backward resolv. hrm. 16:27:53 * Robert releases it. 16:28:00 * OrngeTide codes. 16:28:06 i wish i didn't have to write a C backend. 16:28:40 I wouldn't even try to write a subroutine threaded forth in C, fwiw. 16:28:58 XeF4, well i have a direct threaded forth i wrote in GNU C. :) 16:29:33 http://robert.zizi.org/pub/projects/forth/snake.f 16:29:58 XeF4, but i have a desire to bind to C functions at run time. and I also need to enforce security. so i'm kinda stuck with subroutine threaded. 16:30:37 make C stub functions that call their binding? 16:31:04 no. that won't help. 16:31:26 I guess I don't really know what you're trying to do. 16:31:47 XeF4, a multi-user forth for an object-oriented multiplayer game. 16:32:29 and why won't (in)direct threading suffice? 16:32:37 xef4, because i can't add new bindings to that. 16:32:43 Grrr.. 16:32:56 What do I have to do on that wiki to make it look decent? 16:33:18 i'd have to have a Call instruction that just calls a subroutine to do it. which just adds complication. 16:34:53 where must the new bindings be visible? 16:36:07 XeF4, they can't be visible. they can only be executed. 16:36:32 what must be able to execute them? 16:37:23 anything. 16:37:31 well anything that has that in it's dictionary. 16:39:13 now I understand. 16:40:17 XeF4: snake.asm doesnt works 4 :( could u send a binary? 16:40:43 could you recompile from source/some intermediate form any code whose dictionary bindings change? 16:41:14 XeF4, why bother? 16:42:13 it might be faster. but more complicated. i doubt the improvement would offset the cost. 16:43:20 Robert: im afraid u cant make ur page perfect. its a dumb wiki. twas a wrong selection :) tho, now ur page looks a bit better 16:43:23 XeF4: thx 16:43:57 XeF4: hm.. it does the same as mine 16:44:09 XeF4: prints some 0s 16:44:19 onetom: steer with arrow keys 16:44:30 XeF4: tho, im running it in a win98 windows from under far manager 16:44:40 but it exits 16:44:40 onetom: run it fullscreen 16:44:47 i really should profile this code though. i'd like to see how well it handles under some real load. 16:45:05 XeF4, thanks for your comments! 16:45:10 wow :) 16:45:33 np 16:46:07 ./f "42 0 ! 58 1 ! 0 @ 1 @ + . CR" 16:46:11 onetom: Hehe, well, if you want the source, get it from http://robert.zizi.org/pub/projects/forth/snake.f instead. 16:46:13 --- join: futhin (thin@h24-64-175-61.cg.shawcable.net) joined #forth 16:46:13 that actually works already. i'm happy:) 16:46:26 i think my next challenge is to get : to do something. 16:46:41 then i gotta get IF, THEN, ELSE, BEGIN, REPEAT, ... to work. 16:47:12 Hey futhin. 16:47:27 futhin: Check my quick and dirty Snake game in Forth :) 16:47:27 http://www2.tunes.org/cgi-bin/TunesWiki?browse=Xe4FSnake 16:47:30 hey orngetide, you know what i liked about QNX? the photon client that is available for windows & x11 and displays the photon gui on the qnx server 16:47:38 XeF4: thats 4 ya :) 16:47:39 futhin: http://robert.zizi.org/pub/projects/forth/snake.f :) 16:48:14 futhin: yah. cute huh? :) 16:48:36 futhin: i prefer VNC though, but the vnc port to qnx was pulled out once that photon client became stable. 16:48:45 onetom: that wasn't for public release, far too sloppy code 16:49:13 orngetide: why would you prefer VNC? does VNC work with the photon gui? 16:49:35 futhin: it used to. 16:49:43 not necessarily cute but very useful anyways 16:49:55 it was out before VNC was invented ;P 16:49:59 (i don't know that for a fact) 16:50:13 XeF4: but it works and its small 16:50:16 vnc has a java client and webserver built-in so you just http to VNC. which is far spiffier for showing the muckity mucks a demostration than having them install some special program on thier computer. 16:50:22 XeF4: u dont have 2 b shy because of it 16:50:26 it's about 4x too big and you spelled my nick wrong 16:50:28 futhin: no. VNC is a decade older than photon. 16:50:52 heh 16:50:55 XeF4: eeeh, nevermind. and im gonna fix it anyway 16:51:35 VNC was made by Olivetti ages ago, before they were bought by AT&T 16:52:13 I must live in a cave, when was Olivetti bought by AT&T? 16:52:17 robert: it's nice to see you code forth (unlike me heh) but i wonder if you use too many vars and such 16:52:20 XeF4, 1999 16:52:33 futhin: No, I don't use too many vars :P 16:52:43 However, I can't factorize. 16:52:46 robert: suuurrre you do ;P 16:52:47 VNC was originally designed to run over ATM. :) 16:52:48 yeah 16:52:51 And... there are several bad solutions there. 16:52:53 Well... 16:53:00 If I had some more time, I could make it proper. 16:53:02 robert: factorize causes less need for vars 16:53:09 But a quick hack is a quick hack :) 16:53:13 futhin: I don't have many vars. 16:53:22 Only for things like worm position etc. 16:53:32 robert: my quick hack is at http://sempiternity.org/forth/irclog.f 16:53:35 Only temporary vars I have are tmp-x and tmp-y 16:53:52 wooo neat. VNC is a lib. I should port it to SDL so i can run my games over VNC :) 16:54:01 ewww, temporary vars!! 16:54:11 the tile update stuff should mesh nicely with the SDL_UpdateRect code. 16:54:24 OrngeTide: you discover what license TILE has? 16:54:28 futhin: Only 2. 16:54:33 futhin: i haven't looked yet. 16:54:41 i should though. it might help me with my own forth. 16:54:43 robert: temporary vars should be done thru the stack if possible 16:54:54 futhin: I think it could get quite messy without them. 16:54:57 Well, hrm. 16:55:09 I'd have to restructure and shit. 16:55:22 robert: 3 "variables" are always easily doable thru the stack.. one variable is stored on the return stack 16:55:44 looks GPL. 16:56:11 futhin: OK, check how you would have deleted tmp-x and tmp-y. 16:56:24 futhin: With the current structure, I think that would be quite hard. 16:56:30 Lots of stack magic. 16:56:36 I think the var way is faster and smaller. 16:57:04 OrngeTide: but still can help u... plz read on! i beg u 16:57:05 variables aren't faster if you can do it on the stack 16:57:10 variables = stack magic behind your back 16:57:23 robert: most of your words are more than 1 or 2 lines of code 16:57:41 Robert: and less reentrant... 16:57:42 onetom: hang on. i'm donig something. 16:57:53 robert: er, nevermind 16:58:12 Robert: "avoiding variables" means: avoid them as temporary storage 16:58:13 onetom: wait. i don't see anything. what did you ask? 16:58:22 futhin: "avoiding variables" means: avoid them as temporary storage 16:58:34 * futhin shudders at the sight of the PLAY word heh :P 16:58:40 we have already dicussed it several times... 16:58:41 is TILE Forth 2.1 the latest? 16:58:50 robert: you are coding forth like it's pascal or C or basic :P 16:59:05 futhin: Or assembly >:) 16:59:13 * Robert likes the many gotos in asm. 16:59:16 Anyway... 16:59:17 OrngeTide: 16:59:17 [02:05] i should though. it might help me with my own forth. 16:59:20 I know that, futhin. 16:59:21 [02:08] OrngeTide: but still can help u... plz read on! i beg u 16:59:25 I'm not a good Forth coder. 16:59:37 onetom, oh. i misread you. sorry. 16:59:38 [02:06] looks GPL. 16:59:52 OrngeTide: swap the last 2 lines :) 16:59:55 onetom, yah. :) 17:00:13 yes, its the latest 17:00:30 robert: look at init-vars, you only call that once, so you don't really need it because you can initialize the vars at the time that you create them 17:00:41 wow. it's under Version 1 of the GPL license, 1989 :) 17:00:51 Robert: my code is not far from ready. its a good example how 2 avoid temp vars.. 17:01:04 robert: i'm not trying to harass you or whatever.. you code wayyyy more than i do, and that's a good thing :D 17:01:06 OrngeTide: nice2 isnt it? 17:01:20 OrngeTide: is it good or bad anyway? imean is it better than gpl2? 17:01:21 robert: plus, your asm code is good 17:01:39 futhin: I know I could factor that alot better, I just didn't have the time now ;) 17:01:41 robert: you've already implemented a forth vm 17:01:48 Hmm.. 17:01:53 robert: how much time did you spend on snake.f ? 17:01:54 onetom, no. just old. GPL2 fixed some "bugs" in the license. 17:02:02 futhin: Uhmm... this evening. 17:02:14 futhin: Maybe 4 hours (with IRC in the fore/background ;) 17:02:25 futhin, Robert: hey guys, stop sucking eachothers cock! ;) 17:02:53 * Robert sucks onetom's fingers. 17:03:04 :)))) thx 17:03:08 ;) 17:03:13 heh 17:03:17 Well, next time I'll try to factor properly. 17:03:21 you're weird onetom :P 17:03:29 Maybe I should try to implement some kind of object system in IsForth. 17:03:40 eww! :P 17:03:52 robert: there are far more useful things to implement 17:03:56 want ideas? 17:03:56 I know. 17:04:01 Hehe, sure. 17:04:10 I just want to do it to show bpt how nice Forth is. 17:04:16 --- part: XeF4 left #forth 17:04:25 And, getting another person to join the Forth World (tm), is important! 17:04:55 bpt is already half into it tho 17:04:58 onetom: this forth has a lot of weird macros. 17:05:02 y'know, half-dead, half-alive ;P 17:05:49 futhin: I don't think he's done much Forth coding. 17:05:55 Well, tomorrow I'll start :) 17:05:57 Night all. 17:06:11 robert: graphics stuff like implement the postscript vocabulary, string handling stuff.. 17:06:13 etc 17:06:14 um 17:06:17 i have a list somewhere 17:06:23 a list of things to do in forth he 17:06:26 s/he/heh 17:06:32 Hah. 17:06:37 String handling? 17:06:49 I though there were some words for that hidden somewhere. 17:06:50 well i spent some time yesterday coding forth, so i'm getting back into it 17:07:10 robert: well i just mean abstract it out.. higher-level string handling words 17:07:24 dunno 17:07:51 * Robert will do that object system instead. 17:08:47 what kind of object system? 17:10:09 the whole point of forth is that you create the datastructures you need on the fly. it's really fast to implement the data structures for experienced forth coders because its really quite easy to implement them 17:11:09 hrm. i like ATLAST better than TILE 17:11:46 OrngeTide: :( whats wrong w it? 17:12:21 OrngeTide: how large is ATLAST? and have u also checked the TILE library, examples & docs? 17:12:33 doesn't ATLAST have a totally different aim than TILE ? 17:12:40 OrngeTide: does ATLAST know multitasking? 17:13:12 * onetom got tired 2 continue the snake :( 17:13:58 Robert, XeF4: does ur code work 4 1 long snakes? 17:14:37 is it right 2 say "work 4"? 17:14:47 onetom, well i don't like how the code in TILE is layed out. i think it's indirect on showing what it's doing. 17:14:52 That spelling looks horrible, but I don't know :P 17:15:00 ATLAST doesn't do much at all. no multitasking. not even reentrant. that's it's big weakness. 17:15:00 onetom: You mean, if it works with a long snake? 17:15:09 100 const max-len 17:15:18 That's the max length of the snake. 17:15:44 well i'm going to go home. l8r. 17:15:55 Bye OrngeTide. 17:15:58 ...work in case of a 1 length snake... 17:16:04 Ahh... 17:16:05 0 length snake! 17:16:07 Uhmm.. 17:16:09 Pfff... 17:16:11 I'll test. 17:16:15 but whats the min length? 17:16:18 -6 length snakes too 17:16:23 :)) 17:16:45 -6 should draw a snake that follows where you are about to go, rather than where you have been. :) 17:17:19 onetom: Well, if the snake len is 1, it shows 2 dots, but acts like one. 17:17:52 well well well :) 17:19:09 the magical dotted snake! 17:19:15 OrngeTide: a negative length snake tells where did u come from. its born in delphoi 17:19:44 Night all. 17:20:09 it makes the code more complex if we try 2 handle 0 length snakes 17:20:12 onetom: in the game positive length trails behind where you came from, changing it to negative flips it to point where you are going.. 17:20:17 so we wont 17:20:35 but 1length snakes r not so unreal 17:20:48 but still makes the code more complex :) 17:20:50 0 length snakes don't exist! 17:20:50 :P 17:21:26 coz the 1st particle of the snake is stored as x,y coordinates 17:21:49 and if it ends there then the deltacode list should b 0length 17:22:23 i use pointers 2 point 2 the tail and head of the snake in the delta list 17:23:34 so i have 2 define a full and an empty state 4 this ring buffer 17:24:01 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 17:25:41 lets the full state b: (head+1)%max==tail 17:25:55 while the empty state is: head==tail 17:26:02 dont know why actually 17:26:11 anybody has a better idea? 17:29:16 for what? logs still haven't caught up. 17:29:30 oburuses (sp?) the snake that eats its tail for infinity 17:31:51 (logs caught up) onetom: that will work for a snake that fills the whole playfield 17:33:19 minimum snake len is 2 17:34:44 because the head does not have a buffer entry 17:35:00 would have added complexity and the snake cannot turn back on his own head, so it doesn't matter 17:35:23 otoh, you could have a 1-length snake by just drawing the body without the head. 17:35:37 ... 17:36:46 k, perfect model :) 17:37:15 so yours works according 2 these rules? 17:37:41 and hangs if u try the 1 length snake? 17:38:24 anyway, a 1len snake is also a useful construct. eg, it can simulate mices, eg 17:42:21 * onetom is tired. cu2morrow 17:42:43 good night onetom 17:42:53 onetom: tomorrow i do lots of forth coding! :D 17:42:57 & tonight 17:43:59 beware! iwont 4get what have u promised! :) 17:44:10 :) 17:45:23 there should be a minimum amount of forth one must have written in say.. the last year for license to pontificate in #forth 17:48:40 probably, but i've contributed to the forth community in my own way.. i acquired this channel when i440r unregistered it in a fit of anger, and since then this channel has become a thriving active channel. i have advertised this channel on some of the forth wikis, and i also got chuck moore to come here for an online interview. 17:49:05 i freely admit i am a lazy coder and haven't coded as much as i should have 17:49:22 and i'm working on that 17:49:26 because i do feel guilty :P 17:50:00 btw, I always assumed it was i440r's chan 17:50:08 still i440r's, even 17:50:36 that's fine, it is his chan in most ways, i'm just the stewardship or caretaker.. 17:51:29 i440r mentions that for the 2 years he had the channel, it was dead.. and then when i acquired it, it became fairly active a few months later 17:51:30 heh 17:51:44 i attribute it mostly to luck tho 17:52:37 s/mentions/mentioned 17:54:01 even tho my approach to forth has been mostly slack, i have learned & become VERY comfortable with forth from my exposure to it on this chan and reading forth docs 17:54:52 and my attraction to forth was the attraction to chuck moore's philosophy 17:55:00 the ans forth standard does not describe the forth language but a language of the same name - chuck moore 17:56:39 i'm 99.99 percent behind chuck moore's philosophy and my perspective is that "Forth" is "chuck moore's forth".. any other forth is mostly a different language.. "forth" is not "ans forth" etc.. 17:58:27 but i don't really try to push that view too much, except with some shamless pontificating covered up with lots of emoticons like ;) 17:58:45 s/shamless/shameless 17:59:37 i'll have a forth website up soonish and i'll express all my opinions there :P 18:00:00 and i'll put up _all_ of my forth code 18:00:25 including my future forth code :P 18:00:57 s/stewardship/steward 18:01:36 "i'm just the stewardship" meant to be "i just hold the stewardship" 18:01:39 lala 18:08:07 I don't mean to patronize, but how do you know your opinions would remain the same after you've implemented a fair bit of working applications? 18:08:07 --- quit: futhin (Read error: 104 (Connection reset by peer)) 18:08:11 prkl 18:08:26 --- join: futhin (~thin@h24-64-175-61.cg.shawcable.net) joined #forth 18:08:47 i dont :D 18:09:30 i'm interested in forth because i am interested in a better operating system than windows or *nix 18:10:02 so there's probably a tradeoff between chuck's philosophy and the forth underlying the os 18:11:14 so it will have to be determined up to what point can it be chuck's philosphy .. the simplicity of the os is a good metric to measure.. simplicity could be viewed as the key.. . simpler = better.. 18:11:28 simple in code, simple in interface, intuitive, a sensible ui, etc 18:12:44 I was thinking more about when you said that locals are bad implicit stack passing is (almost) always better 18:14:46 well, if one can code like chuck moore, and code "forth" (as opposed to "coding C" in forth or pascal in forth or some old paradigm) then i don't really think that local variables are necessary, and variables are mostly avoided. 18:15:02 if you code "c" in forth, then variables are probably necessary, etc 18:15:26 i recommend Thinking Forth if you haven't read that.. it had a chapter or two about the whole issue 18:15:33 and onetom has been mentioning reentrancy 18:15:37 --- join: TheBlueWizard (TheBlueWiz@ip-216-25-205-168.vienna.va.fcc.net) joined #forth 18:15:47 hiya all...will be brief 18:16:57 basically, one aims to code small words that take in 2 parameters or less, and do something with it, and leave something on the stack ( or not) .. these words become very easy to string a bunch together and make something happen, without needing to mess around too much with outside factors 18:17:13 I use reentrancy (as recursion) quite often. locals are usually faster on i386 than stack gymnastics 18:18:13 tcn talks about having to deal with the stack, and someone said stack magic today, and now you say stack gymnastics 18:18:22 futhin: have you actually written a nontrivial application that way? 18:18:42 what would be a nontrivial application? 18:19:14 is a short game like snake nontrivial or trivial? 18:19:43 I guess nontrivial is a judgement call. 3d renderer? webserver? speech synth? window system? 18:19:50 trivial 18:20:05 bluewizard: hi 18:20:35 xef4: i first started off coding "forth" in MUF.. and i fell into the forth beginner's habit of doing lots of stuff on the stack.. tons of swaps, dups, rots.. I had to THINK hard and follow all the items on the stack and remember them as they go thru a word and see what happens.. i wrote comments at each level detailing what was on the stack 18:20:47 hiya XeF4 18:20:54 and this is precisely what you DO NOT WANT TO DO 18:21:05 and it is precisely what chuck moore tells you not to do 18:21:36 he gives us simple rules a) don't pass more than 2 parameters to a word b) keep a word 1 or 2 lines of code b) don't manipulate more than 3 items on the stack at a time 18:21:48 it is _obvious_ to me of the advantages 18:21:51 and when i do it that way 18:21:56 i never have to think about the stack 18:22:13 implicit data passing becomes the MAIN FEATURE.. the stack is non-existant from my perspective 18:23:29 non-existant? so you never use stack manipulation words? 18:23:39 occasionally one will have to pass more than two arguments...for example, FILL 18:24:08 i use stack manipulation words, my point is that the stack is not the greatest concern when coding in forth 18:24:18 its not supposed to be 18:24:29 stack gymnastics aren't required if you aren't using variables 18:24:35 if you do things right 18:24:42 that's what i believe 18:25:04 i haven't coded enough to say "fuck off, i have a ton of nontrivial applications and i do it this way, you suck" :P 18:25:55 btw, a webserver could easily be trivial.. could implement a really simple one in 1 or 2 pages of code 18:26:20 true enough. 18:27:03 xef4: my opinions changed.. i started off coding too much with the stack.. i've been down THAT path.. then i read about chuck moore's coding style on ultratechnology, and i realized that i don't have to go down that path 18:27:42 it is hard at first to code that way 18:27:43 whew 18:27:54 i was coding this postscript program 18:28:03 and man! it was hard to make it easily modifiable 18:28:11 i kept coding too many fixed things 18:28:25 instead of easily modifiable, easy to extend code 18:29:02 i didn't factor out properly, and i was having a bitch of a time trying to make all the words reentrant (?? i'm not sure if that's the right word) 18:30:30 reentrancy is actually easy in Forth if you follow a few simple rules 18:31:30 i coded the postscript to draw the stuff.. but it was "fixed" .. i hadn't broken down certain drawing routines into words, and had a hell of a time figuring out how to keep the whole program easy to modify and change (because there were many different drawings to be made) 18:34:14 i had read thinking forth right before i started on that postscript program 18:34:42 so i was trying to do it the "proper" forth coding way :P 18:35:39 * TheBlueWizard leans with bated breath..."And how does it fare?" :) 18:43:18 gotta go...bye 18:43:21 --- part: TheBlueWizard left #forth 18:45:21 *nod* fwiw, I very seldom consume >3 parameters 18:46:10 otoh, I sometimes peek at parameters without removing them from the stack to have quasi-locals and do other horrid things. 19:26:25 --- join: tcn (tcn@tc2-login36.megatrondata.com) joined #forth 19:29:29 --- quit: tcn (Client Quit) 19:47:10 hm 19:47:13 i'm back 19:47:27 i would like a definition of re-entrancy 19:47:43 and i'm curious about the simple rules to implement re-entrancy like thebluewizard mentioned 19:49:06 bbiab 19:51:02 Reentrancy is a possibility of multiple uses of the same code by different threads of control. The correct decomposition of the program allows receiving the more compact and effective code. 20:39:21 --- join: Herkamire (~jason@ip68-9-70-120.ri.ri.cox.net) joined #forth 20:43:32 hi 20:43:59 futhin: u say "believe" & 20:44:22 "obvious" 20:44:44 its not enough. u still could b wrong. 20:44:48 :) somethings are obvious and somethings i haven't tested yet 20:45:01 what is needed then? 20:45:19 well, the answer is very simple. 20:45:27 a proof. 20:45:57 prove all the statments above w clean examples 20:46:10 w pure theory 20:46:58 just try 2 do what chuck does. BEGIN learn experiment evaluate AGAIN 20:47:34 im way 2 tired 4 serious arguments now 20:47:58 but dont just dream. make researches. 20:48:13 eg, take a look @ the snake example 20:48:17 --- nick: Fractal -> lament 20:48:38 XeF4s version is ~262bytes 20:49:32 the tilte version is ~400 w/o the static data structures 20:50:29 --- nick: lament -> Fracral 20:50:31 --- nick: Fracral -> Fractal 20:51:05 ~580 in case of a 10x7 board 20:52:08 and my version isnt complete and does significantly less than XeF4s version 20:52:52 and also does it slower. however thats just absolute speed, not relative.. 20:56:30 --- quit: XeF4 ("pois") 21:10:37 programming is good for the sole 21:18:11 Hey, it's never hurt MY inlines. 21:47:29 I just found an x86 emulator :) 21:48:11 vmware? lindows? perch86? 21:48:18 Perch or something... Can't remember. 21:51:05 bochs 21:51:12 Ah, thats it. 21:51:12 I haven't gotten it to work yet 21:51:53 plex86 is another one. 21:51:59 www.plex86.org 21:52:58 that's not an emulator 21:53:05 I don't have an x86 21:54:46 Ah yes, technically it's a virtualization program. 21:56:46 technically?? it dosn't emulate 21:57:00 Well, not on your non-x86 machine. 21:57:08 it doesn't emulate 21:57:25 No, it doesn't. 21:57:26 emulate means to run stuff that's code for a different processor 21:58:10 it's kinda cool to be able to run mac os inside an X window 21:58:31 Basilisk? 21:58:34 it would be fun to try some x86 operating systems 21:59:23 I might just use it to run x86 linux for the few things that are endian-retarded 22:02:31 what's basilisk? 22:03:46 m68k emulator for x86. 22:04:42 Maybe for PPC too, I dunno. 22:08:32 by golly bochs works under ppc linux :) 22:08:39 I just had to install the font 22:10:06 That's kind of neat... 22:10:26 yeah :) I'm runing FreeDOS 22:10:53 I don't really know how to use dos though :) just a touch (cd, dir... that might be it) 22:12:32 That's about it for DOS. :) 22:14:38 is there a standard editor? 22:15:34 is there a command to shut off the computer in DOS? 22:15:50 hmmm... probably not the place for these questions :P 22:16:59 I think edit might be standard. Maybe ed? 22:17:18 And the command to reboot is control alt delete. :) 22:18:26 hehe :) I'm running x86 linux :) 22:25:44 --- join: sbk_ (~kbs@dsl-65-184-98-221.telocity.com) joined #forth 22:35:33 --- quit: sbk_ ("Leaving") 22:36:46 gak :) debian linux takes forever to start :)... although I expected that. but the stipped down RedHat started pretty quick, so I started getting hopefull :) 22:43:09 Go into /etc/rc* and take out everything you don't need, then recompile your kernel to the bare minimum. The startup time has everything to do with configuration. 23:02:29 --- quit: Herkamire ("leaving") 23:59:59 --- log: ended forth/02.08.23