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


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

High level language for writing Forth

Started byCecil Bayona <cbayona@cbayona.com>
First post2017-04-19 18:32 -0500
Last post2017-05-15 12:05 -0500
Articles 20 on this page of 122 — 21 participants

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


Contents

  High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 18:32 -0500
    Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-20 00:24 +0000
      Re: High level language for writing Forth "Elizabeth D. Rather" <erather@forth.com> - 2017-04-19 14:42 -1000
        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 20:33 -0500
          Re: High level language for writing Forth "Elizabeth D. Rather" <erather@forth.com> - 2017-04-19 16:21 -1000
          Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-19 19:41 -0700
            Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 23:28 -0500
        Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-20 17:02 +0000
          Re: High level language for writing Forth "Elizabeth D. Rather" <erather@forth.com> - 2017-04-20 09:48 -1000
            Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 09:42 +0000
              Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-21 09:07 -0500
                Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-21 17:04 +0100
                  Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-21 11:17 -0500
                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-21 17:36 +0100
                    Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 20:32 +0000
                      Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-21 15:35 -0500
                        Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 20:39 +0000
                      Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-21 22:47 +0100
                  Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 20:29 +0000
                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-21 22:45 +0100
                      Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-22 04:49 +0000
                        Re: High level language for writing Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-22 10:54 +0100
                          Re: High level language for writing Forth Mark Wills <markwills1970@gmail.com> - 2017-04-22 03:04 -0700
                            Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-22 05:12 -0500
                              Re: High level language for writing Forth lehs <skydda.barnen@gmail.com> - 2017-04-22 04:30 -0700
                                Re: High level language for writing Forth Mark Wills <markwills1970@gmail.com> - 2017-04-22 05:00 -0700
                                  Re: High level language for writing Forth lehs <skydda.barnen@gmail.com> - 2017-04-22 05:40 -0700
                                    Re: High level language for writing [unum] Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-22 16:51 +0100
                                      Re: High level language for writing [unum] Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-22 13:36 -0700
                                        Re: High level language for writing [unum] Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-22 22:59 +0100
                                          Re: High level language for writing [unum] Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-22 18:43 -0700
                                            Re: High level language for writing [unum] Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-23 09:33 +0100
                                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 11:23 -0500
                              Re: High level language for writing Forth Mark Wills <markwills1970@gmail.com> - 2017-04-22 04:59 -0700
                          Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-29 03:05 +0000
                            Re: High level language for writing Forth Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-04-29 09:35 +0100
                        Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-22 12:56 +0100
                          Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-29 03:08 +0000
                            Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-29 09:46 +0100
                              Re: High level language for writing Forth lehs <skydda.barnen@gmail.com> - 2017-04-29 02:45 -0700
                                Re: High level language for writing Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-29 13:44 +0000
                                  Re: High level language for writing Forth lehs <skydda.barnen@gmail.com> - 2017-04-29 07:00 -0700
                                  Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-29 07:31 -0700
                                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-29 16:38 +0100
                            Re: High level language for writing Forth Joel Rees <joel.rees@gmail.com> - 2017-04-29 04:10 -0700
                              Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-29 11:35 +0000
                                Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-29 16:33 +0100
                                  Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-05-05 15:24 +0000
                                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-05-05 20:16 +0100
                                      Re: High level language for writing Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-05 22:06 +0200
                                        Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-05-05 21:45 +0100
                                          Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-05-05 21:54 +0100
                                      Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-05-06 10:06 +0000
                                        Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-05-06 13:09 +0100
                                      Re: High level language for writing Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-06 11:04 +0000
                Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 20:28 +0000
                  Re: High level language for writing Forth "Elizabeth D. Rather" <erather@forth.com> - 2017-04-21 12:27 -1000
                    Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-22 04:55 +0000
                  Re: High level language for writing Forth Coos Haak <htrofhc@gmail.com> - 2017-04-22 02:01 +0200
                    Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-22 04:58 +0000
                      Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-21 23:41 -0700
                        Re: High level language for writing Forth Coos Haak <htrofhc@gmail.com> - 2017-04-22 22:15 +0200
                          Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-05-06 13:28 +0000
                      Re: High level language for writing Forth Joel Rees <joel.rees@gmail.com> - 2017-04-27 02:51 -0700
                        Re: High level language for writing Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2017-04-27 12:09 +0200
                          Re: High level language for writing Forth Joel Rees <joel.rees@gmail.com> - 2017-04-29 02:48 -0700
                        Re: High level language for writing Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-29 03:09 +0000
      Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 20:11 -0500
    Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-19 19:34 -0700
      Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-19 23:22 -0500
        Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-19 21:35 -0700
          Re: High level language for writing Forth Melzzzzz <Melzzzzz@zzzzz.com> - 2017-04-20 05:12 +0000
          Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-20 01:15 -0500
            Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-19 23:25 -0700
            Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-21 23:12 -0500
              Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-21 21:53 -0700
                Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 00:42 -0500
                  Re: High level language for writing Forth Paul Rubin <no.email@nospam.invalid> - 2017-04-21 23:44 -0700
                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 03:08 -0500
                  Re: High level language for writing Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-22 04:39 -0500
                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-22 12:37 +0100
                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 11:33 -0500
                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 14:10 -0500
                  Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-22 15:01 -0700
                    Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-22 23:38 +0100
                      Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-22 16:30 -0700
                        Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-22 18:01 -0700
                        Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-23 09:25 +0100
                          Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-23 06:32 -0700
                            Re: High level language for writing Forth Julian Fondren <julian.fondren@gmail.com> - 2017-04-23 07:36 -0700
                            Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-24 14:32 +0100
                    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 18:19 -0500
                      Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-04-22 18:05 -0700
                        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 21:51 -0500
                    Re: High level language for writing Forth Ron Aaron <rambamist@gmail.com> - 2017-04-23 06:54 +0300
                      Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-23 09:16 +0100
                        Re: High level language for writing Forth Ron Aaron <rambamist@gmail.com> - 2017-04-23 18:41 +0300
                          Re: High level language for writing Forth Alex <alex@rivadpm.com> - 2017-04-24 14:35 +0100
                      Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-23 06:15 -0700
                Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-22 08:04 -0700
                  Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-22 11:44 -0500
                    Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-22 12:16 -0700
                Re: High level language for writing Forth Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2017-04-22 22:52 -0400
        Re: High level language for writing Forth Ron Aaron <rambamist@gmail.com> - 2017-04-20 07:49 +0300
      Re: High level language for writing Forth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-20 19:47 +0200
        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-20 15:19 -0500
    Re: High level language for writing Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2017-04-20 08:06 +0200
    Re: High level language for writing Forth Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-04-20 04:35 -0700
    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-04-25 17:03 -0500
      Re: High level language for writing Forth minforth@arcor.de - 2017-04-26 01:58 -0700
    Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-13 17:36 -0500
      Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-05-13 18:37 -0700
        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-13 20:52 -0500
          Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-05-13 19:25 -0700
            Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-05-15 12:44 -0700
              Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-15 17:27 -0500
                Re: High level language for writing Forth hughaguilar96@gmail.com - 2017-05-15 19:43 -0700
                  Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-15 23:55 -0500
                    Re: High level language for writing Forth Mark Wills <markwills1970@gmail.com> - 2017-05-16 01:59 -0700
                  Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-15 23:58 -0500
      Re: High level language for writing Forth Joel Rees <joel.rees@gmail.com> - 2017-05-15 07:00 -0700
        Re: High level language for writing Forth Cecil Bayona <cbayona@cbayona.com> - 2017-05-15 12:05 -0500

