Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #57613 > unrolled thread
| Started by | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| First post | 2017-04-19 18:32 -0500 |
| Last post | 2017-05-15 12:05 -0500 |
| Articles | 20 on this page of 122 — 21 participants |
Back to article view | Back to comp.lang.forth
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 4 of 7 — ← Prev page 1 2 3 [4] 5 6 7 Next page →
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2017-04-21 23:41 -0700 |
| Message-ID | <87a8790wre.fsf@nightsong.com> |
| In reply to | #57779 |
"Rudy Velthuis" <newsgroups@rvelthuis.de> writes: > And I assume you (or someone else) had to start with assembler or C or > whatever for the very low level stuff, unless you manually assembled > the byte codes, or used another Forth to assemble yours. Yes, that's the idea, you start with Forth and there's an assembler written in Forth that's used during metacompilation, probably not at the very beginning. The rest is Forth.
[toc] | [prev] | [next] | [standalone]
| From | Coos Haak <htrofhc@gmail.com> |
|---|---|
| Date | 2017-04-22 22:15 +0200 |
| Message-ID | <1gqogpfutynuu$.1c5tsd3i35uv2$.dlg@40tude.net> |
| In reply to | #57786 |
Op Fri, 21 Apr 2017 23:41:41 -0700 schreef Paul Rubin: > "Rudy Velthuis" <newsgroups@rvelthuis.de> writes: >> And I assume you (or someone else) had to start with assembler or C or >> whatever for the very low level stuff, unless you manually assembled >> the byte codes, or used another Forth to assemble yours. > > Yes, that's the idea, you start with Forth and there's an assembler > written in Forth that's used during metacompilation, probably not at the > very beginning. The rest is Forth. Even the structure of the assembler code is Forth-like. IF ELSE THEN and BEGIN WHILE REPEAT are unknown in the assemblers I know. groet Coos
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-05-06 13:28 +0000 |
| Message-ID | <xn0kpnszxlp8s2u001@nntp.aioe.org> |
| In reply to | #57843 |
Coos Haak wrote: > Op Fri, 21 Apr 2017 23:41:41 -0700 schreef Paul Rubin: > > > "Rudy Velthuis" <newsgroups@rvelthuis.de> writes: > >> And I assume you (or someone else) had to start with assembler or > C or >> whatever for the very low level stuff, unless you manually > assembled >> the byte codes, or used another Forth to assemble yours. > > > > Yes, that's the idea, you start with Forth and there's an assembler > > written in Forth that's used during metacompilation, probably not > > at the very beginning. The rest is Forth. > > Even the structure of the assembler code is Forth-like. IF ELSE THEN > and BEGIN WHILE REPEAT are unknown in the assemblers I know. Not in some of the ones I know. The syntax is more standard of course, i.e. THEN does not close the IF part, etc. -- Rudy Velthuis http://www.rvelthuis.de "Before we blame, we should first see if we can excuse." -- G. C. Lichtenberg
[toc] | [prev] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-04-27 02:51 -0700 |
| Message-ID | <bf0ead71-ab86-4513-b7df-0a588986d9dc@googlegroups.com> |
| In reply to | #57779 |
On Saturday, April 22, 2017 at 1:58:32 PM UTC+9, Rudy Velthuis wrote: > Coos Haak wrote: > > > Op Fri, 21 Apr 2017 20:28:40 +0000 (UTC) schreef Rudy Velthuis: > > > > > Andrew Haley wrote: > > > > > >>> 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 > > > > > > Assembler is assembler, no matter how you look at it, and it doesn't > > > matter if that assembler was written in Forth or any other way. > > > > My Forth is completely written in Forth. > > A lot of definitions are in assembly code that is > > compiled (assembled) within Forth and its integrated Assembler. > > No assembler like MASM TASM NASM or FASM has ever touched it. > > The assembler is written in Forth. You can't deny it is still assembly > language. And I assume you (or someone else) had to start with > assembler or C or whatever for the very low level stuff, unless you > manually assembled the byte codes, or used another Forth to assemble > yours. C has been called an assembly language for a portable run-time. Joel Rees -- Imagining I'm a novelist. http://joel-rees-economics.blogspot.com/2017/01/soc500-00-00-toc.html
[toc] | [prev] | [next] | [standalone]
| From | Lars Brinkhoff <lars.spam@nocrew.org> |
|---|---|
| Date | 2017-04-27 12:09 +0200 |
| Message-ID | <86o9vijh5h.fsf@molnjunk.nocrew.org> |
| In reply to | #58248 |
Joel Rees wrote: > C has been called an assembly language for a portable run-time. Now that I've seen Forth, I no longer consider C close to assembly language. Even less so with contemporary C compilers.
[toc] | [prev] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-04-29 02:48 -0700 |
| Message-ID | <0a0586aa-d137-48a2-be34-16ca864f4e9f@googlegroups.com> |
| In reply to | #58253 |
On Thursday, April 27, 2017 at 7:09:47 PM UTC+9, Lars Brinkhoff wrote: > Joel Rees wrote: > > C has been called an assembly language for a portable run-time. > > Now that I've seen Forth, I no longer consider C close to assembly > language. Even less so with contemporary C compilers. Portable run-times are not real CPUs, either. But while I'm lost in memories, there was an assembler once that used = for moves and + for adds, etc., and was written in infix. One-to-one mapping, but using the more familiar symbols.
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-04-29 03:09 +0000 |
| Message-ID | <xn0kpapmk2n53fy003@nntp.aioe.org> |
| In reply to | #58248 |
Joel Rees wrote: > On Saturday, April 22, 2017 at 1:58:32 PM UTC+9, Rudy Velthuis wrote: > > Coos Haak wrote: > > > > > Op Fri, 21 Apr 2017 20:28:40 +0000 (UTC) schreef Rudy Velthuis: > > > > > > > Andrew Haley wrote: > > > > > > > >>> 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 > > > > > > > > Assembler is assembler, no matter how you look at it, and it > > > > doesn't matter if that assembler was written in Forth or any > > > > other way. > > > > > > My Forth is completely written in Forth. > > > A lot of definitions are in assembly code that is > > > compiled (assembled) within Forth and its integrated Assembler. > > > No assembler like MASM TASM NASM or FASM has ever touched it. > > > > The assembler is written in Forth. You can't deny it is still > > assembly language. And I assume you (or someone else) had to start > > with assembler or C or whatever for the very low level stuff, > > unless you manually assembled the byte codes, or used another Forth > > to assemble yours. > > C has been called an assembly language for a portable run-time. Yes, but C does not use assembler mnemonics that more or less directly translate to the machine code produced. Assemblers do, and so do Forth assemblers. It is futile to deny that. -- Rudy Velthuis http://www.rvelthuis.de "They say such nice things about people at their funerals that it makes me sad that I'm going to miss mine by just a few days." -- Garrison Kielor.
[toc] | [prev] | [next] | [standalone]
| From | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| Date | 2017-04-19 20:11 -0500 |
| Message-ID | <od91mf$2t2$1@dont-email.me> |
| In reply to | #57617 |
On 4/19/2017 7: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. > > But there is no reason that it could not be built in Golang, or Python > or Javascript (ECMAScript), or whatever. > Other than efficiency, Forth in Python would be very slow. Even for my taste C is too inefficient but I been using C because it's available for every CPU known to man for the most part. Using Go I would take a different tack to the problem, I would make a Window/Linux cross compiler that is tethered to the target so for every CPU a very small C program could be loaded that talks to the Windows/Linux CPU to load software. I'm more worried about major flaws in the Language and it's current implementation as it is a relatively new language. -- Cecil - k5nwa
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2017-04-19 19:34 -0700 |
| Message-ID | <87efwneria.fsf@nightsong.com> |
| In reply to | #57613 |
> That is why I started looking at Go so I could have a more modern > language to use in writing system software, Go is something like a cleaned up and safer version of C. I wouldn't call it modern. It's fun to use if you like C, and the compiler is amazingly fast, which is nice. But I'd still consider it a low level language. > Since Go is somewhat similar to C it's not a stretch to rewrite > working C code in it. Yes, it should be pretty straightforward if the C program doesn't do too much pointer and casting madness. > 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? I think the more recent Go compilers are themselves written in Go. It would certainly be easier than writing one in C. It doesn't seem that Forthy to use it to implement Forth though. I don't remember if you've given Python a try. You might like it better than Go.
[toc] | [prev] | [next] | [standalone]
| From | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| Date | 2017-04-19 23:22 -0500 |
| Message-ID | <od9cs5$l37$1@dont-email.me> |
| In reply to | #57624 |
On 4/19/2017 9:34 PM, Paul Rubin wrote: >> That is why I started looking at Go so I could have a more modern >> language to use in writing system software, > > Go is something like a cleaned up and safer version of C. I wouldn't > call it modern. It's fun to use if you like C, and the compiler is > amazingly fast, which is nice. But I'd still consider it a low level > language. > >> Since Go is somewhat similar to C it's not a stretch to rewrite >> working C code in it. > > Yes, it should be pretty straightforward if the C program doesn't do too > much pointer and casting madness. > >> 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? > > I think the more recent Go compilers are themselves written in Go. It > would certainly be easier than writing one in C. It doesn't seem that > Forthy to use it to implement Forth though. It allowed them to simplify their code after moving away from C, a big enhancement of Go is handling multi-processes, cores, and CPUs which C does not have a simple solution but Go has it built into the language. > > I don't remember if you've given Python a try. You might like it better > than Go. > I'm familiar with Python enough to be dangerous and it is easy to learn, has quite a few useful libraries so it's very useful for a lot of applications, that being said it's also slow and to write a Forth VM in it would make the Forth compiler way too slow. Go does have pointers and casting but it's more secure for example you cannot do pointer arithmetic in Go and casting must be explicit but it's available. A handy thing of C but not available in Go is Unions. I will need to read more on pointers as they will be used in the VM so I need to see if that is a show stopper, if it is I will continue using C. In any case I will still want to learn Go as I will use it in many other projects, and I rather use it versus C++. I bought a Hobby copy of 8th and was hoping to use it as a general overall tool to write software for use with my PCs, it has a lot of nice libraries, and data types but it doesn't have support for MySQL which kind of important to me in writing tools to deal with my websites, I originally thought it was to be included, but after the purchase I found it didn't have the capability, instead it has support for SQLlite which won't work for my web applications, I would need to spend an extra $250 to buy a Pro Version which I can't afford at this point. Otherwise it would have been the choice general language for quickly generating applications. Go has full support for MySQL, Network Services, Windowing systems, and other tools built into the system libraries so that is part of the reason to consider it as my main language for use with Windows/Linux applications. -- Cecil - k5nwa
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2017-04-19 21:35 -0700 |
| Message-ID | <8760hzelwb.fsf@nightsong.com> |
| In reply to | #57628 |
Cecil Bayona <cbayona@cbayona.com> writes: > It allowed them to simplify their code after moving away from C, a big > enhancement of Go is handling multi-processes, cores, and CPUs which > C does not have a simple solution but Go has it built into the > language. Goroutines are basically coroutines or lightweight threads: maybe I'm mistaken but I don't think they get dispatched to other cores. There are libraries for C that can do stuff like that, though Go makes it easier. > Python ... to write a Forth VM in it would make the Forth compiler > way too slow. I thought the idea was to write the VM (a simple program, look at the manu implementations of the Retroforth Ngaro VM) in a low level language like C, but you wanted to use something higher level to write the compiler. Anyway, even in Python I bet the Forth VM would run much faster on a modern PC than carefully tuned native Forth compilers did on 1980s computers. > I will still want to learn Go as I will use it in many other projects, Fair enough. > I bought a Hobby copy of 8th... it doesn't have support for MySQL Hmm, maybe you could connect it up to an external MySQL client or library.
[toc] | [prev] | [next] | [standalone]
| From | Melzzzzz <Melzzzzz@zzzzz.com> |
|---|---|
| Date | 2017-04-20 05:12 +0000 |
| Message-ID | <od9g0b$cm2$1@news.albasani.net> |
| In reply to | #57630 |
On 2017-04-20, Paul Rubin <no.email@nospam.invalid> wrote: > Cecil Bayona <cbayona@cbayona.com> writes: >> It allowed them to simplify their code after moving away from C, a big >> enhancement of Go is handling multi-processes, cores, and CPUs which >> C does not have a simple solution but Go has it built into the >> language. > > Goroutines are basically coroutines or lightweight threads: maybe I'm > mistaken but I don't think they get dispatched to other cores. They are dispatched alright. You control that with GOMAXPROCS function.
[toc] | [prev] | [next] | [standalone]
| From | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| Date | 2017-04-20 01:15 -0500 |
| Message-ID | <od9jg0$4ej$1@dont-email.me> |
| In reply to | #57630 |
On 4/19/2017 11:35 PM, Paul Rubin wrote: > I thought the idea was to write the VM (a simple program, look at the > manu implementations of the Retroforth Ngaro VM) in a low level language > like C, but you wanted to use something higher level to write the > compiler. Anyway, even in Python I bet the Forth VM would run much > faster on a modern PC than carefully tuned native Forth compilers did on > 1980s computers. > >> I will still want to learn Go as I will use it in many other projects, > > Fair enough. > >> I bought a Hobby copy of 8th... it doesn't have support for MySQL > > Hmm, maybe you could connect it up to an external MySQL client or > library. > Do you have a MySQL implementation for 8th or for something else that could be adapted? The VM implements anywhere for 60 to 100 primitives, the code to run words from the dictionary, do I/O, and handle the stacks, the rest is implemented in Forth Word tokens that the VM can execute. The instructions of the VM are one byte tokens that are executed by the VM core. Several hundred words are added for the VM to execute that create a compile/interpreter/assembler. The system will vary depending on what language I use and it will determine if the target system is a complete Forth on board or just a tethered system that gets its running code from the PC host. It could be done in several different ways. For some targets that are used often the the target VM could be written in assembler for speed after a while. What I'm currently using is a special version of eForth, it creates a target image with a meta-compiler, and it works quite well, it allows for eForth to be resident on the target CPU, there is really not much wrong with it but I want to write my own from scratch as a learning exercise. Tomorrow evening I will do some research and some simple test programs with Go and pointers, and arrays that will determine which way to proceed from here. -- Cecil - k5nwa
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2017-04-19 23:25 -0700 |
| Message-ID | <871ssnegte.fsf@nightsong.com> |
| In reply to | #57634 |
Cecil Bayona <cbayona@cbayona.com> writes: > Do you have a MySQL implementation for 8th or for something else that > could be adapted? I don't, but as Ron says, you could use the FFI or connect to the mysql command line tool. > The VM implements anywhere for 60 to 100 primitives, the code to run > words from the dictionary, do I/O, and handle the stacks, the rest is > implemented in Forth Word tokens that the VM can execute. That seems like a lot of instructions, but ok. I'd expect the VM to just be a bytecode counterpart to a classic ITC address interpreter. It shouldn't know anything about the dictionary layout. It does have to do some i/o. Do you know about the C port of eForth? http://chiselapp.com/user/tehologist/repository/compc/home > determine if the target system is a complete Forth on board or just a > tethered system that gets its running code from the PC host. If you're thinking of MCU targets you better not write the VM in Go. The Go runtime is intended for bigger machines, needs a megabyte or so of ram, has a garbage collector, etc.
[toc] | [prev] | [next] | [standalone]
| From | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| Date | 2017-04-21 23:12 -0500 |
| Message-ID | <odel20$d4f$1@dont-email.me> |
| In reply to | #57634 |
On 4/20/2017 1:15 AM, Cecil Bayona wrote: > On 4/19/2017 11:35 PM, Paul Rubin wrote: > >> I thought the idea was to write the VM (a simple program, look at the >> manu implementations of the Retroforth Ngaro VM) in a low level language >> like C, but you wanted to use something higher level to write the >> compiler. Anyway, even in Python I bet the Forth VM would run much >> faster on a modern PC than carefully tuned native Forth compilers did on >> 1980s computers. >> >>> I will still want to learn Go as I will use it in many other projects, >> >> Fair enough. >> >>> I bought a Hobby copy of 8th... it doesn't have support for MySQL >> >> Hmm, maybe you could connect it up to an external MySQL client or >> library. >> > > Do you have a MySQL implementation for 8th or for something else that > could be adapted? > > The VM implements anywhere for 60 to 100 primitives, the code to run > words from the dictionary, do I/O, and handle the stacks, the rest is > implemented in Forth Word tokens that the VM can execute. > > The instructions of the VM are one byte tokens that are executed by the > VM core. Several hundred words are added for the VM to execute that > create a compile/interpreter/assembler. > > The system will vary depending on what language I use and it will > determine if the target system is a complete Forth on board or just a > tethered system that gets its running code from the PC host. It could be > done in several different ways. For some targets that are used often the > the target VM could be written in assembler for speed after a while. > > What I'm currently using is a special version of eForth, it creates a > target image with a meta-compiler, and it works quite well, it allows > for eForth to be resident on the target CPU, there is really not much > wrong with it but I want to write my own from scratch as a learning > exercise. > > Tomorrow evening I will do some research and some simple test programs > with Go and pointers, and arrays that will determine which way to > proceed from here. > > 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. 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. -- Cecil - k5nwa
[toc] | [prev] | [next] | [standalone]
| From | hughaguilar96@gmail.com |
|---|---|
| Date | 2017-04-21 21:53 -0700 |
| Message-ID | <9a6d01ae-10a1-4f66-9326-696adfb029b8@googlegroups.com> |
| In reply to | #57771 |
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! 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. 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). 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. 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.
[toc] | [prev] | [next] | [standalone]
| From | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| Date | 2017-04-22 00:42 -0500 |
| Message-ID | <odeqae$o2c$1@dont-email.me> |
| In reply to | #57775 |
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
[toc] | [prev] | [next] | [standalone]
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Date | 2017-04-21 23:44 -0700 |
| Message-ID | <8760hx0wn2.fsf@nightsong.com> |
| In reply to | #57783 |
Cecil Bayona <cbayona@cbayona.com> writes: > 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 can't quite parse that, but I'd put C, C++, Forth, and maybe Pascal in the low-resource class; Go is high-resource (comparable to Python) although it generates faster code. No idea about Oberon.
[toc] | [prev] | [next] | [standalone]
| From | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| Date | 2017-04-22 03:08 -0500 |
| Message-ID | <odf2rg$dki$1@dont-email.me> |
| In reply to | #57787 |
On 4/22/2017 1:44 AM, Paul Rubin wrote: > Cecil Bayona <cbayona@cbayona.com> writes: >> 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 can't quite parse that, but I'd put C, C++, Forth, and maybe Pascal > in the low-resource class; Go is high-resource (comparable to Python) > although it generates faster code. No idea about Oberon. > For a Forth compiler on a desktop extra ram used is not a biggie being slow is a big deal. -- Cecil - k5nwa
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2017-04-22 04:39 -0500 |
| Message-ID | <TOCdnTM5tdUguWbFnZ2dnUU7-d3NnZ2d@supernews.com> |
| In reply to | #57783 |
Cecil Bayona <cbayona@cbayona.com> wrote:
>
> 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,
Surely you just use -S to get assembly language, like any other
compiler. I'll try it...
$ go tool compile -S hello-world.go
"".main t=1 size=170 args=0x0 locals=0x58
0x0000 00000 (hello-world.go:9) TEXT "".main(SB), $88-0
0x0000 00000 (hello-world.go:9) MOVQ (TLS), CX
0x0009 00009 (hello-world.go:9) CMPQ SP, 16(CX)
0x000d 00013 (hello-world.go:9) JLS 160
... lots more.
Yes. Just worked.
Andrew.
[toc] | [prev] | [next] | [standalone]
Page 4 of 7 — ← Prev page 1 2 3 [4] 5 6 7 Next page →
Back to top | Article view | comp.lang.forth
csiph-web