home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 116,726 of 117,927   
   albert@spenarnc.xs4all.nl to the.beez.speaks@gmail.com   
   Re: Avoid treating the stack as an array   
   11 Sep 24 13:29:03   
   
   In article ,   
   Hans Bezemer   wrote:   
      
      
   >Now, I won't say Forth doesn't have its issues. I think IN ESSENCE   
   >recognizers are a beautiful idea. Extend it to strings and you could   
   >eradicate "parsing words" and have something like:   
   >   
   >"lib/mylib.4th" include   
   >   
   >"Square" : "the square is:" print dup * cr ;   
      
   You have that backward, it must be:   
      
   { "the square is:" print dup * cr } : Square   
      
   If there is one thing to preserve in Forth that is the   
   convention that defining words can parse new names in   
   the dictionary by forward scanning, without those considered strings.   
   Here { introduces a denotation, without being a PREFIX (" recognizer"),   
   such as 0x in 0xDEADBEEF is. It is the same within a definition like   
   numbers and nowadays strings.   
      
   { "the square is:" print dup * cr } CONSTANT orang_utan   
   orang_utan DUP : Square  : quadrate   
      
   >   
   >But okay, we'll do with what we have ;-) And BTW, TURNKEY should be   
   >standard. Clean up the dictionary, pump out an executable.   
      
   I have create a language on that principle, e.g. meta   
   accepts 2 xt's a build and a run one. meta is the mother of   
   all defining words:   
   { , } { @ } meta CONSTANT   
   { CELL ALLOT } { } meta VARIABLE   
   { 2 CELLS ALLOT } { } meta 2VARIABLE   
   { } { EXECUTE } meta :   
   { } { } meta DATA     \ My favorite.   
      
   CREATE DOES> is the right idea, an object with an allocation   
   part and a behavior, but the syntax is akward beyond despair.   
      
   I have a backlog, busy with preserving projects dating from the   
   80's, so don't expect a publication soon.   
      
   >   
   >Hans Bezemer   
   >   
   >   
   --   
   Temu exploits Christians: (Disclaimer, only 10 apostles)   
   Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall   
   Art For Home, Office And Garden Decor - Perfect For Windows, Bars,   
   And Gifts For Friends Family And Colleagues.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca