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


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

structure and interpretation of computer programs exercsie 1.3 in forth

Started bygavino_himself <visploveslisp@gmail.com>
First post2013-01-11 04:22 -0800
Last post2013-01-21 23:40 -0800
Articles 20 on this page of 108 — 25 participants

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


Contents

  structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 04:22 -0800
    Re: structure and interpretation of computer programs exercsie 1.3 in forth Alex McDonald <blog@rivadpm.com> - 2013-01-11 05:47 -0800
      Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-11 06:12 -0800
        Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 06:18 -0800
          Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-11 06:20 -0800
        Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-11 06:19 -0800
          Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 06:38 -0800
            Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-11 06:51 -0800
              Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 07:10 -0800
              Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 07:58 -0800
                Re: structure and interpretation of computer programs exercsie 1.3 in forth rickman <gnuarm@gmail.com> - 2013-01-14 10:01 -0500
        Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 06:25 -0800
          Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 06:28 -0800
          Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-11 06:33 -0800
            Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 06:37 -0800
        Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-11 06:56 -0800
          Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 08:03 -0800
            Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 08:06 -0800
              Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-11 12:27 -0800
                Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-13 17:32 -0800
                  Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-13 23:21 -0800
                    Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-13 23:41 -0800
                      Re: structure and interpretation of computer programs exercsie 1.3 in forth Paul Rubin <no.email@nospam.invalid> - 2013-01-13 23:43 -0800
                        Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-14 00:02 -0800
                          Re: structure and interpretation of computer programs exercsie 1.3 in forth "Elizabeth D. Rather" <erather@forth.com> - 2013-01-14 22:43 +1300
                            Re: structure and interpretation of computer programs exercsie 1.3 in forth Paul Rubin <no.email@nospam.invalid> - 2013-01-14 02:41 -0800
                              Re: structure and interpretation of computer programs exercsie 1.3 in forth Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-01-14 11:13 +0000
                              Re: structure and interpretation of computer programs exercsie 1.3 in forth albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-01-14 11:16 +0000
                                Re: structure and interpretation of computer programs exercsie 1.3 in forth mhx@iae.nl (Marcel Hendrix) - 2013-01-14 21:27 +0200
                            Re: structure and interpretation of computer programs exercsie 1.3 in forth Howerd <howerdo@yahoo.co.uk> - 2013-01-14 03:34 -0800
                            Re: structure and interpretation of computer programs exercsie 1.3  in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-14 12:53 +0000
                              Re: structure and interpretation of computer programs exercsie 1.3  in forth "Elizabeth D. Rather" <erather@forth.com> - 2013-01-17 17:31 +1300
                            Re: structure and interpretation of computer programs exercsie 1.3 in forth Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-01-21 19:35 -0800
                          Re: structure and interpretation of computer programs exercsie 1.3 in forth Paul Rubin <no.email@nospam.invalid> - 2013-01-14 02:55 -0800
                          Re: structure and interpretation of computer programs exercsie 1.3 in forth rickman <gnuarm@gmail.com> - 2013-01-14 10:14 -0500
                          Re: structure and interpretation of computer programs exercsie 1.3 in forth Bernd Paysan <bernd.paysan@gmx.de> - 2013-01-14 20:04 +0100
                            Re: structure and interpretation of computer programs exercsie 1.3 in forth Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-01-21 19:57 -0800
                              Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-21 23:19 -0800
                                Re: structure and interpretation of computer programs exercsie 1.3 in forth Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-01-24 18:58 -0800
                                  Re: structure and interpretation of computer programs exercsie 1.3 in forth Alex McDonald <blog@rivadpm.com> - 2013-01-25 15:46 -0800
                                    Re: structure and interpretation of computer programs exercsie 1.3 in forth Pablo Hugo Reda <pabloreda@gmail.com> - 2013-01-25 19:09 -0800
                                      Re: structure and interpretation of computer programs exercsie 1.3 in forth Alex McDonald <blog@rivadpm.com> - 2013-01-26 01:12 -0800
                                  Re: structure and interpretation of computer programs exercsie 1.3 in forth mhx@iae.nl (Marcel Hendrix) - 2013-01-26 12:58 +0200
                                    Re: structure and interpretation of computer programs exercsie 1.3 in forth Alex McDonald <blog@rivadpm.com> - 2013-01-26 04:42 -0800
                                    Re: structure and interpretation of computer programs exercsie 1.3 in forth albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-01-26 14:35 +0000
                    Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-21 22:38 -0800
              Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-11 12:36 -0800
                Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-13 17:33 -0800
                  Re: structure and interpretation of computer programs exercsie 1.3 in forth "Elizabeth D. Rather" <erather@forth.com> - 2013-01-14 22:46 +1300
                    Re: structure and interpretation of computer programs exercsie 1.3 in forth rickman <gnuarm@gmail.com> - 2013-01-14 10:20 -0500
                      Re: structure and interpretation of computer programs exercsie 1.3 in forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-14 10:41 -0600
                        Re: structure and interpretation of computer programs exercsie 1.3 in forth "Elizabeth D. Rather" <erather@forth.com> - 2013-01-17 17:34 +1300
                        Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-21 22:48 -0800
                    Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-21 22:49 -0800
                      Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-21 23:55 -0800
                  Re: structure and interpretation of computer programs exercsie 1.3 in forth "Ed" <invalid@nospam.com> - 2013-01-18 12:50 +1100
                    Re: structure and interpretation of computer programs exercsie 1.3 in forth Bernd Paysan <bernd.paysan@gmx.de> - 2013-01-18 23:31 +0100
                      Re: structure and interpretation of computer programs exercsie 1.3 in forth "Ed" <invalid@nospam.com> - 2013-01-20 12:42 +1100
                        Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <markrobertwills@yahoo.co.uk> - 2013-01-20 01:24 -0800
                          Re: structure and interpretation of computer programs exercsie 1.3 in forth Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-01-20 15:51 -0800
                          Re: structure and interpretation of computer programs exercsie 1.3 in forth "Elizabeth D. Rather" <erather@forth.com> - 2013-01-21 22:14 +1300
                            Re: structure and interpretation of computer programs exercsie 1.3 in forth Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-01-21 19:14 -0800
                        Re: structure and interpretation of computer programs exercsie 1.3 in forth "A. K." <akk@nospam.org> - 2013-01-20 11:13 +0100
                          Re: structure and interpretation of computer programs exercsie 1.3 in forth Paul Rubin <no.email@nospam.invalid> - 2013-01-20 02:45 -0800
                            Re: structure and interpretation of computer programs exercsie 1.3 in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-21 17:14 +0000
                              Re: structure and interpretation of computer programs exercsie 1.3 in forth Paul Rubin <no.email@nospam.invalid> - 2013-01-23 01:52 -0800
                                Re: structure and interpretation of computer programs exercsie 1.3 in forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-23 04:25 -0600
                                Re: structure and interpretation of computer programs exercsie 1.3 in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-23 15:20 +0000
                                  Re: structure and interpretation of computer programs exercsie 1.3 in forth Paul Rubin <no.email@nospam.invalid> - 2013-01-23 09:29 -0800
                                    Re: structure and interpretation of computer programs exercsie 1.3 in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-23 17:40 +0000
                                      Re: structure and interpretation of computer programs exercsie 1.3 in forth Paul Rubin <no.email@nospam.invalid> - 2013-01-23 22:03 -0800
                                        Re: structure and interpretation of computer programs exercsie 1.3 in forth "Elizabeth D. Rather" <erather@forth.com> - 2013-01-24 22:13 +1300
                                          Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-24 02:57 -0800
                                          Re: structure and interpretation of computer programs exercsie 1.3 in forth Paul Rubin <no.email@nospam.invalid> - 2013-01-26 13:49 -0800
                                            Re: structure and interpretation of computer programs exercsie 1.3 in forth "Elizabeth D. Rather" <erather@forth.com> - 2013-01-26 12:40 -1000
                                              Re: structure and interpretation of computer programs exercsie 1.3 in forth Paul Rubin <no.email@nospam.invalid> - 2013-01-26 23:20 -0800
                                                Re: structure and interpretation of computer programs exercsie 1.3 in forth mhx@iae.nl (Marcel Hendrix) - 2013-01-27 09:52 +0200
                                    Re: structure and interpretation of computer programs exercsie 1.3 in forth "Paul E. Bennett" <Paul_E.Bennett@topmail.co.uk> - 2013-01-23 23:05 +0000
                          Re: structure and interpretation of computer programs exercsie 1.3  in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-21 17:05 +0000
                            Re: structure and interpretation of computer programs exercsie 1.3  in forth "A. K." <akk@nospam.org> - 2013-01-21 19:28 +0100
                              Re: structure and interpretation of computer programs exercsie 1.3   in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-22 17:43 +0000
                              Re: structure and interpretation of computer programs exercsie 1.3 in forth "Paul E. Bennett" <Paul_E.Bennett@topmail.co.uk> - 2013-01-22 19:12 +0000
                        Re: structure and interpretation of computer programs exercsie 1.3 in forth stephenXXX@mpeforth.com (Stephen Pelc) - 2013-01-21 12:13 +0000
                        Re: structure and interpretation of computer programs exercsie 1.3 in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-21 17:28 +0000
                      Re: structure and interpretation of computer programs exercsie 1.3 in forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-22 18:06 +0000
                        Re: structure and interpretation of computer programs exercsie 1.3 in forth Bernd Paysan <bernd.paysan@gmx.de> - 2013-01-22 19:30 +0100
                Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-21 23:06 -0800
                  Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-22 02:20 -0800
                    Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-22 03:36 -0800
                      Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-22 06:51 -0800
                  Re: structure and interpretation of computer programs exercsie 1.3 in forth marko <marko@marko.marko> - 2013-01-24 22:14 +1100
                    Re: structure and interpretation of computer programs exercsie 1.3 in forth the_gavino_himself <visphatesjava@gmail.com> - 2013-01-27 20:39 -0800
                      Re: structure and interpretation of computer programs exercsie 1.3 in forth marko <marko@marko.marko> - 2013-02-01 22:07 +1100
                      Re: structure and interpretation of computer programs exercsie 1.3 in forth marko <marko@marko.marko> - 2013-02-01 22:53 +1100
                        Re: structure and interpretation of computer programs exercsie 1.3 in forth the_gavino_himself <visphatesjava@gmail.com> - 2013-02-08 19:50 -0800
                          Re: structure and interpretation of computer programs exercsie 1.3 in forth Elizabeth D Rather <erather@forth.com> - 2013-02-08 19:22 -1000
        Re: structure and interpretation of computer programs exercsie 1.3 in forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-11 11:44 -0600
          Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-11 12:34 -0800
      Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-11 06:18 -0800
    Re:structure and interpretation of computer programs exercsie 1.3 in forth Hans Bezemer <the.beez.speaks@gmail.com> - 2013-01-14 00:13 +0100
      Re: structure and interpretation of computer programs exercsie 1.3 in forth Doug Hoffman <glidedog@gmail.com> - 2013-01-13 19:12 -0500
        Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-13 18:26 -0800
        Re: structure and interpretation of computer programs exercsie 1.3 in forth Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-01-14 08:29 +0000
          Re: structure and interpretation of computer programs exercsie 1.3 in forth Hans Bezemer <the.beez.speaks@gmail.com> - 2013-01-14 23:52 +0100
      Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-13 18:31 -0800
      Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-13 23:19 -0800
        Re: structure and interpretation of computer programs exercsie 1.3 in forth gavino_himself <visploveslisp@gmail.com> - 2013-01-21 22:46 -0800
          Re: structure and interpretation of computer programs exercsie 1.3 in forth Mark Wills <forthfreak@gmail.com> - 2013-01-21 23:40 -0800

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


#18955

From"Elizabeth D. Rather" <erather@forth.com>
Date2013-01-21 22:14 +1300
Message-ID<SJCdncwhDomMmmDNnZ2dnUVZ_sidnZ2d@supernews.com>
In reply to#18919
On 1/20/13 10:24 PM, Mark Wills wrote:
> On Jan 20, 1:42 am, "Ed" <inva...@nospam.com> wrote:
>>
>> I don't accept every criticism Jeff made about ANS in his public writings
>> (and indeed some of it was far too personal) nevertheless I find myself
>> agreeing that the Forth in Standard Forth is increasingly hard to find.
>
> Well, in fairness to Jeff, they were just essays on his *personal*
> website, reflecting his personal views (some of them controversial,
> and some of them a little hard to back up with material evidence IMHO)
> so why not?
>
>> Take locals - allegedly "optional" in ANS.
>
> Why "allegedly" option. There's no allegedly about it. They're
> optional.

Yes, entirely optional. All of the extension wordsets are optional. Really.

>> Should a Forth Standard expect
>> Forth CPU's to have the resources to efficiently implement foreign notions
>> such as locals because the Standard libraries that you load could well be
>> full of them?
>>
> Of course not. Locals are optional. If the implementer, during the
> implementation of his Forth system wants to implement them, he will
> implement them in code; that the underlying processor may be a Forth
> processor is irrelevant.

Agreed.

>> In his "C-Style Structures in ANS Forth" Jeff bemoans the ease with which
>> ANS programmers can write inefficient code:
>>
>>      "We always seemed to come back to the issue that the ANS Forth
>>      Standard had been designed to facilitate the use of portable libraries
>>      like this, and that they were considered good style by many ANS Forth
>>      programmers..."
>>
>> ANS may not be responsible for poorly written code but they provided the tools
>> and the justification to use them.  I've seen 40-line definitions that would have
>> been impossible to write, were it not for the 12 locals scattered throughout.
>> Had that many regular variables been used, it would almost certainly be
>> regarded as unrepresentative of what Forth could/should be.  But because
>> ANS condones locals, you've now got to have a CPU that will handle them
>> and the libraries which use them, and who can say what is good Forth style.
>> The only sure thing is that ANS Forth is not simple.

Having gone round this discussion with Jeff many times, I can summarize 
by saying that apparently at iTV the following things happened:

* They hired a bunch of Forth novice programmers

* These were presented with various C libraries and told to translate 
them into Forth.

* iTv's "ANS Forth Expert" Skip Carter asserted that ANS Forth was 
designed to support direct translation from C to Forth, and that's the 
approach these newbies were encouraged to take. (Other ANS Forth TC 
members vehemently object to this philosophy)