Page 1 of 7  [1] 2 3 4 5 6 7  Next page →


#57613 — High level language for writing Forth

FromCecil Bayona <cbayona@cbayona.com>
Date2017-04-19 18:32 -0500
SubjectHigh level language for writing Forth
Message-ID<od8rt0$k9b$1@dont-email.me>
I been working on a project using C to create a small Forth VM similar 
to eForth, I have been making progress and soon it will be time to use 
that Forth VM as the core of a complete Forth system. Since the core 
it's written in C and the rest in Forth it should be easy to transport 
to various CPUs.

As a side project I bought some books on Go a system programming 
language and have it setup on my development PC, so I was thinking that 
once the Forth VM in C is tested and working to rewrite the whole thing 
in Go as a Go learning exercise.

I was going to write the whole thing in C++ and even bought a few books 
on C++, about $150 worth but then I rediscovered why I disliked C++ in 
the first place so many years ago so that proved a waste of money. That 
is why I started looking at Go so I could have a more modern language to 
use in writing system software, it has limited Object programming but 
unlike C++ which I dislike.

Go is not available for embedded processors other that ARM but it don't 
see that as a major problem, it is available for all the major OSes like 
Windows. OS X, and a multitude of Linux and other similar OSes like BSD.

  I want to learn Go for other uses so the possibility to use something 
else besides Go to write this software such as Forth compilers is a 
possibility. Other options are enhanced Forth like languages such as 
8th, or oForth. Since Go is somewhat similar to C it's not a stretch to 
rewrite working C code in it.

So, does anyone in the group have experience with Go in writing a Forth 
compiler or other major software or know of links to someone else's work 
on using Go in writing compilers?

Thanks in advance.

