Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #50849 > unrolled thread

Given a string, create word with that name (in ANS Forth)?

Started byAlex Dowad <alexinbeijing@gmail.com>
First post2016-09-11 06:12 -0700
Last post2016-09-12 14:08 +0200
Articles 16 on this page of 96 — 19 participants

Back to article view | Back to comp.lang.forth


Contents

  Given a string, create word with that name (in ANS Forth)? Alex Dowad <alexinbeijing@gmail.com> - 2016-09-11 06:12 -0700
    Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-11 10:51 -0500
      Re: Given a string, create word with that name (in ANS Forth)? Alex Dowad <alexinbeijing@gmail.com> - 2016-09-11 09:49 -0700
      Re: Given a string, create word with that name (in ANS Forth)? Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-11 19:57 +0200
        Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-12 02:43 -0500
      Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-11 14:31 -0700
    Re: Given a string, create word with that name (in ANS Forth)? hughaguilar96@gmail.com - 2016-09-11 10:14 -0700
    Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-12 07:46 +0000
      Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-12 01:10 -0700
        Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-12 09:01 +0000
          Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-12 14:02 +0200
            Re: Given a string, create word with that name (in ANS Forth)? "HAA" <someone@microsoft.com> - 2016-09-20 12:06 +1000
              Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-20 11:27 +0200
          Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-12 13:02 -0700
            Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-13 16:20 +0000
              Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-13 21:08 +0200
                Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-13 17:30 -0700
                  Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-14 07:11 +0000
                    Re: Given a string, create word with that name (in ANS Forth)? hughaguilar96@gmail.com - 2016-09-14 18:30 -0700
            Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-15 02:46 -0500
            Re: Given a string, create word with that name (in ANS Forth)? "Elizabeth D. Rather" <erather@forth.com> - 2016-09-20 14:27 -0700
              Re: Given a string, create word with that name (in ANS Forth)? hughaguilar96@gmail.com - 2016-09-20 15:05 -0700
                Re: Given a string, create word with that name (in ANS Forth)? Melzzzzz <Melzzzzz@zzzzz.com> - 2016-09-20 22:19 +0000
              Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-21 12:26 +0000
                Re: Given a string, create word with that name (in ANS Forth)? Coos Haak <htrofhc@gmail.com> - 2016-09-21 15:11 +0200
                  Re: Given a string, create word with that name (in ANS Forth)? mhx@iae.nl - 2016-09-21 10:06 -0700
                    Re: Given a string, create word with that name (in ANS Forth)? Coos Haak <htrofhc@gmail.com> - 2016-09-21 21:12 +0200
                Re: Given a string, create word with that name (in ANS Forth)? "Elizabeth D. Rather" <erather@forth.com> - 2016-09-21 12:06 -1000
                  Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-21 15:40 -0700
                    Re: Given a string, create word with that name (in ANS Forth)? "HAA" <someone@microsoft.com> - 2016-09-22 13:04 +1000
                  Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-22 07:40 +0000
                    Re: Given a string, create word with that name (in ANS Forth)? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-09-22 15:46 +0100
                      Re: Given a string, create word with that name (in ANS Forth)? hughaguilar96@gmail.com - 2016-09-22 11:08 -0700
                      Re: Given a string, create word with that name (in ANS Forth)? Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-22 22:04 +0200
                        Re: Given a string, create word with that name (in ANS Forth)? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-09-23 10:21 +0100
                          Re: Given a string, create word with that name (in ANS Forth)? Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-23 12:06 +0200
                            Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-23 10:44 -0500
                              Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-23 16:26 +0000
                                Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-24 03:46 -0500
                                  Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-24 10:13 +0000
                                    Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-24 10:34 -0500
                                      Re: Given a string, create word with that name (in ANS Forth)? Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-24 20:19 +0200
                                        Re: Given a string, create word with that name (in ANS Forth)? "Elizabeth D. Rather" <erather@forth.com> - 2016-09-24 09:47 -1000
                                          Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-24 14:29 -0700
                                            Re: Given a string, create word with that name (in ANS Forth)? "Elizabeth D. Rather" <erather@forth.com> - 2016-09-24 13:00 -1000
                                              Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-24 16:19 -0700
                                              Re: Given a string, create word with that name (in ANS Forth)? jim.brakefield@ieee.org - 2016-09-24 19:02 -0700
                                                Re: Given a string, create word with that name (in ANS Forth)? "Elizabeth D. Rather" <erather@forth.com> - 2016-09-24 21:23 -1000
                                                  Re: Given a string, create word with that name (in ANS Forth)? hughaguilar96@gmail.com - 2016-09-25 19:08 -0700
                                                    Re: Given a string, create word with that name (in ANS Forth)? jim.brakefield@ieee.org - 2016-09-25 19:53 -0700
                                                      Re: Given a string, create word with that name (in ANS Forth)? hughaguilar96@gmail.com - 2016-09-25 20:00 -0700
                                              Re: Given a string, create word with that name (in ANS Forth)? hughaguilar96@gmail.com - 2016-09-25 17:40 -0700
                                            Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-25 01:42 -0500
                                              Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-24 23:45 -0700
                                                Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-25 02:22 -0500
                                                  Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-26 15:31 +0000
                                                    Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-26 10:42 -0500
                                                      Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-27 15:57 +0000
                                                        Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-27 19:11 +0200
                                                Re: Given a string, create word with that name (in ANS Forth)? "Elizabeth D. Rather" <erather@forth.com> - 2016-09-24 21:28 -1000
                                            Re: Given a string, create word with that name (in ANS Forth)? hughaguilar96@gmail.com - 2016-09-25 18:55 -0700
                                          Re: Given a string, create word with that name (in ANS Forth)? Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-25 09:35 +0200
                                          Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-26 15:38 +0000
                                            Re: Given a string, create word with that name (in ANS Forth)? hughaguilar96@gmail.com - 2016-09-26 12:36 -0700
                                      Re: Given a string, create word with that name (in ANS Forth)? Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-24 20:26 +0200
                                      Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-25 15:22 +0000
                                        Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-25 10:44 -0700
                                          Re: Given a string, create word with that name (in ANS Forth)? Coos Haak <htrofhc@gmail.com> - 2016-09-25 19:55 +0200
                                            Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-25 20:15 +0200
                                              Re: Given a string, create word with that name (in ANS Forth)? Coos Haak <htrofhc@gmail.com> - 2016-09-25 20:26 +0200
                                            Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-25 11:12 -0700
                                              Re: Given a string, create word with that name (in ANS Forth)? Julian Fondren <julian.fondren@gmail.com> - 2016-09-25 11:30 -0700
                                              Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-26 14:51 +0000
                                                Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-27 14:16 +0200
                            Re: Given a string, create word with that name (in ANS Forth)? "Elizabeth D. Rather" <erather@forth.com> - 2016-09-23 07:52 -1000
                        Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-23 10:36 -0500
      Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-12 13:55 +0200
        Re: Given a string, create word with that name (in ANS Forth)? Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-12 15:01 +0200
        Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-12 17:29 +0000
          Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-12 21:02 +0200
            Re: Given a string, create word with that name (in ANS Forth)? Paul Rubin <no.email@nospam.invalid> - 2016-09-12 13:04 -0700
              Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-12 22:33 +0200
                Re: Given a string, create word with that name (in ANS Forth)? lawrencedo99@gmail.com - 2016-09-16 18:38 -0700
                  Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-17 05:33 +0000
                    Re: Given a string, create word with that name (in ANS Forth)? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-17 01:40 -0500
                    Re: Given a string, create word with that name (in ANS Forth)? lawrencedo99@gmail.com - 2016-09-16 23:47 -0700
                      Re: Given a string, create word with that name (in ANS Forth)? Julian Fondren <julian.fondren@gmail.com> - 2016-09-17 00:08 -0700
                      Re: Given a string, create word with that name (in ANS Forth)? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-17 17:03 +0000
              Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-12 22:35 +0200
              Re: Given a string, create word with that name (in ANS Forth)? Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2016-09-17 08:16 +0100
    Re: Given a string, create word with that name (in ANS Forth)? Mark Wills <markwills1970@gmail.com> - 2016-09-12 02:49 -0700
      Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-12 14:04 +0200
      Re: Given a string, create word with that name (in ANS Forth)? Cecil Bayona <cbayona@cbayona.com> - 2016-09-12 09:34 -0500
        Re: Given a string, create word with that name (in ANS Forth)? Mark Wills <markwills1970@gmail.com> - 2016-09-12 08:10 -0700
          Re: Given a string, create word with that name (in ANS Forth)? Cecil Bayona <cbayona@cbayona.com> - 2016-09-12 12:02 -0500
    Re: Given a string, create word with that name (in ANS Forth)? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-12 14:08 +0200

Page 5 of 5 — ← Prev page 1 2 3 4 [5]


#50909

FromPaul Rubin <no.email@nospam.invalid>
Date2016-09-12 13:04 -0700
Message-ID<877faghokv.fsf@jester.gateway.pace.com>
In reply to#50907
albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) writes:
> No need for more words. At the same time we could get rid of
> the SHOUTING FROM THE FORTRAN ERA.

People do like to write   foo bar DUP blah SWAP   to distinguish
builtins from user words, etc.  Case sensitivity would break a
ridiculous amount of existing code.

[toc] | [prev] | [next] | [standalone]


#50913

Fromalbert@cherry.spenarnc.xs4all.nl (Albert van der Horst)
Date2016-09-12 22:33 +0200
Message-ID<nr73ed$n07$1@cherry.spenarnc.xs4all.nl>
In reply to#50909
In article <877faghokv.fsf@jester.gateway.pace.com>,
Paul Rubin  <no.email@nospam.invalid> wrote:
>albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) writes:
>> No need for more words. At the same time we could get rid of
>> the SHOUTING FROM THE FORTRAN ERA.
>
>People do like to write   foo bar DUP blah SWAP   to distinguish
>builtins from user words, etc.  Case sensitivity would break a
>ridiculous amount of existing code.

