00:00:00 --- log: started forth/10.12.07 00:02:45 --- join: nighty__ (~nighty@210.188.173.245) joined #forth 00:25:14 --- quit: PoppaVic (Quit: Smile and Wave, Boys.. Smile and Wave..) 01:53:06 --- quit: nighty__ (Read error: Connection reset by peer) 03:05:47 --- quit: crc (Read error: Connection reset by peer) 03:05:50 --- join: crc_ (~quassel@li125-93.members.linode.com) joined #forth 03:20:32 --- quit: ASau (Remote host closed the connection) 03:21:54 --- join: ASau (~user@95-26-92-70.broadband.corbina.ru) joined #forth 03:36:41 appamatto: that may work. 04:07:53 --- join: martinhex (~mjc@93-97-29-243.zone5.bethere.co.uk) joined #forth 05:13:47 --- quit: ASau (Remote host closed the connection) 05:14:52 --- join: ASau (~user@95-26-92-70.broadband.corbina.ru) joined #forth 05:23:30 --- join: MayDaniel (~MayDaniel@unaffiliated/maydaniel) joined #forth 05:35:54 --- quit: MayDaniel () 05:48:46 --- quit: martinhex (Remote host closed the connection) 06:36:25 --- quit: koisoke_ (Ping timeout: 260 seconds) 07:03:24 --- join: TreyB (~Adium@c-71-198-26-136.hsd1.ca.comcast.net) joined #forth 07:07:08 --- quit: TreyB (Client Quit) 07:23:02 --- join: MayDaniel (~MayDaniel@unaffiliated/maydaniel) joined #forth 07:23:56 --- quit: Deformative (Ping timeout: 250 seconds) 08:15:56 --- join: TreyB (~Adium@carrieriq-fwa002-untru.sjz.navisite.com) joined #forth 08:30:32 --- join: roarde (~roarde@pdpc/supporter/active/sixforty) joined #forth 08:58:33 --- join: PoppaVic (~pops@unaffiliated/poppavic) joined #forth 08:59:00 --- quit: TreyB (Quit: Leaving.) 09:01:04 --- join: tathi (~josh@dsl-216-227-95-5.fairpoint.net) joined #forth 09:01:36 Gah. FICL's input system is such a mess. 09:02:13 : cr? ( char -- flag ) dup 10 = swap 13 = or ; 09:02:13 : line-start ( c-addr u -- c-addr' u' ) 09:02:13 begin dup while 1- 2dup + c@ cr? until 1+ then ; 09:02:13 : line-end ( c-addr u -- c-addr' u' ) 09:02:13 begin dup while over c@ cr? 0= while 1 /string repeat then ; 09:02:15 : source ( -- c-addr u ) 09:02:18 source source-id -1 1 within 0= if 09:02:20 over >in @ line-start nip /string 2dup line-end nip - 09:02:23 then ; 09:03:43 tathi: I'm busy with exceptions. 09:03:48 This is more critical to me. 09:06:16 Heh. I wasn't asking for a fix. 09:06:29 Stick with the exceptions. :) 09:07:24 Just whining, that's all. 09:07:31 I agree that it's not clear what is happenning here. 09:07:46 I'll fix it when I get there. 09:07:49 ...or not. 09:08:10 Yeah, I've thought about fixing it a couple of times, but the code is all spread out and it was never clear to me how to do it. 09:09:27 IIRC it doesn't do the usual REFILL thing; it throws an exception which drops back out to the main loop to read more input, and then picks up where it left off...? 09:09:31 Very weird. 09:10:21 I think it breaks ACCEPT, too (input comes from the current input source rather than from stdin). 09:10:47 --- join: TreyB (~Adium@carrieriq-fwa002-untru.sjz.navisite.com) joined #forth 09:10:54 ficl, I presume? 09:11:46 yeah 09:12:00 tathi: even here the problem reduces to exceptions :) 09:12:00 too difficult to read and grok. 09:12:07 ASau: yup. :) 09:12:08 PoppaVic: not at all. 09:12:23 There's some mind bending with setjmp. 09:12:28 This logic is really convoluted. 09:16:12 --- join: Deformative (~Joseph@caen-cse-141-212-203-96.wireless.engin.umich.edu) joined #forth 09:19:49 --- quit: gogonkt (Quit: leaving) 09:21:52 --- join: Joseph_ (~Joseph@caen-cse-141-212-203-96.wireless.engin.umich.edu) joined #forth 09:24:01 --- join: gogonkt (~info@183.27.212.158) joined #forth 09:25:16 --- quit: Deformative (Ping timeout: 250 seconds) 09:38:19 --- quit: roarde (Quit: Leaving.) 09:43:27 --- join: roarde (~roarde@pdpc/supporter/active/sixforty) joined #forth 09:49:40 --- quit: Joseph_ (Read error: Connection reset by peer) 09:50:06 --- join: Joseph_ (~Joseph@caen-cse-141-212-203-96.wireless.engin.umich.edu) joined #forth 10:00:21 --- quit: MayDaniel (Read error: Connection reset by peer) 10:34:43 --- quit: Joseph_ (Ping timeout: 255 seconds) 10:45:29 --- join: MayDaniel (~MayDaniel@unaffiliated/maydaniel) joined #forth 10:47:08 --- join: qFox (~C00K13S@5356B263.cm-6-7c.dynamic.ziggo.nl) joined #forth 10:48:46 --- quit: roarde (Quit: Leaving.) 10:49:08 --- join: roarde (~roarde@pdpc/supporter/active/sixforty) joined #forth 11:00:12 --- quit: MayDaniel () 11:20:13 --- join: Joseph_ (~Joseph@caen-cse-141-212-203-96.wireless.engin.umich.edu) joined #forth 11:42:01 --- quit: ASau (Remote host closed the connection) 11:43:07 --- join: ASau (~user@95-26-92-70.broadband.corbina.ru) joined #forth 11:43:58 --- join: forther (~forther@207.47.34.100.static.nextweb.net) joined #forth 11:46:57 I think that FICL and pForth miss the whole point in using C as implementation language. 11:47:52 Say on.. 11:49:42 (I need some time to fetch my tea.) 11:50:08 In FICL (4.1.0 I have removed it recently) you can see that 11:50:37 it tries to gain some speed by making assumptions how one 11:50:37 or another high level construct is translated into machine code. 11:50:41 I've not glared at ficl in years 11:51:27 These optimisations make code convoluted and hard to understand. 11:51:45 preoptimizations - and evil 11:52:27 You have to check if some or another variable isn't used 11:52:27 anywhere besides one or two places, 11:52:46 or that it is used exactly one way. 11:53:08 This makes modification of code rather hard task. 11:53:33 of course. it's a bad hobbit 11:54:06 All this happens while it is trivial (still not easy) to check 11:54:18 that reasonable compilers generate the same code. 11:54:54 The point to C is to avoid the asm and leverage the given C. WHich is why such things bug me 11:55:12 (of course, clang and llvm sorta' bend the rules nicely) 11:56:01 Right now I want to check if all these optimisations to get dispatching fast are reasonable. 11:56:30 If the code is unclear, it needs a rewrite. 11:56:31 I suspect that C compilers inline those switch statements just fine. 12:01:06 C compilers can optimize switches fine. Although, I've been using the &&label construct of gcc, instead. 12:17:17 --- quit: roarde (Read error: Connection reset by peer) 12:19:26 --- join: roarde (~roarde@pdpc/supporter/active/sixforty) joined #forth 12:26:57 --- quit: qFox (Ping timeout: 245 seconds) 12:34:51 --- join: qFox (~C00K13S@5356B263.cm-6-7c.dynamic.ziggo.nl) joined #forth 12:35:26 --- quit: qFox (Read error: Connection reset by peer) 12:38:10 --- join: qFox (~C00K13S@5356B263.cm-6-7c.dynamic.ziggo.nl) joined #forth 13:05:23 --- quit: TreyB (Ping timeout: 255 seconds) 13:06:07 --- join: TreyB (~Adium@carrieriq-fwa002-untru.sjz.navisite.com) joined #forth 13:19:51 --- quit: qFox (Ping timeout: 240 seconds) 13:22:13 --- join: qFox (~C00K13S@5356B263.cm-6-7c.dynamic.ziggo.nl) joined #forth 13:36:23 --- quit: qFox (Read error: Connection reset by peer) 13:52:37 --- quit: forther (Remote host closed the connection) 14:03:47 --- quit: TreyB (Ping timeout: 272 seconds) 14:09:29 --- join: TreyB (~Adium@carrieriq-fwa002-untru.sjz.navisite.com) joined #forth 14:27:00 --- join: calin (~calin@78.96.97.59) joined #forth 14:51:38 --- quit: roarde (Read error: Connection reset by peer) 14:52:20 --- quit: Snoopy_1611 () 14:52:20 --- mode: ChanServ set +o crc_ 14:52:26 --- nick: crc_ -> crc 15:20:50 --- join: Snoopy_1611 (Snoopy_161@dslb-088-069-144-164.pools.arcor-ip.net) joined #forth 16:32:36 --- quit: PoppaVic (Quit: Smile and Wave, Boys.. Smile and Wave..) 16:37:22 --- join: PoppaVic (~pops@unaffiliated/poppavic) joined #forth 16:45:03 --- join: nighty__ (~nighty@210.188.173.245) joined #forth 17:12:22 --- quit: ASau (Ping timeout: 245 seconds) 17:16:19 --- join: ASau (~user@95-26-92-70.broadband.corbina.ru) joined #forth 17:50:56 --- quit: Joseph_ (Ping timeout: 264 seconds) 17:58:12 --- quit: calin (Ping timeout: 240 seconds) 18:00:24 --- join: Joseph_ (~Joseph@205-36.adsl.umnet.umich.edu) joined #forth 19:37:19 --- quit: TreyB (Quit: Leaving.) 20:39:26 --- quit: ASau (Remote host closed the connection) 20:40:45 --- join: ASau (~user@95-26-92-70.broadband.corbina.ru) joined #forth 20:44:29 --- join: matthew_ (~matthew@OSH-NET-202-225.onshore.net) joined #forth 20:44:52 Does forth have a mailing list that isn't taken over by spammers? 20:45:29 Forth isn't single-implementatino language. 20:46:28 "mailing list".. How quaint. 20:48:51 I actually wasn't expecting this many people to be in #forth 20:49:05 no offense, of course 20:50:14 at first glance at some source, it looks kind of complex 20:51:17 http://www.xs4all.nl/~thebeez/ForthPrimer/Forth_primer.html 20:52:50 matthew_: what do you mean? 20:53:10 ASau, I'm just used to looking at java I guess 20:53:28 PoppaVic, thank you 20:53:43 matthew_: it is hard to tell if it is more complex than java. 20:53:47 brodies Thinking Forth is also now free as a pdf 20:54:04 More like it is convoluted in another way. 20:54:29 Asau, I'll have to give it a try 20:55:32 Do you know any programming language besides java? 20:55:54 ASau, nothing radically different syntax wise 20:56:06 ASau, I've looked at a tiny bit of scheme though 20:56:22 Syntax matters much less than what you think. 20:56:59 E.g., you can write Scheme with Algol-like syntax. 20:57:14 See R-Lisp as example of this approach. 20:57:58 so why forth 20:58:03 Or you can write in Java-like syntax. 20:58:25 This doesn't magically make Java similar to Scheme. 21:02:02 matthew_: first, try to answer this question: 21:02:10 "why java?" 21:02:32 bytecode 21:02:50 C# is implemented with bytecode too. 21:03:04 And all other CLR languages, F# included. 21:03:18 so? 21:03:24 Why Java? 21:03:37 Why not Prolog? 21:03:51 Prolog is traditionally implemented with sort of byte code too. 21:03:51 I suppose they didn't like Lava 21:04:02 ..as it reminded them of Magma 21:04:46 ASau I'm interested in seeing whats out there as far as languages go. Perhaps I want to explore different paradigms a little bit. 21:05:14 matthew_: then you've started from the wrong end, IMO. 21:05:23 matthew_: you should understand Scheme first. 21:05:40 oh, hogwash 21:06:00 Everybody says to learn functional languages 21:06:13 Yes. 21:06:19 They are right. 21:06:21 everybody jumps off bridges. 21:06:54 I was upset at lisp/scheme because the community was so fragmented between different implementations 21:07:04 It isn't. 21:07:12 You just don't understand it. 21:07:32 This is the point, that there's no single implementation. 21:08:43 Besides. 21:08:59 Have you understood what those differences between implementations are? 21:09:15 Are they significant? 21:09:21 Are they relevant at all? 21:10:34 e.g. 21:10:48 there're _very_ large software packages 21:11:06 Maxima, several Axioms, 21:11:31 that run in _all_ or almost all major implementations. 21:12:00 Very different ones. 21:12:15 CLISP is traditional bytecode system, 21:12:24 ECL is CL-to-C compiler, 21:12:32 SBCL is native compiler, 21:12:53 ABCL is CL-to-JVM compiler, 21:13:11 Poplog is even more different, 21:13:32 it is complete environment which is based on another non-Lisp language. 21:13:36 and some support the standard to varying degrees 21:13:50 All of them support one and the same standard. 21:14:08 Except Poplog supporting a bit older standard. 21:15:50 Oh, and there's CMUCL which is another hybrid bytecode/native compiler. 21:16:23 4+1 very different implementations supporting the same standard 21:16:32 +1 supporting a bit older version of this standard. 21:18:13 Note that these are free accessible implementations, 21:18:23 there're at least 2 major commercial ones. 21:21:40 Note, that Common Lisp isn't toy language like Forth, 21:21:50 so forth is a toy language 21:22:06 978 symbols in core package is far from 2 hundreds. 21:22:16 unless you ask Forth, Inc or anyone that gets paid to use or implement forth 21:22:22 gotcha 21:22:53 Add here several rather elaborate subsystems. 21:22:57 PoppaVic, I gathered that when the only forth related software I could find (that was open source) were mostly interpreters 21:22:57 Packages. 21:22:59 CLOS 21:23:22 um 21:23:22 MOP 21:23:38 forth is supposed to be "interpreted". 21:23:52 matthew_: you haven't searched enough. 21:24:08 It's not really made for batch-compiler, or rather - wasn't intended to be. 21:24:34 no I understand, but in a way that there are hundreds of scheme interpreters out there because people read SICP 21:24:40 PoppaVic: this is wrong. 21:24:42 but, anyway - use what you want I get paid the same. 21:25:12 ASau: dude, please - spare me, ok? Carry on the lecturing if you want. 21:25:26 matthew_: you can start here: http://acweb.sf.net/ 21:25:43 PoppaVic: don't tell lies then. 21:25:59 matthew_, factor might be interesting to you as well if you're interested in functional languages 21:26:11 appamatto: he isn't. 21:26:35 he mentioned them and trying to expand his horizons 21:26:39 PoppaVic: Batch compiler is very primitive mode of operation. 21:26:47 that's nice 21:26:58 And Forth doesn't have elaborate facilities for interactive work. 21:28:47 Even if you implement type-ahead predictor, this is still 21:28:47 very far from elaborate support for interactivity. 21:29:03 why do you guys think stack based programming never caught on 21:30:08 Because it differs too much. 21:30:51 matthew_, maybe because no one came up with a good type system for it 21:31:04 appamatto: this is wrong ;) 21:31:31 (static types) 21:32:04 You have static types in StrongForth and in Cat-Factor line. 21:32:20 Yeah, that's very new though 21:32:27 (Cat and Factor) 21:32:35 Do you understand why it is so? 21:32:43 Not really 21:33:02 In fact it seems like types should be easier for concatenative languages than for others 21:33:26 For FP languages it is sufficient to use classical logic, 21:33:55 e.g. you can work nicely within slightly restricted FOL. 21:34:02 --- nick: matthew_ -> mister_m 21:34:03 yes 21:34:14 This covers LP too. See Prolog. 21:34:33 For stack languages classical logic isn't enough. 21:34:42 Because you transform stack. 21:35:02 hmm, what about a stack-based FOL? 21:35:03 You don't rewrite terms, adding them to blackboard. 21:35:09 appamatto: no. 21:35:21 It is completely different metaphor. 21:35:36 FP and LP work within blackboard metaphor. 21:35:45 You have inputs, you have rewrite rules. 21:36:06 You can work _never_ ever erasing previous facts. 21:36:28 Can't you do the same with a stack language? 21:36:29 With stack you essentially transform stack. 21:36:37 You can just keep writing the stack 21:36:50 appamatto: only if you attempt to overflow it. :) 21:37:49 Hmm, I guess I still don't grasp the difference 21:38:24 simple types should be straightforward to add to a forth system 21:38:27 If you transform (top of) the stack, you essentially erase parts. 21:38:44 appamatto: StrongForth, sure. 21:38:51 You erase parts of (+ (+ 2 2) 2) when you go from there to (+ 4 2) 21:38:57 appamatto: the problem is that they are not interesting for 30 years. 21:39:24 appamatto: you don't destroy "2". 21:39:54 You can't understand anything looking at primitive examples. 21:39:57 sure, you don't destroy a stack either, you just create a new one with the top elements swapped 21:40:12 consider this: 21:41:45 (let* 21:41:46 ((a '(1 2 3)) 21:41:46 (b (first a)) 21:41:46 (c (second a)) 21:41:50 (d (+ b c))) 21:41:52 (* (+ b c) (1+ d))) 21:42:30 Assume that GC is turned off. 21:42:38 What happens to "a"? 21:43:26 You can go furtherm, replace last expression with smth like 21:43:38 (list a b c d (* (+ b c) (1+ d))) 21:43:41 It could stick around in a closure somewhere I guess 21:43:53 But it exists, right? 21:43:59 but the same is true for let bindings in a stack language 21:44:21 No, it isn't the same. 21:44:23 in either language it should be compiled so that "a" never exists 21:44:32 Have you used _explicit_ copying anywhere above? 21:45:10 just naming 21:45:17 That's the point. 21:45:17 --- nick: Joseph_ -> Deformative 21:45:40 With stack you don't introduce unnecessary bindings, 21:45:52 can't FOL operate in the same way? 21:46:01 you use _explicit_ copy and destroy operatinos. 21:46:06 appamatto: no. 21:46:32 Umm, why not? 21:46:50 Because of the nature of logical connectives. 21:46:52 If arithmetic can operate that way, FOL should be able to as well 21:46:59 FOL is classical logic. 21:47:13 It is monotonic. 21:47:16 --- join: TreyB (~Adium@c-71-198-26-136.hsd1.ca.comcast.net) joined #forth 21:47:22 What is an example that couldn't work in Forth? 21:48:29 Try adding two numbers preserving original ones _without_ using dup-over-swap-rot-pick-roll machinery. 21:48:59 I still don't see why that's necessary 21:49:10 This shows fundamental difference. 21:49:22 2dup + 21:49:46 "2dup" is explicit copy, forbidden by condition above. 21:49:54 uh-huh 21:50:05 Can't + just have the type ( int int -- int ) and 2 have type ( -- int ) and then 2 2 + will have type ( -- int ) as well? 21:50:20 Yes, it can. 21:50:28 So, this is FOL 21:50:34 No. 21:50:49 You still can't add two numbers without destroing previous ones. 21:50:58 Why is that important? 21:51:06 This is fundamental difference. 21:51:11 They haven't been deleted anyway 21:51:16 2variable ab ab ! ab cell+ ! ab 2@ ab 2@ + 21:51:43 PoppaVic: "!" is explicit copy, "2@" is another explicit copy. 21:51:48 meanwhile, one dolts forth is anothers ANS 21:52:06 ugh, well I see nothing in your argument that backs up "classical logic is not enough for a typed forth" 21:52:06 Try adding two numbers preserving original ones _without_ using dup-over-swap-rot-pick-roll machinery. 21:52:23 sounds like lotsa' bs ,shrug> 21:52:33 PoppaVic: you've moved outside stack, this expands number of forbidden operations. 21:53:12 PoppaVic: If you want to do it that way, try preserving memory state. 21:53:18 "!" destroys it. 21:55:24 appamatto: the problem is that presense of "dup", "swap" and similar operations 21:55:41 requires radically different logical framework, if you want 21:55:41 to reason about your programs. 21:56:09 In particular, your logic should forbid reasoning like this: 21:56:38 you have $100 => you buy motherboard, 21:56:51 you have $100 => you buy HDD, 21:57:08 right, you make two downpayments on a new rifle. 21:57:12 ((A=>B) & (A=>C)) => (A=>(B&C)) 21:57:30 ASau, that is no different from FP 21:57:41 you have $100 => you buy HDD, motherboard, box, display and build supercomputer. 21:57:58 appamatto: this is radically different from classical FP. 21:58:02 linear logic occurs in FP as well 21:58:31 So far only one non-popular FP language is using linear logic. 21:58:32 not only does linear logic occur in FP, it also does not have to occur in forth 21:59:09 that's because there's no logic at all. 21:59:21 ASau, any FP that can open and close files will suffer from that kind of logic error. Their solution is to leave resource management out of the type system 21:59:39 It's completely orthogonal 21:59:47 Only one article 25 years ago talks about formal reasoning in Forth. 22:01:10 So far FPL (almost all of them) prefer to imagine the world subject to more classical logics. 22:01:10 --- part: mister_m left #forth 22:02:22 And it is hard to imagine Forth to follow this approach with reasonable efforts. 22:02:26 Well, they are all trying to implement various degrees of dependent types 22:02:41 I personally think this will be easier for a forth than for FP 22:02:50 The tradition is that words consume its parameters. 22:02:57 especially if forth uses a concatenative type language 22:02:58 their. 22:03:17 Yes, I'm thinking about it. 22:03:48 But I'm busy with more pragmatical questions right now. 22:04:38 yeah 22:04:53 I waste a lot of time on this stuff :p 23:03:41 --- quit: TreyB (Quit: Leaving.) 23:59:59 --- log: ended forth/10.12.07