* The newbie programmers wrote a lot of code that was slow, poorly 
factored, and way too big.

* From Jeff's POV, this was all due to ANS Forth.

> I don't see any reference to poorly written code in the paragraph from
> Jeff that you cite. Regardless, I'm struggling to see the logical leap
> that you have taken in assuming that a Forth processor should support
> local variables at the machine code/assembly code level; because
> that's what we're talking about: assembly code. If your processor is a
> Forth processor then you are coding in assembler. In other words, you
> are coding at a low level. Why should it support locals?

Why, indeed?  SwiftForth supports locals because they're very helpful in 
dealing with Windows calls. SwiftX does not, because they're far less 
helpful in embedded systems. Stephen Pelc has documented major programs 
in which removing locals has improved performance. They have their 
place, which is why ANS Forth includes them, but Forth as a language 
doesn't need or require them.

> Extrapolating your argument further (and apologies if I've got the
> wrong end of the stick) would you argue that complex words such as
> PARSE, EVALUATE, PARSE-WORD etc. should all be supported by the Forth
> processor? I mean, they're all standard words too. What about
> ENVIRONMENT?

The purpose of a Forth processor is to run Forth primitives blazing 
fast. High-level words should benefit.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

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


#18977

FromHugh Aguilar <hughaguilar96@yahoo.com>
Date2013-01-21 19:14 -0800
Message-ID<dac737bf-4991-4aec-b26d-255e5a7e9167@y5g2000pbi.googlegroups.com>
In reply to#18955
On Jan 21, 2:14 am, "Elizabeth D. Rather" <erat...@forth.com> wrote:
> SwiftForth supports locals because they're very helpful in
> dealing with Windows calls.