Case-sensitivity cannot break existing code that use the same
name consistently.

My proposal would be that the standard be rewritten with all standard
words in lower case.
Furthermore a standard system must recognize standard words in two forms:
as in the standard, or all upper case. (Not case-insensitive:
Open-File would not be accepted.)

Sloppy casing ("case insensitivity") would be an environmental
dependancy.
(I've seen a habit of uppercasing words where they are defined.
Blech.)

Groetjes Albert
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

[toc] | [prev] | [next] | [standalone]


#51050

Fromlawrencedo99@gmail.com
Date2016-09-16 18:38 -0700
Message-ID<f65340ea-d271-482f-88bf-82be7accdc32@googlegroups.com>
In reply to#50913
On Tuesday, September 13, 2016 at 8:24:37 AM UTC+12, Albert van der Horst wrote:
> My proposal would be that the standard be rewritten with all standard
> words in lower case.
> Furthermore a standard system must recognize standard words in two forms:
> as in the standard, or all upper case. (Not case-insensitive:
> Open-File would not be accepted.)

Would it still be ASCII-only? Or would you allow anything that Unicode classes as an alphabetic character?

[toc] | [prev] | [next] | [standalone]


#51054

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2016-09-17 05:33 +0000
Message-ID<2016Sep17.073359@mips.complang.tuwien.ac.at>
In reply to#51050
lawrencedo99@gmail.com writes:
>Would it still be ASCII-only? Or would you allow anything that Unicode classes as an alphabetic character?

He would not care, because he wants case sensitivity, with only an
exception for standard words, and these are ASCII-only.

Forth-2012 says in A.18:

|Many Forth systems today are case insensitive, to accept lower case
|standard words. It is sufficient to be case insensitive for the ASCII
|subset to make this work [...]