-- 
Cecil - k5nwa

[toc] | [next] | [standalone]


#57617

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-20 00:24 +0000
Message-ID<xn0koxy4u878k48008@nntp.aioe.org>
In reply to#57613
Cecil Bayona wrote:

> So, does anyone in the group have experience with Go in writing a
> Forth compiler or other major software or know of links to someone
> else's work on using Go in writing compilers?
> 
> Thanks in advance.

I assume that most Forths are either built with a core of assembler and
the rest in Forth itself, or with a core of C and the rest in Forth
itself. Those with an assembler core might even use Forth to assemble
that core.

But there is no reason that it could not be built in Golang, or Python
or Javascript (ECMAScript), or whatever.

-- 
Rudy Velthuis        http://www.rvelthuis.de

Wilcox's Law: A pat on the back is only a few centimeters from a 
kick in the pants.

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


#57619

From"Elizabeth D. Rather" <erather@forth.com>
Date2017-04-19 14:42 -1000
Message-ID<WoudnXZ88498nmXFnZ2dnUU7-KXNnZ2d@supernews.com>
In reply to#57617
On 4/19/17 2:24 PM, Rudy Velthuis wrote:
> Cecil Bayona wrote:
>
>> So, does anyone in the group have experience with Go in writing a
>> Forth compiler or other major software or know of links to someone
>> else's work on using Go in writing compilers?
>>
>> Thanks in advance.
>
> I assume that most Forths are either built with a core of assembler and
> the rest in Forth itself, or with a core of C and the rest in Forth
> itself. Those with an assembler core might even use Forth to assemble
> that core.

Since its founding in 1973, FORTH, Inc. has only had Forths written in 
Forth (that is, with an assembler for the target processor written in 
Forth and used to construct primitives). When writing the assembler for 
a new target processor, we can optimize the use of registers and other 
resources, a freedom you don't get using another high-level language, so 
the result is a great deal more efficient.

> But there is no reason that it could not be built in Golang, or Python
> or Javascript (ECMAScript), or whatever.

Yes, but there are a lot of Forth features that are actually easier to 
program in assembler than in other HLLs. We often see here people 
posting tortuous C versions of things that take only two or three 
instructions. And the results are always a lot slower.

Cheers,
Elizabeth

-- 
Elizabeth D. Rather
FORTH, Inc.
6080 Center Drive, Suite 600
Los Angeles, CA  90045
USA

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


#57621

FromCecil Bayona <cbayona@cbayona.com>
Date2017-04-19 20:33 -0500
Message-ID<od92us$tpt$1@dont-email.me>
In reply to#57619
On 4/19/2017 7:42 PM, Elizabeth D. Rather wrote:
> On 4/19/17 2:24 PM, Rudy Velthuis wrote:
>> Cecil Bayona wrote:
>>
>>> So, does anyone in the group have experience with Go in writing a
>>> Forth compiler or other major software or know of links to someone
>>> else's work on using Go in writing compilers?
>>>
>>> Thanks in advance.
>>
>> I assume that most Forths are either built with a core of assembler and
>> the rest in Forth itself, or with a core of C and the rest in Forth
>> itself. Those with an assembler core might even use Forth to assemble
>> that core.
> 
> Since its founding in 1973, FORTH, Inc. has only had Forths written in 
> Forth (that is, with an assembler for the target processor written in 
> Forth and used to construct primitives). When writing the assembler for 
> a new target processor, we can optimize the use of registers and other 
> resources, a freedom you don't get using another high-level language, so 
> the result is a great deal more efficient.
> 
>> But there is no reason that it could not be built in Golang, or Python
>> or Javascript (ECMAScript), or whatever.
> 
> Yes, but there are a lot of Forth features that are actually easier to 
> program in assembler than in other HLLs. We often see here people 
> posting tortuous C versions of things that take only two or three 
> instructions. And the results are always a lot slower.
> 
> Cheers,
> Elizabeth
> 
There are a couple of reasons for this exercise, one would be to create 
an easily portable Forth that could easily be moved to other CPUs, that 
rules out Assembler.

Only the Forth VM is written is C or Go or something else, the bulk 
would be written in Forth itself to also make it easy to move to another 
CPU. A third reason is to end up with a system that is simple to 
understand, I own copies of both SwiftForth and MPE professional 
compilers and they are horribly complicated, a lot more so when compared 
to software like eForth, I want to keep the whole thing simple like eForth.

The whole thing will not be as efficient as I would like but I like to 
play a lot with FPGAs and with a CPU of my own creation there would be 
basically no tools available so the software I use to deal with custom 
CPUs would need to be basically simple to change. This is the driving 
force behind this project.