In SwiftForth v2, (LOCAL) has a bug in it that will crash the system
when it is used. LOCALS| works though, which is why I used LOCALS|
rather than (LOCAL) in myt definition of { --- that is as compared to
Anton's version that uses (LOCAL) and won't work under my copy of
SwiftForth (and I'm not going to spend $300 to get SwiftForth v3).

I have yet to compile my novice package under any ANS-Forth system,
and not discover a slew of bugs. I mean, the bugs are in the compiler,
not in my code which is bug-free. The whole novice-package is full of
work-arounds for bugs in various systems, as well as work-arounds for
the bad design of ANS-Forth itself.

The novice package has been tested on SwiftForth, Gforth, and
Win32Forth. These are all supported. I also tried FICL, but it had so
many problems that I couldn't support it (I told John Sadler about the
problems, but he told me to fix the C code myself and then contribute
the fixes, so I just forgot about FICL).

I haven't tried VFX yet --- I have largely lost interest in ANS-Forth
--- I spend all my time nowadays working on Strate Forth.

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


#18920

From"A. K." <akk@nospam.org>
Date2013-01-20 11:13 +0100
Message-ID<50fbc356$0$6565$9b4e6d93@newsspool4.arcor-online.net>
In reply to#18911
On 20.01.2013 02:42, Ed wrote:
> In his "C-Style Structures in ANS Forth" Jeff bemoans the ease with which
> ANS programmers can write inefficient code:
>
>      "We always seemed to come back to the issue that the ANS Forth
>      Standard had been designed to facilitate the use of portable libraries
>      like this, and that they were considered good style by many ANS Forth
>      programmers..."
>

In my experience Forth code is often less portable than C code. I guess 
it is mostly because of the barebone-ness of Forth, i.e. the lack of 
standard libraries. F.ex. the string wordset in standard Forth is 
rudimentary but nearly unusable for real life applications.

However I never came across any portability metrics, let alone for Forth.

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


#18921

FromPaul Rubin <no.email@nospam.invalid>
Date2013-01-20 02:45 -0800
Message-ID<7x7gn8i13t.fsf@ruckus.brouhaha.com>
In reply to#18920
"A. K." <akk@nospam.org> writes:
> However I never came across any portability metrics, let alone for Forth.

A very old article of Chuck's said it took around a month to port Forth
to a new machine.  I expect it's a lot quicker today because of faster
computers and so on.

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


#18965

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2013-01-21 17:14 +0000
Message-ID<2013Jan21.181417@mips.complang.tuwien.ac.at>
In reply to#18921
Paul Rubin <no.email@nospam.invalid> writes:
>A very old article of Chuck's said it took around a month to port Forth
>to a new machine.  I expect it's a lot quicker today because of faster
>computers and so on.

I wouldn't expect computer speed to be much of an influence in Chuck
Moore's way of porting (and one month seems long to me), but certainly
Gforth builds in a few minutes, and has been built successfully
without human intervention on new machines that we did not test or
build on before.  And for that operation the machine speed does play a
role.

- 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 2012: http://www.euroforth.org/ef12/

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


#19038

FromPaul Rubin <no.email@nospam.invalid>
Date2013-01-23 01:52 -0800
Message-ID<7x622otedn.fsf@ruckus.brouhaha.com>
In reply to#18965
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> I wouldn't expect computer speed to be much of an influence in Chuck
> Moore's way of porting (and one month seems long to me), but certainly
> Gforth builds in a few minutes

I don't think that is measuring the same thing.  I think Chuck's ports
meant sitting down with the processor manual to figure out the
instruction set, writing some kind of boot sequence and toggling it in
through front panel switches, writing an assembler, and bringing up
Forth on the bare metal.  Memory constraints were probably more of an
issue than cpu speed.  Classic Forth implementation techniques use all
kinds of space-saving hacks that are irrelevant for today's development
machines.  They are perhaps still relevant for the occasional cases
wehre you want to run a full Forth on a small embedded cpu.

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


#19040

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2013-01-23 04:25 -0600
Message-ID<tJ-dncWDbavgJ2LNnZ2dnUVZ_tednZ2d@supernews.com>
In reply to#19038
Paul Rubin <no.email@nospam.invalid> wrote:

> Classic Forth implementation techniques use all kinds of
> space-saving hacks that are irrelevant for today's development
> machines.  They are perhaps still relevant for the occasional cases
> wehre you want to run a full Forth on a small embedded cpu.

And we were discussing the Propeller only a few days ago!

Andrew.

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


#19046

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2013-01-23 15:20 +0000
Message-ID<2013Jan23.162039@mips.complang.tuwien.ac.at>
In reply to#19038
Paul Rubin <no.email@nospam.invalid> writes:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>> I wouldn't expect computer speed to be much of an influence in Chuck
>> Moore's way of porting (and one month seems long to me), but certainly
>> Gforth builds in a few minutes
>
>I don't think that is measuring the same thing.

Of course not.

>  I think Chuck's ports
>meant sitting down with the processor manual to figure out the
>instruction set, writing some kind of boot sequence and toggling it in
>through front panel switches, writing an assembler, and bringing up
>Forth on the bare metal.

Or writing an assembler in Forth, and using a cross-compiler to
generate a Forth image for the target machine, transferring that and
using that to load the rest of the Forth system.  In any case, most of
the time is spent understanding the machine and writing code, and
faster computers don't help much with that.

- 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 2012: http://www.euroforth.org/ef12/

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


#19054

FromPaul Rubin <no.email@nospam.invalid>
Date2013-01-23 09:29 -0800
Message-ID<7xwqv3renz.fsf@ruckus.brouhaha.com>
In reply to#19046
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> In any case, most of the time is spent understanding the machine and
> writing code, and faster computers don't help much with that.

But it really does, especially when "bigger" comes along with "faster".
You no longer have to spend so much time on low level programming to
save bits or cycles.  Chuck presumably wouldn't approve, but think of
the availability of garbage collection as a benefit of having more
memory.

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


#19057

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2013-01-23 17:40 +0000
Message-ID<2013Jan23.184037@mips.complang.tuwien.ac.at>
In reply to#19054
Paul Rubin <no.email@nospam.invalid> writes:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>> In any case, most of the time is spent understanding the machine and
>> writing code, and faster computers don't help much with that.
>
>But it really does, especially when "bigger" comes along with "faster".
>You no longer have to spend so much time on low level programming to
>save bits or cycles.  Chuck presumably wouldn't approve

Which means that it does not matter when the question is how long
Chuck takes to port Forth to a new machine, and whether faster/bigger
helps.

If you want a decidedly un-Chuck way, look at the way that Gforth is
ported to a new machine that has a POSIX environment and gcc
available.  It's just "configure; make". There memory and CPU speed
help.

>but think of
>the availability of garbage collection as a benefit of having more
>memory.

What about it?  It would be one more piece of software to port.

- 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 2012: http://www.euroforth.org/ef12/

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


#19068

FromPaul Rubin <no.email@nospam.invalid>
Date2013-01-23 22:03 -0800
Message-ID<7xpq0vw21k.fsf@ruckus.brouhaha.com>
In reply to#19057
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>but think of the availability of garbage collection as a benefit of
>>having more memory.
>
> What about it?  It would be one more piece of software to port.

As we see from jsforth, garbage collection is useful when
writing a Forth interpreter.  jsforth is much smaller (in source code)
and more straightforward than a traditional implementation, and
probably took less development time than writing a traditional
Forth from scratch.

http://forthfreak.net/index.cgi?jsforth

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


#19075

From"Elizabeth D. Rather" <erather@forth.com>
Date2013-01-24 22:13 +1300
Message-ID<hcKdnbLN_Ya7Zp3MnZ2dnUVZ_qudnZ2d@supernews.com>
In reply to#19068
On 1/24/13 7:03 PM, Paul Rubin wrote:
> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>>> but think of the availability of garbage collection as a benefit of
>>> having more memory.
>>
>> What about it?  It would be one more piece of software to port.
>
> As we see from jsforth, garbage collection is useful when
> writing a Forth interpreter.  jsforth is much smaller (in source code)
> and more straightforward than a traditional implementation,

Having looked at it, I can confidently assert that jsforth is 
considerably larger than a standalone Forth, and I'm not sure how you 
measure "straightforward" but this source looks pretty complex to me.

> and
> probably took less development time than writing a traditional
> Forth from scratch.

Which is how long?

> http://forthfreak.net/index.cgi?jsforth
>

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

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


#19078

FromMark Wills <forthfreak@gmail.com>
Date2013-01-24 02:57 -0800
Message-ID<01ad0180-9314-48ce-b0eb-2154ee264ad5@m12g2000yqp.googlegroups.com>
In reply to#19075
On Jan 24, 9:13 am, "Elizabeth D. Rather" <erat...@forth.com> wrote:
> On 1/24/13 7:03 PM, Paul Rubin wrote:
>
> > an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> >>> but think of the availability of garbage collection as a benefit of
> >>> having more memory.
>
> >> What about it?  It would be one more piece of software to port.
>
> > As we see from jsforth, garbage collection is useful when
> > writing a Forth interpreter.  jsforth is much smaller (in source code)
> > and more straightforward than a traditional implementation,
>
> Having looked at it, I can confidently assert that jsforth is
> considerably larger than a standalone Forth, and I'm not sure how you
> measure "straightforward" but this source looks pretty complex to me.
>
> > and
> > probably took less development time than writing a traditional
> > Forth from scratch.
>
> Which is how long?
>
> >http://forthfreak.net/index.cgi?jsforth
>
> Cheers,
> Elizabeth
>
> --
> ==================================================
> Elizabeth D. Rather   (US & Canada)   800-55-FORTH
> FORTH Inc.                         +1 310.999.6784
> 5959 West Century Blvd. Suite 700
> Los Angeles, CA 90045http://www.forth.com
>
> "Forth-based products and Services for real-time
> applications since 1973."
> ==================================================

Knowing what I know now regarding Forth implementation, I'm fairly
confident that if working full-time I could implement my (native)
Forth system in 4 or 5 days on a processor/hardware environment that
is familiar to me. A week tops. I could probably get something
minimally boot-strapped in a single day, though it'd be fairly dumb!

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


#19177

FromPaul Rubin <no.email@nospam.invalid>
Date2013-01-26 13:49 -0800
Message-ID<7x1ud7obre.fsf@ruckus.brouhaha.com>
In reply to#19075
"Elizabeth D. Rather" <erather@forth.com> writes:
> Having looked at it, I can confidently assert that jsforth is
> considerably larger than a standalone Forth, and I'm not sure how you
> measure "straightforward" but this source looks pretty complex to me.

Jsforth is about 4000 SLOC and 150k bytes of source (around 25% of that
is comments), which admittedly is more than I remembered.  eForth is a
bit smaller though I think it doesn't do as much.  Jsforth is
straightforward in the sense that I could read through it and understand
what it was doing.  The ANS Forth standard is in some ways harder to
read.  I remember thinking that examining Jsforth seemed like a good way
to demystify the parts of ANS Forth that I currently don't understand.

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


#19180

From"Elizabeth D. Rather" <erather@forth.com>
Date2013-01-26 12:40 -1000
Message-ID<lJSdncAWJIPBxpnMnZ2dnUVZ_i2dnZ2d@supernews.com>
In reply to#19177
On 1/26/13 11:49 AM, Paul Rubin wrote:
> "Elizabeth D. Rather" <erather@forth.com> writes:
>> Having looked at it, I can confidently assert that jsforth is
>> considerably larger than a standalone Forth, and I'm not sure how you
>> measure "straightforward" but this source looks pretty complex to me.
>
> Jsforth is about 4000 SLOC and 150k bytes of source (around 25% of that
> is comments), which admittedly is more than I remembered.  eForth is a
> bit smaller though I think it doesn't do as much.  Jsforth is
> straightforward in the sense that I could read through it and understand
> what it was doing.  The ANS Forth standard is in some ways harder to
> read.  I remember thinking that examining Jsforth seemed like a good way
> to demystify the parts of ANS Forth that I currently don't understand.
>

It's really hard to compare without knowing exactly the extent of 
capabilities covered (CORE, optional wordsets, utilities, programmer 
aids, etc.), but the standalone Forths I worked with took <3,000 sloc 
for the metacompiler, kernel including device drivers, and most 
utilities and programmer aids (editor, dumps, source management, disk 
utilities, etc.).

Hosted systems, of course, are much bigger because of the cost of 
dealing with the OS.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

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


#19184

FromPaul Rubin <no.email@nospam.invalid>
Date2013-01-26 23:20 -0800
Message-ID<7xbocbhz2s.fsf@ruckus.brouhaha.com>
In reply to#19180
"Elizabeth D. Rather" <erather@forth.com> writes:
> It's really hard to compare without knowing exactly the extent of
> capabilities covered (CORE, optional wordsets, utilities, programmer
> aids, etc.), 

You could give it a try in a browser:

   http://forthfreak.net/jsforth80x25.html

There is some help text at the bottom of the page.

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


#19186

Frommhx@iae.nl (Marcel Hendrix)
Date2013-01-27 09:52 +0200
Message-ID<81839408028434@frunobulax.edu>
In reply to#19184
Paul Rubin <no.email@nospam.invalid> writes Re: structure and interpretation of computer programs exercsie 1.3 in forth

> "Elizabeth D. Rather" <erather@forth.com> writes:
>> It's really hard to compare without knowing exactly the extent of
>> capabilities covered (CORE, optional wordsets, utilities, programmer
>> aids, etc.), 

> You could give it a try in a browser:
>
>   http://forthfreak.net/jsforth80x25.html
>
> There is some help text at the bottom of the page.

It doesn't work with Internet Explorer, and crashes 
after doing "4 load"  and "ls" which are the first suggestions 
in the right pane. The page says it should suck, not that it
can't operate. So far for portable js.

It runs in Firefox, but then it spell checks the text 
in the active window and presents (this is Forth!) a screen 
full of completely inappropriate wiggly red lines.

-1 dump returns 0

0 100 dump says  dump  is not implemented.

The decompiler is good, it even shows the stack signature:
: #s ( d1 -- d2 )
   # 2dup or 0= 0branch-5  ;
Why the 0branch-5 ? Tight for space?

User words can be decompiled, but the stack signature is not shown.
js doesn't warn for redefinitions.

: test 0 0 do -1 i ! loop ; 
Was still busy with it after 5 minutes. There is no break key.
OK, it is realistic :-)

