00:00:00 --- log: started forth/11.12.18 00:15:57 --- quit: ttmrichter (Quit: Leaving) 00:18:44 --- join: ttmrichter (~ttmrichte@113.106.102.7) joined #forth 00:21:43 --- quit: ivan` (Ping timeout: 240 seconds) 00:30:59 --- join: ivan` (~ivan@unaffiliated/ivan/x-000001) joined #forth 01:26:47 --- quit: karswell (Ping timeout: 255 seconds) 01:36:04 --- join: xpololz (~xpol@50.80-203-124.nextgentel.com) joined #forth 02:12:26 hmm 02:13:07 : var create 1 cell allot , ; var test 6 test ! 02:15:03 what happens here? I couldn't do the for example "create 1 cell allot , test 6 test !" 02:15:32 also shouldn't the , in the first colon definition cause a stack underflow if the stack was empty before? 02:32:41 it should yes. also, in the failing example are you actually typing create 1 cell allot , interactively 02:33:28 yeah 02:33:34 because if you are, it will create a word 1 02:36:36 I couldn't find any explenation that tells that if it's a colon definition it should be threated like that :-/ 02:38:26 Create is a parsing word, so it fetches the name to create from the input buffer when it executes 02:40:08 but it is not immediate, so you can compile it into colon definitions and it will only execute when you call the word whose definition it is in 02:40:19 --- quit: ASau` (Read error: Connection reset by peer) 02:40:34 because the way I obviously was looking at it was -- the words compromising the body of the definition would be executed sequentially and threated just like in interactive mode 02:42:13 they execute sequentially, but interactively you have the rest of that line in the input buffer when create executes 02:42:18 --- join: ASau` (~user@89-178-123-216.broadband.corbina.ru) joined #forth 02:42:41 so it creates a word with the name immediately following it on the line 02:46:32 hmm okay 02:46:38 thanks 03:30:45 --- quit: fantazo__ (Remote host closed the connection) 03:36:57 --- join: _spt_ (~postmaste@host-92-4-59-130.as43234.net) joined #forth 03:36:57 --- quit: _spt_ (Changing host) 03:36:58 --- join: _spt_ (~postmaste@unaffiliated/-spt-/x-5624824) joined #forth 03:42:41 koisoke: your explanation is wrong. 03:43:37 koisoke: at least for non-interactive version. 03:45:51 xpololz: if you're not familiar with Forth, avoid using parsing words. 03:47:49 ASau`: what is wrong with it 03:48:58 At least in common dialects "create" isn't immediate. 03:49:43 11:10 < koisoke> but it is not immediate, so you can compile it into colon definitions and it will only execute when you call the word whose definition it is in 03:50:02 Alright then. :) 03:50:31 The main problem with this "var" definiton is another anyway. 03:53:00 yeah it also leaves an extra 1 on the stack because he wrote cell instead of cells 03:54:13 It isn't clear whether this was intentional or not. 03:54:31 Perhaps this is a kind of type tag. 03:55:20 ah yes 03:55:29 stored after the value 03:55:54 but the order is bizarre 03:56:26 and it would make more sense to just 0 , 1 , instead of leaving the contents uninitialized but the type set 04:08:53 hmm, I'm learning Forth.. :-) 04:09:31 at least Ḯ'm trying. 04:11:48 and I was working my way through Memory and Data Storage chapter in the Forth programmer's handbook 04:13:05 <_spt_> Forth Programmers Hand Book? may I ask who that is written by? 04:13:51 Edward K. Conklin and Elizabeth D. Rather 04:15:15 <_spt_> ar yes thats the Forth inc, swiftForth. I don't know that book. 04:15:18 I wanted to learn some about the language before I moved on to Thinking Forth by Leo Brodie :-) 04:15:24 --- join: MayDaniel (~MayDaniel@unaffiliated/maydaniel) joined #forth 04:15:32 yeah, I'm using gforth though. 04:16:15 <_spt_> Starting Forth by Leo Brodie is what I would recommend 04:16:47 I recommend _not_even_touching_ that archaic shit. 04:17:09 It is full of advices that were proved wrong. 04:17:23 ASau`, your referring to Forth programmers handbook? 04:17:34 I refer to "Starting Forth." 04:17:55 which one would you recommend then? 04:18:00 and why? 04:18:32 I recommend not learning Forth until they fix major bugs with parsing words. 04:19:20 :-/ 04:19:44 In particular, many of problems arise because there is 04:19:44 no way to create anonymous words and bind them to names afterwards. 04:20:03 <_spt_> there is nothing wrong in looking at at Starting Forth and the Jupiter Ace manual if you have never seen Forth. 04:20:06 Part of your problems above belong exactly to this kind. 04:20:17 _spt_: there's many wrongs in that. 04:21:34 <_spt_> what would you recommend then for a beginner to Forth? 04:21:53 I recommend not even touching Forth if you're beginner programmer. 04:22:25 There're more effective ways to get things done. 04:22:39 ASau`: it's a bit of a kludge but you can Create a word with DOES> of @ execute and put the execution token of an anonymous word in its storage 04:22:52 <_spt_> but , if you want to lean about Forth , what would you recommend? 04:23:19 koisoke: "does>" is another major problem. 04:23:44 Well, I've got some experience in Ada and C though, but was advised to get some experience in the stack paradigm before looking at assembly :-) 04:24:08 xpololz: better get some experience in functional programming. 04:24:41 xpololz: e.g. with Scheme _and_ O'Caml. 04:24:55 Or Standard ML instead of O'Caml. 04:25:09 Or Haskell. 04:25:14 okay, why do you think that's better? :-) 04:25:55 Because it teaches you how to program with less logical and semantical bugs. 04:26:32 Plus, you have powerful tools to check for bugs before you run program. 04:27:27 In particular, you'll find what it is when some sorts of bugs just can't happen. 04:36:06 I'm gonna have an architecture course after next summer(which is mainly using mips though), my plan was to get some experience with the stack paradigm, stack machines etc before moving on to some z80 assembly 04:36:39 because it teaches me some fundemental concepts and makes it easier to learn assembly 04:37:03 I'm kind of into system programming at the moment 04:37:43 I don't plan to use Forth for any seriuos project 04:38:15 <_spt_> why Z80? 04:38:41 z80/8080 .. 8bit mcu 04:39:05 <_spt_> then you would like the Jupiter Ace! a Forth Z80 machine! 04:39:47 Well... 04:39:57 It doesn't help you understanding register machines. 04:40:17 Jupiter Ace just sucks. 04:40:36 It is built around FIG dialect, which is nothing but broken. 04:41:46 I know there's a stack machinie book by Phil Koopman which is suppose to be nice, was planning to have a look at that one 04:42:50 ASau`, I don't know what's better I'm just listening to the guys who knows, so I appreciate any advise though. 04:43:32 <_spt_> a litter nice Forth stack computer, easy to build see http://sites.google.com/site/libby8dev/fignition 04:43:39 <_spt_> *litte 04:44:33 xpololz: if you want to read about it, find article from Lua guys who converted from stack machine to register-based one. 04:45:04 xpololz: you'll see what is efficient and what is not. 04:45:38 _spt_: "litter" isn't error this time :) 04:46:17 <_spt_> I'm blind and don't see to kets very well 04:46:17 ASau`, don't you believe there are some important concepts to learn from the stack paradigm though? 04:47:42 It isn't "paradigm", it is just a model of computation. 04:48:22 That Forth is a bit closer to it, is just a matter of coincidence. 04:48:41 In fact, it isn't close enough. 04:49:09 It is just implementation of stack-based VM on top of register-based machine. 04:49:20 There're more efficient ways to go. 04:49:34 Both as a model and as paradigm. 04:51:38 you would recommend diving straight into assembly? 04:51:51 or, you think that's a better way to go* ? 04:53:00 What is your major goal? 04:53:03 Writing drivers? 04:53:30 Writing cool software? 04:53:36 Just wasting time? 04:54:10 not quite sure, I'm trying to build a good foundation.. 04:54:18 system programming in general seems interesting. 04:54:43 System programming is very large topic. 04:54:51 It doesn't consist from writing drivers only. 04:55:26 If you want to build a good foundation, then Forth and stack automata is definitly wrong place to look. 04:56:33 If you want foundations, then you should read about models of computation, 04:56:49 then go the path of various calculi, 04:57:09 various lambda-calculi, pi-calculus, and so on. 04:59:20 models of computition? like finite-state automata, turing machines, stack automata..? 05:00:14 Yes. 05:00:54 But that's only short introduction, there's not much to look there. 05:01:18 Almost everything starts after you learn untyped lambda-calculus. 05:01:23 well, I read about those in my discrete mathematics course.. 05:02:20 Then read Pierce's "Types and Programming Languages." 05:02:23 however, I have absoloutly no idea about lambda calculus, and I had to look it up on wiki now. 05:03:28 If you feel a bit extreme, you can read Turner's paper on total functional programming. 05:03:58 It has interesting mapping to stack-based automata. 05:10:15 "The portion of the lambda calculus relevant to computation is now called the untyped lambda calculus" would other other lambda calculus be worth to learn? And when you say read Pierce's book, is that in order to learn lambda calculus? or did you mean after? 05:11:24 also as I said earlier, I've had some look into Ada too, mainly in order to get some taste on the type system. 05:13:39 --- quit: ttmrichter (Quit: Leaving) 05:16:27 After. 05:16:41 Or in parallel. 05:17:21 I just read some book description: "The core topics include the untyped lambda-calculus, simple type systems, type ..." that's why I'm asking :-) 05:18:27 --- quit: MayDaniel (Read error: Connection reset by peer) 05:18:38 --- part: _spt_ left #forth 05:27:59 Well, you're probably right. But I believe now is a good time to learn some about how the systems work at CPU level, since I'm having that architecture course soon too 05:28:54 lambda calculus type systems and models of computition doesn't seem to be directly related to that 05:32:45 --- join: swiley (~swiley@114.sub-75-197-115.myvzw.com) joined #forth 06:03:58 ASau`, thanks a lot by the way, appreciate your help :-) 06:30:09 --- join: nighty__ (~nighty@69-165-220-105.dsl.teksavvy.com) joined #forth 06:43:36 --- quit: nighty__ (Ping timeout: 244 seconds) 07:58:54 --- join: _spt_ (~postmaste@host-92-4-59-212.as43234.net) joined #forth 07:58:55 --- quit: _spt_ (Changing host) 07:58:55 --- join: _spt_ (~postmaste@unaffiliated/-spt-/x-5624824) joined #forth 10:49:53 --- join: davazp (~user@89.100.226.133) joined #forth 10:50:01 --- quit: swiley (Read error: Connection reset by peer) 11:26:52 --- quit: davazp (Ping timeout: 252 seconds) 11:52:28 --- join: davazp (~user@89.100.226.133) joined #forth 11:55:40 --- join: swiley (~swiley@114.sub-75-197-115.myvzw.com) joined #forth 13:31:24 --- join: fantazo (~fantazo@178-190-233-246.adsl.highway.telekom.at) joined #forth 13:36:58 --- quit: xpololz (Ping timeout: 245 seconds) 14:33:26 --- join: ttmrichter (~ttmrichte@58.56.112.86) joined #forth 14:51:36 --- quit: Fox78 (Remote host closed the connection) 14:52:50 --- join: Fox78 (~fox@123.115.208.88) joined #forth 15:10:44 --- quit: ttmrichter (Remote host closed the connection) 15:27:33 --- join: crcx (~crcx@184.77.185.20) joined #forth 15:53:45 --- quit: crcx (Quit: crcx) 16:07:21 --- part: _spt_ left #forth 16:35:07 --- quit: fantazo (Remote host closed the connection) 17:39:17 --- join: ttmrichter (~ttmrichte@58.56.112.83) joined #forth 18:37:42 --- quit: davazp (Remote host closed the connection) 18:40:04 --- join: cataska (~cataska@210.64.6.233) joined #forth 18:55:00 --- quit: ttmrichter (Ping timeout: 248 seconds) 18:55:34 --- join: ttmrichter (~ttmrichte@113.106.101.43) joined #forth 18:57:30 --- join: truefx (~hasan@88.250.93.191) joined #forth 18:58:35 hi guys is there a parser design in forth tutorial book document etc available ? google is no my frieds when it comes to forth materials on net !!! 19:45:09 --- join: nighty__ (~nighty@69-165-220-105.dsl.teksavvy.com) joined #forth 20:08:36 probably everyone is forthing none has written anything in last 6 hours except me :) 20:23:50 --- join: ASau`` (~user@89-178-114-64.broadband.corbina.ru) joined #forth 20:24:14 --- quit: boo (Quit: Coyote finally caught me) 20:26:57 --- quit: ASau` (Ping timeout: 240 seconds) 20:36:33 truefx: What would make designing a parser in Forth different from designing it in any other language? 20:39:39 ttmrichter, best question to ask someone who has 10 hours of acquintance with forth. And my answer is that if i design a parser in forth i can get support more easily in a friendlier environment ! 20:41:30 The actual parsing, however, is the same. For a conventional language (i.e. not Forth:D), you tokenize into the language's lexis, you parse into a syntax tree (or equivalent structure) to represent the language's grammar. 20:41:59 --- quit: swiley (Ping timeout: 268 seconds) 20:42:10 The only thing that's going to be different between writing that in C or writing that in Forth is the RPN and Forth's tendency to many small words over mega-functions (by comparison) that C encourages. 21:12:17 --- quit: ttmrichter (Quit: Leaving) 21:23:56 --- quit: nighty__ (Ping timeout: 240 seconds) 23:16:42 --- quit: nighty- (Ping timeout: 268 seconds) 23:34:28 --- join: ttmrichter (~ttmrichte@58.55.124.246) joined #forth 23:36:48 --- join: karswell (~coat@93-97-29-243.zone5.bethere.co.uk) joined #forth 23:59:59 --- log: ended forth/11.12.18