My recommendation is for the dictionary search to be case insensitive
for ASCII chars (that's common practice) and case sensitive for
anything else.  That way you will not get spurious matches if the
encoding of the code is different from the encoding of the system;
also case insensitive matching for some non-ASCII characters is
complex.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2016: http://www.euroforth.org/ef16/

[toc] | [prev] | [next] | [standalone]


#51056

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2016-09-17 01:40 -0500
Message-ID<3audnQ-0uoHxeEHKnZ2dnUU7-TGdnZ2d@supernews.com>
In reply to#51054
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
> Forth-2012 says in A.18:
> 
> |Many Forth systems today are case insensitive, to accept lower case
> |standard words. It is sufficient to be case insensitive for the ASCII
> |subset to make this work [...]
> 
> My recommendation is for the dictionary search to be case insensitive
> for ASCII chars (that's common practice) and case sensitive for
> anything else.  That way you will not get spurious matches if the
> encoding of the code is different from the encoding of the system;
> also case insensitive matching for some non-ASCII characters is
> complex.

I agree.  Also, it means that systems can use UTF-8 for dictionary
entries with no requirement that the system itself decode UTF-8, or
have any knowledge of it.

Andrew.

[toc] | [prev] | [next] | [standalone]


#51058

Fromlawrencedo99@gmail.com
Date2016-09-16 23:47 -0700
Message-ID<bcfc31cf-c066-452b-8a07-28ca43cd7f70@googlegroups.com>
In reply to#51054
On Saturday, September 17, 2016 at 5:47:18 PM UTC+12, Anton Ertl wrote:
> That way you will not get spurious matches if the
> encoding of the code is different from the encoding of the system ...

Why would you use any encoding other than Unicode?

[toc] | [prev] | [next] | [standalone]


#51061

FromJulian Fondren <julian.fondren@gmail.com>
Date2016-09-17 00:08 -0700
Message-ID<de2729e6-4d67-41c9-9a6d-d664336b5a87@googlegroups.com>
In reply to#51058
On Saturday, September 17, 2016 at 1:47:59 AM UTC-5, lawren...@gmail.com wrote:
> On Saturday, September 17, 2016 at 5:47:18 PM UTC+12, Anton Ertl wrote:
> > That way you will not get spurious matches if the
> > encoding of the code is different from the encoding of the system ...
> 
> Why would you use any encoding other than Unicode?

Unicode isn't an encoding.

Encodings like UTF-8 suck for CJK.

Historical reasons.  A Thai customer went through a lot of pain when
a PHP upgrade made his site spit out UTF-8 and TIS-620 intermixed.
"Break everything because it's simpler for you." sells poorly.

[toc] | [prev] | [next] | [standalone]


#51080

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2016-09-17 17:03 +0000
Message-ID<2016Sep17.190323@mips.complang.tuwien.ac.at>
In reply to#51058
lawrencedo99@gmail.com writes:
>On Saturday, September 17, 2016 at 5:47:18 PM UTC+12, Anton Ertl wrote:
>> That way you will not get spurious matches if the
>> encoding of the code is different from the encoding of the system ...
>
>Why would you use any encoding other than Unicode?

For whatever reason.  Maybe the user uses ISO Latin-1, ISO Latin-2, or
KOI8-R throughout, and does not want to switch yet.  Or they use
Unicode in the GB18030 encoding, while another user uses the UTF-8
encoding of Unicode.  And while the program will not look as intended
when interpreted with a different encoding, the Forth system with the
above rules will have no trouble processing it, and depending on what
it does, the encoding of the program may not be a problem when running
it.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2016: http://www.euroforth.org/ef16/

[toc] | [prev] | [next] | [standalone]


#50914

Fromalbert@cherry.spenarnc.xs4all.nl (Albert van der Horst)
Date2016-09-12 22:35 +0200
Message-ID<nr73i2$n0u$1@cherry.spenarnc.xs4all.nl>
In reply to#50909
In article <877faghokv.fsf@jester.gateway.pace.com>,
Paul Rubin  <no.email@nospam.invalid> wrote:
>albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) writes:
>> No need for more words. At the same time we could get rid of
>> the SHOUTING FROM THE FORTRAN ERA.
>
>People do like to write   foo bar DUP blah SWAP   to distinguish
>builtins from user words, etc.  Case sensitivity would break a
>ridiculous amount of existing code.

Case-sensitivity cannot break existing code that use the same
name consistently.

My proposal would be that the standard be rewritten with all standard
words in lower case.
Furthermore a standard system must recognize standard words in two forms:
as in the standard, or all upper case. (Not case-insensitive:
Open-File would not be accepted.)

Sloppy casing ("case insensitivity") would be an environmental
dependancy.
(I've seen a habit of uppercasing words where they are defined.
Blech.)

Groetjes Albert
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

[toc] | [prev] | [next] | [standalone]


#51062

FromJan Coombs <jenfhaomndgfwutc@murmic.plus.com>
Date2016-09-17 08:16 +0100
Message-ID<20160917081617.18348db2@HP-6550b>
In reply to#50909
On Mon, 12 Sep 2016 13:04:32 -0700
Paul Rubin <no.email@nospam.invalid> wrote:

> albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) writes:
> > No need for more words. At the same time we could get rid of
> > the SHOUTING FROM THE FORTRAN ERA.
> 
> People do like to write   foo bar DUP blah SWAP   to
> distinguish builtins from user words, etc.  Case sensitivity
> would break a ridiculous amount of existing code.

Not necessarily:

I use 8051 Camel Forth for test firmware, which came (IIRC) as
case sensitive and all standard words in upper-case. Because I
like consistent names, and the assembler won't allow hyphens I
use a lot of camel-case, and so preferred case-sensitive
dictionary searching, and not be forced to SHOUT. 