: test 0 0 do -1 i ! loop ; 
Killed. Well, it probably is written partly in itself. Good?

It was enough.

-marcel

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


#19062

From"Paul E. Bennett" <Paul_E.Bennett@topmail.co.uk>
Date2013-01-23 23:05 +0000
Message-ID<amb8q5Fif9nU2@mid.individual.net>
In reply to#19054
Paul Rubin wrote:

> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>> In any case, most of the time is spent understanding the machine and
>> writing code, and faster computers don't help much with that.
> 
> But it really does, especially when "bigger" comes along with "faster".
> You no longer have to spend so much time on low level programming to
> save bits or cycles.  Chuck presumably wouldn't approve, but think of
> the availability of garbage collection as a benefit of having more
> memory.

Try not generating the garbage in the first place. It makes life a whole lot 
easier.

-- 
********************************************************************
Paul E. Bennett...............<email://Paul_E.Bennett@topmail.co.uk>
Forth based HIDECS Consultancy
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-510979
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************

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


#18964 — Re: structure and interpretation of computer programs exercsie 1.3 in forth

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2013-01-21 17:05 +0000
SubjectRe: structure and interpretation of computer programs exercsie 1.3 in forth
Message-ID<2013Jan21.180502@mips.complang.tuwien.ac.at>
In reply to#18920
"A. K." <akk@nospam.org> writes:
>In my experience Forth code is often less portable than C code.

