00:00:00 --- log: started forth/01.06.07 00:01:34 --- join: edrx (edrx@200.240.18.109) joined #forth 00:30:39 --- quit: edrx ([x]chat) 02:57:49 --- quit: adu (IRCStep) 06:36:27 --- quit: clog (Ping timeout) 06:36:27 --- log: stopped forth/01.06.07 06:36:46 --- log: started forth/01.06.07 06:36:46 --- join: clog (nef@bespin.org) joined #forth 06:36:46 --- topic: 'http://isforth.sourceforge.net -- http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/isforth/?cvsroot=isforth' 06:36:46 --- topic: set by ChanServ on [Tue Jun 05 14:37:28 2001] 06:36:46 --- names: list (clog aaronl lar1 Trey) 08:28:56 --- join: cleverdra (jfondren@1Cust163.tnt4.florence.sc.da.uu.net) joined #forth 08:39:38 * cleverdra thinks of a nice way to build macros in Forth. 08:40:29 No, it doesn't use late-binding, no it doesn't require tedious POSTPONEs. 08:42:05 Now I just have to think of nice names =) 08:43:13 : foo INLINE bar baz quux THEN ;, where INLINE compiles a simple MOVE to get its code into the word being defined. 08:43:53 : day1 foo ;, for instance, would be exactly the same as : day1 bar baz quux ; 08:56:41 --- join: futhin (thin@h24-67-113-99.cg.shawcable.net) joined #forth 08:59:14 hello futhin 08:59:33 heyas 08:59:35 how's it going? 09:00:26 pretty good. I just flashed on a simple and early-binding macro system. 09:00:46 what's a macro in forth? 09:01:53 Well, for most people a macro seems to be something ugly like : foo s" bar baz" evaluate ;, to compile BAR and BAZ into another word, used as : quux foo ; 09:02:31 The problem with that is those type of macros is that they are late-binding. If you redefine BAR, FOO will compile the *new* BAR instead of the *old* BAR. 09:03:22 hm 09:03:28 So as an alternative, many people use POSTPONE -- : foo POSTPONE bar POSTPONE baz ;, which works the same as the other macro (when compiling) but is early-binding 09:03:49 so the word can be redefined and won't affect the macro? 09:03:57 The problem with this is that POSTPONE is long to type and tedious to use if used rapidly in succession -- and makes for hard-to-read code afterward. 09:04:17 Yeah. in that last example BAR can be redefined and FOO won't be affected at all. 09:05:03 : 0?exit POSTPONE 0= POSTONE IF POSTPONE EXIT POSTPONE THEN ; 09:05:08 That kind of thing. 09:05:37 So just a few minutes earlier I thought of an alternative, which goes something like this: 09:05:49 : foo INLINE bar baz quux THEN ;, where INLINE compiles a simple MOVE to get its code into the word being defined. 09:06:01 I'm still thinking about the names, but that would work. 09:06:39 Basically, you write FOO just like you want it to appear in the definition that uses it, except for INLINE and THEN which wrap that code. 09:07:11 All INLINE does is compile a MOVE to get the wrapped code into the created definition. 09:07:25 hm 09:07:26 : day1 foo ;, for instance, would be exactly the same as : day1 bar baz quux ; 09:07:54 Well, not exactly the same, because FOO is early-binding. 09:08:01 hey i got a question 09:08:05 yeah? 09:09:27 um, suppose i have multiple programs on an interactive forth, what can i do if some of the programs have similarly named words? like, can i treat each program unique even if some words are the same? 09:09:31 like 09:09:40 suppose i run a ForthOS or something 09:09:58 then there is going to be a good chance that some words are named similarly 09:10:04 Actually, I could also modify the compiler to search for words in an INLINE vocabulary, but I'm not sure how I could determine where the definitions woul dend. 09:10:18 You have seperate vocabularies, futhin. 09:10:21 because you'll have all the applications, gui, etc.. 09:10:38 how do you separate the vocabularies? 09:11:22 erm, with VOCABULARY, usually =) Vocabularies are pretty simple to use. You create one, you set one as being the destination for your definitions, you switch between and change your order, etc. 09:12:21 They're a compile-time thing, mostly, which means that they are a method of organizing words to be compiled into a definition -- but they're pretty useful interactively, too. 09:12:37 Here's an example from Enth, a stand-alone Forth I've been using recently. 09:13:38 Enth has vocabularies for its editor (called EDITOR), for low-level editing features (EDIT), for control of the clock (RTC), etc. If I boot up Enth and notice that the clock is two hours behind, this is how I fix that: 09:14:04 ALSO RTC HOUR@ 2 + HOUR! PREVIOUS 09:14:38 This adds RTC to my order, gets the hours, adds two to that, changes the hours in the clock to my new setting, and then removes RTC from my order. 09:16:04 hm 09:18:28 can you run multiple programs at the same time in enth and other forths? 09:19:21 yeah, a number of Forths have varying types of multitasking. Enth uses a simple, traditional round-robin multitasking where each process has control of when it can be interrupted. Nice. 09:20:10 it's not that good if somebody forgets to tell a process to interrupt itself after it does its thing.. ? 09:20:17 In Enth the EDITOR runs as a seperate process as the console, and you can switch between these easily. Also, the clock is running as its own process. (or should I say thread?) 09:21:13 I'm sure that there are ways to create a process that'll lock the machine, futhin, and why not? 09:21:50 All you have to do is put PAUSEs where you wouldn't mind being interrupted, and some of the words have implicit PAUSEs. 09:22:20 implicit how? 09:22:45 Since there's a little clock at the lower-right corner of the screen ticking off seconds while I'm doing whatever, I think Enth's multitasking works pretty well. 09:22:57 implicit in that you call one of these words and they call PAUSE 09:23:33 I think the I/O words do this. 09:24:28 what if you want to have an forth interactive lang as the os and you want non-coders to use it too.. and suppose that some try to do some coding, some newbie coders.. they'll make mistakes, etc.. 09:24:57 Yes they will. 09:25:06 it'll be easier if they don't have to reboot the comp everytime they make a mistake 09:25:46 does a pause save the stack the program was working with? 09:25:51 I suppose you could be bothered to write a specialized vocabulary and tell them to keep in it if they don't know what they're doing it. 09:26:14 or use a different multitasking 09:26:18 system 09:26:18 yes, futhin. Each process has its own stack and its own memory space. 09:26:35 so each process can be paused at any time without any problems? 09:27:02 except maybe the io stuff 09:27:10 Why? If they're going to be writing multitasking words, they could also write words to toggle the floppy driver's motor on and off every millisecond, and erase memory, and do all kinds of Bad Stuff. 09:27:28 futhin, the I/O words typically have pauses built into them. 09:27:44 why what? 09:27:53 why should it use a different multitasking system? 09:28:11 Of course, the motor wouldn't work that fast -- it's got a delay of some milliseconds, but I think such an operation could still do some damage. 09:28:23 I don't understand your question, futhin. I never suggested a different multitasking system. 09:28:44 i'm asking you what you said "Why?" at.. 09:28:53 I assume that you want a preemptive multitasking system. I've heard that some Forths use these, but I don't know which ones. 09:29:30 oh, I meant "Why should a different multitasking system be used for these newbie programmers?" and then I go off to explain the other hazards they'll meet. 09:29:48 wouldn't a preemptive multitasking be better for non-coders and newbie coders? 09:30:18 I think that giving them a hosted Forth on a multiuser machine to play with or their computer with Flux would be a better idea, until they learn more. 09:30:42 I don't see how it would effect non-coders at all, futhin. I don't think it'll effect newbie coders too much, either. 09:31:33 I mean, if you sit at the keyboard and bang the keys and somehow magically come up with a word that runs in a tight meaningless loop that contains no PAUSEs and then set this up to be its own TASK and then start that TASK, sure. You'll have problems. 09:32:17 But you really have to almost *try* to do that. You have to set up the new TASK, you have to define its operation, and you have to be careful about avoiding words that contain PAUSEs. 09:32:33 an os provides multitasking, protects the memory of other applications and more or less protects things. an interactive lang as the "os" should be able to provide the same stuff that a typical os does.. 09:32:55 Why, futhin? 09:33:15 why do OSes provide what they do? 09:33:45 why shouldnt an interactive lang as the "os" do the same? 09:33:53 No, why do you think that a stand-alone Forth system should try to mimic all the common processes of other operating systems? 09:34:18 imagine this interactive lang "os" as a mainstream "os" competing successfully with microsoft windows. 09:34:56 don't you think there should be built in stuff for the user's convenience? 09:34:56 I'm not running a bunch of untrusted programs on my machine. I'm not exposing my machine to untrusted users. I neither need nor have security, both in my system's internals and at its access gates. Why burden myself with such? 09:35:07 It's not competing with MS Windows, futhin. 09:36:01 imagine such an os were created and it is competing with MS Windows.. how would it work, would it not provide any protections? would it not use preemptive multitasking? 09:38:08 OK, I'm going to step out of reality and assume that something like Enth has been proposed as a general alternative to Windows. Woops! Enth can't run any win32 programs. Woops! Enth doesn't look ANYTHING AT ALL like windows. Woops! Enth is directed at a totally different user-base than windows. Woops! Woops! If you get on Windows and go delete critical files, Explorer won't stop you. Why do you think that Enth should stop pe 09:39:30 If you really want user-safety, you'd use OpenBSD or something, where the user has his own space, his own limited access to the machine, and rules by which he can surpass these. 09:40:03 In Enth you can do *exactly this*, by creating a TASK for the user with a trimmed-down vocabulary. 09:40:55 You could set a password on the bloody tasking commands, and then only give out that password to people you trust to have a clue. 09:40:59 i'm not talking something like enth. plus a gui can be built up, that looks just like windows. and who cares about it running win32, that is besides the point. 09:41:18 It is if it is *competing* with windows, futhin. 09:41:57 no, it is competing because it is an os with some advantages over windows. it is also competing with every other os in the marketplace. 09:42:33 but i meant to convey the sense that assume we have an interactive lang as the os and it has gone mainstream. 09:42:52 and because it is mainstream, what kind of protection does it have? 09:43:09 Windows is an OS. Windows is hardly competing with common uses of Unix, or with Real-Time embedded OSes, or with the OS of a CRAY. Where do you get this idea that every OS competes? They have their uses. 09:43:34 what protections should it have? 09:44:06 OK. If it is mainstream, meaning that it's made for tots and people who don't understand programming, it'll probably have an interface layer above the programming level where all you can do is run programs -- just like in Windows. The difference here, I hope, is that you've a little doorway by which you can gain access to the underlying Forth. 09:44:08 if it is mainstream and commonly used by many people 09:44:28 yeah 09:44:36 This machine still does not need memory protection or preemptive multitasking -- though I suppose that such might be given to it. 09:45:13 wouldn't it be a good idea for mem protection and preemptive multitasking? suppose there are malicious hackers or such? 09:45:38 It doesn't need these because the user is only running programs, which should be expected to play nice. Programs that don't play nice can be found everywhere, and need not be handled. 09:46:00 OK, that's a good example, futhin. 09:46:12 hm 09:46:47 What if somebody gives you a program for this operating system that builds a backdoor and musses with memory and logs what you're doing and changes the kernel running in memory in nasty ways. This would be a time for memory protections. 09:47:36 yeah 09:47:58 Actually, I can think of how you'd do this in Enth. It wouldn't be too difficult. You'd create a set of vocabularies which user programs only have access too. 09:48:29 Alternatively, you could dig deep down and put the memory protection stuff in the core @ and !, with a small loss of efficiency. 09:49:59 hm ok 09:50:28 Is that all you wanted to know? =/ 09:52:05 heh 09:52:14 sort of :) 09:53:16 --- quit: cleverdra (Leaving) 09:56:29 --- quit: futhin () 11:13:47 --- join: MrReach (mrreach@209.181.43.190) joined #forth 11:59:21 --- quit: lar1 (Ping timeout for lar1[adsl-63-203-73-199.dsl.snfc21.pacbell.net]) 11:59:38 --- join: aaronl_ (aaronl@vitelus.com) joined #forth 11:59:43 --- quit: aaronl (Read error to aaronl[vitelus.com]: EOF from client) 12:10:08 --- join: lar1 (lar1@adsl-63-203-73-199.dsl.snfc21.pacbell.net) joined #forth 12:21:44 --- join: cleverdra (jfondren@1Cust92.tnt3.florence.sc.da.uu.net) joined #forth 12:41:37 cleverdra! 12:41:54 * Trey <- has Enth running on two machines. 12:42:32 I tried running it under Bochs, but it exhibits a couple of problems: 12:43:07 1) it redefines "slow" as far as speed of booting goes 12:43:34 --- join: adu (andrew@adsl-63-201-88-95.dsl.snfc21.pacbell.net) joined #forth 12:43:39 2) Bochs panics on some kind of illegal register write. 12:45:09 hello Trey. like, darn. 12:45:20 Do you have any other machines? 12:45:45 I have four other machines. 12:45:58 Ooops. Make that five. 12:46:28 But Enth works really well now on the PPro-180. 12:47:01 Cool. What'd you do? 12:47:02 The dual P2-266 only updates the time in the lower left of the display about every 16 seconds. 12:47:09 Bad floppy disk. 12:47:15 ah. 12:47:23 That's wierd, with the P2-266. 12:47:27 Yep. 12:48:19 You might want to drop a line on the forum linked from pringle.sphosting.com -- sean seems to check it every one or two days. 12:48:30 Have you tried to use Flux, yet? 12:48:33 Ok. 12:48:36 stuff rocks 12:48:46 I haven't tried much, yet. 12:49:18 I wanted to run it on my BeOS box in Bochs so I could have docs, etc. in easy reach. 12:50:11 whats flux? 12:50:31 Yeah. It has shadow blocks on cylinder 5 where Flux is, and cylinder 6 is devoted to information on the editor -- but everything else is in a text file. I think I remember sean saying that the next release would have the documentation in block form. 12:50:40 adu - a Color Forth running on Enth. 12:51:04 oic 12:51:22 When you start using Flux, Trey, you might want to check the Forum. I've some words on there and some fixes that'll probably help you. IMPS especially, and the fixes to the DECISION table (you have to change NOP to NOOP). 12:51:57 Excuse me, *if* you start =) 12:52:02 :-) 12:52:11 I'd love to find the time. 12:53:18 Enth needs an IDE driver. 12:53:44 Well, when SASM is put in, I'll try to implement one. 12:54:57 Does Sean have any idea when he'll get SASM ported to Enth (or Flux)? 12:56:18 erm, he says that he's already got SASM in, but he's working on the metacompiler. 12:56:54 Apparently Flux is greatly improved =) 13:32:40 --- quit: clog (Ping timeout) 13:32:40 --- log: stopped forth/01.06.07 13:32:47 --- log: started forth/01.06.07 13:32:47 --- join: clog (nef@bespin.org) joined #forth 13:32:47 --- topic: 'http://isforth.sourceforge.net -- http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/isforth/?cvsroot=isforth' 13:32:47 --- topic: set by ChanServ on [Tue Jun 05 14:37:28 2001] 13:32:47 --- names: list (clog adu cleverdra lar1 aaronl_ MrReach Trey) 14:07:50 l8r d00dz 14:07:58 --- quit: adu (IRCStep) 14:24:09 http://www.tuxedo.org/~esr/writings/sextips/ 17:14:17 heh 17:43:29 --- join: TheBlueWizard (TheBlueWiz@ip-216-25-205-196.vienna.va.fcc.net) joined #forth 17:43:30 --- mode: ChanServ set mode: +o TheBlueWizard 17:43:34 hiya all 17:45:18 hey, blue. 17:45:29 hiya cleverdra...whassup? 17:45:43 --- join: futhin (thin@h24-67-113-99.cg.shawcable.net) joined #forth 17:46:54 blue - mmm right now I'm mostly in 'Gather' mode. 17:47:32 hey futhin. 17:48:35 howdy 17:49:44 "Gather"? As in Magic: The Gathering? 17:50:30 i thought gathering information 17:51:16 what futhin said. 17:51:37 what information are ye gathering? :) 17:52:19 hmm...ok 17:53:08 well. 17:53:51 I don't have the URL. What ESR says about geek sex. 17:54:09 oh yeah! 17:54:14 i read that! awesome page :) 17:54:33 <--- needs all the help he can get :P 17:55:30 what's the problem, futhin? 17:55:54 heh 17:55:56 not much 17:56:01 k 17:56:08 just a little shy, a little not confident, and a little too fat 17:56:23 futhin - cool =) I was similarly impressed. 17:56:32 gotta go. 17:56:34 --- quit: cleverdra (Read error to cleverdra[1Cust92.tnt3.florence.sc.da.uu.net]: Connection reset by peer) 17:56:37 bye clog 17:56:46 dang that tab completion! 17:57:00 heh 17:57:04 cool 17:57:07 i can do that too 17:57:14 i normally just type it out 17:57:29 i didn't know i could do it :P 17:57:32 I meant to say bye cleverdra, but s/he left so fast that it picled clog instead 17:57:36 yup 17:57:50 s/picled/picked/ 18:54:39 hey 19:00:15 hiya 19:01:31 --- part: TheBlueWizard left #forth 19:07:34 --- join: TheBlueWizard (TheBlueWiz@ip-216-25-205-196.vienna.va.fcc.net) joined #forth 19:07:34 --- mode: ChanServ set mode: +o TheBlueWizard 19:07:44 there 19:46:09 gotta go...bye 19:46:13 --- part: TheBlueWizard left #forth 20:32:27 * Trey is away: sleeping [22:32] 21:54:16 --- join: adu (shadowirc@adsl-63-201-92-89.dsl.snfc21.pacbell.net) joined #forth 23:19:42 --- quit: futhin (sleep) 23:58:11 --- part: adu left #forth 23:59:59 --- log: ended forth/01.06.07