Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: DISFAVORED ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 24 of 89 Topic 3800 of 4224
Post > Topic >>

Re: DISFAVORED Was: name for 3 PICK finally?

by Jonah Thomas <jethomas5@[EMAIL PROTECTED] > Mar 7, 2008 at 10:02 AM

Andrew Haley <andrew29@[EMAIL PROTECTED]
> wrote:
> Jonah Thomas <jethomas5@[EMAIL PROTECTED]
> wrote:
> > Andrew Haley <andrew29@[EMAIL PROTECTED]
> wrote:
 
> >> We'd certainly spend a lot of time discussing what ahould be
> >> DISFAVOURED.  Top of my personal list would be STATE, then ROLL,
> >> then PICK...
> 
> > Since we've started that discussion, I'd nominate IMMEDIATE . It
> > isn't that often that you want the same word to do the same thing
> > whether compiling or interpreting.
> 
> That's fine, as long as you have _some_ way to make a word execute
> while compiling.  As long as you can do that, defining a word as
> COMPILER is fine.  I can't see the difference, really, as long as it
> works.

I haven't implemented this, it's just a morning idea. But -- we
currently have a lot of complication built around immediate words. They
execute while compiling, and the compiler has to know that. But then,
sometimes you do want to compile them so you have POSTPONE which has to
do the right thing with words that aren't immediate too. There were
enough problems with all tha, that Forth-94 declared most of the
standard special words to be particularly special -- you can POSTPONE
them but you can't use ' or ['] on them to get an xt. They're
compile-only meaning that a Forth system can make them do whatever it
wants in interpret-state. It's a big mess.

So, say we make the Forth-94 compile-only words be EXECUTE-ONLY. Get rid
of POSTPONE (meaning encourage people not to use it). Let users make
words be EXECUTE-ONLY too. An EXECUTE-ONLY word always executes and
never gets compiled -- just exactly like IMMEDIATE ! But not
state-smart. (Meaning encourage people not to use STATE as we've
encouraged them for 20+ years.) If you want to wait until later to
execute an execute-only word, then put it into a macro and execute the
macro whenever you want to.

If you want a little bit of safety, make some words COMPILE-ONLY . And
for a little bit more safety, a macro that includes a compile-only word
should become compile-only too.

That simplifies things IMO. No deciding when to compile immediate words.
You simply never compile immediate words and so the complications around
that are gone. Nothing state-smart, so STATE doesn't need to be
explicit. (But you could provide a different cursor while compiling.) 

What do we lose? It doesn't provide an obvious way to replace
state-smart words. You could have two words with the same name and
arrange for different ones to be found first at different times, but
there's nothing here to say how to do that.

And you lose the chance to make control structures without parsing or
using the dictionary. With :NONAME and POSTPONE and COMPILE, you can
have a program that assembles Forth comands with no use of the
dictionary at all. Build a headerless definition, use postponed commands
to build control structures, lay down xt's with COMPILE, there doesn't
have to be anything at all to look up in the dictionary. I don't know
how often that's im****tant, but it's something we'd be losing.

And maybe something I've missed.

> > If you want it to do different things then instead of using STATE it
> > might as well be two words.
> 
> > In terms of traditional implementations, if you get rid of the
> > immediate header bit then as Bruce pointed out you have 8 categories
> > available.  HOST COMPILER TARGET etc could fit in there, or others.
> 
> Urgh.  That sounds even more complicated than what we have now.  :-(

If you want to have a host-target system that fits the proto target
standard, there's nothing particularly wrong with doing it this way. I
think. I don't see that it would be better to do it with wordlists. If
you need 5 categories that are kind of like wordlists and you have 3
bits available, that still gives you 3 more categories. If you wanted
you could even have one of them be SMUDGE . :)
 




 89 Posts in Topic:
name for 3 PICK finally?
m_l_g3@[EMAIL PROTECTED]   2008-03-05 11:11:00 
Re: name for 3 PICK finally?
Elizabeth D Rather <er  2008-03-05 10:23:12 
Re: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-05 12:45:31 
Re: name for 3 PICK finally?
m_l_g3@[EMAIL PROTECTED]   2008-03-06 04:08:32 
Re: name for 3 PICK finally?
Andrew Haley <andrew29  2008-03-06 12:51:52 
Re: name for 3 PICK finally?
Jerry Avins <jya@[EMAI  2008-03-06 10:12:36 
Re: name for 3 PICK finally?
Coos Haak <chforth@[EM  2008-03-06 21:07:02 
Re: name for 3 PICK finally?
mhx@[EMAIL PROTECTED] (M  2008-03-06 21:17:29 
Re: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-06 13:59:21 
Re: name for 3 PICK finally?
Jerry Avins <jya@[EMAI  2008-03-06 15:28:37 
Re: name for 3 PICK finally?
Albert van der Horst <  2008-03-06 15:39:29 
Re: name for 3 PICK finally?
Alex McDonald <blog@[E  2008-03-06 07:01:21 
Re: name for 3 PICK finally?
mhx@[EMAIL PROTECTED] (M  2008-03-06 21:04:51 
Re: name for 3 PICK finally?
Alex McDonald <blog@[E  2008-03-06 14:19:30 
Re: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-06 08:22:06 
Re: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-06 17:04:23 
Re: name for 3 PICK finally?
Andrew Haley <andrew29  2008-03-07 11:09:43 
Re: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-07 06:43:26 
Re: name for 3 PICK finally?
Andrew Haley <andrew29  2008-03-07 12:19:56 
Disfavoured words (Re: name for 3 PICK finally?)
anton@[EMAIL PROTECTED]   2008-03-08 18:51:57 
DISFAVORED Was: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-07 09:13:33 
Re: DISFAVORED Was: name for 3 PICK finally?
Andrew Haley <andrew29  2008-03-07 14:26:52 
Re: DISFAVORED Was: name for 3 PICK finally?
pablo reda <pabloreda@  2008-03-07 06:33:40 
Re: DISFAVORED Was: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-07 10:02:23 
Re: DISFAVORED Was: name for 3 PICK finally?
Andrew Haley <andrew29  2008-03-10 16:15:16 
Re: DISFAVORED Was: name for 3 PICK finally?
Elizabeth D Rather <er  2008-03-10 07:58:59 
Re: DISFAVORED Was: name for 3 PICK finally?
"Mark W. Humphries&q  2008-03-07 07:46:25 
Re: DISFAVORED Was: name for 3 PICK finally?
Andrew Haley <andrew29  2008-03-10 16:15:52 
Re: DISFAVORED Was: name for 3 PICK finally?
Alex McDonald <blog@[E  2008-03-07 08:10:40 
Re: DISFAVORED Was: name for 3 PICK finally?
Bill <bill@[EMAIL PROT  2008-03-07 13:22:10 
Re: DISFAVORED Was: name for 3 PICK finally?
"Mark W. Humphries&q  2008-03-07 08:26:20 
Re: DISFAVORED Was: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-07 11:51:07 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-07 09:08:12 
Re: DISFAVORED Was: name for 3 PICK finally?
Elizabeth D Rather <er  2008-03-07 07:56:23 
Re: DISFAVORED Was: name for 3 PICK finally?
John Doty <jpd@[EMAIL   2008-03-07 15:12:12 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-07 09:11:02 
Re: DISFAVORED Was: name for 3 PICK finally?
"Mark W. Humphries&q  2008-03-07 09:37:07 
Re: DISFAVORED Was: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-07 13:06:51 
Re: DISFAVORED Was: name for 3 PICK finally?
Alex McDonald <blog@[E  2008-03-07 14:09:52 
Re: DISFAVORED Was: name for 3 PICK finally?
John Doty <jpd@[EMAIL   2008-03-07 15:14:31 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-07 14:51:48 
Re: DISFAVORED Was: name for 3 PICK finally?
Alex McDonald <blog@[E  2008-03-07 15:08:55 
Re: DISFAVORED Was: name for 3 PICK finally?
John Doty <jpd@[EMAIL   2008-03-07 16:28:56 
Re: DISFAVORED Was: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-07 18:15:57 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-07 16:06:19 
Re: DISFAVORED Was: name for 3 PICK finally?
Alex McDonald <blog@[E  2008-03-07 16:06:16 
Re: DISFAVORED Was: name for 3 PICK finally?
John Doty <jpd@[EMAIL   2008-03-07 17:23:37 
Re: DISFAVORED Was: name for 3 PICK finally?
Josh Grams <josh@[EMAI  2008-03-07 16:54:26 
Re: DISFAVORED Was: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-07 20:54:07 
Re: DISFAVORED Was: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-07 21:01:01 
Re: DISFAVORED Was: name for 3 PICK finally?
anton@[EMAIL PROTECTED]   2008-03-08 18:40:59 
Re: DISFAVORED Was: name for 3 PICK finally?
"Mark W. Humphries&q  2008-03-07 19:34:51 
Re: DISFAVORED Was: name for 3 PICK finally?
"Mark W. Humphries&q  2008-03-07 22:02:11 
Re: DISFAVORED Was: name for 3 PICK finally?
"Mark W. Humphries&q  2008-03-07 22:12:15 
Re: DISFAVORED Was: name for 3 PICK finally?
"Mark W. Humphries&q  2008-03-07 22:24:45 
Re: Late vs. early binding Was: DISFAVORED Was: name for 3 PICK
Josh Grams <josh@[EMAI  2008-03-08 05:14:24 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-08 09:37:41 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-08 09:53:39 
Re: Late vs. early binding Was: DISFAVORED Was: name for 3 PICK
Bruce McFarling <agila  2008-03-08 09:56:51 
Re: DISFAVORED Was: name for 3 PICK finally?
"Mark W. Humphries&q  2008-03-08 12:11:07 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-08 13:19:05 
Re: DISFAVORED Was: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-08 19:02:05 
Re: DISFAVORED Was: name for 3 PICK finally?
Albert van der Horst <  2008-03-09 14:16:23 
Re: DISFAVORED Was: name for 3 PICK finally?
mhx@[EMAIL PROTECTED] (M  2008-03-09 17:25:23 
Re: DISFAVORED Was: name for 3 PICK finally?
Albert van der Horst <  2008-03-09 20:23:38 
Re: DISFAVORED Was: name for 3 PICK finally?
Jerry Avins <jya@[EMAI  2008-03-09 17:54:51 
Re: DISFAVORED Was: name for 3 PICK finally?
Coos Haak <chforth@[EM  2008-03-10 00:59:40 
Re: DISFAVORED Was: name for 3 PICK finally?
Jerry Avins <jya@[EMAI  2008-03-09 21:22:30 
Re: DISFAVORED Was: name for 3 PICK finally?
Albert van der Horst <  2008-03-10 14:12:08 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-09 20:28:55 
Re: DISFAVORED Was: name for 3 PICK finally?
Jerry Avins <jya@[EMAI  2008-03-09 23:42:12 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-09 22:26:59 
Re: DISFAVORED Was: name for 3 PICK finally?
Albert van der Horst <  2008-03-10 14:23:28 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-10 13:48:58 
Re: DISFAVORED Was: name for 3 PICK finally?
Albert van der Horst <  2008-03-11 09:41:41 
Re: DISFAVORED Was: name for 3 PICK finally?
Coos Haak <chforth@[EM  2008-03-11 18:14:25 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-11 10:56:10 
Macros etc Was: DISFAVORED
Jonah Thomas <jethomas  2008-03-08 23:56:25 
Re: Macros etc Was: DISFAVORED
Andrew Haley <andrew29  2008-03-10 16:30:20 
Re: Macros etc Was: DISFAVORED
Albert van der Horst <  2008-03-11 10:15:46 
Re: Macros etc Was: DISFAVORED
Andrew Haley <andrew29  2008-03-11 10:23:50 
Re: Macros etc Was: DISFAVORED
"Mark W. Humphries&q  2008-03-08 22:01:52 
Re: name for 3 PICK finally?
gavino <gavcomedy@[EMA  2008-03-09 03:50:29 
Re: DISFAVORED Was: name for 3 PICK finally?
"Mark W. Humphries&q  2008-03-09 07:19:05 
Re: Macros etc Was: DISFAVORED
Jonah Thomas <jethomas  2008-03-09 11:08:35 
Re: DISFAVORED Was: name for 3 PICK finally?
Jonah Thomas <jethomas  2008-03-09 11:40:37 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-09 15:39:37 
Re: Macros etc Was: DISFAVORED
"Mark W. Humphries&q  2008-03-09 19:49:30 
Re: DISFAVORED Was: name for 3 PICK finally?
Bruce McFarling <agila  2008-03-09 20:17:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Aug 30 8:23:07 CDT 2008.