A small change fixed this: If a dictionary search fails, and the
text contains no upper case, then the text is converted to upper
case and the search is run again. This makes any mixed-case
words unique, but allows me to type all system words in
lower-case. 

My gains are only cosmetic though: the old assembler, which
builds the system, works in upper-case only, but at least the
built systems work as I want. 

Jan Coombs

[toc] | [prev] | [next] | [standalone]


#50880

FromMark Wills <markwills1970@gmail.com>
Date2016-09-12 02:49 -0700
Message-ID<37f0d705-cf03-4f28-b48e-05ddf0de523b@googlegroups.com>
In reply to#50849
On Sunday, 11 September 2016 14:12:40 UTC+1, Alex Dowad  wrote:
> Hello all,
> 
> ANS Forth has CREATE, which reads a token from SOURCE and adds a word to the dictionary. But I can't find any word in the standard which takes a string and adds a new word to the dictionary.
> 
> This seems to be a failure of orthogonality; CREATE combines the functionality of WORD with that of adding to the dictionary. If those operations were split out from CREATE, that would have provided greater flexibility.
> 
> Is there some clever way to get around this, while staying within the standard? Or is it something which can only be done with implementation-specific code?
> 
> Thanks, Alex Dowad

Yes. It would be a nice inclusion in standard Forth.

My system has HEADER.

http://turboforth.net/lang_ref/view_word.asp?ID=161

[toc] | [prev] | [next] | [standalone]


#50891

Fromalbert@cherry.spenarnc.xs4all.nl (Albert van der Horst)
Date2016-09-12 14:04 +0200
Message-ID<nr65l7$jgr$1@cherry.spenarnc.xs4all.nl>
In reply to#50880
In article <37f0d705-cf03-4f28-b48e-05ddf0de523b@googlegroups.com>,
Mark Wills  <markwills1970@gmail.com> wrote:
>On Sunday, 11 September 2016 14:12:40 UTC+1, Alex Dowad  wrote:
>> Hello all,
>>
>> ANS Forth has CREATE, which reads a token from SOURCE and adds a word to the dictionary. But I can't find any word in the standard which takes a string and adds a new word to the dictionary.
>>
>> This seems to be a failure of orthogonality; CREATE combines the functionality of WORD with that of adding to the dictionary. If those operations were split out from CREATE, that would have provided greater flexibility.
>>
>> Is there some clever way to get around this, while staying within the standard? Or is it something which can only be done with implementation-specific code?
>>
>> Thanks, Alex Dowad
>
>Yes. It would be a nice inclusion in standard Forth.
>
>My system has HEADER.
>
>http://turboforth.net/lang_ref/view_word.asp?ID=161
>

Mine too, whose system has not? But are they interchangeable?

Groetjes Albert
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

[toc] | [prev] | [next] | [standalone]


#50895

FromCecil Bayona <cbayona@cbayona.com>
Date2016-09-12 09:34 -0500
Message-ID<nr6eed$r0v$1@dont-email.me>
In reply to#50880
On 9/12/2016 4:49 AM, Mark Wills wrote:
> On Sunday, 11 September 2016 14:12:40 UTC+1, Alex Dowad  wrote:
>> Hello all,
>>
>> ANS Forth has CREATE, which reads a token from SOURCE and adds a word to the dictionary. But I can't find any word in the standard which takes a string and adds a new word to the dictionary.
>>
>> This seems to be a failure of orthogonality; CREATE combines the functionality of WORD with that of adding to the dictionary. If those operations were split out from CREATE, that would have provided greater flexibility.
>>
>> Is there some clever way to get around this, while staying within the standard? Or is it something which can only be done with implementation-specific code?
>>
>> Thanks, Alex Dowad
>
> Yes. It would be a nice inclusion in standard Forth.
>
> My system has HEADER.
>
> http://turboforth.net/lang_ref/view_word.asp?ID=161
>

Is the source code to your compiler available? Curious, I want to learn 
from the implementations of various Forth.

-- 
Cecil - k5nwa

[toc] | [prev] | [next] | [standalone]


#50897

