00:00:00 --- log: started forth/05.01.20 00:16:29 --- join: segher (~segher@blueice1n1.de.ibm.com) joined #forth 01:36:43 --- join: yumehito (yumehito@giguz.turbo.nsk.su) joined #forth 01:54:36 --- quit: Obakeneko[away] (Read error: 110 (Connection timed out)) 03:27:40 --- join: Obakeneko[away] (yumehito@giguz.turbo.nsk.su) joined #forth 03:42:31 --- quit: yumehito (Read error: 110 (Connection timed out)) 03:43:58 --- join: aum (~aum@60.234.138.239) joined #forth 03:44:44 hi - how do i 'import' a string of python source as a module object? 03:45:00 sorry, wrong chan 04:17:44 --- join: Topaz (~top@sown-85.ecs.soton.ac.uk) joined #forth 04:41:38 --- quit: Topaz (Read error: 60 (Operation timed out)) 04:47:53 --- join: samc_ (~sam@203-114-131-74.inspire.net.nz) joined #forth 04:49:20 --- join: Topaz (~top@sown-85.ecs.soton.ac.uk) joined #forth 04:55:08 --- quit: samc_ (Remote closed the connection) 04:55:44 --- join: samc_ (~sam@203-114-131-74.inspire.net.nz) joined #forth 04:56:21 l 05:11:23 --- quit: Topaz (Read error: 113 (No route to host)) 05:11:37 --- join: Topaz (~top@sown-86.ecs.soton.ac.uk) joined #forth 05:25:24 --- quit: Topaz (Read error: 60 (Operation timed out)) 05:34:06 --- join: Topaz (~top@sown-85.ecs.soton.ac.uk) joined #forth 06:17:19 --- quit: Topaz (Read error: 113 (No route to host)) 07:01:30 --- quit: segher ("Leaving") 07:23:14 --- quit: I440r (Read error: 60 (Operation timed out)) 07:59:17 --- join: proteusguy (~proteusgu@dsl027-163-201.atl1.dsl.speakeasy.net) joined #forth 09:31:40 --- join: zol1 (~l@ppp-82-135-13-242.mnet-online.de) joined #forth 09:31:52 g'day 09:33:15 i was wondering whether there would be some interest in "common" forth libs, built on forth words, working throughout all standards and versions, which would be includable/installable right over the net (a bit like the perl modules from CPAN) 09:34:22 after all, what makes C dominant at this point, is the availibility of libraries 09:34:37 at least i think that that would be the reason 09:47:45 --- quit: proteusguy (Read error: 110 (Connection timed out)) 09:52:05 I don't get the 'includable/installable right over the net' bit 09:53:42 like "include", which loads a source from local mass memory, a somewhat more advanced inlcude, which downloads the source file from the lib server, or one of its mirrors, to the local library first. 09:54:10 probably by using OS-functionality 09:54:18 shell to wget, or the like 09:54:27 however 09:55:04 basically, treating the local lib as cache to the web lib 09:56:17 such a feature would have to be incorporated into the forth system, so how do you propose it to work 'throughout all standards and versions'? 09:57:11 by providing the words for managing the library as forth source, which *mey* be version specific. 09:57:14 may 09:57:29 the *library* is meant to be version non-specific 09:57:58 that is, using only words, and in a way, which is supposedly working on all forths 09:58:19 : foo dup drop ; even if not very useful, is very forth version non-specific 09:58:42 would it have any use, it would qualify as library word 09:59:13 it would have to be decided that library words would be generic enough 09:59:20 s/that/what/ 10:01:12 apart from the 'over the net' bit, how is this different from supplying source that will probably work on most forths? 10:01:52 1: there would be a code repository, where "common" lib sources would be gathered 10:02:11 2: there would be a mechanism, allowing inclusion of that source into you own system 10:02:38 result: those lib sources would have a higher likeliness to become common for and in many sources 10:02:49 that means, programmers can rely on their presence 10:10:53 that also means, there would a be available common code pool, without requiring to affect the standard (or submit to any of those) in any way. 10:11:02 --- join: proteusguy (~proteusgu@dsl027-163-201.atl1.dsl.speakeasy.net) joined #forth 10:11:15 you'd basically work on a new sub-standard 10:11:30 i'd count "dup" to those wirds 10:11:33 words 10:11:40 and swap, drop 10:12:00 + - 10:12:16 and or xor 10:12:25 0= = 10:12:33 and a few more 10:12:37 as one sees fit 10:12:57 basically, all word which can be build form those, could be candidates as well 10:24:21 what sort of library could be written with this lowest common denominator of forth functionality? 10:25:51 bit handling, math beyond elementary functions, data structures und -handling ... compare question with "what programs can be written with a turing machine" 10:26:59 in comparison mine assumes efficiency 10:28:17 well though-about algorithms from libraries, using common words, can be more efficient than home-made words, using system specifics. 10:28:55 apart from saving implementation time 10:30:35 of course for somebody who write functions in zero time, and uses only the most efficient algorithms right from the beginning, the lib would have no value. 10:31:18 oh I wouldn't use it then 10:31:24 :P 10:31:29 nobody requires you to 10:32:15 if i'd need, say, an fft, (which i don't have in my lib right now), i would have to start looking for one, and hope that it compiles on my system. 10:32:42 if it wouldn't be in the FSL, i really would have to search for it 10:33:05 (i reckon there are implementations in the FSL) 10:33:10 endian issues? 10:33:59 no code which stops working on different endian-ness would become part of the lib 10:34:08 there are work arounds 10:34:22 either, less efficient code, or conditional compilation 10:36:21 you could have thought of that 10:37:22 as your position is clear anyway (you're not going to use it), i'm not sure whether i can expect much productive input from you 10:38:05 long live principle :P 10:44:52 I can't imagine it actually happening, but I would like a wavelet implementation right about now... :) 10:46:05 many things can't be imaged they are ever going to happen before it is done. but, i'm only probing for interest in that now, no intention to start hacking stuff at this moment 10:46:43 if there's not much positive feedback, i'm likely to drop the idea 10:47:17 I assume you are intending to post to c.l.f then? 10:47:30 possibly. likely, even. 10:47:50 but only after i'd have thought about it a bit longer 10:48:03 since nobody else here is replying 10:48:32 well, you did. 10:48:40 well now you know how a dummy like me is likely to misinterpret your idea ;) 10:49:52 yes, that's good. i didn't post this here only to get supportive reactions. 10:50:22 it doesn't lower my esteem of you in any way :) 10:51:44 knowing that some ideas i might have are not worth to follow at ll 10:51:50 all 10:57:56 call it "reality check" 10:58:48 in that case disregard my comments, I live in my own fantasy world 10:59:18 there's the chance that several users share the same fantasy world 10:59:27 or at least a similar one 11:01:32 for small differences between forths automatic translation might be useful 11:02:14 not that I can think of any such small differences 11:07:29 i'd consider that as "one of the next steps" and would, if at all, start with compatible-with-all code only. 11:08:11 there's the idea of translating forth to byte code, and translating back, for dealing with differences 11:09:15 --- quit: proteusguy (Read error: 110 (Connection timed out)) 11:09:25 jonah thomas did write something about this on http://www.forthfreak.net/wiki/index.cgi?WhyByteCode 11:11:18 the top level page of his articles is here: http://www.forthfreak.net/wiki/index.cgi?ForthScripts 11:12:20 --- join: Topaz (~top@sown-87.ecs.soton.ac.uk) joined #forth 11:19:57 --- join: Herkamire (~jason@h000094d30ba2.ne.client2.attbi.com) joined #forth 11:31:55 --- quit: samc_ (Read error: 113 (No route to host)) 11:32:44 has anyone looked at SP-Forth yet (which does now exist for Posix, i.e. Linux, BSD etc as well) ? 11:32:55 looks like a meta compiler, as it was written in Forth 11:33:25 was only available as windows version as far 11:34:22 the Posix version carries as time stamp Jan18 11:52:27 --- quit: Topaz (No route to host) 12:06:06 --- join: Topaz (~top@sown-85.ecs.soton.ac.uk) joined #forth 12:26:20 --- quit: Topaz (Read error: 113 (No route to host)) 12:26:55 --- part: zol1 left #forth 12:31:46 --- join: qFox (C00K13S@82-169-140-229-mx.xdsl.tiscali.nl) joined #forth 12:43:29 --- join: Sonarman (~snofs@adsl-64-169-95-56.dsl.snfc21.pacbell.net) joined #forth 12:49:41 Chucks wife passed 12:52:24 --- quit: Raystm2 (Excess Flood) 12:52:26 --- join: Raystm2 (~Ray@adsl-68-95-248-94.dsl.rcsntx.swbell.net) joined #forth 14:06:49 --- join: saon (1000@c-24-129-90-197.se.client2.attbi.com) joined #forth 14:46:45 --- join: Topaz (~top@sown-85.ecs.soton.ac.uk) joined #forth 15:19:55 --- join: thinfu (thin@bespin.org) joined #forth 15:20:05 --- mode: ChanServ set +o thinfu 15:48:43 Hi all 15:49:03 heya crc 15:51:50 --- quit: Topaz (Read error: 60 (Operation timed out)) 15:56:18 what's up? 15:59:51 --- join: TheBlueWizard (TheBlueWiz@modem-150.nyc-tc03a.FCC.NET) joined #forth 16:04:03 bleh, being a forth newb, not much else 16:04:13 :) 16:04:27 i need to just get some clearly defined things i want to do, then pick a forth, and do them 16:04:34 * crc is considering writing a debugger for RetroForth 16:04:54 crc, in what context? 16:05:08 It'll run along side the block editor I wrote 16:05:13 like adding the word 'see' and other debugging stuff found in other forths? 16:05:16 ah, i see 16:05:27 There'll be a disassembler, but probably not "see" 16:05:39 ah, okay 16:05:46 The editor already shows the top of the stack 16:05:55 cool 16:06:15 I've written words for a hex dump, helmar wrote a disassembler that I still have to clean up 16:06:30 Then it's figuring out the best way to tie everything together 16:07:29 i'm just not accustomed to doing things the forth way i suppose 16:07:57 in other langs, you're mostly provided with tools you have to decide how to piece together to make a working system 16:08:16 in forth, you decide what tools you need to solve the problem, then make them yourself 16:08:41 :) 16:08:42 without planning something out, i seem to go into a tail-spin of not really knowing what to do or where to start 16:09:01 I prefer to use tools that I've written, even when dealing with other languages 16:09:14 yeah 16:10:05 bleh, most of my programming has slowed down a lot. i used DOS/windows since like 5th grade and in 9th (last year) managed to switch to linux 16:10:22 i'm still relearning the shell environments and system setup 16:11:36 at least forth takes most of those problems out of the way 16:11:45 Yup 16:12:11 * crc gets tired of dealing with traditional languages, libraries, and OSes easily now 16:13:34 if i weren't such a forth newb, i'd use it more often 16:14:27 * saon needs something that clearly defines some of the essential forth words and how they work 16:14:30 It took me years to learn to really use Forth 16:15:51 yeah, i'm a programmer, but, i've only got a few years experience altogether, and only a few months of looking at forth 16:16:16 after learning imperative langs, it's kinda hard to switch gears and learn forth 16:16:35 though i must say programming in forth is much more fun than in anything else i've ever used 16:16:52 I understand 16:17:28 "Starting Forth" is a decent tutorial even though it is rather old 16:19:15 i have a copy of the Free Forth Primer, but it goes in a way that i don't really like 16:19:39 http://home.iae.nl/users/mhx/sf.html 16:19:52 like application design and normal stuff instead of forth from the ground up 16:19:58 The FFP is rather dull IMO 16:19:58 thanks :) 16:20:01 np 16:20:35 * crc is considering putting together a copy of "Starting Forth" targetted towards RetroForth sometime 16:21:05 i read the text document that came with retroforth, it seemed to cover it fairly well 16:21:25 It assumes a knowledge of Forth though 16:21:41 I want to write a good tutorial for newcomers to Forth 16:21:46 * TheBlueWizard wonders whether "Starting Forth" is still copyrighted (and thus should not be altered...) 16:22:04 TBW: there are already several altered copies online 16:22:39 I've been working on an interactive tutorial for the block editor (Raystm2 has used it already) 16:23:10 8.0 will come with a lot more documentation. 16:24:21 I see 16:25:42 Hopefully the completion of the "Thinking Forth" PDF project will help the community get permission to do something similar with "Starting Forth" 16:27:19 re: RetroForth8.0 help tutorial. Great so far. Nice going crc. I'll write about my experiance and post to your wiki soonest. 16:27:41 Post to the message board; the wiki is kind of buggy right now 16:27:48 * Raystm2 currently working on a colorforth experiment 16:27:55 very well :) 16:31:25 --- quit: qFox ("this quit is sponsored by somebody!") 16:59:52 --- part: Raystm2 left #forth 17:38:22 --- join: zol1 (~l@ppp-82-135-13-242.mnet-online.de) joined #forth 17:38:36 g'day 17:39:23 Hi zol1 17:39:34 hi crc 17:40:01 had a look at jsforth recently ? 17:40:10 yes 17:40:18 It's getting very nice 17:40:27 my weird problem i had is fixed now 17:40:38 that is, compiling vars and constants and the like 17:40:42 ahh 17:40:53 finally progressing again :) 17:41:01 :) 17:41:14 I'm starting work on a debugger for retro8 now ;) 17:41:17 xt and word address mixup, i had 17:41:24 jsforth? what's that? 17:41:42 a mechanism for allowing forth embedded in web pages? 17:41:43 wanna try it ? 17:41:54 it has been online all the time 17:41:54 not many things i wont' try - gimme a link 17:42:20 http://forthfreak.net/JS-Forth.html 17:42:45 it is still lacking input number conversion 17:42:52 only numbers 0...6 work 17:42:52 holy fuck 17:43:05 no .( 17:43:27 retroforth doesn't have .( 17:43:33 but colon words an the like, variable and constant defs do all what they're supposed to do 17:43:54 zol1: get more numbers to work! 17:43:58 i'd say, in num conversion, hi-level flow control, and it is more or less done 17:43:58 : fred ." hello, this is fred" ; 17:43:58 error: word not found 17:44:05 not finished, but a good base 17:44:10 right 17:44:16 : foo s" test" type ; 17:44:32 hilevel part of ." not there yet 17:44:36 look at words 17:45:06 oh 17:45:20 i want to link this to online forth tutorials 17:45:36 and a second frame, next to the forth terminal 17:45:48 not handling ': blah 3 + ;' 17:45:52 so you can mouse click a word, and get its description 17:46:15 it should do 17:46:18 it does with me 17:46:33 don't press cursor keys 17:46:40 they're not filtered out yet 17:46:46 only backspace for editing ... 17:47:11 that's enough 17:47:58 you should do a jforth, allowing for java applets in forth 17:48:21 try: : foo s" google.com" url ; 17:48:27 ehm ... 17:48:38 : foo s" http://google.com" url ; 17:49:04 hehe 17:49:19 404 on http://forthfreak.net/google.com :P 17:49:23 and it requires firefox, mozilla or netscape 17:49:29 that's cool 17:49:32 no ie or opera yet 17:49:39 nobody here has a problem with lack of ie support 17:49:47 ie is not a proper browser 17:50:04 the key event i use to gather input doesn't work with it yet 17:52:09 but as i place jsforth under gpl, possibly somebody with ie and a bit knowledge of javascript will fix it :) 17:52:11 all you need to add is words for accessing the browser's cache, history and cookie store, and you've got Phishing Heaven 17:52:29 i intend to interface javascripts "eval" 17:52:48 i.e. : do_javascript 0 word count eval ; 17:52:58 do_javascript here comes javascript code 17:53:23 all you would need to do through javascript would be available this way 17:53:45 implementing eval is a no-brainer 17:54:03 a 2 line primitive 17:56:36 it is in jsforth now 17:56:45 : foo 0 word count eval ; 17:56:49 foo open("http://forthfreak.net") 18:00:12 but i reckon i need a javascript crack, to look over the io stuff 18:00:40 did as best i could which isn't much as my javascript skills is very limited 18:00:49 in fact, i only looked at it for jsforth 18:01:35 getting rid of the backscroll buffer would be nice ... 18:02:08 --- join: slava (~slava@24.43.80.135) joined #forth 18:03:48 and i'll add catch and throw. crc will hate me for this :) 18:04:12 * crc ponders kickbanning zol1 for heresy ;) 18:04:47 heh 18:04:48 what's wrong with catch and throw 18:04:53 yeah 18:04:58 t'is not for the minimalists 18:05:05 I don't like them (personal preference) 18:05:09 they're very forth like, because they factor out exception handling in a useful way 18:05:12 too complicated :P 18:05:25 not compilicated at all. the factor implementation is probably 25 lines of code 18:05:28 handling errors /without/ catch and throw is way more complicated 18:06:00 I do no error checking in RetroForth 18:06:03 soon i will add CL-style restarts 18:06:43 * aum extends Pic18Forth with the ability to define immediate words written in python - doesn't get more heretical 18:06:48 python? 18:06:53 why? 18:07:10 i find python way easier to code in, and far more readable months later 18:07:17 than what? 18:07:19 perl? :) 18:07:30 than forth, perl, c, ... 18:07:34 hmm 18:07:49 i like dynamic typing and garbage collection 18:08:00 yep 18:08:07 but i don't like python 18:08:09 :) 18:08:11 * crc seldom uses languages other than forth and assembly these days 18:08:22 python is like java, after taking off the tie, and sitting at a bar with a nice cool beer 18:08:32 comparing with java is hazardous 18:08:40 python is much slower than java btw 18:08:44 java is a bloated language 18:08:50 whenever i touch another language, it is transmutes to Forth 18:08:55 not if you turbo charge it with psyco, pyrex etc 18:08:57 * crc doesn't use either python or java 18:09:23 psyco had some good ideas behind it 18:09:25 * aum is frustrated by the lack of a decent oo model in forth 18:09:39 factor is an OO language 18:09:46 gforth has 3 oo implementations to choose from, all of them horrible 18:10:01 write your own. 18:10:02 ah, that's right - you're the factor dude 18:10:17 well, i don't define my life by the languages i code, but yes :) 18:10:26 heh, sorry 18:10:26 oo is just a complex way of overloading operators 18:10:41 that's only one perspective 18:10:54 zol1, its not any more complex than manually doing conditionals 18:10:56 oo can be useful at times 18:10:57 it's also a way of logically grouping data items and operators as abstract entities 18:11:18 slava: complex, relatively spoken 18:11:23 relative to what though? 18:11:28 GENERIC: draw 18:11:33 M: rectangle draw ... ; 18:11:35 M: circle draw ... ; 18:11:37 that's not complex 18:11:39 python's oo goes down like 24-year-old single malt 18:11:46 esp. if you have a lot of 'draw' cases and you can spread them out in files 18:11:47 * zol1 worked on the oo model presented to euroforth 3 years ago 18:11:53 aum, factor's OO is better 18:12:02 you can dispatch on anything that is a definable predicate 18:12:17 slava: how do you rate my chances of getting a factor vm/lib into 4k or less? 18:12:23 0 18:12:27 but python won't fit either :) 18:12:49 what 'bout the neon oo model ? 18:12:56 its ugly 18:13:14 you have to name your objects, you can't pass them on the stack in a useful way 18:13:27 ok 18:13:28 one of the least ugly forth oo models is FICL forth's - ficl.sf.net 18:13:59 what makes it good? 18:14:12 feels more oo 18:14:17 can pass objects on stack 18:14:32 objects sit on stack as 'class inst' pairs 18:14:36 i'm reading it right now -- i don't see anything special 18:14:42 why pairs and not a single thing? 18:14:46 not sure how it compares: http://www.forthfreak.net/wiki/index.cgi?SmallOOPS (t'is a bit simplified) 18:14:51 methods and attribs are explicitly accessed with '-->' operator 18:15:05 so methods are inside classes? 18:15:15 you cannot define new methods on built-in classes, like strings? 18:15:37 separating cls and inst eliminates the overhead of storing class id inside instance 18:15:41 in factor i can write GENERIC: output M: string output ... ; M: myclass output ... ; 18:15:53 but there's the same overhead if you have to pass the class on the stack 18:16:02 look at ficl oo - http://ficl.sourceforge.net/oop.html 18:16:08 yes, i'm reading it 18:17:43 i doubt that naming instance data is really necessary 18:17:58 what is 'naming instance data'? 18:18:00 after all, for encapsulation, you'd provide access methods anyway 18:18:06 --- quit: aum () 18:18:45 slava: declare some instance data to be accessable by name 18:19:21 ok 18:19:36 right now i represent user-defined classes as hashtables, but this will change into a more efficient form soon. 18:19:56 instead, a user defined class will be a tuple, and the library will define accessor and mutator words for you that read/write numbered slots under the hood. 18:20:27 right 18:21:18 consistent with "no external code shall access or modify instance data without using class-provided methods to do so" 18:22:24 --- join: OrngeTide (orange@rm-f.net) joined #forth 18:22:40 well in a forth you never access instance data directly unless you're using @ ! or something 18:22:45 most often you always have words 18:23:20 get to the xt in a deferred word 18:23:37 i never use the forth deferred word idiom 18:24:34 there banging heads about that on c.l.f now 18:25:12 deferred words and the standard forth variables have a fatal flaw in my opinion 18:25:17 adding an - implementation specific - word "was" could be all there is to it ... 18:25:36 wsa foo xt is foo 18:25:39 was 18:25:54 what i dislike aobut that is that it is not rpn 18:26:32 why does it have to be rpn? 18:26:34 variables, or values ? 18:26:42 more consistent with the rest of forth 18:27:12 no need for is or was to look ahead 18:27:35 forth is not rpn 18:27:43 ? 18:27:52 oh, i must have dreamt that 18:28:08 rpn is a big part of forth 18:28:15 but forth is not exclusively rpn 18:28:19 : sq dup * ; 18:28:21 : is not rpn 18:28:42 and there's a good reason, because you cannot just read the name of the new word without the special handling that : does, since the word doesn't exist yet 18:29:06 I never claimed forth was only rpn 18:29:12 parsing is important ;) 18:29:22 put any string on a stack, inherently, before operating on it ? 18:29:28 My block editor makes use of several parsing words 18:29:36 zol1: you still have to parse to get the string 18:29:43 Or build it by hand... 18:30:15 start with puttig whole string on stack 18:30:23 how do you read the string? 18:30:30 you need a non-rpn parsing word " 18:30:38 using a parsing world means, operating on the stacked string 18:30:43 here '1 c, '2 c, '3 c, 3 type 18:30:44 such as cutting in in two 18:30:46 123 18:30:54 " sq" { dup * } define looks uglier than : sq dup * ; 18:30:54 :) 18:31:01 Overkill though 18:31:16 zol1, you still need a parsing word, or a special case in the parser, to read quoted strings 18:31:42 slave, i didn't say that there wouldn't be any parsing words 18:31:48 slava* 18:31:52 --- join: Raystm2 (~Ray@adsl-69-149-42-7.dsl.rcsntx.swbell.net) joined #forth 18:31:59 but quoted strings can be taken from a stacked string as well 18:32:00 * crc scolds zol1 for calling slava "slave" 18:32:05 slava, i mean, excuse me 18:32:14 was typing too quickly 18:32:16 :) 18:32:24 zol1, but " sq" { dup * } define looks uglier than : sq dup * ; 18:32:26 i fall into the pattern of typing exisiting words 18:32:28 hence we have the nice : syntax 18:34:13 i notice the flaw in my proposal 18:34:58 that is, stacking every string would never get as to execute anything ... 18:35:33 zol1: use of things like TO is consistant with forth's extensible syntax 18:35:57 ok, but so is writing a basic interpreter in forth 18:36:02 True. 18:36:26 Writing it doesn't make you a bad forther 18:36:35 Just one who does what's needed to get a job done. 18:36:36 not everything you *can* write by extending must be consistent with forth 18:37:11 zol1: define forth 18:37:38 at least two stack, logical or physical 18:37:48 some platform specific primitives 18:37:56 one or more vocabularies 18:38:00 * Raystm2 thinks the language we use to describe the differences between all of our custom systems. 18:38:17 that's a very broad definition 18:38:24 i'm narrowing it in 18:38:28 have to start somewhere 18:38:33 it's a very broad subject. 18:38:34 factor fits that definition, but its not really a forth, due to types etc 18:38:43 or would you call any of those points "wrong" ? 18:38:48 no they're correct 18:38:56 Forth is a dictionary of words and their definitions, at least two explicit stacks, and an interactive interpreter and compiler 18:38:56 but they don't characterize forth, but a broader class of languages 18:39:06 crc, something about being close to hardware is needed i think 18:39:21 forth can have 1 stack. it's not fun. 18:39:37 slava, how close is bashforth to the hardware ? 18:39:44 or, current example, jsforth ? 18:40:04 or does that disqualify them being forths ? 18:40:11 slava: forth is close to the hardware 18:40:21 But the hardware can be another language environment 18:40:21 hmm 18:40:30 Forth is kind of flexible in that regard 18:40:34 so is factor a forth then? 18:40:36 if i'd make a forth in brainfuck ... 18:40:37 Yes 18:40:44 what hardware would it need ? 18:40:48 a typed forth then? 18:40:49 brainfuck VM 18:40:50 Factor is a dynamically typed OO forth 18:40:58 ah 18:41:09 Far more complex than a 1x forth, but a forth none the less 18:41:09 Raystm2: there is strongforth 18:41:15 strongly typed 18:41:25 i don't know enough about factor 18:41:37 http://www.forthfreak.net/wiki/index.cgi?strongForth 18:41:37 i think almost every postfix language has two stacks though 18:41:37 thanks zol1. 18:41:55 * crc is quite impressed by factor despite the huge differences in approach to programming that we have 18:41:58 so postscript is a forth, and so is joy, etc 18:42:04 yes 18:42:07 hmm 18:42:18 Forth is more a family of semi-related languages than a single language 18:42:30 hence my definition. 18:42:33 slava: afaik, the story that postfix was originally written in forth is wrong 18:42:34 RetroForth is Forth, so is gForth, isForth, Joy, Factor, etc 18:42:39 it uses some ideas 18:43:03 but i'm not sure whether it should be called "forth" because of that 18:43:20 earlier visual basic used some ideas, typical for forth 18:43:26 I've never seen two forths that are completely identical, but all share a set of common ideals and some core word names/behaviours 18:43:29 but wou wouldn't call it forth because of that ? 18:43:33 No 18:43:46 Visual Basic was never a truely interactive language 18:43:52 That's one major aspect to Forth IMO 18:43:59 forth does not need to be interactive 18:44:02 And it didn't make the stacks explicit IMO 18:44:19 there are native code compilers, still able to process forth source 18:44:31 zol1: true, but a non-interactive forth is less useful in many cases to an interactive one 18:44:41 I've written a native code compiler for retroforth 18:44:41 i grant you that 18:44:53 interactivity sure helps this novice hobbiest learn to use the system faster. Reading librarys of code takes me too long. 18:44:57 It's helpful when I need an app that *doesn't* need interactivity 18:45:19 * zol1 has been working for many years with a native code compiler 18:45:30 compiling to native code does not preclude being interactive 18:45:33 (ARM and PPC versions of my native compiler are coming this year) 18:45:34 used it to write most of my stuff in 18:45:41 sbcl does not have an interpreter of any kind; its interactive 18:46:29 when you type (+ 2 2), it turns it into optimized machine code, then runs it :) 18:46:35 * crc knows that 18:47:02 well, zol1 implied he didn't :) 18:47:03 just took a look at that subtextual language yesterday. I thought it was interesting approach. 18:47:08 I call my tool to create standalone non-interactive apps a "target compiler" 18:47:45 i tend to call it "native code compiler" to express that there's no virtual machine in the generated code 18:48:25 seen new SP-Forth (for linux now too) 18:48:26 ? 18:48:27 you don't need a VM to be interactive... 18:48:38 sbcl doesn't have a vm or an interpreter or anything 18:49:07 retroforth doesn't have a VM or inner interpreter either 18:49:18 :) 18:49:36 I could have the compiler generate code before running anything easily enough too 18:49:44 that's, after lpforth, another free meta compiler targetting linux off-the-shelf as well 18:49:46 I just see no reason to do that 18:50:08 if you're running something once, there's not a lot of point to compiling it :) 18:50:22 I know 18:50:28 That's the main reason I don't 18:50:41 in the case of common lisp, doing both compilation and interpretation means writing two copies of many things 18:51:11 salva, but with (traditional) forth, you still compile it to threaded code ... that would be unnecessary ... 18:51:25 i don't think traditional forth implies threaded code execution 18:51:32 i think subroutine-threaded forths have been around for a long time 18:51:35 stc is still threaded :) 18:51:37 interpreting source without compilation would be the proper thing, according you ? 18:51:48 and we're confused about the term 'compilation' 18:52:09 you can't have a forth without a compiler since then you won't get colon definitions etc 18:52:18 compilation, in the general sense, generating a code representation different from the source 18:52:27 in forth, compiler == parser in many ways 18:52:36 slava: you could have an interpreted-only forth, but it wouldn't be very useful :) 18:52:40 right 18:52:51 in factor, the two stages differ, which is a major divergence from forth 18:53:05 the parser generates a syntax tree, which the interpreter can run; but the native compiler is a separate module 18:56:50 I see nothing wrong with that 18:57:14 i'm not saying its a wrong approach, but its different to a typical forth 18:57:21 true 18:57:29 where the code that parses the source compiles (either to DTC, or STC, or bytecode, etc) 18:58:58 well actually, my parser is compiling too, to a simple syntax tree 18:59:04 :) 18:59:18 so the native compiler is like an optimizer stage. i never thought of it that way... 18:59:48 Yup 19:08:07 chuck's wife died ? 19:08:10 yes 19:08:24 poor min and chuck... 19:08:45 how terrible 19:14:38 --- join: artoffoo_ (1000@c-24-129-90-197.se.client2.attbi.com) joined #forth 19:14:56 --- quit: saon (Read error: 54 (Connection reset by peer)) 19:17:03 --- nick: artoffoo_ -> saon 19:21:11 is anyone good with javescript here ? 19:21:15 javascript 19:22:19 *sob* 19:24:19 I'm somewhat good with javascript 19:24:36 * TheBlueWizard likes Python, by the way 19:26:32 --- quit: Sonarman (Read error: 110 (Connection timed out)) 19:32:52 --- quit: saon ("Leaving") 19:33:56 oh, great 19:34:08 i got a specific thing i really want to improve 19:34:16 concerning output to forms 19:34:22 mind if i ask you ? 19:34:43 well, i do anyway :) 19:34:44 forms? I am not real familiar...but I can try 19:34:58 i have an output function, goinf like this: 19:35:03 function type(string) { document.terminal.dialog.value+=(string) ; } 19:35:22 mmhmm... 19:35:32 this is a: pretty slow, and b: it fills, when used a lot, the form with a backscroll 19:35:38 it can be seen here: 19:35:44 why don't you just use document.write() 19:35:48 http://forthfreak.net/JS-Forth.html 19:36:14 slave, i forgot why 19:36:19 slava: it's a console emulation 19:36:19 slava ! 19:36:20 document.write() can be 'destructive' in certain cases.... 19:36:26 right 19:36:36 it overwrote my form borders 19:36:42 and just filled the whole page 19:36:47 document.write won't play nicely with the idea of a console 19:37:20 TheBlueWizard: now what i want to achieve is: 19:37:40 a: increase output speed, and b: get rid of the backscroll buffer 19:37:47 no scroll bars. 19:37:49 * TheBlueWizard forgot what conditions would be such that document.write() would be destructive, but he generally wouldn't use it 19:37:57 as longer it gets, as slower output gets 19:38:16 You can use CSS to get rid of scrollbars I think 19:38:30 i would know how to get rid of the backscroll, but that would be surely more complicated than required 19:38:40 cause it would require some code 19:40:46 hmm....maybe you want to record the position of the "newlines" in an array (posn[], say), then before app appending to .value, if it would get too long, read the posn[0], use that to delete value[0 to posn[0]], then append the string then delete posn[0] and then append the newline position to posn[newentry] 19:41:00 follow me? I believe it will help 19:41:10 i do 19:41:22 that's about what i wanted to avoid to code :) 19:42:25 * TheBlueWizard shrugs...he has no other ideas...but he doesn't think it would take much code at all 19:43:05 i was afraid that ading code there would further slow output down 19:43:43 of course the posn[] only has to record the newline point from the beginning of THAT line, so it should be simple...something like strlen(newstring) for newstring about to be appended 19:44:12 and, when using non-javascript coded stuff, (functions/methods i don't know), it would be dealt with by code which has been compiled 19:44:36 it is a question of whether you want to cap the overall slowdown, at expense of small, fixed amount of "slow" code 19:46:11 i might have to try several solutions to develop an idea of which one is the best 19:46:15 just another thought -- another approach: buffer the outputting until it reaches the input point (waiting for button click, or waitiing for keystrokes), then update the .value in an intelligent way 19:46:31 but i'm afraid i might miss potential solutions just by not knowing much of javascript 19:46:47 the screen then would not refresh too much, which will speed up the process 19:47:18 i don't understand that 19:47:40 javascript is really designed for making the webpages "a-happening", but not for sophisticated, optimized performance 19:47:58 you don't think i could outperform gforth ?? 19:48:04 *eveil grin* 19:48:06 evil 19:48:31 changing .value content would force the refreshing of the screen, and screen refreshing is an expensive operation 19:48:52 ah. i think i get you now 19:49:06 javascript isn't designed for performance, so I don't care about comparing between two 19:49:16 you say "don't append to value with every type operation" 19:49:53 right, that should be an improvement 19:50:10 currently, even a single "emit" does append a string to value 19:50:49 thus, i'd better use an off-screen representation of the terminal screen 19:51:08 and only update the browser windows when necessary 20:02:54 goodnight 20:03:08 'nite 20:07:40 wow 20:08:19 wow what? 20:08:30 just found a presentation from this year's chaos computer club meeting 20:08:36 concerning forth 20:08:47 some links given there too 20:08:53 looks like, in order of relevance 20:09:23 item 1 and 3 are forthfreak links 20:09:53 1: starting forth, leo brody (link to forthfreak) 20:09:58 3: forthfreak wiki 20:10:12 (2: thinking forth, brody) 20:11:17 http://www.ccc.de/congress/2004/fahrplan/files/225-forth-slides.pdf 20:11:29 s/this year/2004/ 20:11:35 not used to 2005 yet 20:13:55 and i'm not used yet to reading an article, and see my own url suddenly jumping into my eyes 20:14:34 oh right 20:14:39 for the record ... 20:14:46 * zol1 alias Speuler 20:15:02 ah...hiya Speuler 20:15:04 may not be evident ... 20:16:19 can be complete the topic ? 20:16:35 Simplicity is growing ... into complexity .. 20:16:58 (i thought simplicity was about getting rid of things) 20:17:05 i.e. shrinking 20:17:11 --- topic: set to 'Forth: A simple language for solving commplex problems' by crc 20:17:24 hehe 20:17:30 sleepwalker 20:17:36 sleepcoder :) 20:17:56 doesn't one write commplex with 3 m ? 20:18:07 --- topic: set to 'Forth: A simple language for solving complex problems' by crc 20:18:16 * slava has changed the topic to: Java: a complex language for creating complex non-problems with no solution other than ditching Java 20:18:34 heh 20:19:24 --- quit: slava ("Leaving") 20:20:48 lol 20:21:32 TBW, another javascipt q: for outputting asciis as chars, i currenly set up an array, indexed by ascii, filled with the character string. 20:21:42 is there a better way ? 20:22:12 i.e. my emit does: type(character[tos]) 20:22:21 where character is the array 20:22:27 tos the ascii 20:22:34 you guessed that 20:26:58 I am not sure I understand your Q 20:27:39 are you thinking of chr() function? 20:27:48 is there a javascript function to output a character from its ascii, rather than me converting ascii to char by table lookup ? 20:27:57 yes, like chr() 20:28:24 ah....I am sure there is such a function, defined in string, I believe 20:28:50 where an ascii is no string object 20:28:56 but must become one 20:29:43 --- join: Sonarman (~snofs@adsl-64-160-164-183.dsl.snfc21.pacbell.net) joined #forth 20:30:18 --- nick: Raystm2 -> spike_anarchy 20:34:31 I'm looking online for some Javascript stuff...I'm pretty sure there is such a function 20:35:20 i just tried out buffering string output in non-visible variable, and appended it when output was completed, as you suggested 20:35:32 the performance difference is considerable 20:35:43 i used the output of "words" for it 20:36:03 would almost call it "snappy" :) 20:36:44 factor 10 at least 20:37:34 now that makes me confident that implementing an off-screen model, even if it is in javascript, would increase output speed 20:38:25 I found the answer! 20:38:43 all my ears are belong to you 20:38:50 :) 20:39:10 * TheBlueWizard obligedly steals all ears from crc :) 20:39:53 use charCodeAt(n) function...example: 'ABC'.charCodeAt(1) gives 66 (ASCII code for B)...it is like charAt(n) function, only that it gives ASCII value 20:40:15 right, that's what i use for the opposite conversion direction 20:40:26 string to ascii 20:40:43 I even test it using my little debug.html (it is an el-cheapo HTML based Javascript tester) 20:41:06 but ascii to string was what i couldn't find (therefor using the lookup array) 20:41:18 oh...opposite direction? ah...ok lemme search once again :) 20:41:23 sorry 20:42:33 i've put a line, crediting you, into the jsforth source. 20:43:35 line 634 of the current source 20:45:10 found the answer again!!! 20:45:33 an example: String.fromCharCode(65,66,67) gives 'ABC' 20:45:47 use String. for this method 20:45:59 it appends to string ? 20:47:16 no....fromCharCode is a static method, so you need String, which is one of the builtin classes 20:49:01 http://docs.sun.com/source/816-6408-10/string.htm gives some info (there are some good stuff on that website, though the page layout is butt ugly) 20:49:29 and I did test String.fromCharCode() using my little debug.htm :) 20:49:49 that is, you got it working 20:50:08 i haven't yet. probably invoking it the wrong way 20:50:14 temp="" ; 20:50:14 temp.fromCharCode(tos); 20:50:23 where tos is ascii 20:50:48 complains about undefined property 20:50:57 and "is not a function" 20:50:57 you need to write it this way: temp = String.fromCharCode(tos); 20:51:03 ah 20:51:06 stupid me 20:51:14 cuz fromCharCode() is a static method 20:52:11 right. it works now 20:52:31 but as i haven't got loops yet i cannot measure the difference in performance 20:52:39 i mean, i got loops almost 20:52:51 the runtime words are in place. only need to do the hilevel stuff 20:53:11 good moment to do that i suppose 20:53:31 :) 20:54:10 like type(String.fromCharCode(tos)); it works too 20:54:31 thus it is just a convoluted way of writing chr() 20:58:43 if you want to, you can type chr=String.fromCharCode; at beginning of Javascript body, then you can type chr(68,69,70) to get the desired action (a shortcut) 20:58:56 it is just Javascript thing 20:59:14 no performance difference ? 20:59:14 --- join: saon (1000@c-24-129-90-197.se.client2.attbi.com) joined #forth 21:00:02 ok, my ugly character array can be thrown out 21:00:25 much nicer now 21:00:29 I think it is a very, very minor performance penalty...I have no idea, really 21:00:51 there are only two places where i use that function/method 21:00:58 so i won't alias it 21:01:05 ok :) 21:01:13 that's also the reason i wanted to get rid of the array 21:01:31 takes more lines to set it up than the number of lines using it 21:02:25 * TheBlueWizard nods 21:02:36 and easier to debug 21:02:53 it works. no more debugging needed :) 21:04:20 the whole thing starts to look very reasonable 21:04:34 hasn't got the dirty look from two days ago anymore 21:05:14 do you use another browser than firefox/mozilla/netscape ? 21:05:28 such as internet explorer or opera ? 21:05:47 I'm currently on Winblows, so, yeah...*cough* IE *cough* 21:05:53 oh 21:06:05 that jsforth won't work for you at the moment ... 21:06:10 why? 21:06:26 cause somehow ie doesn't seem to execute the keypress handler 21:07:29 hmm... 21:07:45 in the html file, i have: 21:07:57 KeyEvent is my key event handler 21:08:34 where i try to pick up they keys for ie and non-ie browsers like: 21:08:36 keyascii = e.keyCode; // for internet explorer 21:08:36 keyascii |=e.which; // firefox, mozilla, netscape 21:08:36 if (keyascii == 0) return true; 21:09:07 but somehow that doesn't work 21:09:18 try this: change onSelect="SelectEvent()" to onSelect="return SelectEvent()" 21:09:38 or to onSelect="SelectEvent();return true" 21:09:52 select is mouse/mark stuff 21:09:58 that's not used now 21:10:01 yes, I know...try this 21:10:06 the KeyEvent is used 21:10:07 ok 21:10:12 ah ok 21:10:22 * TheBlueWizard hmms 21:10:32 the mouse selection is meant for future extension 21:10:41 like, i want to be able to double click on a forth word, 21:10:54 and gets its description in a second form box 21:11:19 --- quit: saon ("Leaving") 21:11:23 (the interpreter is meant for beginners and try-outers after all) 21:11:24 ok...did you update http://forthfreak.net/JS-Forth.html ? 21:11:47 that's justthe buttons for the terminal size selection. 21:11:57 starting on of these: 21:12:14 jsforthx*y.html 21:12:25 such as jsforth80x25.html 21:12:38 updated it yesterday 21:12:47 --- join: saon (1000@c-24-129-90-197.se.client2.attbi.com) joined #forth 21:14:11 the whole keyevent handler is in http://forthfreak.net/jsforth-terminal.js 21:16:46 tried jsforth80x25.html...IE 5 reported some error with it (of course no further info) 21:17:18 i've set firefox to strict javascript 21:17:24 i.e. reporting all errors 21:17:35 but the javascript console remains clean 21:18:18 hoped i could catch incompatibilities that way 21:18:27 another hope down the drain 21:19:29 the ugly little truth is that each browser implement Javascript a little differently....IE is perhaps the most egregious of those, however 21:19:55 and one needs to run ie to find that out 21:19:59 and get the script running 21:20:10 i don't even have a machine to run it on 21:20:13 a professional webmaster typically would have several browsers at hand to test his/her pages 21:20:28 * TheBlueWizard nods 21:20:31 we are a totally windows-free environment 21:20:44 right now I am reading web articles...soon I will have to go to bed 21:21:05 thanks for your great tips and help 21:21:14 I know....right now my X windows is broken (I'm told to wait for the upgrade) 21:21:23 np -- my pleasure 21:22:02 we got a very strange weather right now here. ... snow and lightning 21:22:10 unusual combination 21:22:39 lightning?! VERY weird! but I think it is not unheard of :) 21:23:04 snow started about 30 min ago, lightning 10 min 21:25:50 snow may hit here again (I live in WashDC area) 21:26:32 -20 ... +40 C range ? 21:28:30 here?, itis maybe 25 F right now (32 F = 0 C) 21:29:16 ok, i meant, summer to winter extremes, lowest and highest temp over the year 21:29:52 --- quit: OrngeTide ("dinner") 21:30:27 that's -4 ... 104 F range 21:32:28 oh! hmm...I'd say on average it range from 20 F to 95 F here...though I've experienced colder and hotter temps here 21:33:15 not a really cold region 21:33:36 proximity to ocean probably buffers 21:34:16 that's only about 2/3 of the dynamic range which we are experiencing here 21:36:21 yeah...WashDC isn't too far from Atlantic Ocean (I'd say maybe three hours of hearty driving will do the trick), and it is obviosly south of Pennsylvania, meaning it doesn't get as cold as often as the northern states do 21:46:55 --- join: aum (~aum@60.234.138.239) joined #forth 21:49:26 first go at for ... next loops in jsforth was successful. 21:49:47 good 21:49:55 (but i'm cheating, i port a lot from bashforth now) 21:50:13 :) 21:50:18 that was a 1:1 ort 21:50:19 port 21:50:40 in Free Software and Open Source world, cheating is *good*! ;) 21:50:51 in forth to, it is called "reuse" 21:51:02 yep 21:51:16 i meant to express "no mental effort" 21:52:06 then all the remaining control flow should be a snap 21:52:34 nice that i got catch/throw in bashforth as well which i can steal from there 21:53:44 bashforth? a forth shell? 21:53:53 a forth written as bash script 21:54:01 oh 21:54:22 http://www.forthfreak.net/wiki/index.cgi?BashForth 21:54:38 * aum waits for a forth written in cobol 21:54:52 *g* 21:55:02 we were talking abouta forth in brainfuck a while ago 21:55:09 * zol1 admits even having started with it 21:55:13 that would be painful 21:55:29 i got to the point of implementing the memory interface 21:55:32 afaik, you can't create named procedures or vars in bf 21:55:38 (after all, absolute addressing required) 21:55:45 no 21:55:51 there are none 21:56:04 bf is a nice idea, but it desperately needs extension mechanisms 21:56:15 got to structure *everything* in nested loops 21:56:23 one idea would be where any 'cell' can itself be a block of memory 21:56:38 no need to extend brainfuck 21:56:50 better use a different lang if it doesn't suffice 21:57:00 the minimality is its charme 21:57:10 i guess bf has its place - after hacking in bf, forth feels luxurious 21:57:22 true 21:57:44 i'm only staying with forth because it's brilliant for spartan platforms 21:58:07 i'm staying because i'm too stupid for other languages 21:58:14 eh? 21:58:23 forth requires higher iq than most other langs 21:58:34 trying to code in something different makes my itchy 21:58:43 tried python? 21:58:52 cause i have to work my way around things i can do easily with forth 21:58:55 yes, a bit 21:58:58 not much 21:59:29 python and forth are equally powerful and extensible, although in radically different ways - they're both like distant best-of-breed pedigree cousins 21:59:59 i'm building a forth where 'immediate' words are written in python 22:06:45 --- join: zoly (~l@ppp-82-135-1-178.mnet-online.de) joined #forth 22:07:07 sry, daily adsl reconnect 22:07:13 at 7:00 22:07:32 same or different ip addr? 22:07:39 different 22:07:44 bummer 22:08:23 i don't need static ip here 22:08:35 got servers for that 22:08:42 k 22:08:47 this is just consumer line 22:09:15 you're up early for .de 22:09:23 not worth the few extra bucks 22:09:25 --- nick: spike_anarchy -> Raystm2 22:09:26 early ? 22:09:26 bye all 22:09:36 9am or so, isn't it? 22:09:39 i got up at 4:40 pm yesterday 22:09:39 --- part: TheBlueWizard left #forth 22:09:51 10 past 7 a.m now 22:10:09 that's early in h4x0r terms 22:10:31 i've been awake for a mere 15 hours now 22:10:46 --- join: rsync (~pavel@CPE000c41aac435-CM00111ae4f4cc.cpe.net.cable.rogers.com) joined #forth 22:10:58 ahh, that's respectable 22:11:18 but slept 14 hours yesterday 22:11:46 (catching up) 22:12:29 --- quit: rsync ("Changing server") 22:12:59 most people here don't know at any given time whether i am still awake, or already ... 22:13:33 --- join: rsync (~pavel@CPE000c41aac435-CM00111ae4f4cc.cpe.net.cable.rogers.com) joined #forth 22:16:41 --- quit: zol1 (Read error: 110 (Connection timed out)) 22:25:52 if ... else .. then with jsforth work 22:26:59 case? 22:27:23 busy with begin while repeat now 22:27:34 for next was the first what worked 22:27:50 control flow words are fun to implement 22:27:52 i'm not sure whether i'm going to implement case 22:28:05 who needs it could load eakers case 22:28:18 got a link for eakers case ? 22:28:48 not handy. would have to google 22:29:52 if you google for it, could you please create a page for it on forthfreak.net ? 22:30:50 well ,was simple to find 22:34:22 http://www.forth.org/fd/FD-V2.pdf page37 is the original article 22:34:41 urg, pdf :O 22:36:14 i don't find case terribly useful 22:36:38 --- quit: Sonarman ("leaving") 22:37:01 i think, should i need it, there's something wrong in my code 22:37:05 case rocks imo - way more readable than endless 'n over = if drop ... then then then then then' 22:37:29 that's even worse 22:38:07 i'd tend to scan for the case term, take its index, use it to execute an xt in an array 22:38:43 no need to do endless comparing again and again 22:39:43 i hardly ever use case (and that "hardly" is just a prevention for saying "never") 22:39:55 what if there's a bunch of non-contiguous values to test? 22:40:26 i can stuff any comparison quantity in the scan list 22:40:39 no need to use contoguous values 22:42:02 if one single word needs to handle that many cases, isn't there a need to factor ? 22:46:16 begin while repeat works 22:46:51 now again until, then do ?do loop +loop 22:49:47 again , until work 22:55:37 do loop work 22:57:53 ?do +loop work 22:58:01 now that was good going 22:58:13 ah. leave ?leave 23:04:47 both work 23:05:16 thnk i'm done for today 23:47:45 not too bad, jsforth is about 25 times faster than bashforth 23:48:20 that means, about 1000..2000 times slower than native code 23:48:52 (meaning, than a forth written in assembly) 23:49:11 using firefox 1.0 23:50:14 that means, it would be pretty useable in terms of execution speed 23:50:32 runs about 130000 empty loops per second 23:50:47 which is much better than i expected 23:59:59 --- log: ended forth/05.01.20