Forth would be a choice way up on the list of possibilities as writing 
an assembler is pretty easy in Forth and so would a lot of other 
features. It would need to be a Forth that generates stand alone code, 
but there are plenty of those.

The main reason to try Go would be to become more familiar with the 
language, it also has a lot of features frowned up by the Forth 
community so there are few decent libraries available like there would 
be for Go.

-- 
Cecil - k5nwa

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


#57622

From"Elizabeth D. Rather" <erather@forth.com>
Date2017-04-19 16:21 -1000
Message-ID<zbqdnTHRu-SMhmXFnZ2dnUU7-LvNnZ2d@supernews.com>
In reply to#57621
On 4/19/17 3:33 PM, Cecil Bayona wrote:
> On 4/19/2017 7:42 PM, Elizabeth D. Rather wrote:
>> On 4/19/17 2:24 PM, Rudy Velthuis wrote:
>>> Cecil Bayona wrote:
>>>
>>>> So, does anyone in the group have experience with Go in writing a
>>>> Forth compiler or other major software or know of links to someone
>>>> else's work on using Go in writing compilers?
>>>>
>>>> Thanks in advance.
>>>
>>> I assume that most Forths are either built with a core of assembler and
>>> the rest in Forth itself, or with a core of C and the rest in Forth
>>> itself. Those with an assembler core might even use Forth to assemble
>>> that core.
>>
>> Since its founding in 1973, FORTH, Inc. has only had Forths written in
>> Forth (that is, with an assembler for the target processor written in
>> Forth and used to construct primitives). When writing the assembler
>> for a new target processor, we can optimize the use of registers and
>> other resources, a freedom you don't get using another high-level
>> language, so the result is a great deal more efficient.
>>
>>> But there is no reason that it could not be built in Golang, or Python
>>> or Javascript (ECMAScript), or whatever.
>>
>> Yes, but there are a lot of Forth features that are actually easier to
>> program in assembler than in other HLLs. We often see here people
>> posting tortuous C versions of things that take only two or three
>> instructions. And the results are always a lot slower.
>>
>> Cheers,
>> Elizabeth
>>
> There are a couple of reasons for this exercise, one would be to create
> an easily portable Forth that could easily be moved to other CPUs, that
> rules out Assembler.
>
> Only the Forth VM is written is C or Go or something else, the bulk
> would be written in Forth itself to also make it easy to move to another
> CPU. A third reason is to end up with a system that is simple to
> understand, I own copies of both SwiftForth and MPE professional
> compilers and they are horribly complicated, a lot more so when compared
> to software like eForth, I want to keep the whole thing simple like eForth.

The think is, only a very small number of words need to be written in 
Assembler. Most of the VM is high-level Forth. We are supporting SwiftX 
for a dozen or so different target processors, and only a few files are 
customized to the specific target. Others who have supported C-based 
Forths have told me that their portability is hampered by the 
differences between C compilers, so there's no magic bullet here.

Yes, I know SwiftForth is horrendously complicated, but that is 
overwhelmingly due to the complexities of dealing with Windows. 
polyFORTH had a lot of libraries and add-ons, but its VM was extremely 
simple, and we ported it to a number of processors.

> The whole thing will not be as efficient as I would like but I like to
> play a lot with FPGAs and with a CPU of my own creation there would be
> basically no tools available so the software I use to deal with custom
> CPUs would need to be basically simple to change. This is the driving
> force behind this project.

Yes, I agree that keeping the CPU-dependent software to a minimum is the 
way to go. We just achieve that by following a different path.

Cheers,
Elizabeth

-- 
Elizabeth D. Rather
FORTH, Inc.
6080 Center Drive, Suite 600
Los Angeles, CA  90045
USA

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


#57626

FromPaul Rubin <no.email@nospam.invalid>
Date2017-04-19 19:41 -0700
Message-ID<87a87ber7e.fsf@nightsong.com>
In reply to#57621
Cecil Bayona <cbayona@cbayona.com> writes:
> Only the Forth VM is written is C or Go or something else, the bulk
> would be written in Forth itself to also make it easy to move to
> another CPU. 

You might look at Retroforth: http://retroforth.org/docs/
It's written in about the way you describe.

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


#57629