In my experience my Forth code is more portable between architectures
than my C code, at least at the start.  After eliminating the
portability bugs coming from C's type zoo, they are probably similarly
portable.

And the portability of other people's code between architectures is also
good in my experience.

The portability between systems is a different issue, though.  The
idea of portability of some system vendors is to change the source
code of the program when porting to another system.  Actually their
idea is to change the source code when doing any kind of porting, even
when "porting" from one directory to another one on the same machine.
The C guys are a little farther in that respect, at east in practice,
even if not in the standard.

> I guess 
>it is mostly because of the barebone-ness of Forth, i.e. the lack of 
>standard libraries. F.ex. the string wordset in standard Forth is 
>rudimentary but nearly unusable for real life applications.

How does the availability of standard libraries influence portability.
The reverse may however be the case, however: Certain difficulties in
creating portable code may have discouraged people from writing such
code.

- 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 2012: http://www.euroforth.org/ef12/

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


#18970 — Re: structure and interpretation of computer programs exercsie 1.3 in forth

From"A. K." <akk@nospam.org>
Date2013-01-21 19:28 +0100
SubjectRe: structure and interpretation of computer programs exercsie 1.3 in forth
Message-ID<50fd88e1$0$9514$9b4e6d93@newsspool1.arcor-online.net>
In reply to#18964
On 21.01.2013 18:05, Anton Ertl wrote:
> "A. K." <akk@nospam.org> writes:

>> I guess
>> it is mostly because of the barebone-ness of Forth, i.e. the lack of
>> standard libraries. F.ex. the string wordset in standard Forth is
>> rudimentary but nearly unusable for real life applications.
>
> How does the availability of standard libraries influence portability.
> The reverse may however be the case, however: Certain difficulties in
> creating portable code may have discouraged people from writing such
> code.
>

I forgot to tell that I was talking about porting old code that had been 
originally developed by other guys, which are no longer in the company 
or retired. It is quite a different story when you port your own 
software (eg gforth) to a new platform in a one-man-show.

Without some harness (eg halfway complete libraries) everybody reinvents 
even basic wheels, which leads to _very_ individualistic constructs, 
hard to maintain and hard to move.

Even here in c.l.f. (most here seem to be expert oldtimers) the Forth 
code published by one person does most often _not_ run unchanged on the 
favorite Forth of another person.

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


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

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


csiph-web