00:00:00 --- log: started forth/05.11.24 03:17:20 --- join: nyingen (n=jeeves@216-39-182-234.ip.theriver.com) joined #forth 03:18:32 --- quit: saon ("leaving") 03:18:59 --- join: saon (i=1000@unaffiliated/saon) joined #forth 04:15:32 --- join: akebono (i=fujiwara@218.231.249.169.eo.eaccess.ne.jp) joined #forth 04:15:32 Quote: Let us live for the beauty of our own reality. -- Charles Lamb 04:26:31 --- join: Jim7J1AJH (n=jim@221x115x224x2.ap221.ftth.ucom.ne.jp) joined #forth 04:28:21 anyone in here use colorforth? 04:29:10 i haven't 04:30:32 Interesting system, but I'm having some trouble figuring out exactly how to use it... 04:30:51 Not so well documented = ) 04:31:58 I'm a novice Forth user, I believe some other experts in this channel will answer you much better. 04:32:30 afaik, ColorForth is for Chuck's own chip. 04:33:01 Yeah, but the idea of a self-contained Forth running on the bare hardware is strangely compelling 04:33:30 But yeah, I'll check back later. It would be cool if some friendlier docs for colorforth were around 04:34:01 Jeff Fox's page may have some. 04:35:04 hmm, got a URL for that? 04:35:12 the link I found via google is a 404 04:35:32 http://www.ultratechnology.com/ 04:35:43 it should work. 04:35:51 thanks! 04:42:32 --- join: PoppaVic (n=pete@0-1pool47-140.nas30.chicago4.il.us.da.qwest.net) joined #forth 04:44:57 hi, poppavic 04:45:19 howdy 04:45:56 ohayoo = ) 04:46:03 as a novice forther in Tokyo, can I ask you to look at my five or six line forth codes? 04:46:11 ohayoo. 04:46:22 hmm, sure - I guess. 04:46:33 it's for gcd. 04:46:34 ..admittedly, the coffee is not working yet. 04:46:39 hehe 04:46:55 hmm. oh, good - I can take a pass then ;-) 04:46:56 I can't send you a cop. 04:47:02 cup. 04:47:21 s'ok, this is just the first cuppa 04:47:55 GCD: greatest-common-denominator? 04:48:04 : gcd ( a b -- g) 04:48:04 2dup < if swap then 04:48:04 2dupm 04:48:04 begin dup 0> while 04:48:04 >r swapd r> 04:48:05 2dupm 04:48:07 repeat 04:48:09 drop swapd ; 04:48:19 : swapd ( a b -- b a) swap drop ; 04:48:19 : 2dupm ( a b -- a b m) 2dup mod ; 04:48:47 the latter 2 lines should come first, I failed to paste the lines from my cygwin console. 04:49:07 how can I make it better? 04:49:38 hold on. I'm still getingboth eyes to read it 04:50:44 OK... what are you feeding it? 04:51:33 53 21 gcd should put 1 on the stack. 04:51:41 --- quit: aum () 04:52:20 321 123 gcd will produce 3 instead. 04:52:32 it's just a greater common demoninator routine. 04:52:37 hmm.. complete packages of 'b' within 'a'? 04:53:06 yeah, that'swhat I thjought... Yer just looking for the largest whole insert of lesser into greater 04:53:26 well, it's workin' 04:54:26 yes, I think it works. 04:54:40 but I'm not sure it's a good or bad forth program. 04:55:00 can it be smater> 04:55:01 ? 04:55:07 smarter 04:55:13 I'm not sure.. I have to reorganize my head for it. Not awake enough. 04:55:23 hahaha 04:55:33 it looks pretty tight to me, but I'm really new at forth ;p 04:55:41 10 30 gcd . 10 ok 04:55:43 it's four or five inthe us. 04:55:55 I used to do HP calculator RPN a lot, so I have some knowledge of postfix stuff 04:56:07 8am here - it's also dark as hell and 15 degrees w/o windchill. 04:56:19 ah New York you are. 04:56:21 6 am here...slated to be a balmy 78 degrees 04:56:29 shaddap! ;-) 04:56:40 oh, I wish it were cold...eternal summer gets old fast 04:56:58 well, A/C is a lovely thing - and I am NOT running out to snowblow 04:56:58 hp's calculater has limited stack size... 04:57:08 true 04:57:18 but it got me into Forth anyway 04:57:37 anyway, I'm glad to know my codes were terribly bad. 04:57:37 I dunno if I like the 2dupm word 04:57:55 how could you write it? 04:58:14 well, it's not very "reusable" 04:58:41 Ah, I see. Elements that are not reusable should not be factored. 04:58:46 you mean.... 04:58:50 I understood. 04:59:01 Yeah, generally it's a good idea 04:59:07 I see. 04:59:28 I'm still glaring at it, trying to recall how I used to manually determine this stuff. 04:59:57 I have another toy. 05:00:02 2 9 gcd == 1, and that bugs me. 05:00:40 okay, so the first swapping part should be removed. 05:00:55 iirc, I used to compare the denom and if I couldn't get a nice division, I'd double everything and use those values. 05:01:24 ..I keep thinking of measurements and tools.. 05:01:40 how about this? 05:01:50 : lcm ( a b -- l) 05:01:50 2dup * -rot gcd / ; 05:01:58 if I have 1/8" and 1/4" - I'd want to get them in the same scale. 05:03:17 ok.. lemme cogitate a mo... 05:03:48 which forth implementations are you using? 05:03:54 gforth for me 05:03:56 gforth now. 05:04:04 yeah, that's what I've got 05:04:08 just checking to see = ) 05:04:21 except for the latest version not installing well for me, it works pretty well 05:04:36 is there any easy way to call C libraries? 05:04:44 Not to interrupt lcm/gcd discussion... 05:04:46 from forth? 05:04:48 yeah 05:05:06 well, the latest gforth uses calls to do so, but I can't get it to build properly. 05:05:21 otoh, FICL is written in C and runs a forth. 05:05:24 In particular I want to use ncurses 05:05:27 and there is pfe 05:05:42 I was looking at pfe, but had trouble wrapping my head around it 05:06:11 so I'm totally open to recommendations, if any 05:06:15 yeah, PFE is a complex, complete lil' bastard - and I can't recall, but I seem to recall the docs were not all that friendly. 05:06:49 Of late, I'dhave to recommend FICL. Written in C to eval and use forth. 05:06:59 I'll check that out 05:07:10 gforth's manual has a section "Integrating Gforth into Cprograms". 05:07:16 I like forth a lot, but have had a little trouble figuring how how I could use it in my work 05:07:19 you can check it at google. 05:07:22 I've not had luck at all using/understanding FFI tools. 05:07:29 akebono: I'll check that 05:07:52 Right now I'm playing with Colorforth, which is a very weird and cool idea = ) 05:07:54 akebono: yeah - the newest gforth incorporates FFI, but I can't get doubles to work properly. 05:08:38 2-cell numbers are hard for use for novice users like me. 05:08:42 ;-0 05:08:47 well, they get used internally 05:09:10 but, you can also think of them as one-shot single-number pairs. 05:09:35 one better example is rational numbers. 05:09:45 brb.. nature is screaming... 05:10:13 and rational numbers easily require multiple precisions. 05:11:31 so, I need to write a set of operators handling multiple-length precision numbers. 05:11:46 to use rational numbers. ;-) 05:12:35 I hope Forth programming skill will be improved enough to write them soon. 05:12:45 my forth programming skill. 05:12:53 ;-) 05:18:21 oy.. geezus, dats better 05:22:21 using 100 or 1000 as the base. 05:22:34 hmm? 05:23:24 to implement bignum 05:23:30 ugh 05:23:49 I wanted to use rational numbers. 05:24:06 but I found I needed routines to handle bignum. 05:24:15 I've never had a need for such 05:24:54 but it costs too much. 05:25:06 yep. 05:25:40 If I needed huge numbers, I'd just suffer FP 05:25:50 ha. 05:26:16 but rational numbers have good things. 05:26:31 I can't even recall what a "rational number" is. 05:26:37 when one or two word numbers can suffice for the needed precision. 05:26:51 oh, yer talking fractions 05:26:58 123 1 = 123 05:27:03 yeah 05:27:17 somewhere, I recall seeing source for that sorta' thing 05:27:56 a bad thing is that each operation often needs reduction. 05:27:57 iirc, it was an old task for forthers 05:28:02 yep 05:28:14 rescaling, anyway 05:28:18 this requires lcm 05:28:23 which needs gcd. 05:28:42 it costs much even in single precision. 05:28:46 sure. It's not trivial 05:29:41 but only real numbers and irrational numbers can not be expressed by rational numbers. :-) 05:29:54 and, of course, this is why I prefer to think of forth/C/asm 05:31:13 I'm just a novice learner of Forth, but I think it's very different from C. 05:31:25 it is, in many ways 05:31:37 a different interpretation of the machine language. 05:31:42 otoh, I never liked Forth pretending to *BE* the OS 05:31:51 no 05:32:07 is it a minimalist approach to Forth? 05:32:13 whom? 05:32:43 forth as self-sufficient operating system. 05:32:51 You have to first recall there is no "Forth" - there is FIG-Forth, ANS-forth, Gforth, etc. 05:33:26 and there's no one single cpu. but there are many different machines. 05:33:33 akebono: well, FIG used to lay atop bios-calls, and most forths still think they are the end-all. Otherwise, the idea of FFI would be older and more widespread. 05:33:59 FFI? 05:34:02 sure. and, forthish "compiled code" doesn't usually care about the cpu 05:34:10 Foreign Function Interface 05:34:16 ah. 05:34:39 There are 2 popular FFI libs for C - and I can barely understand 'em. 05:34:54 ..getting them to play with forths is.... interesting. 05:35:43 This is usually why I think of using C to write/bootstrap a forth 05:36:12 ah, instead of machine codes. 05:36:45 sure: let the C-compiler generate the MC or asm (and then use the assembler): avoid the mc/asm 05:38:05 does it have anything to do with the issue of writing a forth interpreter in C? 05:38:16 hmm 05:38:37 well, I like C.. But, recall: Gforth REQUIRES gcc; and FICL uses ansi-C 05:39:09 it's not a pure forth approach. 05:39:25 Given an apropos lib and funcs, slapping together routines to manage a forthish-utility is easier. 05:39:39 yes. 05:39:58 The purist approach requires everyone to write everthing from scratch. 05:39:59 Sure it's not. And, unless yer willing to spend to get a commercial product, the metacompiling and stuff is sorta' out of reach. 05:40:18 akebono: yeah, which often means "damn the OS - I know better". 05:41:07 Now, historically, that was fine: forth used to be the first language on new platforms - maybe following an assembler. 05:41:31 ..it gets really tedious when you want to integrate and leverage code. 05:41:45 I feel the purist approach should reserve a place somewhere in this hasty busy enrionment in the computing industry. 05:42:05 environment - i meant. 05:42:11 it has a place - there must be at least 3 guys in here that asm their own distro. 05:42:23 :-) 05:42:47 ..I immediately avoid 'em, just because I feel C - at its worst - is still more portable and useful. 05:43:03 in a sense, we are using and buying forth products to reserve the place. 05:43:12 nonsense. 05:43:37 I mean there can be many other approaches. 05:43:42 there are 05:44:01 ..and the more restricted and deviant, the less shit is used. 05:44:34 I think both should be promoted. 05:44:43 whatever 05:45:30 but today many programmers need to first learn C or C++. 05:45:38 better or worse. 05:46:08 of course they first need to understand macine codes. 05:46:16 Nowadays they actually ridicule C, and use shit like Java, Python, Perl, Lisp, and .Net 05:46:23 not really. 05:46:39 Learning ASM is not a priority anymore. 05:47:06 but at least C is not such a high-level language as Fortran. 05:47:58 a novice learner have to wonder what the difference between an array name and its address. 05:48:08 is. 05:48:17 sure. 05:48:42 they can wonder all day long - they can buy a few books, spend hours and hours, and still do -S to get asm for reading. 05:49:18 C's array indexing syntax is very confusing. 05:49:28 doesn't matter 05:49:43 C's been around the horn many, many times. 05:50:48 C used to be a Pascal for ASM programmers. 05:51:07 Pascal or PL/1 05:51:29 I still piss folks off regular, because I prefer to consider C a "portable assembler" - and damn the verbatim shit. 05:52:09 not portable than FORTRAN. 05:52:31 because they rely on libraries. 05:52:39 huh? 05:53:22 FORTRAN had defined a strict specifications about its performance and behavior. 05:53:49 of course there were many exceptions, though. 05:54:05 I wish fortran on enemies 05:54:12 hahaha. 05:55:07 but treating C as a high-level language tends to fail. 05:55:21 Because it's systemic 05:55:44 Similarly, forth string-support makes C look magical 05:56:08 C doesn't support strings at all. 05:56:37 so, it's necessary to #include 05:56:46 true, but it's nonsupport has a lot of capabilities. 05:56:56 ..whereas, forth has far less. 05:57:10 I've been cogitating these issues for weeks. 05:58:01 I'm not an expert, but forth usually treats strings as counted strings or a pair. 05:58:08 afaik. 05:58:19 yeppers - then look at the internals. 05:58:31 it's not really pleasant 05:59:22 Anyway... Yeah, I like Forth - always have. I also live in C. I want my C to employ forthish and forthish to employ C. 05:59:50 in any language, string is a difficult thing. 06:00:09 because it may require GC. 06:00:45 not necessarily, but it CAN get shitty when you suffer wchar_t and uni* chars/strings 06:01:53 btw 06:02:03 can gforth have access to system calls? 06:02:59 it should 06:03:34 both shells/popen? I think 06:03:47 ah. 06:03:49 or, do you mean lower? I think they manage that, too 06:04:36 okay. I guess at least its Linux version will support most of all system calls. 06:04:57 Most likely 06:05:17 reading the Gforth source will leave you blind, bleeding and ragged 06:05:17 but I'm using cygwin for learning and playing with forth :-) 06:06:11 there are several forths for dos/doze 06:06:38 I have used pygmyForth 06:08:01 but old purist forths occupied a floppy disk. 06:08:15 accessing the disk directly. 06:08:32 yeppers "block files" 06:08:40 still convenient to support 06:09:10 some were not dependent on neither DOS nor BIOS. 06:09:15 I know 06:09:19 (I was there) 06:09:29 self-running 06:09:52 Actually, it just meant they wrote a driver/routine in asm/mc 06:10:25 yes, they wrote what OS/BIOS does today. 06:10:41 right 06:10:47 or the asm to access those 06:11:43 I feel forth is very flexible. 06:12:05 yep, it should be 06:12:10 and it's data type is very simple. 06:12:27 I'm thinking "too simple" - because it has more than one 06:12:57 it's like BLISS's approach. No type basically. 06:13:08 just words or bytes. 06:13:30 The problem is the interpretation 06:13:39 interpretation is up to you! 06:13:45 that's the prob 06:14:03 It's ok for interactive programming as a non-root 06:14:17 it's NOT ok for deployment. 06:14:28 it's like Fortran's EQUIVALENCE statement. 06:14:45 no idea - I've not seen or touched fortran in nearly 30 years 06:14:49 a word can be interpreted in any ways. 06:14:55 yep 06:15:22 signed, unsigned inter? or two 7-bit characters or 8-bit characters? 06:15:31 or two chars array? 06:15:53 right and ptrs and illegal addresses or misinterpreted or "strings" of chars, etc 06:16:14 It's actually at least as dangerous - as is - as asm. 06:16:32 one word can be executable. 06:16:35 Actually, let me retract and restate... 06:17:17 it may make the entire system halt. 06:17:22 I like the forth flexibility (and it can be improved), but that belongs in non-interactive, valid-code. It'd help if interactivity was a bit more paranoid. 06:17:51 I keep remembering F-PC 06:18:09 ..that sucker was stone-cold cool for experimenting and programming on dos 06:18:48 ..it was almost a 1:1 copy of the screen for turbo-pascal or turbo-C 06:19:24 or SmallTalk? :-P 06:20:35 So, yes.. I think that most forths are self-serving and generally foolish. I can easily envision better interactive-interfaces and I wouldexpect non-programmer or limited-programming environments to be a lot pickier.. Gforth is about as protective as I've seen. 06:20:51 I never suffered smalltalk - never wanted to do so. 06:20:59 I did try modula-2.. 06:21:19 IMPLEMENTATION MODULE 06:21:33 yeah, the cases and verbosity got old. 06:21:56 it's if then else syntax differed from that of Pascal. 06:22:54 it was simpler than Ada but more complicated than Pascal. 06:23:06 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 06:23:25 I believe C had advantages over those rigidly typed languages. 06:23:43 I sorta' agree 06:24:33 Problem with C is mostly a lack of ability to ascertain ABI, and the semi-sloppy method of separating API from code. 06:25:01 I say "semi" because, sure - you can fake it... But apparently kids are stupid, or their teachers need to be shot. 06:26:53 the simplicity of Lisp and Prolog look somewhat similar to forth. 06:27:13 though they were all very different internally. 06:27:15 well, Forth grew from the Lisp predecessors 06:27:56 because it's a linked list of executable cells. 06:27:56 Personally, I can't read lisp - and I can do better with forth 06:28:16 but they are very similar. 06:28:27 oh, several ideas - but yeah, the idea of a "list" maintains 06:28:57 and no absolute distinction between code and data 06:29:33 I personally believe there are issues with "parsing" and words, but I'm still trying to codify my views there. ANd, I have some issues with datatypes. 06:30:14 data type is one different theme. 06:30:23 akebono: well, the prob with that is: there are a multitude of distinct issues about code and data - and asm & os reflect this 06:31:29 think of user/group/root: and think of exec-data (code) and R/O data and r/w data, etc.. It all can come back and bite the proverbial butt. 06:33:24 language is not well seamlessly incorporated into the os environment. 06:33:35 Oh.. and recall: a freestanding forth may not care, but *nix sure will. 06:33:45 yeppers, more than true 06:34:55 also recall that - some places - you might need no headers, or you want the headers in memory different from the code/data: the variations HERE alone are less than amusing 06:35:34 may be it's achievable only on experimental systems like Plan 9 or self-running forth. 06:35:56 or lisp machine. 06:36:08 no.. I'm still tinkering.. It's all doable, but it can't be "purist" or ANS in the end. 06:36:18 file systems are much worse. 06:36:41 files and devices simply must rely on the underlying system 06:37:05 I should say: paths, files & devices 06:37:27 there are file systems accepting distinction of U&lc characters for file names. 06:37:37 Sure.. As FIG did, you could code yer own "standalone driver", but it'd need to reflect at least posix 06:37:46 other systems don't. 06:38:01 akebono: I use *nix on a powerbook.. I'm aware ;-) 06:38:10 but some of the other systems may support UTF-8. 06:38:18 that's the macintosh HFS. 06:38:27 I'd suggest a UTF-8 filesystem is not a great idea 06:38:43 otoh, if it was all integrated at the lowest levels, it'd work 06:38:57 Why do they support U&lc differentiation before they implement UTF8? 06:39:10 why don't -- sorry 06:39:15 akebono: well, I could install darwin linux, but macosx offers interesting possibilities I deal with 06:39:41 on the other hand, 06:39:51 there are many, many "hands" ;-) 06:40:14 the standard OSX doesn't have any text editor that can write in UTF-8. 06:40:24 it's terrible. 06:40:39 they have just a text editor supporting UTF-16. 06:40:43 TO be honest, while I can understand the idea behind utf-8, I don't believe I've ever used/noticed it. 06:41:10 I'm usually a "oh, fuck 'em all: I use ascii" guy. 06:41:28 UTF-8 is an ASCC-centric extension to keep the character code endian-free. 06:41:38 ASCII 06:41:40 and that's why I could suffer it 06:41:57 BUT: not as we currently consider "strings" 06:42:31 UTF-8 can be 6-byte length. 06:42:48 pay attention to the variable length nature. 06:43:35 it's not yet another expanded national character set. 06:44:16 Unicode is another tower of mysteries. 06:46:03 I'm not even sure how non-ascii shit would end up 'displayed' from a utf8 string into an ascii world. 06:47:26 I believe the 7-bit part is the same as that of ASCII. 06:47:54 so... how do apps/sys display the intrusions? 06:48:01 so, don't worry, as far as you don't try to go beyond the territory of ascii chars. 06:48:41 I've always liked the html mode of '%20' 06:48:54 at least one can type all that crap 06:50:07 I think the hig bit works. 06:50:11 high 06:51:02 Be interesting to see some tests - I've never tried to pervert my system. 06:51:11 it decides whether the following byte is also an ordinary ascii or not. 06:51:21 yeah. 06:51:30 Not a bad idea, then 06:51:41 ..explains the '%20' outputs 06:52:04 the first bit is always zero. 06:52:06 I still think "string" needs a total overhaul. 06:52:09 if it's an ascii. 06:52:40 yeah, the % was the important part. For html, spaces would be a nono and be treated similarly. 06:52:47 ..same for filepathspecs 06:53:39 if it's set to 1, it is the 2nd or 3rd byte of a 2-byte or 3-byte char. 06:54:19 if it's set to 110, it's the first byte of a 2-byte char. 06:54:36 Yeah, I glanced at a doc - never toyed with the stuff 06:54:44 if it's set to 1110, it's the first byte of a 3-byte char. 06:55:06 iirc, it's fixed at a max of 3-bytes (4?) though, right? 06:55:16 four bytes, i feel. 06:55:29 ok, that explains wchar_t and friends 06:56:19 Yeah.. I can now envision dealing with utf8. We need a far, far better interface. 06:56:57 UTF-16 is much simpler but it is a 16-bit code. 06:56:57 chars, strings, files, consoles, devices - access to members. We need an overhaul. 06:57:20 well, if you settle on a 32-bit int, yer pretty golden. 06:57:58 if so, UCS4 = UTF-32 is ideal for internal representation. 06:58:46 the prob is "internal" versus "external" - utf8 is prolly the best solution. 06:59:30 I edit a plain ascii-file; you see this as utf-8 extern, but use internals. 06:59:46 reversed, I'd see escaped-crap, no? 07:00:06 no. 07:00:12 hmm... ahh, therein is the rub 07:00:29 the local -> internal translation takes care everything. 07:00:49 ...if I write "foobar=", you could use Japanese (kanjii?) similarly? 07:00:52 and, the internal representation should be fixed length 07:01:17 yes. 07:01:38 on PCs, no escape sequences are used. 07:01:57 now wait - gimme' a "for instance" ala' Japanese. - we can't all use ASCII if we are to satisfy trolls. 07:02:02 instead, using Shift-JIS codes 07:02:17 shift wha-huh? 07:02:55 the genuine JIS codes are 7-bit/8-bit characters. 07:03:11 but they conflict with ascci and control chars without escape sequences. 07:03:13 oh-hah? hasu-desu? 07:03:21 ahhhh 07:03:24 I thought so 07:03:46 ..intriguing 07:03:47 so, some sections of chars are shited to avoid the 7-bit area. 07:04:19 Be interesting to see xchat grab the utf-8 and paste it to my ascii termwin 07:04:20 so, just by looking at the first byte, you can tell if it's an ASCII code or Japanese character. 07:04:34 yes.. I can envision that 07:04:49 this is Shift-JIS. 07:05:01 most widely used standard code on pcs. 07:05:05 but today, 07:05:33 Unicode-savvy systems and applications translate them into their itnernal format in Unicode. 07:05:56 or applicaton docs may save documents in entirely in Unicode. 07:06:05 older applications don't do that thought. 07:06:58 for example, XChat that I'm using support UTF-8 by default. 07:07:06 hmm... It's certainly an issue I've avoided for decades. I still hope to avoid it. 07:07:13 yeah, mine too 07:07:25 so, you can paste an UTF-8 char if your IRC client suports Unicode. 07:07:35 never bothereed 07:07:46 haha. 07:08:18 In fact.. personally, I've always felt the uni-foo really belongs in strings/prompts - not var-names/funcs, etc. 07:08:46 but commercial Prolog systems support names in UTF-8. 07:08:58 ..this is one of the reasons I believe "string" needs a total rethink. 07:09:01 because their academic users need them. 07:09:08 I doubt it 07:09:16 ..but I will believe it 07:10:26 because Prolog has a parser generator. 07:10:37 for natural language processing. 07:10:42 yeah, those can get ugly fast, however 07:11:08 otoh.. I've maintained for several years that we need a more flexible parsing-system. 07:11:19 --- quit: snowrichard ("Leaving") 07:12:10 Once yer more into forth, we can argue the parsing ;-) 07:12:14 not just context free grammar, i guess. 07:12:22 right 07:12:38 I keep thinking contexts CAN - not must - make a difference. 07:13:10 Prolog has definite clause grammar.... 07:13:42 yeah, and you'd want to remain in the forthish-universe as well 07:13:48 I'm not a language expert, and I don't know how it works in Prolog. ;-) 07:14:32 well, I'm thinking that perhaps the syntax/semantics may alter by at least "active vocabulary" (namespaces) 07:14:49 for me Prolog looks like a big loop, which is interesting. 07:15:00 thus is forth as well 07:15:09 since it's an interpreter 07:15:19 database, in their terminology 07:15:37 rewriting database.... 07:15:37 yes, I understand the torqued use 07:16:07 ..not all bad, but "lexicon" and "vocabulary" and "wordlist" is nearer the truth 07:16:41 In all, yeah: I find forthish to be... interesting and intriguing. 07:17:06 a grammer has a Prolog parameter that is bound to a conetxt. 07:17:17 I believe it 07:17:33 You'd need to xlate that into forthish or C terms, of course ;-) 07:17:33 even if everything else fits the grammar, 07:18:09 if the context doesn't meet the binding of the parameter, 07:18:17 pass it along 07:18:24 the grammar is skipped. 07:18:41 to the next grammar with the same "pattern", 07:18:54 but with different parameter bindings. 07:18:54 Eventually, you'd hit a handler or "exception" that hollered at you. 07:19:12 oh, hell - they even subgroup the handlers?? 07:19:19 that's sorta' weird 07:19:22 I think they can. 07:19:39 sounds like too much overhead to me. 07:19:43 hi everyone 07:19:50 hi crc ;-) 07:19:55 because they do backtracking. 07:20:03 hi 07:20:04 ahh, yeah: that's overhead 07:20:18 so, they have an operator called "cut". 07:20:37 from which no backtracking is allowed. 07:20:46 akebono: pay close attention to the "only, also, definitions, order, vocs" stuff 07:21:22 gforth implements the sorta' weird, but old, voc-stack idea. 07:23:00 ah, it's beyond my home works yet now. ;-) 07:23:17 but I feel prolog has very interesting ideas. 07:23:48 yes. 07:24:12 think of them as "namespaces" of "words" (for now) - on an ordered-stack. 07:24:39 ..This is where I think adding optional alternate parsing can come in handy 07:25:15 shit.. brb - lemme' beat the ISP sweep 07:25:23 --- quit: PoppaVic ("sweep-beater") 07:25:27 I think forthers like you can easily remap the notions in Prolog into forth words and concepts. 07:26:01 because they are also a parser and interpreter with dictionaries. 07:26:06 and a big loop. 07:26:55 --- join: PoppaVic (n=pete@0-1pool46-200.nas30.chicago4.il.us.da.qwest.net) joined #forth 07:27:09 gotcha' 07:28:03 when I master programming forth I will revisit the difficult issue. Please write some charts or schematics in forth and save it somewhere accessible for someday in the future. :-) 07:28:30 I've been tinkering and writing obscure notes for over a year.. 07:28:45 I think it will take a major rethink. 07:29:17 I guess the parameter binding needs something for unification. 07:29:46 it's beyond my imagination. 07:30:05 I'm thinking vtables and associative arrays 07:30:54 and, this will lead you to a more complete parsing system with constraints handlers. 07:31:16 yeah, but it would no longer be "ANS Forth" per-se 07:31:24 hahaha 07:31:37 I do believe parsing and strings are quite important. 07:32:02 you will have to deal with complex networks of constraints. 07:32:05 Yes, ANS forth has iked me for decades 07:32:14 no 07:32:18 and, what's worse, you will need to solve the constraints. 07:32:53 Everything deals with it's little-bit: I don't care if it generates a neural-network. I just note that Forth is more amenable to the evolution. 07:33:09 I agree. 07:33:33 prolog, lisp, scheme and forth are relatives. 07:34:03 So, every "litter bit" either works or fails and passes it along.. You end up (worst case) with a bitch, or (best case) someone knows how to deal with it. 07:34:17 yes. 07:34:37 and, for and interpretive system, (or a shell), this is fine. 07:34:57 ..what gets generated can be boiled further - with additional tools. 07:34:58 because it's self-extensible. 07:35:02 right. 07:35:38 and, as like lisp and prolog, it can deal with higher-order functions. 07:35:45 Now note: I have not yet seen anything decisively-superior to voclists/vocstack order. 07:35:49 that processes programs not just data. 07:36:29 Sure, generating native-code or something from precompiled "valid code" is just another step. 07:36:46 ..importing it should be no more tedious. 07:37:05 word list management is what forth has been good at. 07:37:27 be advised: ANS and gforth add the concept of "wordlist" 07:37:38 ..sub vocabularies 07:38:28 ..and, unfortunately, it's still 100% ascii - I'm not sure about the cure, but I'm beginning to think UTF8 is a step the right way. 07:39:00 maybe even using the Vstr lib 07:39:23 ..not sure, but it's becoming an issue as grave as the ABI everywhere. 07:39:25 at least for forth systems to be used by natural language researchers or non-Latin script users. 07:39:32 yes 07:39:45 It's becoming nearly a core-issue 07:40:13 without it, program and data are divided at that point. 07:40:21 And, mind you: I still think ascii is more than suitable for 'names', not text 07:40:51 I doubt it, though in many cases it may be true. 07:41:03 Either way, you still need representations. 07:41:40 I don't doubt it. Folks writing code, using var-names or funcs with local dialectic are just asking for a kick in the nuts. 07:42:10 in many cases. yes. 07:42:11 ..next, they will want help: and no one has a clue wtf the var/func are doing 07:42:48 well, ok - they'd see intristic typing 07:43:04 ..but even that concept is sorta'.... broken? 07:43:40 if the internal representation is simple enough, either is fine. 07:43:45 We are right on the cusp of "goddamnit, we can do better" 07:44:31 you should add a flag "-ascii-only". 07:45:57 btw, I need to go to bed. now it's 0:45 in Tokyo. 07:46:03 stay well 07:46:45 good night. thanks for the conversation. 07:47:12 --- part: akebono left #forth 07:47:13 certainly 07:49:00 hmm.. I need feedback from a cross-ection. SHit. 07:49:07 section, two 07:57:26 --- quit: cmeme (Read error: 104 (Connection reset by peer)) 07:58:43 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 07:58:48 --- quit: cmeme (Remote closed the connection) 07:59:45 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 08:53:43 --- join: airbrush (n=morph@216-237-213-242-access-r30-ad.northstate.net) joined #forth 08:56:28 --- join: ThinkingInBinary (n=tom@pool-68-163-248-14.bos.east.verizon.net) joined #forth 08:56:32 Quartus: hey! 08:57:30 anyone around know the specifics of input buffer vs. input source stuff? 08:58:14 what are you asking for? 08:58:44 a buffer isn't source; source is usually ascii chars 08:59:21 PoppaVic: If I'm writing the parser loop, it reads from the input buffer. How does the input buffer get filled? 08:59:59 you add to it, incrementing the counter - checking for overflow or reloads 09:00:09 oh, and terminators 09:00:23 PoppaVic: add to it from where? how do i keep track of what (stdin or user buffer) i'm reading from? 09:00:32 agg 09:00:45 OK, Youve several dilemma 09:00:53 PoppaVic: yeah ;-) 09:00:58 PoppaVic: i'm writing my own forth 09:01:18 PoppaVic: I can do single-char keyboard IO from and to the stack using my VM. How do I get from that to a parser loop? 09:01:20 1) What is valid; 2) what delimits; 3) are we within the buffer 09:01:36 yeah, you can't rely on that 09:01:51 this is why C abstracts fd/ FILE* 09:01:54 PoppaVic: can't rely on what? 09:02:16 PoppaVic: i'm not doing file io yet 09:02:25 I'd suggest a stack of fp/fd 09:02:47 PoppaVic: so basically a list of places i'm reading from? 09:02:50 like "include files" 09:03:03 PoppaVic: is that another "real" stack or one in data memory? 09:03:07 yeah, an entire state-description, including buffers 09:03:18 an internal stack, prolly. 09:03:20 PoppaVic: (the return and data stacks are implemented in my VM, not in forth) 09:03:26 PoppaVic: okay, so just some place in memory 09:03:28 Ain't this fun? 09:03:35 PoppaVic: :-b 09:03:46 PoppaVic: it's too bad EVALUATE is in CORE :-( 09:03:56 I been doing this on & off for several years 09:04:12 have you reviewed FICL4+? 09:04:55 PoppaVic: ? 09:05:09 I'd suggest that parsing, eval and such all suggest that Forth/gforth/ans-forth suggest a whole lot of alternatives. 09:05:12 PoppaVic: hehe, i googled it and the only 2 results are you talking about it in this channel. 09:05:39 OK.. try "Forth Inspired Interpretive Compiler Language" 09:05:46 PoppaVic: so you're saying there are too many ways to do it? 09:05:48 pretty damned poor googling 09:06:00 PoppaVic: sorry ;-) 09:06:14 PoppaVic: i googled "ficl4+" 09:06:14 not really: just that we all keep repeating similar problems over and over 09:06:24 --- quit: saon ("Lost terminal") 09:06:27 oh, no... 4+ is theversioning of ficl 09:06:36 PoppaVic: i figured 09:06:46 I think his latest was like 4.0.1 09:06:47 PoppaVic: i thought maybe the + was like "deluxe version" ;-) 09:06:52 yeah 09:07:04 PoppaVic: so you're saying I should write a not-really-ANSI Forth system? 09:07:07 I note he's about abandoned it. 09:07:13 PoppaVic: hmm... 09:07:16 * PoppaVic sighs 09:07:27 PoppaVic: blame Quartus, he convinced me ;-) 09:07:30 I can't really recommend fully ignoring ANS 09:07:46 ..I can recommend that ANS be a stupid voc/layer 09:08:02 PoppaVic: voc? 09:08:09 vocabulary 09:08:17 PoppaVic: oh 09:08:24 PoppaVic: well i won't ignore everything, I just won't implement it all 09:08:28 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 09:08:37 as long as folks COULD make shit 100% ANS, fine. 09:09:00 --- join: saon (i=1000@unaffiliated/saon) joined #forth 09:09:03 PoppaVic: you mean as long as programs that work on my partial-ANS system work on a real ANS system? 09:09:05 yeah.. I'm still peeved about Posix(s) and C, let alone ANS 09:09:09 PoppaVic: so you're saying don't rename stuff 09:09:16 PoppaVic: what's wrong with those? 09:09:26 I'm saying that being ABLE to write ANS isnot "bad" 09:09:35 or "import it", anyway 09:10:08 If you can get ANS forth -> myGreatLanguage: fine. 09:10:21 PoppaVic: so make it possible to implement it on top. okay. 09:10:25 ..I still tend to think of vocs and filters 09:10:59 if you can write ANS here and send it there, cool. If you can read ANS and run it, cool. 09:11:13 But, yeah: I see a lot of issues all over. 09:11:23 PoppaVic: meh, it's too complicated for a cell phone 09:11:42 The only folks that get more peeved with me are #asm folks ;-) 09:12:16 Personally, I'd love to see folks impaled and die on their fuckin' cellphones. 09:12:24 PoppaVic: hey! 09:12:28 PoppaVic: what for?! 09:13:14 PoppaVic: I'm not a jerk in public with it, I use it mostly for internet/text messaging, and I make calls politely. 09:13:20 I despise cells and their ear-jammed twits that can't drive 09:13:37 * airbrush calls them "phone-ticks" 09:13:44 yes 09:14:02 PoppaVic: I don't have a driver's license. Please don't kill me! 09:14:16 PoppaVic: But I agree, I can't stand it when people drive with phones and act like idiots. 09:14:26 ThinkingInBinary: as a rule, I like C - I came from Forth (long ago) and see advantages both ways 09:14:58 PoppaVic: What kind of state in a system is reset during an EVALUATE? Can I just insert the string into the input buffer? 09:15:00 Yep. I can suffer a driver with a headset; I can't suffer lunatics trying to drive while cupping their heads 09:15:16 PoppaVic: lol 09:15:17 ThinkingInBinary: it depends on the interface. 09:15:29 PoppaVic: like the UI? 09:16:05 you MIGHT leave the state-of-forth/engine and blip in and out of C or asm - it might not matter. ORRR, it might matter to the evaluation. 09:16:36 It's mostly a question of layering and FFI 09:16:41 PoppaVic: FFI? 09:16:53 Foreign Function Interfaces 09:16:57 Contexts 09:17:06 PoppaVic: ah 09:17:11 indeed 09:17:13 PoppaVic: like interfaces to native code? 09:17:20 just looking into that will take you a week 09:17:30 yes, or C or python or perl or... 09:17:35 PoppaVic: mine are lame, I use negative XT's in dictionary entries to index into a switch block of native calls in my Java code. 09:17:43 PoppaVic: 09:17:45 PoppaVic: whoops 09:17:50 s'ok 09:18:04 damn, you need a shorter handle 09:18:07 PoppaVic: J2ME doesn't support classloading, so I only need to interface to my own code (users can't, physically, load their own java code) 09:18:16 PoppaVic: no tab completion? 09:18:21 I do NOT care about goddamned java 09:18:34 yer hogging column zero of the window 09:18:35 hehe 09:18:36 * ThinkingInBinary cowers in the corner. 09:18:52 java is just a fuckin' forthish variant 09:19:04 PoppaVic: oh yeah, the JVM is stack-based isn't it. 09:19:11 PoppaVic: well, good design decision on their part ;-) 09:19:12 d'oh 09:19:23 * airbrush remembers basic, goto, and gets a semi-erection 09:19:36 peek 09:19:39 poke 09:19:47 ok, yer stuck getting shitty prints on the screen - I dragged it. 09:20:05 64K man I never thought I'd use all that memory *<]8) 09:20:07 ..this about doubles the chance I can't understand 09:20:31 airbrush: multitasking, procs and compiling can hog it all 09:20:52 ..the fact some moron treats it all as HIS is what hurts 09:21:27 PoppaVic: I'm confused... what are you talking about? 09:21:35 PoppaVic: Java? 09:21:41 Being trained on cp/m and 64K, I can understand TRYING to be cheap 09:22:17 --- part: snowrichard left #forth 09:22:27 ThinkingInBinary: Yer causing my xchat window to split greedy on the left/names: would you fuckin' PLEASE get a shorter name?? 09:22:40 this was a commodore 64, back in the 80's, heh I was inschool, on a vax/vms taking calc/w/computers, and I has this "neater" toy (C64) at home 09:22:44 --- nick: ThinkingInBinary -> t 09:22:52 Yeah, I had a C64 09:23:09 just a sec 09:23:12 --- nick: t -> tjt 09:23:27 --- nick: tjt -> ashorternick 09:23:29 sinclair Z80, C64, Kaypro-64, an AT and then - all bets were off 09:23:44 better? 09:23:54 never has the sinclair, wanted an amiga/or atarist but didn't get one 09:23:58 tolerable. I hate looong nicks 09:24:14 s/has/had 09:24:32 the amiga intrigued me, but they blew it and I went with the C64, still interested me, but I screamed and went Cp/M 09:25:45 When the amiga went "custom chips and OS" and German, I raced straight to CP/M 09:25:45 I remember waiting for that tape drive to load a program, hehe it was basic "patience" training for the dialup downloads to come 09:25:59 300bps ;-) 09:26:31 wasn't that right after the president of commodore went to atari? 09:26:43 still, there are so DAMNED many "good ideas" out there.. *sigh* Doze and *nix just bug me. 09:26:50 I believe so 09:26:57 it's kinda hard to remember those years, I musta burnt them brain cells up 09:27:06 --- join: virl (n=hmpf@chello062178085149.1.12.vie.surfer.at) joined #forth 09:27:13 wel, for me: they are just buried in years 09:27:33 ..I dunno how many books I've just thrown away 09:27:46 hehe, back when a ho was a garden tool 09:28:06 back when "gay" meant happy, fer cripes sakes 09:28:11 I still have my C64, heh and the manuals 09:28:14 hehe yep 09:28:26 there were only "queers" 09:28:35 oh, hell - mine died.. THe PS and the drive - fuck that expensive shit 09:28:43 PoppaVic: I "love" how the command in ANS Forth to read a line of user input is QUIT 09:28:47 PoppaVic: it's *so* logical! 09:29:04 ashorternick: yes, you'll find a lot of that stuff 09:29:18 PoppaVic: it's obvious it used to be for "QUITting" a program, but that's just lame 09:29:30 I'd have understood a deferred word or list-of-words, but nooo 09:29:40 how do I get forth to page outputs at the command line? 09:29:50 ANS will make you want to cry 09:29:50 airbrush: pipe it into less? 09:29:53 or at least pause 09:30:02 there is no 'page' except to devices 09:30:10 I didn't see less in the list of words 09:30:10 PoppaVic: it's not a good spec, it's just a "standardization" of a bunch of quirks 09:30:20 yeppers 09:30:30 airbrush: i meant pipe the forth program's stdout into a pager 09:30:31 I saw that long, long ago as a member of FIG 09:30:48 airbrush: you HAVE to think "devices" 09:31:07 Isuspect C is why I think forth is even more broken. 09:31:09 I'll just stick the output into a file and read the file from the shell, 09:31:53 Forth seems to have some major issues with contexts/devices - and I never understood why. 09:32:10 heh, it's like in lisp, no one can tell you how to clear the screen 09:32:12 hehe 09:32:45 'clear' does that in retroforth :) 09:33:47 you'd think that would be a basic command in any term box language 09:34:14 yup 09:34:22 well.. 09:34:25 * PoppaVic sighs 09:34:59 I've thought for several years we could benefit from a "console.h" as opposed to termios guts 09:35:08 Does the size of the input buffer change based on incoming line size? How does a program find out when it has read to the end of the line/ 09:35:15 s/\//\?/; 09:35:38 yer thinking of TIB and no. it looks for terminators for WORDS 09:35:47 ..I told yah it was primitive 09:36:27 PoppaVic: yeah but what if I have a line "FOO BAR BAZ" that I just ran, and then I read a line "FOO BAR". Won't the input buffer say "FOO BAR" and then still contain " BAZ" after that? how does it know that it's reached the end of the line? 09:36:39 nope 09:36:52 TIB manages words, last I studied 09:37:13 PoppaVic: no I mean like SOURCE and >IN 09:37:15 do you use C? 09:37:34 PoppaVic: a little 09:37:39 think in terms of fgetc() into a buffer 09:38:18 PoppaVic: so single characters at a time? 09:38:21 SOURCE and whatnot are related to more-than-a-word, and frankly: the stuff gets old and cripple fast. 09:38:35 no, per-char UNTIL a delimitor 09:38:40 delimiter 09:38:41 PoppaVic: oh 09:39:07 did you guys see this http://www.theinquirer.net/?article=27857 09:39:10 PoppaVic: but what about, e.g., the compile loop? it will keep doing that, reading everything in the buffer. how does it know the end of the buffer? 09:39:15 you can spend days screwing with reviewing what those assorted vars/buffs store, dude 09:39:18 PoppaVic: if you were redesigning Forth IO, how would you make it? 09:39:31 PoppaVic: I hate the way ANS does it, I'm going to make mine work differently. 09:39:36 to this : http://www.advantagesix.co.uk/products/A9home.html 09:39:51 similar to FIG or bios or libs. Trust me, I've been considering it for a long time. 09:40:06 FIG? 09:40:13 airbrush: what? why? 09:40:15 forth interest group? 09:40:28 Forth Interest Group FORTH - very, very old 09:40:46 Minimal asm to provide the most primitive of primitives 09:40:58 articles about some new RISC OS machines coming out 09:41:07 with C and decent OS, you SHOULD be able to climb a stair or two 09:41:15 PoppaVic: ok 09:41:15 ugh, fuck em 09:41:31 RISC makes me nuts - as do CPU anymore 09:41:34 heh, the man box is the size of two floppy drives taped together 09:42:01 if it has a gcc interface, I'm golden 09:43:49 ashorternick: Historically, FIG came first, then F-83 and then F-PC, and so on... Almost *ALL* arguments in forth are predicated on who does what to whom and where... It's pretty damned depressing. 09:44:46 I sometimes think Forthish would benefit from just accepting prototypes and libs. 09:45:38 ..as is, there is just no way to do "prototypes" that I'd call "clean" 09:46:07 even more depressing, an article about making forth more "professional", ugh 09:46:15 ..and "stack effect comments" just do not count 09:46:34 airbrush: yeah, prolly doze/M$ centric 09:47:23 nope, it seemed to imply that too many people (laymen) could understand it, heh, he wants to turn it into computer sci jargon 09:47:46 I don't think he can succeed, cause his forth wont be my forth :) 09:47:47 "professional" only bugs me when they want to specify commercial tools and freakin' "rules" specific to their firms... Like the stupid "tactical" for firearms folks. 09:47:59 ahhhh 09:48:13 it wasn't "snooty" enough I guess 09:48:18 airbrush: he wants a math/cs voc 09:48:45 he complained that it was associated too much with "hackers" and such, like that was a bad t hing 09:48:50 I look instead at "what the fuck is around and how can I reach it - or bypass it" 09:49:23 well, I have to agree - the "hackers" I knew are no longer relevant: nowadays they are all "hacqueers" 09:50:01 ???? 09:50:02 in the Long Ago, "hack" meant "Geezus christ, how can I get this fucker to run here?" 09:50:12 I think of "hackers" as hobbiest 09:50:14 brb 09:50:35 nowadays, they are all twits - and I no longer refer to self as "hacker" 09:51:49 be advised, they merged shit like "crackers" and "phreaks" at least a decade ago 09:52:53 ..so, what used to be a label for someone that lacked University-training, (or superseeded it), has become a really obvious label. 09:53:30 "pest" wouldn't fly - assholes won't admit it. 09:54:06 we can thank the media for that misportrayal 09:54:23 I always got a hoot from books that mentioned the evolution of "bohemian" and "beatnik" and "hippie" ;-) 09:54:58 "'Bums'have to changetheir labels every few years" 09:55:33 yeah, but we have to LIVE with it - and damn the media: the same folks that decried "baby-killers"/ 09:55:59 That old "grain of salt" still applies. 09:56:08 I take most things with a huge lump of salt, especially media 09:56:18 no joke 09:56:43 I watch daily - It's a huge laugh.. I can only hope it all falls apart soon, or I die ;-) 09:57:09 ..the former, they don't want to accept ;-> 09:58:06 ANyway, forget the idiocy-labels.. I've coded for at least decades, and used forth on and off for most of that. 09:58:35 Don't let the politics and labels bug you overly. 10:01:19 PoppaVic: I still call myself a "hacker", but inevitably have to postfix it with "the good kind that likes to work on computers, not the evil kind, like crackers" 10:01:19 which labels or politics? 10:02:21 ashorternick: hmm, couldn't you just postfix it with 'MIT like'? 10:02:36 I don't bother anymore - the term is as perverted as "He is a Gay lad". 10:02:38 virl: I'm in highschool, most people wouldn't get that. 10:04:06 heh, what part of the country are you in? 10:04:15 Mid-east 10:04:19 MI 10:04:26 airbrush: MA 10:04:44 airbrush: just check my whois 10:04:53 ..and don't start: I already know about the people/politics: it's all that bugs me. 10:05:28 airbrush: you're in NC, right? 10:05:33 "People: nothing a Neutron Bomc can't recolve" 10:05:40 resolve 10:05:41 I asked my nephew, he was in HS a couple of years ago, why he and all his friends dressed up like black people, he didn't know heh I finally figured it out though 10:05:49 airbrush: oh that's lame. 10:05:50 ashorternick, yep :) 10:05:54 airbrush: whois is useful 10:06:08 airbrush: and you use morphix 10:06:12 shit, you should hear the args about "jailing" pants - they think it's cute 10:06:28 PoppaVic: huh? 10:06:35 ..I got an argument about WHY they drooped 10:06:40 I figured it out, they're trying to get their white girls back *<]8) 10:07:21 * PoppaVic being "white" lost something in translation - and isn't too worried 10:07:25 I think the gangs started the "saggin' and baggin' " originally to conceal weapons 10:07:32 nope 10:07:42 I've heard similar though 10:08:07 that gang stuff reminds me of lord of the flies 10:08:20 It's the same, be it shoes or pants: they don't leave internees/inmates a "rope". 10:08:54 okay, final answer, anyone here think there's a serious problem with supporting only a single, fixed input source (keyboard) on a small forth? 10:09:02 Frankly, I've pretty much gotten to the point where "ethnic cleansing" almost makes sense... 10:09:08 not if that's what you want to do 10:09:13 ashorternick: no 10:09:17 PoppaVic: good 10:09:28 PoppaVic: reading files will be implemented as "typing" them. 10:09:32 PoppaVic: it seems to make sense 10:09:40 PoppaVic: ozzy said it "Thank God for the Bomb" 10:09:42 "Dat der 'Melting Pot' Done be broked" 10:10:22 look, you CAN write a forth/whatever to use a console ONLY for input - but it seems unlikely. 10:10:56 PoppaVic: what else would i use for input on a pda-style device? 10:11:03 You might want a buffer, a file or a whole dir 10:11:15 PoppaVic: hmm 10:11:19 oh, a PDA - yer again talking a Special Device. 10:11:28 PoppaVic: yeah, I have been the whole time. 10:11:35 PoppaVic: it's going to be a J2ME app for my cellphone. 10:11:42 Yeah, it makes yer plans and thoughts rotate 10:11:54 * airbrush has seen them tiny things 10:12:06 airbrush: yeah, Nokia 6102, it's a cool phone 10:12:08 #1) I could care less about cells; #2) I don't do java 10:12:28 now, imagine CROSS COMPILING 10:12:29 PoppaVic: I know, you already told me. 10:12:50 apps are... applications. 10:12:54 hehe, compgeeks has a pair of sunglasses that play mp3's and can record voice, so now we can take pictures with our phones, and listen to our glasses 10:13:01 You need a target and/or baseline 10:13:03 PoppaVic: I'm not asking you to care about my cell phone or write Java, I'm just looking for design advice. 10:13:14 PoppaVic: you mean like a goal for what I want it to implement/do? 10:13:16 ashorternick: right, and THERE I try to help 10:13:24 well, yeah 10:13:37 PoppaVic: okay, that's all I'm asking for. 10:13:50 for starters, the target prolly does NOT need a full language 10:14:04 however, getting there might. 10:14:15 PoppaVic: I'd like to be able to develop programs on the device itself. 10:14:23 (are we having fun yet? ;-) 10:14:27 PoppaVic: oh yeah! 10:15:01 ashorternick: yeah, you MIGHT support a SUBSET - so, you need to ascertain what subsets are possible and then how 10:15:29 PoppaVic: so just come up with a list of words/sets of words that I want? 10:15:57 sets, and words - yeah, not a bad start; I wish we could everyone to play - we'd learn more 10:16:22 PoppaVic: one nice thing about my @#$% program is that I am creating my own "machine" to run its own "assembly" language because @#$% doesn't really do pointers right. 10:16:23 do NOT stint on "vocabulary" 10:16:30 PoppaVic: ok 10:16:38 PoppaVic: hell, it *doesn't* do method pointers. 10:16:41 and do NOT think of "asm" 10:17:30 folks that think "asm" seem to believe ASM is "portable" and uber-powerful 10:17:42 * airbrush will just wait for the programmers to get finished, then he'll tell the computer what he wants, "computer, make me a sandwich" 10:17:53 PoppaVic: so how do I write "DUP" without asm? (not being a jerk, just curious) 10:17:58 you need to accept that "toolfoo" is the target 10:18:12 PoppaVic: I'm writing toolfoo too, so that gives me some freedom. 10:18:24 dup better be a prim, because the stack is fairly primitive" 10:18:38 PoppaVic: DUP is a bytecode in my VM. 10:19:10 PoppaVic: to make life easy, chars, addresses, and cells are all 16-bit signed chars (I would do unsigned but @#$% doesn't do that) 10:19:21 basically, you want to do stack[now+1]=stack[now++]; 10:19:33 PoppaVic: yeah, I got that already. 10:19:47 ashorternick: you might care to examine fovm and such herein 10:20:36 PoppaVic: what is fovm? 10:20:44 but, folks commonly seem to forget you need a host/compiler or a target/compiler. 10:21:19 ashorternick: we've a few folks that write asm-based forth; and a far smaller number using bytecodes 10:21:40 PoppaVic: well, bytecodes == asm for me since the bytecodes are instructions for my VM 10:21:52 I think JasonWoof is using bytecodes 10:22:06 no, BC is BC - not necessarily mc 10:22:08 PoppaVic: what is the minimum set of control-flow words I need? 10:22:27 PoppaVic: sorry, I meant that when I said "bytecodes", I was referring to VM instructions. 10:22:34 if/then/else/endif;goto 10:22:39 right 10:22:41 PoppaVic: goto? how does that work? 10:22:48 relative 10:22:58 PoppaVic: like 5 GOTO will jump 5 somethings ahead? 10:23:01 you'd need a lot more experimenting 10:23:32 or "goto label" - it's all relative, even if folks compile absolute. ;-) 10:23:49 PoppaVic: but how do you make a label in forth? i'm confused. 10:24:17 ahh, in forth... which? version? cross-compiled? You begin to see the issues. 10:24:54 ashorternick: I might - perhaps - recommend you to the #openbios folks. 10:25:03 PoppaVic: why? they do forth stuff? 10:25:14 ..they are working up a forthish system 10:25:54 PoppaVic: is forthish an adjective meaning like forth, or the name of a program? 10:26:06 Mind you, herein - in #forth - we talk some other issues. But, the #openbios folks have already headbanged a lot. 10:26:48 I tend to use "forthish" to mean "akin to forth" - but I might usurp it, since forth is so damned wide-open 10:26:54 PoppaVic: ok 10:27:03 * airbrush passes a copy of the qnx "incredible floppy" to ashorternick 10:27:38 ok.. I must plan din-din and call it a day. 10:27:41 PoppaVic: ok 10:27:46 Talk to you all tomorrow 10:27:56 PoppaVic: bye 10:27:57 --- quit: PoppaVic ("stay well - I gotta' split") 10:28:01 do I know you both? 10:29:05 ashorternick, heh I have one linux box that you're whois wont decipher 10:29:45 oh, and I don't care if you have a nick 26 letters long, go for it! 10:29:52 --- nick: ashorternick -> ThinkingInBinary 10:29:58 wheeeeeee 10:30:02 hehe 10:30:10 airbrush: it feels happier in here now 10:30:15 heh 10:30:55 It's pretty laid back down here 10:31:09 airbrush: dear god, java's chars are *un*signed, and i just converted my whole system to them 10:31:19 hey, i said Java and a lightning bolt didn't hit me! 10:31:41 I don't know java, I've done a little C++ though, heh enough to know I didn't ever want to do any more 10:31:50 heh 10:32:24 I took a C++ course over at the college, seems like someone designed that language for job security 10:32:31 airbrush: ugly as hell 10:32:57 hmm wasn't java designed for that? 10:33:05 virl: what, to be ugly? 10:33:11 virl: nah, it's pretty but wordy. 10:33:12 yepidiyep 10:33:27 I like lisp and scheme, but I have a hard time deciphering the "computer-ese" those guys use 10:34:00 I still don't get what makes a lisp macro so special, heh all the examples I've seen look like any other macro 10:34:03 pretty? c++ is prettier, because you can strip the whole OOP-everywhere-in-an-ugly-ugly-way shit 10:34:40 C++ is like a clairvoyants programming language 10:35:01 virl: oh, i just meant syntax-wise 10:35:05 virl: Java's OOP-is-your-life attitude sucks. 10:35:13 virl: I *never* want to do Math.abs() again. 10:35:34 :-) 10:36:20 System.out.println is also weird 10:37:12 okay, i'm using int's again ::phew:: 10:37:22 * ThinkingInBinary just doubled the RAM requirements of his program. 10:37:27 soIsTheseLongNamesStrungTogether 10:38:12 (((IRCUser)airbrush).getChatMessageWriter()).sendMessage(new Message("Really? You think?!")); 10:38:43 "We must ask ask oursef: is our children learning" G. Bush 10:38:51 airbrush: hehe, i have a dubya fortune file 10:39:09 have you seen the letter to pres bush? 10:39:15 airbrush: have you ever written a parser/compiler loop/ 10:39:17 ? 10:39:32 nope, I don't even know what a parser is 10:39:35 airbrush: ;-) 10:39:38 anyone? 10:40:08 a simple parser? for what? 10:40:16 virl: for my forth implementation! 10:40:48 * virl thinks that he wrote something like that 10:41:03 ThinkingInBinary : save this to read later, you'll love it : http://www.lionelonline.com/reading.htm 10:41:07 virl: I still can't figure out an elegant way to do I/O on a small device. 10:41:08 for forth you don't need a parser 10:41:11 airbrush: yeah 10:42:08 which small device? 10:42:25 * virl is also writing a forth for a small device 10:51:04 --- part: airbrush left #forth 10:52:04 virl: what exactly are you doin? 10:59:59 in which context? computer? work? hobby? =) 11:00:59 writing a forth for a small device that's what i want to learn more about :) 11:05:51 oh 11:05:58 virl: j2me, for my phone 11:06:03 virl: context? 'cause i can! 11:06:27 virl: and because, to be useful to me as a geek, any device i use *must* have the ability to be programmed by itself, without a host system 11:07:29 virl: how do i parse user input without a parser? 11:07:46 virl: by parser i mean like read a word, look it up, compile or execute, repeat 11:07:48 ThinkingInBinary: thanks, but I don't ask you for that, I asked humulus ;) 11:08:06 virl: sorry 11:08:14 no problem 11:09:03 virl: so, if I'm implementing a different IO system than ANS Forth, what would be a good design? 11:09:04 humulus: in short I'm doing a game forth as an OS for the XGS 11:09:23 brb 11:10:19 XGS i'll google that :) 11:11:08 and I'm also doing a bytecode based forth system/framework for game development/streaming/(trying to kick java/.net away)/curiosity/own use 11:11:45 sounds nice :) 11:12:22 but bytecode is a different approach then forth's threaded code :) 11:12:34 xell.forthworks.com, when you want a site to associate with it(the bytecode forth) 11:13:12 ah.. no I didn't mean that context with 'bytecode' I meant that words are bytecode 11:14:03 and humulus it's not a different approach because it's also a well known approach, it's called 'token threaded' 11:14:40 but I will use indirect threaded code or direct threaded code 11:14:54 token threaded i remember that from a course :) 11:15:20 virl: my J2ME-Forth is bytecode-powered, except the bytecodes are themselves instructions to a virtual machine ;-) 11:17:06 I also use bytecodes for instructions. I think there is a little misunderstanding in that context. 11:18:52 virl: for me bytecode is something like java bytecode, i never heard people usin it as a forth implem. technique 11:21:05 if you're implementing a system that can read from multiple places (console, file, user buffer, etc...), how do you keep track of where you are and were reading from? 11:54:30 most times you don't need to know from where you read data 12:01:23 humulus, it's an implementation technique for small forths but very slow forths. 12:10:20 --- quit: warpzero ("leaving") 12:10:53 --- join: warpzero (n=warpzero@wza.us) joined #forth 12:21:26 --- quit: ThinkingInBinary (Read error: 104 (Connection reset by peer)) 12:40:52 --- nick: Raystm2 -> tiff 12:49:43 --- nick: tiff -> Raystm2 12:59:58 --- quit: madwork ("?OUT OF DATA ERROR") 13:00:10 --- join: madwork (n=foo@derby.metrics.com) joined #forth 13:58:25 --- quit: nyingen ("leaving") 14:50:54 --- join: sproingie (n=chuck@64-121-2-59.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com) joined #forth 15:02:44 --- join: snoopy_1611 (i=snoopy_1@dslb-084-058-154-024.pools.arcor-ip.net) joined #forth 15:03:08 --- quit: Snoopy42 (Nick collision from services.) 15:03:10 --- nick: snoopy_1611 -> Snoopy42 15:41:59 --- join: ThinkingInBinary (n=tom@pool-68-163-248-14.bos.east.verizon.net) joined #forth 15:43:20 hey 15:49:51 Hey. 15:51:33 Quartus: I'm trying to write the part of my FORTH to handle the input buffer... how do you keep track of where you're reading from, how long the data in the input buffer is, and that sort of stuff? 15:54:42 Quartus: basically, I know SOURCE-ID will keep track of the *type* of input source, but how do I keep track of the location of the buffer, the location in it, and stuff like that? 15:55:50 Quartus: Do I keep it on the return stack? 16:05:41 one sec 16:05:55 Quartus: okay thanks 16:06:25 SAVE-INPUT and RESTORE-INPUT are the words to save and restore the input specification. 16:07:57 Quartus: but aren't they only for the same input source? 16:09:05 Quartus: but i mean, internally, what state do you need to keep track of, and how do you keep track of it? 16:09:47 No, they're for any input source. You need to keep track of, for instance, a file handle, a position in the file, the input buffer pointer. 16:10:41 Quartus: wait, for the console, there's no special data. for an input buffer, i need to keep track of the pointer and the position. 16:10:47 Quartus: (i'm not doing file handles just yet) 16:11:22 Sure there's special data for the console -- the input buffer, the value of >IN, the current value of SOURCE-ID. 16:11:33 Well, not the whole buffer, but the pointer to it. 16:11:44 Quartus: yeah that's what i meant 16:11:53 After all you need to handle EVALUATE, which uses a string as an input buffer. So you have to have a global pointer to your input buffer. 16:12:15 Quartus: so that pointer will either be to a user input buffer or the terminal input buffer 16:12:37 usually one of those two. 16:12:40 Quartus: and I keep the pointers on the return stack? 16:12:59 Quartus Forth stores save-input data on the return stack, yes. 16:13:09 Quartus: oh, and how does it know to switch to the old buffer when the current one is over? what word does that? 16:13:10 You could set up a special stack for it, but there's no requirement. 16:13:46 How? You do it explicitly. EVALUATE would do a SAVE-INPUT, set all appropriate pointers to the passed string, and interpret; once complete, it would do a RESTORE-INPUT. 16:14:20 To include source from a file, INCLUDED would do a SAVE-INPUT, interpret successive lines from the file in question, and once complete, it would do a RESTORE-INPUT. 16:14:26 Quartus: ok 16:14:31 Quartus: lemme try this. 16:14:54 I also store the current filename, so in THROW reports all nested filenames can be reported. 16:16:18 Quartus: SOURCE returns both a pointer and a length, right? 16:18:29 --- quit: sproingie (Remote closed the connection) 16:18:57 Yes. 16:19:48 Quartus: so *I* need to keep track of both as well. 16:20:24 Quartus: okay, so this also means that SAVE-INPUT and RESTORE-INPUT have to be called in the same word, or the return stack will be corrupted? 16:21:05 No. Lift the return address, save the data, put the return address down. 16:21:11 Quartus: so I need to save SOURCE-ID, the address and length of SOURCE, and Quartus: but how will it know how far to lift it? 16:22:12 Hang on, let me check the implementation I use. I believe SAVE-INPUT uses the data-stack. So I have an internal version that uses the return stack for my own purposes, and I do some other shenanagins to get it to use the data-stack for the Standard version of the word. You'll want to do something similar. 16:22:56 Quartus: but why on earth would you want to use the data stack? wouldn't that mean if you do 3 2 S" * " EVALUATE, it won't be able to see the 3 and 2? 16:22:58 How far? One return address. Pick it up, drop your data, put it back down;. 16:23:20 ThinkingInBinary, you don't want to use the data stack for internal purposes, but the Standard SAVE-INPUT and RESTORE-INPUT use it. 16:23:32 Same info gets stored, though. 16:23:35 Quartus: okay. 16:24:03 Quartus: why do you tuck the data one address under? i don't get it. 16:24:13 You'll likely want to write the return-stack version, and then duplicate & modify that for the standard version. 16:24:26 Quartus: Why not just put it on the top of the stack. 16:24:38 You call your internal _saveinput as a subroutine, so there's a return address on the return stack. You need that to return to your caller. So you pick it up, write your data onto the return stack, put it back, and return. 16:25:05 Quartus: so from SAVE-INPUT I will call a smaller subroutine? 16:25:13 The return stack holds, among other things, return addresses; you don't want to do a return-from-subroutine against a file handle. 16:25:16 No, it itself is a subroutine. 16:25:29 Quartus: oh I get it 16:25:52 Quartus: but if SAVE-INPUT is a native command (on my VM, for speed), it's not a subroutine call and I don't need to. 16:26:12 It means you have to call your _restoreinput from the same nesting level as your _saveinput, but that's not something that should be hard to manage. 16:26:21 Quartus: yeah, it would be odd not to 16:26:40 Quartus: i need to save >IN as well, right? 16:26:52 ThinkingInBinary, if you can manage it some other way, go nuts -- I don't see how you can write random data on the return stack and expect to have a valid return address there, but if you have a way, go to it. 16:26:59 Yes. 16:27:26 Quartus: basically, it's as if SAVE-INPUT were a single instruction in asm. 16:27:41 Ok, but SAVE-INPUT is the datastack version. I assume you mean the version that uses the return stack. 16:28:08 It's not a requirement that you use the return stack -- Quartus Forth does, but you could set up a stack just for input specifications if you wanted. 16:28:18 Quartus: yeah, it's _SAVE_INPUT 16:28:59 Quartus: i'm planning to implement many core words in native code (J*censored*) to save time. 16:30:03 Sure. 16:30:52 Quartus: okay, good 16:31:36 A lot of this accesses internals that you may not want to make publically accessible anyway. 17:20:34 Quartus: is it okay to put code and data in the same memory? 17:21:34 Quartus: it saves me having to keep track of two separate pointers and making sure code (placed first) doesn't overflow into data (placed second) 17:42:08 It's ok, but it might be simpler to avoid it. 17:43:24 In fact I'd make them non-contiguous. 18:12:42 Quartus: ok 18:12:43 --- quit: ThinkingInBinary ("leaving") 19:24:21 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 19:25:36 --- quit: snowrichard (Client Quit) 19:34:05 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 19:41:19 --- join: homeness (n=Miranda@savant.kz) joined #forth 19:47:42 --- join: richard_ (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 19:48:47 --- quit: snowrichard (Nick collision from services.) 19:48:53 --- nick: richard_ -> snowrichard 19:48:59 --- join: richard_ (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 20:51:13 --- quit: snowrichard ("Leaving") 21:08:26 --- quit: richard_ ("Leaving") 22:24:35 --- quit: virl (Remote closed the connection) 22:55:43 --- quit: swalters_ ("User disconnected") 22:55:57 --- join: swalters_ (n=swalters@6532183hfc82.tampabay.res.rr.com) joined #forth 23:59:59 --- log: ended forth/05.11.24