FromCecil Bayona <cbayona@cbayona.com>
Date2017-04-19 23:28 -0500
Message-ID<od9d7d$lqa$1@dont-email.me>
In reply to#57626
On 4/19/2017 9:41 PM, Paul Rubin wrote:
> Cecil Bayona <cbayona@cbayona.com> writes:
>> Only the Forth VM is written is C or Go or something else, the bulk
>> would be written in Forth itself to also make it easy to move to
>> another CPU.
> 
> You might look at Retroforth: http://retroforth.org/docs/
> It's written in about the way you describe.
> 
I have looked at RetroForth in the past with it's NGaro Virtual machine 
but it was kind of complex to setup the tools and work with it. I'm 
trying to simplify the whole process and use tools that are simple to setup.

-- 
Cecil - k5nwa

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


#57644

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-20 17:02 +0000
Message-ID<xn0koyogr8gp1n6000@nntp.aioe.org>
In reply to#57619
Elizabeth D. Rather wrote:

> > I assume that most Forths are either built with a core of assembler
> > and the rest in Forth itself, or with a core of C and the rest in
> > Forth itself. Those with an assembler core might even use Forth to
> > assemble that core.
> 
> Since its founding in 1973, FORTH, Inc. has only had Forths written
> in Forth (that is, with an assembler for the target processor written
> in Forth and used to construct primitives).

So an assembler core and the rest in Forth. 

-- 
Rudy Velthuis        http://www.rvelthuis.de

"There are people in the world so hungry, that God cannot appear 
 to them except in the form of bread."
 -- Mahatma Gandhi (1869-1948)

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


#57665

From"Elizabeth D. Rather" <erather@forth.com>
Date2017-04-20 09:48 -1000
Message-ID<OomdndE3obkcjWTFnZ2dnUU7-K3NnZ2d@supernews.com>
In reply to#57644
On 4/20/17 7:02 AM, Rudy Velthuis wrote:
> Elizabeth D. Rather wrote:
>
>>> I assume that most Forths are either built with a core of assembler
>>> and the rest in Forth itself, or with a core of C and the rest in
>>> Forth itself. Those with an assembler core might even use Forth to
>>> assemble that core.
>>
>> Since its founding in 1973, FORTH, Inc. has only had Forths written
>> in Forth (that is, with an assembler for the target processor written
>> in Forth and used to construct primitives).
>
> So an assembler core and the rest in Forth.

It's not organized that way. There are a couple of files of assembler 
primitives (using the Forth assembler) and a lot more files of 
high-level Forth words using them. Most of the core is high level. It's 
really all Forth, including some Forth words that assemble machine 
instructions.

Cheers,
Elizabeth

-- 
Elizabeth D. Rather
FORTH, Inc.
6080 Center Drive, Suite 600
Los Angeles, CA  90045
USA

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


#57704

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-21 09:42 +0000
Message-ID<xn0kozrdf1kyvl002@nntp.aioe.org>
In reply to#57665
Elizabeth D. Rather wrote:

> On 4/20/17 7:02 AM, Rudy Velthuis wrote:
> > Elizabeth D. Rather wrote:
> > 
> > > > I assume that most Forths are either built with a core of
> > > > assembler and the rest in Forth itself, or with a core of C and
> > > > the rest in Forth itself. Those with an assembler core might
> > > > even use Forth to assemble that core.
> > > 
> > > Since its founding in 1973, FORTH, Inc. has only had Forths
> > > written in Forth (that is, with an assembler for the target
> > > processor written in Forth and used to construct primitives).
> > 
> > So an assembler core and the rest in Forth.
> 
> It's not organized that way. There are a couple of files of assembler
> primitives (using the Forth assembler) and a lot more files of
> high-level Forth words using them. Most of the core is high level.

But it is still an assembler core with the rest in Forth. What you
consider "core" may be different. Fact is that there is "a core" of
assembler words on which the rest builds.

-- 
Rudy Velthuis        http://www.rvelthuis.de

"I feel so miserable without you; it's almost like having 
 you here." -- Stephen Bishop

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


#57719

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2017-04-21 09:07 -0500
Message-ID<T9SdnTyfk9Kgj2fFnZ2dnUU7-IednZ2d@supernews.com>
In reply to#57704
Rudy Velthuis <newsgroups@rvelthuis.de> wrote:
> Elizabeth D. Rather wrote:
> 
>> On 4/20/17 7:02 AM, Rudy Velthuis wrote:
>> > 
>> > So an assembler core and the rest in Forth.
>> 
>> It's not organized that way. There are a couple of files of assembler
>> primitives (using the Forth assembler) and a lot more files of
>> high-level Forth words using them. Most of the core is high level.
> 
> But it is still an assembler core with the rest in Forth. What you
> consider "core" may be different. Fact is that there is "a core" of
> assembler words on which the rest builds.