FromMark Wills <markwills1970@gmail.com>
Date2016-09-12 08:10 -0700
Message-ID<5e7a1e79-0141-4b8e-b25b-5ff5ea14a772@googlegroups.com>
In reply to#50895
On Monday, 12 September 2016 15:34:58 UTC+1, Cecil - k5nwa  wrote:
> On 9/12/2016 4:49 AM, Mark Wills wrote:
> > On Sunday, 11 September 2016 14:12:40 UTC+1, Alex Dowad  wrote:
> >> Hello all,
> >>
> >> ANS Forth has CREATE, which reads a token from SOURCE and adds a word to the dictionary. But I can't find any word in the standard which takes a string and adds a new word to the dictionary.
> >>
> >> This seems to be a failure of orthogonality; CREATE combines the functionality of WORD with that of adding to the dictionary. If those operations were split out from CREATE, that would have provided greater flexibility.
> >>
> >> Is there some clever way to get around this, while staying within the standard? Or is it something which can only be done with implementation-specific code?
> >>
> >> Thanks, Alex Dowad
> >
> > Yes. It would be a nice inclusion in standard Forth.
> >
> > My system has HEADER.
> >
> > http://turboforth.net/lang_ref/view_word.asp?ID=161
> >
> 
> Is the source code to your compiler available? Curious, I want to learn 
> from the implementations of various Forth.
> 
> -- 
> Cecil - k5nwa

Yes, it's available in the zip:

http://turboforth.net/download.html

It's also viewable online: http://turboforth.net/source/

[toc] | [prev] | [next] | [standalone]


#50900

FromCecil Bayona <cbayona@cbayona.com>
Date2016-09-12 12:02 -0500
Message-ID<nr6n28$rrt$1@dont-email.me>
In reply to#50897
On 9/12/2016 10:10 AM, Mark Wills wrote:
> On Monday, 12 September 2016 15:34:58 UTC+1, Cecil - k5nwa  wrote:
>> On 9/12/2016 4:49 AM, Mark Wills wrote:
>>> On Sunday, 11 September 2016 14:12:40 UTC+1, Alex Dowad  wrote:
>>>> Hello all,
>>>>
>>>> ANS Forth has CREATE, which reads a token from SOURCE and adds a word to the dictionary. But I can't find any word in the standard which takes a string and adds a new word to the dictionary.
>>>>
>>>> This seems to be a failure of orthogonality; CREATE combines the functionality of WORD with that of adding to the dictionary. If those operations were split out from CREATE, that would have provided greater flexibility.
>>>>
>>>> Is there some clever way to get around this, while staying within the standard? Or is it something which can only be done with implementation-specific code?
>>>>
>>>> Thanks, Alex Dowad
>>>
>>> Yes. It would be a nice inclusion in standard Forth.
>>>
>>> My system has HEADER.
>>>
>>> http://turboforth.net/lang_ref/view_word.asp?ID=161
>>>
>>
>> Is the source code to your compiler available? Curious, I want to learn
>> from the implementations of various Forth.
>>
>> --
>> Cecil - k5nwa
>
> Yes, it's available in the zip:
>
> http://turboforth.net/download.html
>
> It's also viewable online: http://turboforth.net/source/
>
Thanks, I downloaded a copy. The TI 99/4A was an interesting machine but 
the did so many things to cripple the machine and make it slow as 
molasses. I wonder if the CPU is available in FPGA form, it should run 
rings around the original machines.

-- 
Cecil - k5nwa

[toc] | [prev] | [next] | [standalone]


#50892

Fromalbert@cherry.spenarnc.xs4all.nl (Albert van der Horst)
Date2016-09-12 14:08 +0200
Message-ID<nr65sq$jjq$1@cherry.spenarnc.xs4all.nl>
In reply to#50849
In article <41b6c38e-a2c5-43f9-965b-78f0afdf6ebe@googlegroups.com>,
Alex Dowad  <alexinbeijing@gmail.com> wrote:
>Hello all,
>
>ANS Forth has CREATE, which reads a token from SOURCE and adds a word to the dictionary. But I can't find any word in the standard which takes a string and adds a new word to the dictionary.
>
>This seems to be a failure of orthogonality; CREATE combines the functionality of WORD with that of adding to the dictionary. If those operations were split out from CREATE, that would have provided greater flexibility.

And then some. CREATE also reserves a place for a DOES> pointer to fill in.
CREATE : (CREATE) plus DOES>-pointer
(CREATE) : HEADER plus linkage

Groetjes Albert

>Thanks, Alex Dowad
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

[toc] | [prev] | [standalone]


Page 5 of 5 — ← Prev page 1 2 3 4 [5]

Back to top | Article view | comp.lang.forth


csiph-web