home .. forth .. colorforth mail list archive ..

[ColorForth] Passing values from Compiletime to Runtime


> Von: Jeff Fox <fox@xxxxxxxxxxxxxxxxxxx>
> An: ColorForth List Member <ColorForth@xxxxxxxxxxxxxxxxxx>

Hi Jeff! Great to see you on the list, you've got a marvelous
site out there!

> 
> That is exactly the issue.  When Chuck first mentioned this
> in 1999 he said it was only visible when under the cursor
> "ring."  Someone joked that it was a secret decoder ring,
> and Chuck joked that "Forth needed a secret decoder ring."
> 
> I also don't care for the idea that two color change tokens
> in a row are not visible except under a cursor.  To me the
> obvious solution is an additional color, something equivalent
> to [ ... ] LITERAL which would make the compile time interpreted
> literal sequence completely visible without the need to pass it
> under a cursor.

Yes, that's an alternative, but i fear i'll be running out
of colors... because i have some concepts in the back of my head
like
- using a different color for embedded regress tests
  (so you write some precondition/postcondition expressions
  into the word definition, sort of like an "example" about
  how this word is expected to process data.   )
- using a second color set to manipulate a second stack; 
  the idea here is to combine Forth-the-fast-machine-oriented
  language with Forth-the--highly-abstract-functional language;
  for the latter, i already have a Forth interpreter that has
  abstract refcounted datatypes in the way of Python (lists,
  strings,ints,floats that behave polymorphically, so when
  you do "+", on runtime it's decided that, for example
  we gotta do a string concatenation). That one is coded in
  C++, but i want to recode it in terms of a simple machine
  oriented Forth, so that it's just a little optional wordset on top
  of a machine oriented Forth. It's nice to do scripting with
  that one, but of course, it's stinking slow.

> 
> The first solution that appealed to me was just a visible word
> version of LITERAL like we have done in most versions of Machine
> Forth.   I would tend to just use the Machine Forth operator #. 

That's exactly what i'm looking for. '#' looks more appropriate
than '>'. 

Thanks for the clarifications!

Dirk
------------------------

To Unsubscribe from this list, send mail to Mdaemon@xxxxxxxxxxxxxxxxxx with:
unsubscribe ColorForth
as the first and only line within the message body
Problems   -   List-Admin@xxxxxxxxxxxxxxxxxx
Main ColorForth site   -   http://www.ultratechnology.com