It's never felt that way to me.  Code written in Forth's assembler is
still Forth: it's low-level Forth, or something.  Forth's assembly
language, with its integration with the high-level language and macros
etc isn't plain old assembly.  So I think it's fair to say "It's all
Forth", just as a C compiler written in C bootstraps itself.

Andrew.

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


#57723

FromAlex <alex@rivadpm.com>
Date2017-04-21 17:04 +0100
Message-ID<oddabo$itc$1@dont-email.me>
In reply to#57719
On 4/21/2017 15:07, Andrew Haley wrote:
> Rudy Velthuis <newsgroups@rvelthuis.de> wrote:
>> Elizabeth D. Rather wrote:
>>
>>> On 4/20/17 7:02 AM, Rudy Velthuis wrote:
>>>>
>>>> So an assembler core and the rest in Forth.
>>>
>>> It's not organized that way. There are a couple of files of assembler
>>> primitives (using the Forth assembler) and a lot more files of
>>> high-level Forth words using them. Most of the core is high level.
>>
>> But it is still an assembler core with the rest in Forth. What you
>> consider "core" may be different. Fact is that there is "a core" of
>> assembler words on which the rest builds.
> 
> It's never felt that way to me.  Code written in Forth's assembler is
> still Forth: it's low-level Forth, or something.  Forth's assembly
> language, with its integration with the high-level language and macros
> etc isn't plain old assembly.  So I think it's fair to say "It's all
> Forth", just as a C compiler written in C bootstraps itself.
> 
> Andrew.
> 

Especially when you can write code like this.

code dup3+
    ] dup [
    add eax 3
    next;  ok
10 dup3+ .s [2] 10 13  ok[2]

-- 
Alex

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


#57724

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2017-04-21 11:17 -0500
Message-ID<m-ydnY8_yPocrWfFnZ2dnUU7-IednZ2d@supernews.com>
In reply to#57723
Alex <alex@rivadpm.com> wrote:
> On 4/21/2017 15:07, Andrew Haley wrote:
>> 
>> Code written in Forth's assembler is
>> still Forth: it's low-level Forth, or something.  Forth's assembly
>> language, with its integration with the high-level language and macros
>> etc isn't plain old assembly.  So I think it's fair to say "It's all
>> Forth", just as a C compiler written in C bootstraps itself.
> 
> Especially when you can write code like this.
> 
> code dup3+
>    ] dup [
>    add eax 3
>    next;  ok
> 10 dup3+ .s [2] 10 13  ok[2]

Yeah, exactly!  It's even portable!

SwiftForth i386-Linux 3.6.4 21-Mar-2017 
code dup3+  ok
] dup [   3 # ebx add   ret   end-code  ok
10 dup3+ .s 
10 13 <-Top  ok

What's not to like?  ;-)

Andrew.

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


#57725

FromAlex <alex@rivadpm.com>
Date2017-04-21 17:36 +0100
Message-ID<oddc98$pft$1@dont-email.me>
In reply to#57724
On 4/21/2017 17:17, Andrew Haley wrote:

> 
> Yeah, exactly!  It's even portable!
> 

It's the principle that's portable. If you don't like them, I have 
others. :)

-- 
Alex

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


#57746

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-21 20:32 +0000
Message-ID<xn0kp08ie8nhuee006@nntp.aioe.org>
In reply to#57724
Andrew Haley wrote:

