00:00:00 --- log: started forth/02.10.28 02:56:13 Heh :) 02:56:22 That joke has been up forever. 04:17:18 --- quit: onetom (Remote closed the connection) 04:17:27 --- join: onetom (~tom@novtan.bio.u-szeged.hu) joined #forth 04:52:32 --- quit: Fractal (Read error: 110 (Connection timed out)) 05:00:18 --- quit: Robert (Remote closed the connection) 05:00:24 --- join: Robert (~Robert@robost86.tsps1.freenet6.net) joined #forth 05:00:59 --- quit: onetom (Read error: 113 (No route to host)) 05:07:52 --- join: XeF4 (xef4@lowfidelity.org) joined #forth 05:27:24 --- join: revanthn (revanthn@202.9.183.155) joined #forth 05:40:27 --- quit: revanthn () 05:59:26 --- join: revanthn (~revanthn@203.129.127.19) joined #forth 06:14:46 --- quit: revanthn () 07:03:57 --- join: onetom (~tom@novtan.bio.u-szeged.hu) joined #forth 07:15:03 --- quit: onetom (Read error: 104 (Connection reset by peer)) 07:30:02 --- join: snowrichard (~forth@66.190.101.66) joined #forth 07:30:03 hello 07:30:19 Hi :) 07:31:03 --- quit: snowrichard (card.freenode.net irc.freenode.net) 07:31:03 --- quit: TreyB (card.freenode.net irc.freenode.net) 07:31:03 --- quit: mpo (card.freenode.net irc.freenode.net) 07:31:03 --- quit: skylan (card.freenode.net irc.freenode.net) 07:31:03 --- quit: OrngeTide (card.freenode.net irc.freenode.net) 07:31:14 --- join: snowrichard (~forth@66.190.101.66) joined #forth 07:31:14 --- join: mpo (~a@adsl-143-32.barak.net.il) joined #forth 07:31:14 --- join: skylan (sjh@207.164.213.137) joined #forth 07:31:14 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 07:31:14 --- join: OrngeTide (orange@65.19.141.250) joined #forth 07:32:17 is anybody here now? 07:32:51 A! S! D! F! J! K! L! DESPITE QWERTY ALL IS WELL! 07:33:43 just wondered what all that netsplit stuff was. :) 07:35:22 --- join: I440r (mark4@sdn-ap-008tnnashP0490.dialsprint.net) joined #forth 07:35:28 but anyway I am writing a language for Vax netbsd I am calling michael. I am using indirect threaded code, borrowing the basic operators from C. But the assembler forces separate data and instruction space so I am going to have to have a slightly different model for variables than the other forths I have seen before. 07:36:14 the assembler or netbsd? 07:36:31 the former is easy enough to fix: get a new assembler 07:36:39 the text segment is not writeable, you must put data you want to write to in a data segment. 07:37:03 can you mprotect/mmap +PROT_WRITE? 07:37:08 harvard architecture 07:37:18 take a look at some 8051 forths 07:37:47 doesnt netbsd have an mprotect syscall ? 07:38:17 linux also tries to enforce harvard architecture on you but my isforth just mprotects all its memory to r/w/x :) 07:38:35 I defined a macro that defines variables for me at assembly time. I have only been using netbsd on the vax for a week or so I don't know that much about the syscalls. 07:39:09 snowrichard ok then, i would assume you can redefine the memory protections (is this an x86 machine?) 07:39:18 vax 07:39:24 oh heh 07:39:51 hmm im sure you can mprotect 07:40:29 could I do that from a C subroutine? 07:40:42 however. doing so might have a performance impact 07:40:56 yes, theres libc wrappers for mprotect i think 07:41:22 actually I think I want to keep the separate spaces if I can figure it out. It would keep an application from being able to destroy the interpreter. 07:41:40 if you can figure out a way to have code and data sepreate it would probably be faster 07:41:59 like a variable could be considered a constant pointer to the variables ram area 07:43:22 so the only little bit more overhead would be when I defined a variable, at runtime it would look like a constant that was an address. 07:44:27 so I would need a pointer to the next available space in the data space like HERE is a pointer to dictionary space in some forths. 07:47:07 yes 07:48:30 i can't put data in the text segment, but I wonder if I could put a piece of code in the data segment? 07:49:16 there would need to be a piece of code defined with the variable that puts its address on the parameter stack. 07:51:26 like: moval var,-(r11); next; 07:51:52 r11 is my parameter stack. 07:52:41 next is a macro that does: movl (r10)+,r8; jmp *(r8); 07:53:07 where r10 is the IP for the language. 07:54:53 I'll write a little test routine that creates some instructions in data space and jmps to them to see if it works. 07:55:14 you can define a constant in the text segment as pure code, no data. 07:56:31 but at runtime when I am creating a new variable, the assembly is already over with. I would have to have code created when createing a variable to stack the variables address . 07:57:10 hmmm point 07:58:24 I have a macro to create variables for the interpreter to use. But when a user is trying to program with the language they will need to create variables as well. 07:59:00 right. or else they are going to be slightly crippled in their development heh 07:59:14 i bypassed all this by making all memory read/write/execute 08:00:22 I think I can create a template with the code to access a variable in the text segment. At variable define time, copy that code to data segment, insert the correct address of the variable in it, then when I reference the variable, use that code as its run time code. 08:02:55 --- join: onetom (~tom@novtan.bio.u-szeged.hu) joined #forth 08:06:07 --- quit: onetom (Client Quit) 08:06:52 I'll write a litte test routine and try it out. 08:07:00 need a break first. later. 08:07:11 --- quit: snowrichard ("snowrichard has no reason") 08:08:08 :) 08:30:03 --- quit: Robert (Read error: 110 (Connection timed out)) 08:31:50 --- join: Herkamire (~jason@ip68-9-59-250.ri.ri.cox.net) joined #forth 08:44:30 --- join: onetom (~tom@novtan.bio.u-szeged.hu) joined #forth 08:48:13 --- quit: Herkamire ("leaving") 09:10:55 --- quit: skylan (Read error: 104 (Connection reset by peer)) 09:11:43 --- join: skylan (sjh@207.164.213.141) joined #forth 09:15:20 --- quit: skylan (card.freenode.net irc.freenode.net) 09:15:20 --- quit: TreyB (card.freenode.net irc.freenode.net) 09:15:33 --- join: skylan (sjh@207.164.213.141) joined #forth 09:15:33 --- join: TreyB (~trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 09:25:06 --- join: Herkamire (~jason@ip68-9-59-250.ri.ri.cox.net) joined #forth 09:32:21 --- join: Robert (~Robert@h236n2fls31o965.telia.com) joined #forth 10:04:55 --- quit: Robert (Read error: 60 (Operation timed out)) 12:04:04 --- join: Robert_ (~Robert@h236n2fls31o965.telia.com) joined #forth 12:21:23 --- join: Fractal (ujuoe@h24-77-171-228.ok.shawcable.net) joined #forth 12:56:24 --- nick: Robert_ -> Robert 14:51:50 --- join: tathi (~josh@ip68-9-68-50.ri.ri.cox.net) joined #forth 15:28:53 --- join: bugslayer (guest@62.77.213.195) joined #forth 15:29:08 hi 15:29:14 Hi. 15:29:34 how do i get the ascii value of a char in isforth? 15:29:41 i don't see ASCII or CHAR 15:31:46 'x' 15:31:53 As simple as it can get :) 15:31:59 (And slow, and complex) 15:32:38 oh yeah 15:32:44 i tried 'a and `a 15:32:53 forgot that it was supposed to end with ' 15:34:10 so how do you create a string in isforth again? 15:34:20 blah CREATE 15:34:33 " blahblah" ? 15:34:36 no.. 15:34:36 geez 15:34:44 bad memory 15:37:29 hey come on guys, talk talk talk :P 15:39:44 bahbahbah 15:39:51 --- quit: bugslayer ("bye") 15:39:56 Hm. 15:40:04 You do. 15:40:13 create my-string ," MY STRING IS NICE" 15:40:14 Bah. 16:14:36 --- join: gilbertbsd (~gilbertbs@67.97.122.14) joined #forth 16:14:43 hullo 16:14:47 anyone up? 16:14:58 Now that I have read a little more about assembler, I have some forth questions. 16:15:33 Hey :) 16:15:52 hi robert. 16:15:57 can you answer some forth questions? 16:16:03 Maybe. Ask :) 16:16:22 okay, the machine converts everyhing to work on a stack right? 16:16:28 like add eax, bx etc... 16:16:31 is that correct? 16:18:11 wake up forthers 16:19:02 Hm. 16:19:19 Well, it simply runs a little function that uses the stack. 16:19:20 Like... 16:19:28 mov eax,[ebx] 16:19:36 add [ebx+4],eax 16:19:39 add ebx,byte 4 16:19:46 That could be the function for "+" 16:20:01 so forth could do that faster right? 16:20:09 since it already operates with the stack? 16:21:35 Uhm. 16:21:48 No, on non-stack-based machines, it has to do it that way. 16:21:59 Unless you're using some sort of an optimized compiler. 16:22:21 is there a layer between forth and the machine? 16:22:36 Yes, on most CPUs... 16:22:46 is there a layer between asm and the machine? 16:22:56 where machine == machine code 16:27:09 No. 16:29:13 Good night. 16:36:30 i440? 16:38:38 no, they both compile to the same code and run at the same speed 16:39:05 just being forth doesn't give the hardware magical properties it hadn't before 16:39:11 ah okay... so thats how forth and asm are about equal? 16:40:09 for adding 2 numbers from the top of the stack and returning the result on the stack, yes 16:40:20 there aren't many different (sane) ways to do that 16:40:49 and besides, the forth + is almost certainly coded in asm 16:41:07 hmmm. 16:41:32 --- join: rsnow1 (~rsnow1@66.190.101.66) joined #forth 16:42:28 I need a netbsd (or I can change os's if I must) VAX macro assembler 16:42:43 you have a vax box? 16:42:56 I have the VAX station 3100 model 30 16:43:15 how much did it cost? 16:43:21 $20 16:43:34 really? Where? 16:43:43 on ebay, nobody bid against me. 16:44:23 most of them are going around $50 to $100 now though. 16:44:44 hmmm. 16:45:45 xef4 what do you use forth for? 16:46:00 I was trying to use as on netbsd 153 vax to write a threaded language interpreter similar to forth. But I need to have a link field in my headers that are assembled into the kernel and it doesn't have any assembly time variables. 16:46:46 so what were you going to use your language for? 16:46:51 is it just for fun? 16:47:07 so I might have to backtrack and implement the VAX macro assembler in C to implement my little language. 16:47:49 unless there is already an opensource VAX assembler. 16:48:01 that has a decent macro language :) 16:48:53 I don't know anything about vax/vms unfortunately. 16:49:25 I just wanted to write an interpreter for the fun of it. 16:49:42 ah okay. 16:49:56 I am trying to learn asm in order to understand forth myself. 16:49:59 to learn the assembly language. 16:50:50 but do you understand forth very well? 16:50:55 one component of my language would have been the ability to assemble code routines so I was going to have to have some kind of assembler eventually anyway. 16:51:14 gilb: just about anything. softsynth,graphics manipulations,etc 16:51:38 I have implemented something like forth on a Coco computer once. I have written a few programs with F83 on a pc. 16:52:11 Coco? 16:52:33 --- join: bugslayer (guest@62.77.213.195) joined #forth 16:52:37 radio shack color computer. based on 8-bit 6809 microprocessor. 16:53:14 I was using os/9, a memory-based os similar to unix 16:53:15 whats the minimum amount of forth you need to write the rest of forth in? 16:53:27 os/9? plan 9? 16:53:34 or MAC os 9? 16:54:11 radio shack licensed it from somebody. the commands were similar to unix, but not very many of them. 16:54:31 floppy disk file system doesn't have much room 16:55:01 gilbertbsd: 9 is the very minimum afiak, but it's slow. actually, that's a lie.. you could probably get away with like 2 or 3 words 16:55:12 gilbertbsd: machineforth has 27 words 16:55:21 s/words/primitives 16:55:36 is that the stuff chuck moore uses? 16:55:45 for his forthchips, yes 16:55:50 for 25X 16:56:04 but he is 'out there'... 16:56:06 i heard he did colorforth ontop of a machineforth VM 16:56:08 naw 16:56:15 he's not really out there 16:56:25 there is forth for chuck moore, and then there is a forth for everyone else. 16:56:26 just most of us are too lazy to focus on colorforth 16:56:43 no, some guys start out with colorforth straight off the bat and do fine 16:56:54 it's probably better to learn aha and colorforth 16:57:00 and not learn any other forth 16:57:01 color wouldn't help me any. I'm color blind. 16:57:05 because you have to unlearn 16:57:20 what advantages does color forth have over the other forths? 16:57:42 rsnow1: that's not an excuse, you can use bold,italic, etc instead of colors 16:57:58 gilbertbsd: it's much more forthish 16:58:10 I've never seen it. and it wouldn't run on this vax. no graphics. 16:58:35 asm mnemonics match machine code one for one. what does forth match with? 16:58:38 the asm? 16:58:40 well chuck moore's colorforth runs on a pc, but nothing is stopping anybody from coding it for different platforms 16:58:52 tathi/herkamire are coding a colorforth for the ppc 16:59:11 gilbertbsd: you know asm macros? 16:59:19 some, still learning tasm. 16:59:21 that's what forth is like.. it's a macro assembler 16:59:26 ah okay. 16:59:28 a macro is a block of asm code 16:59:38 so DUP is just a block of asm code 16:59:41 probably looks like 16:59:50 mov eax,ebx 16:59:52 mov eax, ebx 16:59:54 inc ebx 16:59:54 touche :D 16:59:56 or whatever 17:00:01 yeah 17:00:01 :) 17:00:22 okay so forth can just be a bunch of macros. 17:00:40 I have d/l the nasm code for isforth but I am not sophisticated enough to understand it. 17:00:51 how would the forth interpreter/listener be created? 17:00:57 movl (r11)+,r0; movl r0,-(r11); movl ro,-(r11); next is probably how I would have it on my vax. 17:01:42 gilbertbsd: check out this http://hermantom.homeip.net/~guest/forth/kernel.fs 17:02:01 that's the forth kernel 17:02:06 it doesn't have the interpreter 17:02:09 now whats that? 17:02:16 ah okay... 17:02:23 but what about the interpreter... the listener? 17:02:39 the interpreter is a loop that reads in input, and runs it.. 17:02:51 ah yes. 17:03:08 so first you make a loop... and then you make a prompt inside the loop... 17:03:19 and then how do you scan for forth words to execute within that loop? 17:03:25 : interpreter begin readin finditindictionary ?abort? until ; 17:03:47 thos are made up words 17:03:49 so there isn't really a listener? 17:04:01 dunno what a listener is 17:04:07 prolly not 17:07:10 listener == interpreter. 17:07:10 the interactive prompt thingamabob. 17:07:11 there isn't really a "prompt" in forth 17:07:11 just the OK after it finished executing something. 17:07:11 yeah, but that's more of a response, i wouldn't call it a prompt 17:07:11 gilbertbsd: don't worry, semantics is the hardest part of forth ;) 17:07:23 instead of calling it a function, we call it a word 17:07:32 instead of calling it a library, we call it a dictionary or vocabulary 17:07:34 etc :P 17:08:27 the technical jargon of forth is inconsistent with the technical jargon for computer science, that probably is a factor why not that many people are interested in forth or understand it.. 17:08:57 --- quit: gilbertbsd (Read error: 54 (Connection reset by peer)) 17:09:12 it would be kind of slow to start up, but I could integrate an assembler into my interpreter and have part of the startup code be to assemble a kernel, then switch to standard input for the interactive use. 17:09:59 does PREVIOUS go back to the previous vocabulary or the previous definition? 17:10:52 write me an assembler while your at it :) 17:10:55 heh 17:11:10 i440r: tell me about previous 17:11:11 it discards the top itme in the context stack 17:11:21 yeah, what the heck is context? 17:11:32 there's context and there's current 17:11:36 .context .current 17:11:38 context is a list of voabularies to search 17:11:46 hm 17:11:55 current is the vocab where all new defs go 17:12:00 current does NOT need to be in context 17:12:01 so when i have 17:12:04 vocabulary net 17:12:07 net definitions 17:12:09 blahblah code 17:12:13 compiler definitions 17:12:15 blah blah code 17:12:17 previous 17:12:21 where am i now? 17:13:23 futhin: yes, fpos is for ppc. 17:13:32 where could I find a description of the a.out object file format? 17:13:40 ok 17:13:42 do this 17:13:50 in isforth (are you in isforth?) 17:13:55 yes 17:13:57 only forth compiler 17:13:59 .context 17:14:08 will show ROOT FORTh COMPILER <-- top 17:14:13 previous 17:14:15 .context 17:14:17 will show 17:14:19 ROOT FORTH 17:14:46 --- join: gilbert_bsd (~gilbert_b@67.97.122.14) joined #forth 17:14:59 sorry my machine crashed massively. 17:15:09 lol 17:15:16 hah, i440r, isforth isn't consistent 17:15:29 ROOT FORTH COMPILER (top) 17:15:31 versus 17:15:35 yes i know 17:15:40 1 0 0 127 17:15:42 where 1 is top 17:15:49 so just deal with it :P 17:15:53 heh 17:15:58 .s is correct, .context etc arent 17:16:02 naw 17:16:05 .s is incorrect 17:16:09 but 'I' know about it so... 17:16:09 heh 17:16:11 bleh 17:16:12 it's lame :P 17:16:27 do it the standard way or throw out all standards in isforth ;P 17:16:31 i440 do you have a 'see' in isforth? 17:16:38 --- quit: rsnow1 ("rsnow1 has no reason") 17:16:44 not yet 17:16:59 im not goint to implement the decompiler till have hve a metacompiler 17:17:02 thers a reason for that 17:17:37 i440 i was asking about a listener before netware dissapeared with win2k on me... 17:17:55 I got the part where its a loop with a prompt that reads in input... 17:18:05 and then it was gone. 17:18:22 or rather I was gone. 17:19:38 eh heh 17:19:52 a listener ? 17:20:05 an interpreter? 17:21:00 well the prompt IS a listener no? 17:21:13 there's no prompt in forth 17:21:19 and a listener is too ambiguous 17:21:22 yes there is 17:21:24 it can mean something else 17:21:26 like sockets 17:21:26 thers an OK prompt 17:21:34 that's not a prompt 17:21:35 heh 17:21:39 that's more of a response 17:21:42 yes. a listener is a sockets thing :) 17:21:46 whats the 'ok' thing (thing I am calling listnener) 17:23:16 whats the thing that says 'ok' all the time? 17:24:01 quit calls interpret 17:24:19 interpret conditionally calls .ok 17:24:25 which displays OK 17:24:30 maybe :P 17:24:37 depending on the current state etc 17:26:45 <-- afk 17:26:56 brb 17:26:58 --- part: gilbert_bsd left #forth 17:28:57 robert: your string is nice! 17:38:06 ls 17:38:12 --- join: gilbertbsd (~gilbertbs@67.97.122.14) joined #forth 17:38:13 ls --color 17:38:21 the chan is full of color! 17:38:37 http://www.tinyboot.com/fig1.gif 17:38:52 bugs ... is that _the_ forth interpreter? 17:38:56 the 'listener'. 17:39:06 that's the interpreter 17:39:18 please get rid of "listener" from your vocabulary heh 17:39:25 --- quit: XeF4 ("pois") 17:39:25 unless you are talking about sockets stuff 17:39:35 I picked that from some place. 17:41:03 nice picture 17:41:11 and yes, it IS the forth interpreter 17:41:33 you should try to get Starting Forth by leo brodie 17:41:43 so IF (big IF) I can write that I got the heart of forth beating? 17:41:59 oh I got starting forth alright ... but there is no forth w/o learning asm I discovered. 17:43:16 umm 17:43:19 starting forth is pretty good 17:43:26 but prolly needs to be read several times 17:43:34 i'm trying to get it again from the library 17:43:39 and I agree. I even wrote to leo brodie to put the $#$#$ book online. he didn't respond though. 17:43:39 gotta read it again 17:43:51 well if you have it 17:43:57 and you have access to a scanner 17:43:58 I don't own a copy. 17:44:03 ok 17:44:08 when i get my hands on it again 17:44:09 i'm scanning it 17:44:19 heh 17:44:34 <-- warez kiddie ;P 17:44:50 gilbertbsd: yeah, you need the forth kernel and the interpreter 17:44:55 I shoulda scanned it when I got my paws on it. 17:45:11 the kernel comes before the interpreter 17:45:22 whats in the kernel? 17:49:00 uh basic stuff.. 17:49:00 like dictionary 17:49:00 stack 17:49:00 return stack 17:49:01 what forth standard do people follow in implementing forth? 17:49:01 http://hermantom.homeip.net/~guest/forth/kernel.fs 17:49:01 forth is gonna be my first asm app you see :D 17:49:01 don't worry about a standard.. 17:49:01 but if you really want to, try sticking with f83 17:49:02 its gonna be in tasm so it will be dos based. 17:49:49 thats cool 17:50:04 i encourage you to look closely at kernel.fs you can adapt it to asm 17:50:10 and it's fairly understandable 17:50:35 when you look at kernel.fs 17:50:37 and you see 17:50:39 variable sp 17:50:48 that's just SP in asm 17:50:53 the SP register 17:51:00 etc 17:51:22 well i gotta go 17:51:31 thanks man. I am printing it out. 17:51:32 laters 17:51:39 cool 17:51:42 --- quit: bugslayer ("laters") 18:01:27 --- join: Robert__ (~Robert@h236n2fls31o965.telia.com) joined #forth 18:06:24 --- quit: gilbertbsd (card.freenode.net irc.freenode.net) 18:06:24 --- quit: Robert (card.freenode.net irc.freenode.net) 18:06:24 --- quit: Herkamire (card.freenode.net irc.freenode.net) 18:06:24 --- quit: I440r (card.freenode.net irc.freenode.net) 18:06:24 --- quit: mpo (card.freenode.net irc.freenode.net) 18:06:24 --- quit: OrngeTide (card.freenode.net irc.freenode.net) 18:08:13 --- join: gilbertbsd (~gilbertbs@67.97.122.14) joined #forth 18:08:13 --- join: Robert (~Robert@h236n2fls31o965.telia.com) joined #forth 18:08:13 --- join: Herkamire (~jason@ip68-9-59-250.ri.ri.cox.net) joined #forth 18:08:13 --- join: I440r (mark4@sdn-ap-008tnnashP0490.dialsprint.net) joined #forth 18:08:13 --- join: mpo (~a@adsl-143-32.barak.net.il) joined #forth 18:08:13 --- join: OrngeTide (orange@65.19.141.250) joined #forth 18:09:39 --- quit: tathi ("leaving") 18:14:17 --- quit: Robert (Read error: 104 (Connection reset by peer)) 18:19:53 --- quit: gilbertbsd (Read error: 110 (Connection timed out)) 18:38:36 --- join: bugslayer (guest@62.77.213.195) joined #forth 18:39:00 --- part: bugslayer left #forth 19:42:17 --- quit: onetom (card.freenode.net irc.freenode.net) 19:42:33 --- join: onetom (~tom@novtan.bio.u-szeged.hu) joined #forth 21:01:37 --- quit: Herkamire ("leaving") 22:21:45 --- quit: I440r (Read error: 110 (Connection timed out)) 23:59:59 --- log: ended forth/02.10.28