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


Groups > comp.lang.forth > #57783

Re: High level language for writing Forth

From Cecil Bayona <cbayona@cbayona.com>
Newsgroups comp.lang.forth
Subject Re: High level language for writing Forth
Date 2017-04-22 00:42 -0500
Organization A noiseless patient Spider
Message-ID <odeqae$o2c$1@dont-email.me> (permalink)
References (2 earlier) <od9cs5$l37$1@dont-email.me> <8760hzelwb.fsf@nightsong.com> <od9jg0$4ej$1@dont-email.me> <odel20$d4f$1@dont-email.me> <9a6d01ae-10a1-4f66-9326-696adfb029b8@googlegroups.com>

Show all headers | View raw


On 4/21/2017 11:53 PM, hughaguilar96@gmail.com wrote:
> On Friday, April 21, 2017 at 9:12:47 PM UTC-7, Cecil - k5nwa wrote:
>> Go for creating a Forth VM is off the table for now, Go flunked my test
>> of pointers to create stacks.
>>
>>    You cannot use a pointer to go through an array of data by using
>> increment, and decrement operation on the pointer like you can in C.
>> Pointers in Go are basically used to pass data around without copying it
>> but you can't use pointer arithmetic in any fashion including increment
>> and decrement operators.
>>
>>    In C it's easy to create a stack by having a pointer to an array of
>> data, read the data and increment the pointer is a pop, increment the
>> pointer and write the data is a push.  That can be very efficient as
>> increment or decrement of a pointer is a fast instruction. In Go I can
>> do it by incrementing or decrementing an index into an array but the
>> address calculations are not as fast, it could be close to the same but
>> I can't see the generated code to be able to tell one way or the other.
>> I can see their point of limiting pointers for safety reasons, in C one
>> needs to add code to check and make sure the pointers stay pointing
>> within the array but the same applies to using an array index, one needs
>> to make sure the index is valid.
> 
> I wouldn't dismiss Go because of this --- I would expect that incrementing and decrementing an array index would be almost as fast as incrementing and decrementing a pointer --- the difference is like one or two extra instructions, but the instructions may parallelize so they don't actually take any extra time.
> 
> This is premature optimization!
> 

That why I wish I could see the generated code, it might not make a 
difference after optimization but I don't have a way of finding out 
right now,

> Also, a Forth VM written in any high-level language is going to be significantly slower than generating machine-code with an STC Forth --- so the difference between C and Go in speed doesn't matter --- so long as you don't think that Perl (John Passaniti) or Python (Juergen Pintaske) is a good language to write a Forth VM in, you should get reasonable speed.
> 
>> So its back to using C for now and finish what I started, I'm pretty
>> close anyway with the C code to start testing the VM.
> 
> C has a lot of problems of its own --- Anton Ertl complains about this continually --- I wouldn't use C.

There are few system languages available that generate decent code, 
C/C++, Pascal, Go, Oberon, and Forth, other higher level languages are 
way too slow and require massive resources. I own several commercial 
copies of C/C++, and some old copies of Delphi, and various Forth 
Systems including Swift, and MPE VFX. C and Forth are the most viable 
and maybe Go. I like Delphi I dug it out and installed it but my old 
versions had problems with Windows 10 so I then started looking at Go, 
C++ is not under consideration. I might try loading Delphi in a Windows 
7 Virtual PC and see how that works out tomorrow. Too many choices can 
be a major problem.

> 
> I am learning Go right now. I hadn't considered writing a Forth VM in Go, because I think FASM is better --- I had just been thinking of Go as a practical language for writing programs --- Python is very popular, but it is also very slowwwwww, so Go may eventually replace it as the most supported language available (supported in the sense of having code-libraries).

I want to use Go for other purposes and I will but it would have been 
interesting to use this a learning experience, I might still do it 
anyway after I finish the C code so I have something to compare it 
against. The whole purpose of this is to have it be easy to move to a 
new PC without having to deal with a different assembler for each processor.

> 
> Forth is just a weird hobby. It is soooooo dead! There are fewer than 20 ANS-Forth programmers in the world, and none of them are writing programs, but instead they spend their time on the Forth-200x mailing list pretending to be leaders. There are fewer than 200 Forth programmers in the world, but most of them are like Ilya Tarasov in that they write their own non-standard Forth system and have only a handful of users, and (unlike Ilya TArasov) they stay away from comp.lang.forth because it is annoying to be attacked by Elizabeth Rather's sycophants who call them stupid and tell lies about them.

You read any of the articles by Charles Moore or his discussions and he 
sees Forth as a set of tools that are customized to the needs of the 
hour, I don't see him nailed to a Standard, he does as he pleases to get 
the job done. That is how I feel about Forth myself, it's nice to have a 
standard but it better be a good one or I will ignore it. I'm ignoring 
it for the most part, I can't stand all this ambiguity in it, I like 
simplicity.

> 
> I should learn a popular language such as Go or Python that people actually use --- nobody considers me to be a programmer right now --- my Forth experience doesn't count for anything in the real world.
> 

Poor baby, not being loved. I firmly believe that the only one that can 
make one happy is oneself, others can help, but most are in the way.

Python is handy for small programs that can afford to run slow, Go looks 
interesting it is fast, and has nice libraries, I would learn both, I 
intend to.

-- 
Cecil - k5nwa

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web