> Alex <alex@rivadpm.com> wrote:
> > On 4/21/2017 15:07, Andrew Haley wrote:
> >> 
> >> Code written in Forth's assembler is
> >> still Forth: it's low-level Forth, or something.  Forth's assembly
> >> language, with its integration with the high-level language and
> macros >> etc isn't plain old assembly.  So I think it's fair to say
> "It's all >> Forth", just as a C compiler written in C bootstraps
> itself.
> > 
> > Especially when you can write code like this.
> > 
> > code dup3+
> >    ] dup [
> >    add eax 3
> >    next;  ok
> > 10 dup3+ .s [2] 10 13  ok[2]
> 
> Yeah, exactly!  It's even portable!

Not really. It is only portable to other 32 bit x-86 systems, and it
stops being portable as soon as you must use system calls (or APIs),
e.g. to manipulate files, directories, to do graphics, etc., which is
inevitable at some point in time.

-- 
Rudy Velthuis        http://www.rvelthuis.de

"If a scholar aspires to the Way but is ashamed of bad clothes
 and bad food, he isn't ready to join the discussion yet."
 -- Confucius

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


#57747

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2017-04-21 15:35 -0500
Message-ID<4eudnQMKo4mK8GfFnZ2dnUU7-N2dnZ2d@supernews.com>
In reply to#57746
Rudy Velthuis <newsgroups@rvelthuis.de> wrote:
> Andrew Haley wrote:
> 
>> Alex <alex@rivadpm.com> wrote:
>> > On 4/21/2017 15:07, Andrew Haley wrote:
>> >> 
>> >> Code written in Forth's assembler is
>> >> still Forth: it's low-level Forth, or something.  Forth's assembly
>> >> language, with its integration with the high-level language and
>> macros >> etc isn't plain old assembly.  So I think it's fair to say
>> "It's all >> Forth", just as a C compiler written in C bootstraps
>> itself.
>> > 
>> > Especially when you can write code like this.
>> > 
>> > code dup3+
>> >    ] dup [
>> >    add eax 3
>> >    next;  ok
>> > 10 dup3+ .s [2] 10 13  ok[2]
>> 
>> Yeah, exactly!  It's even portable!
> 
> Not really. It is only portable to other 32 bit x-86 systems, and it
> stops being portable as soon as you must use system calls (or APIs),
> e.g. to manipulate files, directories, to do graphics, etc., which is
> inevitable at some point in time.

You have had your sense of humour amputated.

Andrew.

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


#57748

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-21 20:39 +0000
Message-ID<xn0kp08od8nqgy1008@nntp.aioe.org>
In reply to#57747
Andrew Haley wrote:

> Rudy Velthuis <newsgroups@rvelthuis.de> wrote:
> > Andrew Haley wrote:
> > 
> >> Alex <alex@rivadpm.com> wrote:
> >> > On 4/21/2017 15:07, Andrew Haley wrote:
> >> >> 
> >> >> Code written in Forth's assembler is
> >> >> still Forth: it's low-level Forth, or something.  Forth's
> assembly >> >> language, with its integration with the high-level
> language and >> macros >> etc isn't plain old assembly.  So I think
> it's fair to say >> "It's all >> Forth", just as a C compiler written
> in C bootstraps >> itself.
> >> > 
> >> > Especially when you can write code like this.
> >> > 
> >> > code dup3+
> >> >    ] dup [
> >> >    add eax 3
> >> >    next;  ok
> >> > 10 dup3+ .s [2] 10 13  ok[2]
> >> 
> >> Yeah, exactly!  It's even portable!
> > 
> > Not really. It is only portable to other 32 bit x-86 systems, and it
> > stops being portable as soon as you must use system calls (or APIs),
> > e.g. to manipulate files, directories, to do graphics, etc., which
> > is inevitable at some point in time.
> 
> You have had your sense of humour amputated.

I sometimes put it aside, e.g. when I am being serious. 

This was humour, really? Oh, OK: Ha! Ha! Ha!

-- 
Rudy Velthuis        http://www.rvelthuis.de

"To love oneself is the beginning of a lifelong romance"
 -- Oscar Wilde (1854-1900)

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


#57752

FromAlex <alex@rivadpm.com>
Date2017-04-21 22:47 +0100
Message-ID<odduet$p6h$2@dont-email.me>
In reply to#57746
On 4/21/2017 21:32, Rudy Velthuis wrote:
> Andrew Haley wrote:

>>
>> Yeah, exactly!  It's even portable!
> 
> Not really. It is only portable to other 32 bit x-86 systems, and it
> stops being portable as soon as you must use system calls (or APIs),
> e.g. to manipulate files, directories, to do graphics, etc., which is
> inevitable at some point in time.
> 

Andrew majored in sarcasm.

-- 
Alex

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


#57745

From"Rudy Velthuis" <newsgroups@rvelthuis.de>
Date2017-04-21 20:29 +0000
Message-ID<xn0kp08g08neb0u005@nntp.aioe.org>
In reply to#57723
Alex wrote:

> On 4/21/2017 15:07, Andrew Haley wrote:
> >Rudy Velthuis <newsgroups@rvelthuis.de> wrote:
> > > Elizabeth D. Rather wrote:
> > > 
> > > > On 4/20/17 7:02 AM, Rudy Velthuis wrote:
> > > > > 
> > > > > So an assembler core and the rest in Forth.
> > > > 
> > > > It's not organized that way. There are a couple of files of
> > > > assembler primitives (using the Forth assembler) and a lot more
> > > > files of high-level Forth words using them. Most of the core is
> > > > high level.
> > > 
> > > But it is still an assembler core with the rest in Forth. What you
> > > consider "core" may be different. Fact is that there is "a core"
> > > of assembler words on which the rest builds.
> > 
> > It's never felt that way to me.  Code written in Forth's assembler
> > is still Forth: it's low-level Forth, or something.  Forth's
> > assembly language, with its integration with the high-level
> > language and macros etc isn't plain old assembly.  So I think it's
> > fair to say "It's all Forth", just as a C compiler written in C
> > bootstraps itself.
> > 
> > Andrew.
> > 
> 
> Especially when you can write code like this.
> 
> code dup3+
>    ] dup [
>    add eax 3
>    next;  ok
> 10 dup3+ .s [2] 10 13  ok[2]

So you can inline the assembly. That's fine. It is still (x-86, in this
case) assembly. <shrug>

