00:00:00 --- log: started forth/01.06.08 00:24:17 * aaronl_ is away: I'm busy 03:04:23 --- join: Soap (flop@210-54-195-47.dialup.xtra.co.nz) joined #forth 07:02:25 --- join: cleverdra (jfondren@1Cust98.tnt3.florence.sc.da.uu.net) joined #forth 08:37:54 --- join: futhin (thin@h24-67-113-99.cg.shawcable.net) joined #forth 08:38:49 hello cleverdra and mrmreach and trey :P 08:38:56 er.. MrReach 08:39:20 hello futhin 08:45:02 it's really weird using ." hello world" with forth when i'm used to "hello world" 08:45:19 with muf, the string itself is actually placed on the stack :P 08:47:24 --- quit: Soap (Ping timeout for Soap[210-54-195-47.dialup.xtra.co.nz]) 08:48:09 Good morning, futhin. 08:48:52 I don't think so, futhin (re: string on the stack). 08:49:27 well, something that the string words understand is placed on the stack 08:49:43 Agreed, but not the string contents. 08:50:53 i find it a little annoying to have to put a space between ." string" 08:51:02 futhin - Forths typically have s" hello world" too, in which an (addr len) pair is placed on the stack, and c" hello world", in which an addr is placed on the stack (where addr is the length of the string followed by the contents of the string) 08:52:27 ciforth has a smart way of allowing "foobar" and such, futhin. The reason you need that space there is because ." is a Forth word. ciforth has a more complex NUMBER than most Forths do, so when "hello from "hello world" isn't found, it executes a word " in a special vocabulary, which handles things 08:53:22 err, addr is not the length of the string, it is the address at which is the length of the string, and after which is the contents of the string. 08:56:16 * cleverdra kicks his "preesice englis" box. 08:57:56 hm, well maybe forth shouldn't treat "blah as a unique word and just see the first " 08:58:07 nobody is putting " in their words are they? 09:00:46 sure they do. Why not? 09:01:16 heh 09:01:38 futhin - Forth could very easily fail to find "blah in its dictionary and then treat it specially as the start of a string, but it doesn't. Try altering your NUMBER, or whatever word serves in its place. 09:02:57 but what if "blah does exist in the dictionary and i still want to use it as a string? :) 09:03:07 You could do the same thing with comments, too, and have even more for different types of string and for different kinds of quoting. You could add a special syntax to allow *arbitrary* quoting, to avoid conflict with characters in your string. You could even make your string delimeters multicharred, or whole words. 09:03:35 futhin - then that doesn't work. You could check for string-ness before you check for word-ness, though. That'd require modifying your outer interpreter. 09:04:25 Note that you end up with something not Forth ;-) 09:04:30 futhin - but the thing is, you don't need all this. It's more complex than what you have and it makes your outer-interpreter slower than it needs to be and it makes compilation slower than it needs to be and all you gain from it is the ability to save a single space in your strings. 09:04:35 heh 09:04:56 Actually, a single space in your source. 09:04:58 futhin - what's with the CTCP VERSION? 09:05:03 right, what Trey said. 09:05:21 just checking whether you are in windoze or linux (cause i wanted to ask a windows forth question) 09:06:17 i kind of want to code some forth application that connects to the internet.. would you recommend any particular forth for windows? 09:06:30 I typically use Linux. I only use this machine to 'net from when at home. 09:07:02 i was looking at swiftforth 09:07:59 futhin - for windows? SwiftForth, maybe, or Win32Forth. I think you can extend Win32Forth with some trouble. GForth, also. All you need to extend GForth in C to handle your OS internetworking stuff is a C compiler and some knowledge. 09:29:33 i don't know enough of c/c++ 09:33:17 --- quit: futhin (gotta go) 11:43:09 --- quit: cleverdra (Ping timeout for cleverdra[1Cust98.tnt3.florence.sc.da.uu.net]) 12:44:45 --- join: futhin (thin@h24-67-113-99.cg.shawcable.net) joined #forth 12:45:55 is forth a functional language?? 12:46:28 cause i was looking at the comp.lang.functional faq and it doesn't mention forth 13:06:41 --- join: cleverdra (jfondren@1Cust185.tnt3.florence.sc.da.uu.net) joined #forth 13:10:28 cleverdra 13:10:29 is forth a functional language?? 13:10:30 cause i was looking at the comp.lang.functional faq and it doesn't mention forth 13:12:54 no, it's not a functional language 13:14:53 ok 13:14:59 what kind of lang is it then? :) 13:15:05 what category does it fall into? 13:19:43 oh, there are some people who call it a 'concatenative' language 13:20:14 heh 13:20:25 is forth the only concatenative lang? 13:20:49 Really it's almost a meta-language -- with a little trouble you can evolve parts of it to fit into nearly any definition. Mostly though, you're extending your Forth virtual machine to do what you want to do. You're also building a vocabulary to complete your task. 13:20:58 I don't know. Let me check. 13:22:08 Joy Language seems to be similar. but i was wondering about others.. 13:23:40 Well, the HP49G language is kinda like Forth. 13:23:47 the major difference is that it doesn't have a return stack 13:25:17 check out joy if you haven't yet http://www.latrobe.edu.au/www/philosophy/phimvt/j00syn.html 13:25:37 I have. 13:26:28 I think that URL you just gave me talks about concatenative languages =/ 13:26:54 no, the url talks about joy 13:26:56 hrm 13:27:27 groups.yahoo.com/group/concatenative/message 13:27:40 It mentions that though, I believe. 13:27:53 the syntax seems somewhat similar to forth, and the guy makes no references to forth so it seems that he went from lisp to joy. he says that it is a functional language for the most part.. 13:33:10 um, there's more to language types than syntax 13:33:27 but here: 13:33:43 Forth isn't an Imperative Language, because it doesn't have goto 13:34:39 Forth isn't a functional language, because it doesn't have closures 13:35:02 not really. 13:35:30 Forth isn't a scripting language, because it's not strongly typed (according to the Tcl guy) 13:36:33 Forth isn't a *real* language 13:36:35 err. 13:36:41 That isn't what I wanted to say. 13:36:47 lists.tunes.org/archives/tunes/2000-April/002719.html 13:36:56 that's more on concatenative languages 13:37:15 anyway, some people think that Forth isn't a *real* language, because it's not compiled. 13:37:31 You know, like in exactly the way C is. 13:40:33 Of course, there's strongForth, which is strongly typed, and 4TH, which is compiled, and I, at least, know how to implement a general sort of goto 13:41:06 compiled in the manner of C, I mean. 13:43:05 http://groups.google.com/groups?q=type+functional+closure&hl=en&lr=&group=comp.lang.forth.*&safe=off&rnum=2&ic=1&selm=871efe%24ls2%241%40news.tuw 13:43:25 more on if Forth is a functional language 13:44:27 any more questions, futhin? 13:50:52 --- quit: cleverdra (Ping timeout for cleverdra[1Cust185.tnt3.florence.sc.da.uu.net]) 14:05:20 --- join: cleverdra (jfondren@1Cust204.tnt3.florence.sc.da.uu.net) joined #forth 14:05:46 o/~ la la la o/~ 14:06:08 Welcome back. 14:07:42 what did you think of joy? 14:08:37 * cleverdra shrugs. 14:08:55 The description of it was interesting. I couldn't get it to compile. 14:10:02 heh 14:10:16 did it introduce any good ideas as compared to forth? 14:10:20 * Trey is away: preparing for a party [16:10] 14:11:25 I didn't really read it carefully, since I couldn't get the language working and I was really doing something else at the time. Why, did anything leap out at you? 14:11:58 naw.. it's just that i don't know enough to judge it 14:12:04 or compare it 14:12:31 Well, let me look at that url again. 14:14:11 * cleverdra shrugs at it. 14:16:41 hm, for joy is it [1 | 14:16:42 er 14:16:50 [1 +] or 1 + ? 14:17:15 I don't know. 14:31:23 looks like: 1 + 14:56:54 This feature is also known as extended records [wirth88]. It is the 14:56:54 main innovation in the Oberon language; in other words, adding this 14:56:54 feature to Modula-2 led Wirth to create a new language, write a new 14:56:54 compiler etc. Adding this feature to Forth just requires a few lines 14:56:54 of code. 14:58:13 heh? 14:59:11 quote about a feature of Ertl's structures that allows them to be extended after being defined. 15:00:53 basically saying that forth is leet cause only a few lines of code? :) 15:06:21 --- quit: aaronl_ (varley.openprojects.net farmer.openprojects.net) 15:06:22 --- quit: lar1 (varley.openprojects.net farmer.openprojects.net) 15:06:22 --- quit: Trey (varley.openprojects.net farmer.openprojects.net) 15:06:22 --- quit: cleverdra (varley.openprojects.net farmer.openprojects.net) 15:06:22 --- quit: MrReach (varley.openprojects.net farmer.openprojects.net) 15:06:26 --- join: Trey (Baxter@ns.TreySoft.com) joined #forth 15:06:26 --- join: lar1 (lar1@adsl-63-203-73-199.dsl.snfc21.pacbell.net) joined #forth 15:06:26 --- join: cleverdra (jfondren@1Cust204.tnt3.florence.sc.da.uu.net) joined #forth 15:06:27 --- join: MrReach (mrreach@209.181.43.190) joined #forth 15:10:33 --- join: aaronl_ (aaronl@vitelus.com) joined #forth 15:29:57 cleverdra 15:30:07 yeah? 15:30:24 someguy was saying how the forth syntax was unsafe.. for example "1 2 3 + ." leaves "1" on the stack.. 15:30:49 How is that unsafe? 15:31:11 and he doesn't want to use dual stacks for his forth compiler 15:31:23 for his forth.. 15:31:42 and he's trying to aim for a small parser like 4k 15:31:52 a *small* parser is 4K? 15:32:09 hm.. 15:32:32 Are you sure he doesn't mean something other than 'parser'? A parser in Forth is bloody simplistic. 15:32:41 for Forth, I mean. 15:32:53 if you only have one stack.. and you've got "1 2 3 + ." isn't there a problem? 15:32:54 Anyway, who are you talking about? 15:33:06 well.. it's not forth 15:33:09 it's crush 15:33:09 no futhin, that's not a problem. What does the number of stacks have to do with that? 15:33:20 crush? 15:33:28 it's a forthlike lang with lisp syntax 15:33:39 That's... interesting. 15:33:54 http://www.qzx.com/brix/?p0=about&p1=crush 15:34:23 i probably don't understand enough and i'm probably giving you some false impressions 15:34:46 but he didn't want to use forth because the syntax was unsafe, and used "1 2 3 + ." as an example... 15:34:59 I'm tempted to say that he's a moron, but I won't. 15:34:59 and i don't quite understand 15:35:14 he's air on #osdev 15:35:59 futhin, the "problem" with his example code is that it leaves a number on the stack. If you run through that code too many times, if you fill your stack with garbage, eventually Bad Things will happen -- typically your stack overwriting your dictionary and a crash. 15:38:06 But, to say that such is "dangerous" is about at the same level as to say that a typo is dangerous. Yes, it is, it can be. You can put invisible bugs into your code that only come into play at rare times and cause horrible damage. He'd be much wiser to say that ! and @ are dangerous because they make it too easy to arbitrarily read and write with memory. 15:38:39 "You could put garbage into one of your words accidently, causing that word to be a danger at runtime!" Well, yeah. 15:39:07 But handling the stack is central to Forth programming. Those bugs *don't* happen if you pay attention and factor well. 15:39:44 If you can't do that much, if you can't test your words interactively and see if they work, if you can't pay attention to your code -- yes, Forth can be dangerous. 15:39:46 cleverdra: let me send you a log of the conversation i had 15:39:48 OTOH, crush looks interesting. 15:39:53 =) 15:39:56 futhin - OK 15:41:24 his remark about dual stacks is stupid. It takes no more parsing work at all, even if you're using a lisp syntax. Perhaps he doesn't quite understand the return stack in Forth. 15:42:41 Forths *often* check for underflow. I dunno about overflow. 4th probably does. 15:43:10 hm.. was it even necessary for him to invent a new lang? :) 15:43:49 although he doesn't want to implement the overflow/underflow check because that would be more code or something.. 15:44:00 I imagine he's enjoying the process =) but yeah, you might want to point him at 4th. 4th is touted as a "safe" Forth. 15:44:21 His Forth definitions are broken. I wonder if he noticed that. 15:45:03 hrm, well maybe he was drastically simplifying for me? 15:45:55 yeah, the broken-ness is trivial. Given his tendency toward hyperreductionist english, he probably thought the space well-saved. 15:46:13 hm 15:46:29 he's coding an os using crush.. 15:46:49 but why not do it in forth? that's what i'm wondering 15:47:36 his reasoning appears to be "because Forth is unsafe" 15:47:38 is the forth syntax really unsafe? i don't quite get that.. 15:47:40 * cleverdra shrugs 15:47:55 Forth doesn't have syntax. That makes it mildly unsafe, I suppose =) 15:48:05 yeah.. 15:48:09 : foo bar baz ( woops, I wanted a ; here! ) quux la la la 15:48:36 but that's ridiculous, everybody makes typos, and usually fix them all 15:48:49 I once missed a ; on some Forth code, and had one word flow into the next. One word didn't work the way I wanted it to, and the other word didn't get compiled at all. 15:48:57 Yes, these problems are trivial. 15:49:23 if there's a 1 leftover on the stack when a program is executed, isn't the stack cleared? 15:50:50 If Forth itself ends later on a hosted system, sure. If this is a word inside a native system, the '1' will still be on the stack. If I loop over this broken word indefinitely, I will fill the stack and probably cause a crash. 15:51:14 hrm. so how to solve that problem? 15:51:27 This is why you check your words as you write them. This is also why you factor code heavily, because factoring lets you check simpler words -- and then forget them, they being checked. 15:52:29 futhin, some people periodically use words that clear the stack. I think this is *EVIL* -- it can hide bugs, and is inefficient besides. Just test your code, it's not hard. 15:52:49 yeah, but for a forth as the os, maybe some newbie trys his hand at coding.. it wouldn't be pleasant to have the os crash on him.. 15:53:06 : foo ( a b -- c ) * 1 ; 1 2 foo . ( oh look, there's a 1 here! I'd better check FOO and see what's wrong ) 15:54:00 no futhin, it wouldn't =) Why are you so worried about newbies? If he tests code, he'll notice and fix it. If he doesn't test code, he'll swiftly learn to test code =) 15:54:39 well, sounds like there's a reason for crush :) 15:54:49 Enth is pretty helpful in this area, actually, in that it displays the stack at the bottom of the screen after the interpreter finishes with your input. 15:56:16 a tiny reason, futhin. Crush might also want to consider having preemptive threading, in case newbies might lock the machine up, or have memory control, in case newbies try to write over critical parts of the system, or fantasical abstraction from the hardware, in case newbies try to muss with the floppy motor. 15:56:40 Or better yet, *no* threading, because you have to deal with race bugs and the newbie might not manage that. 15:57:04 Or better yet, *no* direct memory access, because the newbie might not be able to handle building data structures in raw memory, and might muss them up badly. 15:57:40 Or better yet, *no* access to the hardware, and merely allow the newbie to do simple, abstracted functions like I/O or streams. 15:57:57 If you take this far enough, futhin, you no longer have a Forth. 15:58:22 Yes, I admit it! Forth can be dangerous in the wrong hands. So can a pencil. 15:58:32 heh 15:58:48 put down that pencil! :P 15:59:00 No running with the pencil! =) 15:59:15 You'll poke your eye out, kid. 15:59:34 Still, 4th has a number of protections -- supposedly it is "uncrashable". 15:59:50 hm 15:59:55 maybe i should check it out then 16:00:02 uncrashable == good 16:00:32 strongForth would disallow such words as : foo ( a b - c ) * 1 ;, because the stack comment in strongForth is actually part of the language, and the interpreter would catch that the word isn't returning what it says it does. 16:00:33 good uncrashable ! (or maybe i should talk like forth?) 16:01:01 not necessary, and anyway your syntax is wrong =) In the first you made a comparison. 16:01:02 strongforth sounds cool 16:01:24 I don't really like strongForth, or 4th, but I can see that they have their place and could be interesting. 16:01:40 eh? good uncrashable ! is wrong? 16:01:55 hm 16:01:57 uncrashable == good \ is a comparison 16:02:01 yeah 16:02:08 good uncrashable ! \ is an assignment, kinda 16:02:35 good uncrashable = . \ under strongForth, this would print TRUE =) 16:02:47 heh 16:03:05 strongForth is kinda cool that way, in that it can have multiple words with the same name that act on different "types", but then there you are with having types at all. 16:03:48 s" foo bar baz" . \ or does strongForth have a different word for strings? does it use "foo bar baz"? I don't remember. 16:04:05 hmpf i was at this site that said "It is a very interesting language to study, both for its achievements and its shortcomings." i want to know what shortcomings there are :) 16:04:13 re forth 16:04:33 cleverdra: MUF was "foo bar baz" 16:04:41 perhaps his ability to amplify the shortcomings of its programmers, such shortcomings as they have. 16:04:47 err, its ability. 16:05:01 I've got to go, futhin. bye. 16:05:16 bye 16:05:24 see ya 16:05:42 anyway, air's assertion that Crush is Forth-like because the bytecode, which is invisible to the user, is in RPN, is silly. 16:05:43 talk to you later :) 16:05:46 hm 16:05:49 *java*'s bytecode is in RPN =) 16:05:54 heh 16:05:56 ok 16:05:59 yeah. talk to you later. 16:06:01 --- quit: cleverdra (Leaving) 17:15:31 --- join: nate37 (nate@cx83983-d.irvn1.occa.home.com) joined #forth 17:44:23 heh 18:07:52 --- quit: MrReach () 18:32:20 --- join: edrx (edrx@200.240.18.80) joined #forth 18:33:59 --- quit: edrx ([x]chat) 20:29:21 --- quit: aaronl_ (2.4.5-ac11) 20:41:46 --- join: aaronl (aaronl@vitelus.com) joined #forth 21:02:40 --- quit: aaronl (hotplug) 21:19:45 --- join: aaronl (aaronl@vitelus.com) joined #forth 21:22:28 * aaronl is away: movie 21:43:00 --- quit: futhin (later) 21:57:48 --- quit: clog (Ping timeout) 21:57:48 --- log: stopped forth/01.06.08 21:57:56 --- log: started forth/01.06.08 21:57:56 --- join: clog (nef@bespin.org) joined #forth 21:57:56 --- topic: 'http://isforth.sourceforge.net -- http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/isforth/?cvsroot=isforth' 21:57:56 --- topic: set by ChanServ on [Tue Jun 05 14:37:28 2001] 21:57:56 --- names: list (clog aaronl nate37 Trey lar1) 23:02:09 --- join: adu (shadowirc@adsl-63-201-92-89.dsl.snfc21.pacbell.net) joined #forth 23:59:59 --- log: ended forth/01.06.08