-- 
Rudy Velthuis        http://www.rvelthuis.de

Hind's Law of Computer Programming:

   1. Any given program, when running, is obsolete.
   2. If a program is useful, it will have to be changed.
   3. If a program is useless, it will have to be documented.
   4. Any given program will expand to fill all available memory.
   5. The value of a program is proportional to the weight of its 
      output.
   6. Program complexity grows until it exceeds the capability of
      the programmer who must maintain it.
   7. Make it possible for programmers to write programs in
      English, and you will find that programmers cannot write in
      English.

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


#57751

FromAlex <alex@rivadpm.com>
Date2017-04-21 22:45 +0100
Message-ID<odduck$p6h$1@dont-email.me>
In reply to#57745
On 4/21/2017 21:29, Rudy Velthuis wrote:
> Alex wrote:
> 
>> On 4/21/2017 15:07, Andrew Haley wrote:
>>> Rudy Velthuis <newsgroups@rvelthuis.de> wrote:
>>>> Elizabeth D. Rather wrote:
>>>>
>>>>> On 4/20/17 7:02 AM, Rudy Velthuis wrote:
>>>>>>
>>>>>> So an assembler core and the rest in Forth.
>>>>>
>>>>> It's not organized that way. There are a couple of files of
>>>>> assembler primitives (using the Forth assembler) and a lot more
>>>>> files of high-level Forth words using them. Most of the core is
>>>>> high level.
>>>>
>>>> But it is still an assembler core with the rest in Forth. What you
>>>> consider "core" may be different. Fact is that there is "a core"
>>>> of assembler words on which the rest builds.
>>>
>>> It's never felt that way to me.  Code written in Forth's assembler
>>> is still Forth: it's low-level Forth, or something.  Forth's
>>> assembly language, with its integration with the high-level
>>> language and macros etc isn't plain old assembly.  So I think it's
>>> fair to say "It's all Forth", just as a C compiler written in C
>>> bootstraps itself.
>>>
>>> Andrew.
>>>
>>
>> Especially when you can write code like this.
>>
>> code dup3+
>>     ] dup [
>>     add eax 3
>>     next;  ok
>> 10 dup3+ .s [2] 10 13  ok[2]
> 
> So you can inline the assembly. That's fine. It is still (x-86, in this
> case) assembly. <shrug>
> 

It's the other way round. The assembler is inlining Forth.

Actually, it's all Forth. Or assembler. Or even Forth assembler with 
Forth. Who knows?

also assembler
code adup3+ ] dup [ add eax 3 next;
: bdup3+ dup [ add eax 3 ] ;
: cdup3+ dup 3 + ;

code adup3+ ( ? -- ? )
\ adup3+ is defined in c:/w32f/v608/test1.fs at line 3
\ call compiled
\ code=$41BEDB len=9 type=129
( $0 )    mov     dword { $-4 ebp } eax             \ 8945FC
( $3 )    sub     ebp $4                            \ 83ED04
( $6 )    add     eax $3                            \ 83C003
( $9 )    ret                                       \ C3 ( end )
: bdup3+ ( ? -- ? )
\ bdup3+ is defined in c:/w32f/v608/test1.fs at line 4
\ call compiled
\ code=$41BEEA len=9 type=130
( $0 )    mov     dword { $-4 ebp } eax             \ 8945FC
( $3 )    sub     ebp $4                            \ 83ED04
( $6 )    add     eax $3                            \ 83C003
( $9 )    ret                                       \ C3 ( end )
: cdup3+ ( ? -- ? )
\ cdup3+ is defined in c:/w32f/v608/test1.fs at line 5
\ call compiled
\ code=$41BEF9 len=9 type=130
( $0 )    mov     dword { $-4 ebp } eax             \ 8945FC
( $3 )    sub     ebp $4                            \ 83ED04
( $6 )    add     eax $3                            \ 83C003
( $9 )    ret                                       \ C3 ( end )

Identical.

-- 
Alex

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


Page 1 of 7  [1] 2 3 4 5 6 7  Next page →

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


csiph-web