Hi all, may be my over incitement for Forth at the moment as I feel like there is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and theForth way.
Question; why has Forth not been as prolific as other languages?
Hi all, may be my over incitement for Forth at the moment as I feel like there is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and theForth way.
Question; why has Forth not been as prolific as other languages?interesting, Forth is a VM, why not extend CPU simulation on Forth, where one would test those targeted systems and make it "simple" to see how the app behaves at the hardware level and how to optimize it. I know metaprograming just looks natural in
Views:
Why is there a lack of cross compiler on Forth?
- IMHO, this is an area where Forth could do the community a great deal of good. If for example, there where crosscompilers for the embedded environments, this would potentially drive the adoption of the Language. Another thing that could be really
Further more, one are of inspiration is having something like https://cpulator.01xz.net/?sys=arm-de1soc&d_audio=48000consider the following.. .
Well, that is a dream, but if you thing about it, the front end could run on a browser, the back end could be a forth system... If that is too much to ask, consider Gerog Heinrichs neat little MikroForth, well and if that is too much to ask then
Program offset instruction Dis-assembled register/ storage (after execution) TEST001 000000 X'05C0' BALR R12,0 R12=002CE00Asubstantially over priced, under power, higher barrier to entry, where you are designing the hardware, with it's pitfalls in the development phase, then the Forth that sits o top ( Ok so forth is the machine code, cool science project, one I would like
000002 X'47F0C00E' BC 15,X'00C'(R12)
00000E X'98ECD00C' STM R14,R12,X'00C'(R13) X'002E0008' ==> X'00004CE,002CE008,..etc....'
000012 X'45E0C122' BAL R14,X'122'(R12) R14=002C0016
SUB1 000124 X'50E0C28A' ST R14,X'28A'(R12) X'002CE294' ==> X'002C0016' etc...
Ok, even a GDB interface to the ISS would be enough, really! :)
Furthermore, on the basis of use cases, I see lot's of discussion and people building FPGA based stack CPU's. I apologize in advance form my ignorance on the matter, but isn't Fort a VM for a CPU sort of speak? What can you really get out of
If Forth is a VM kernel , would it not make sense to spend the time to have a vm that has a native Programmable Interrupt Controller with built in interrupt priority levels and streamline the code executed on these systems? I look at all the bloat thatgoes into projects like OpenWRT, and I just wonder if they where not better off moving to bare metal ( FORTH ) to deliver better performance? I also see that with the excess of compute available in the Arch64 space, there is plenty of opportunities to
One area I see that this could be interesting is in high end embedded systems, where the CPU is really a peripheral of a larger systems, like dedicated cards that do networking or caching on larger servers... those systems build extensive and expensivesystems, that have all the linux bloat on them, when in the end all they run is a 10K lines of code with a very specif purpose. I thought Forth could be the kernel. for these systems.
Furthermore, Forth brings another interesting option, if you are running a forth vm on top of a forth vm that runs the app or part of the app ( think of containers speaking to each-other at CPU speed.), then near real time upgrades could be possible oreven bitecode up-gradable ( just updating the dictionary to point to a new portion of the code could be possible, that is a strong business case if you are targeting edge devices... smart meters, ect...
Just so much could be done.
Thoughts? Rebuttals? Ideas?
czwartek, 24 listopada 2022 o 23:19:05 UTC+1 SpainHackForth napisał(a):Forth way.
Hi all, may be my over incitement for Forth at the moment as I feel like there is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and the
Question; why has Forth not been as prolific as other languages?
Simple: it was not taught in universities. Contrary to C, for example.
Besides: business prefers languages like C, that allows easier replacementI know! I got a funny story on that one. I once worked for a joint that got spreadsheet
of programmers, in case of need.
Hi all, may be my over incitement for Forth at the moment as I feel like there
is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and the Forth way.
Question; why has Forth not been as prolific as other languages?
Views:
Why is there a lack of cross compiler on Forth?
On 25/11/2022 10:15 am, Zbig wrote:Forth way.
czwartek, 24 listopada 2022 o 23:19:05 UTC+1 SpainHackForth napisał(a):
Hi all, may be my over incitement for Forth at the moment as I feel like there is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and the
Question; why has Forth not been as prolific as other languages?
Simple: it was not taught in universities. Contrary to C, for example.Universities are conservative. If Forth is being taught, you can bet
there's a Forth evangelist behind it :)
On Thursday, November 24, 2022 at 9:02:52 PM UTC-4, dxforth wrote:Forth way.
On 25/11/2022 10:15 am, Zbig wrote:
czwartek, 24 listopada 2022 o 23:19:05 UTC+1 SpainHackForth napisał(a): >>>> Hi all, may be my over incitement for Forth at the moment as I feel like there is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and the
Universities are conservative. If Forth is being taught, you can bet
Question; why has Forth not been as prolific as other languages?
Simple: it was not taught in universities. Contrary to C, for example.
there's a Forth evangelist behind it :)
Universities are conservative??? Really, since when?
Forth is not used, because they don't derive recognizable benefit from it.
I won't argue that, but that's not the reason Forth isn't used. It's
just not useful to them, much like the vast majority of programmers.
On 28/11/2022 8:01 am, Lorem Ipsum wrote:the Forth way.
On Thursday, November 24, 2022 at 9:02:52 PM UTC-4, dxforth wrote:
On 25/11/2022 10:15 am, Zbig wrote:
czwartek, 24 listopada 2022 o 23:19:05 UTC+1 SpainHackForth napisał(a): >>>> Hi all, may be my over incitement for Forth at the moment as I feel like there is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and
there's a Forth evangelist behind it :)
Question; why has Forth not been as prolific as other languages?
Simple: it was not taught in universities. Contrary to C, for example. >> Universities are conservative. If Forth is being taught, you can bet
Universities are conservative??? Really, since when?Ever since those funding universities (parents, govt, industry) wanted something in return.
Forth is not used, because they don't derive recognizable benefit from it.Exactly. Forth is the radical fringe, populated by Timothy Leary types.
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
I won't argue that, but that's not the reason Forth isn't used. It'sA university teaching programming by using Forth would be like a pilot
just not useful to them, much like the vast majority of programmers.
school teaching navigation by wetting your thumb and sticking it out
into the wind.
More like an electronics class where they hand you a kit of parts to first buildI won't argue that, but that's not the reason Forth isn't used. It's just not useful to them, much like the vast majority of programmers.A university teaching programming by using Forth would be like a pilot school teaching navigation by wetting your thumb and sticking it out
into the wind.
the measurement equipment yourself.
Lorem Ipsum <gnuarm.del...@gmail.com> writes:
I won't argue that, but that's not the reason Forth isn't used. It'sA university teaching programming by using Forth would be like a pilot school teaching navigation by wetting your thumb and sticking it out
just not useful to them, much like the vast majority of programmers.
into the wind.
…which is perfectly possible. Yes, the students are able to build such equipmentMore like an electronics class where they hand you a kit of parts to first buildI won't argue that, but that's not the reason Forth isn't used. It's just not useful to them, much like the vast majority of programmers.A university teaching programming by using Forth would be like a pilot school teaching navigation by wetting your thumb and sticking it out
into the wind.
the measurement equipment yourself.
out of given components, using a particular schematics — when still having just
a sligth idea „how it actually works”, and learning the details later.
On Monday, November 28, 2022 at 2:15:42 AM UTC+1, Zbig wrote:
…which is perfectly possible. Yes, the students are able to build such equipmentMore like an electronics class where they hand you a kit of parts to first buildI won't argue that, but that's not the reason Forth isn't used. It's >>>>> just not useful to them, much like the vast majority of programmers.A university teaching programming by using Forth would be like a pilot >>>> school teaching navigation by wetting your thumb and sticking it out
into the wind.
the measurement equipment yourself.
out of given components, using a particular schematics — when still having just
a sligth idea „how it actually works”, and learning the details later.
Which was my point.
Which was my point.Give them a schematic which has an error and see whether they find it :)
czwartek, 24 listopada 2022 o 23:19:05 UTC+1 SpainHackForth napisał(a):Forth way.
Hi all, may be my over incitement for Forth at the moment as I feel like there is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and the
Question; why has Forth not been as prolific as other languages?Simple: it was not taught in universities. Contrary to C, for example. Besides: business prefers languages like C, that allows easier replacement of programmers, in case of need.
On 24 Nov 2022 at 23:19:03 CET, "SpainHackForth" <jem...@gmail.com> wrote:
Hi all, may be my over incitement for Forth at the moment as I feel like there
is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and the Forth way.
Question; why has Forth not been as prolific as other languages?Mainly because Forth is difficult and dangerous you havr to be a good programmer to use it well.
Secondly because people become hypnotised into writing their own Forth. Don't do it, there are plenty available.
Views:There are plenty of cross compilers written in Forth for Forth. The reality is
Why is there a lack of cross compiler on Forth?
that the vast majority are not very good. The good ones (with support and documentation) are mostly by the commercial vendors - Forth Inc and MPE. See: http://www.mpeforth.com
We support quite a range of CPUs. There are TCP/IP and USB stacks for 32 bit CPUs.
Stephen
--
Stephen Pelc, ste...@vfxforth.com
MicroProcessor Engineering, Ltd. - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, +44 (0)78 0390 3612,
+34 649 662 974
http://www.mpeforth.com - free VFX Forth downloads
On Friday, 25 November 2022 at 15:07:26 UTC, Stephen Pelc wrote:
Secondly because people become hypnotised into writing their own Forth. Don't
do it, there are plenty available.
its free , easily available and widely discussed. eg jonesforth. I wouldnt say hypnotised
but why wouldnt wanna be forthers want to see if you can do it too or better?
On Monday, 28 November 2022 at 15:57:05 UTC, minf...@arcor.de wrote:I could not agree more with your comments...
NN schrieb am Montag, 28. November 2022 um 15:43:30 UTC+1:
On Friday, 25 November 2022 at 15:07:26 UTC, Stephen Pelc wrote:
Secondly because people become hypnotised into writing their own Forth. Don't
do it, there are plenty available.
its free , easily available and widely discussed. eg jonesforth. I wouldnt say hypnotisedThere is this saying "fly like an eagle, don't scratch like a chicken". Build your own Forth
but why wouldnt wanna be forthers want to see if you can do it too or better?
(one among thousands) can be like eternal ground scratching and become a waste of time.
(to remain fair: it can also be a fun hobby where time wasted does not count).
You are not speaking from the perspective of someone who's just starting to learn forth.
Additionally learning about how it all works cant be a waste of time until you have done it
once.
There was one famous guy in the Forth world: Tom Zimmer. The author of ZForth, TCOMI dont know much about what Tom's done since he left forth scene. He's very good but whats
and F-PC and one of the "fathers" of Win32Forth. IIRC he left Forth altogether because
he could never become as productive as with C++.
stopping him from writing a database or spreadsheet? Has he been productive with c++ ?
Maybe he just wanted a change. We all do sometimes.
its free , easily available and widely discussed. eg jonesforth. I
wouldnt say hypnotised
but why wouldnt wanna be forthers want to see if you can do it too or better?
NN schrieb am Montag, 28. November 2022 um 15:43:30 UTC+1:
On Friday, 25 November 2022 at 15:07:26 UTC, Stephen Pelc wrote:
Secondly because people become hypnotised into writing their own Forth. Don't
do it, there are plenty available.
its free , easily available and widely discussed. eg jonesforth. I wouldnt say hypnotisedThere is this saying "fly like an eagle, don't scratch like a chicken". Build your own Forth
but why wouldnt wanna be forthers want to see if you can do it too or better?
(one among thousands) can be like eternal ground scratching and become a waste of time.
(to remain fair: it can also be a fun hobby where time wasted does not count).
There was one famous guy in the Forth world: Tom Zimmer. The author of ZForth, TCOM
and F-PC and one of the "fathers" of Win32Forth. IIRC he left Forth altogether because
he could never become as productive as with C++.
On Monday, 28 November 2022 at 15:57:05 UTC, minf...@arcor.de wrote:
NN schrieb am Montag, 28. November 2022 um 15:43:30 UTC+1:
On Friday, 25 November 2022 at 15:07:26 UTC, Stephen Pelc wrote:
Secondly because people become hypnotised into writing their own Forth. Don't
do it, there are plenty available.
its free , easily available and widely discussed. eg jonesforth. I wouldnt say hypnotisedThere is this saying "fly like an eagle, don't scratch like a chicken". Build your own Forth
but why wouldnt wanna be forthers want to see if you can do it too or better?
(one among thousands) can be like eternal ground scratching and become a waste of time.
(to remain fair: it can also be a fun hobby where time wasted does not count).
You are not speaking from the perspective of someone who's just starting to learn forth.
Additionally learning about how it all works cant be a waste of time until you have done it
once.
On Monday, 28 November 2022 at 15:57:05 UTC, minf...@arcor.de wrote:
NN schrieb am Montag, 28. November 2022 um 15:43:30 UTC+1:Forth. Don't
On Friday, 25 November 2022 at 15:07:26 UTC, Stephen Pelc wrote:
Secondly because people become hypnotised into writing their own
or better?do it, there are plenty available.its free , easily available and widely discussed. eg jonesforth. I >wouldnt say hypnotised
but why wouldnt wanna be forthers want to see if you can do it too
There is this saying "fly like an eagle, don't scratch like achicken". Build your own Forth
(one among thousands) can be like eternal ground scratching and becomea waste of time.
(to remain fair: it can also be a fun hobby where time wasted does not >count).
You are not speaking from the perspective of someone who's just starting
to learn forth.
Additionally learning about how it all works cant be a waste of time
until you have done it
once.
There was one famous guy in the Forth world: Tom Zimmer. The author of >ZForth, TCOM
and F-PC and one of the "fathers" of Win32Forth. IIRC he left Forth >altogether because
he could never become as productive as with C++.
I dont know much about what Tom's done since he left forth scene. He's
very good but whats
stopping him from writing a database or spreadsheet? Has he been
productive with c++ ?
Maybe he just wanted a change. We all do sometimes.
C is widely used and even if you want to get away from it you cant
ignore it exists.
I have said in the past that forth is difficult but its no more or
less difficult than say haskell.
NN <novembe...@gmail.com> writes:
C is widely used and even if you want to get away from it you cantI don't think C is taught much in universities either. If you want to
ignore it exists.
teach low level programming, use assembly language. For high-level programming, Python has become popular.
You can do a lot in C that just would take ages in Assembly. Sure, you
can inline code, but you would most likely embed ASM into a C
function.
Here is the beauty of C, this is 133 lines with comments for an 8 bit
virtual cpu... you can see the how long that would take in ASM... https://godbolt.org/z/qMeKoevEa
I wonder how that would look in Forth... :)
Which was my point.Give them a schematic which has an error and see whether they find it :)
As a „BTW”: https://www.youtube.com/watch?v=CLnolhyT5SI
On Monday, November 28, 2022 at 10:07:15 PM UTC+1, Paul Rubin wrote:
NN <novembe...@gmail.com> writes:I just checked, C is def in the top Engineering curriculum for the major universities. Python was listed in the curriculum for Computer Science though.
C is widely used and even if you want to get away from it you cantI don't think C is taught much in universities either. If you want to
ignore it exists.
teach low level programming, use assembly language. For high-level programming, Python has become popular.
You can do a lot in C that just would take ages in Assembly. Sure, you can inline code, but you would most likely embed ASM into a C function.
Here is the beauty of C, this is 133 lines with comments for an 8 bit virtual cpu... you can see the how long that would take in ASM...
https://godbolt.org/z/qMeKoevEa
I wonder how that would look in Forth... :)
On Monday, 28 November 2022 at 15:57:05 UTC, minf...@arcor.de wrote:
There was one famous guy in the Forth world: Tom Zimmer. The author of ZForth, TCOM
and F-PC and one of the "fathers" of Win32Forth. IIRC he left Forth altogether because
he could never become as productive as with C++.
I dont know much about what Tom's done since he left forth scene. He's very good but whats
stopping him from writing a database or spreadsheet? Has he been productive with c++ ?
Maybe he just wanted a change. We all do sometimes.
On 29/11/2022 5:19 am, NN wrote:...
On Monday, 28 November 2022 at 15:57:05 UTC, minf...@arcor.de wrote:
There was one famous guy in the Forth world: Tom Zimmer. The author of ZForth, TCOM
and F-PC and one of the "fathers" of Win32Forth. IIRC he left Forth altogether because
he could never become as productive as with C++.
"Today I program mostly in Visual C++. Originally I hated 'C', but after five
years, it is bearable."
https://tomzimmer.files.wordpress.com/2016/06/an-interview-with-tom-zimmer.pdf
https://tomzimmer.files.wordpress.com/2016/06/an-interview-with-tom-zimmer.pdf
dxforth <dxf...@gmail.com> writes:
https://tomzimmer.files.wordpress.com/2016/06/an-interview-with-tom-zimmer.pdf
From page 5:
"Forth's most important feature has little to do with the fact that
it is a stack language, it has instead to do with the way it
interacts as a whole with the user. Forths extensibility, structure, modularity and very simple syntax are key attributes that give the programmer freedom to structure solutions for problems in ways that programmers of other languages cannot understand or attempt."
Nice. I wonder what Chuck Moore would say about that.
In article <871qpmz...@nightsong.com>,
Paul Rubin <no.e...@nospam.invalid> wrote:
SpainHackForth <jem...@gmail.com> writes:
You can do a lot in C that just would take ages in Assembly. Sure, you
can inline code, but you would most likely embed ASM into a C
function.
Writing big programs in asm is not done much any more. The idea of
studying asm is to understand how low level programming works, not to >actually do a lot of it.
Here is the beauty of C, this is 133 lines with comments for an 8 bit
virtual cpu... you can see the how long that would take in ASM...
https://godbolt.org/z/qMeKoevEa
I wonder how that would look in Forth... :)
With a macro assembler, the asm version wouldn't be much worse than theI went to a course: Safer C. Apparently bugs per line of code is
C version. The Forth version would be fairly similar.
constant across the board. The course leader doesn't understand
what the advantage is of small modules in programming.
The macro assembler illustrates the point. A 500 line assembler
program shrinks to 100 lines, if a couple of strategic macro's
are introduced, and the bugs list shrinks proportionally.
This is IMHO one of the reasons Forth is reliable, its reliance
on small components that are thoroughly tested.
SpainHackForth <jemo07@gmail.com> writes:
You can do a lot in C that just would take ages in Assembly. Sure, you
can inline code, but you would most likely embed ASM into a C
function.
Writing big programs in asm is not done much any more. The idea of
studying asm is to understand how low level programming works, not to >actually do a lot of it.
Here is the beauty of C, this is 133 lines with comments for an 8 bit
virtual cpu... you can see the how long that would take in ASM...
https://godbolt.org/z/qMeKoevEa
I wonder how that would look in Forth... :)
With a macro assembler, the asm version wouldn't be much worse than the
C version. The Forth version would be fairly similar.
none albert schrieb am Dienstag, 29. November 2022 um 11:21:27 UTC+1:
In article <871qpmz...@nightsong.com>,
Paul Rubin <no.e...@nospam.invalid> wrote:
SpainHackForth <jem...@gmail.com> writes:
You can do a lot in C that just would take ages in Assembly. Sure, you >> can inline code, but you would most likely embed ASM into a C
function.
Writing big programs in asm is not done much any more. The idea of >studying asm is to understand how low level programming works, not to >actually do a lot of it.
Here is the beauty of C, this is 133 lines with comments for an 8 bit >> virtual cpu... you can see the how long that would take in ASM...
https://godbolt.org/z/qMeKoevEa
I wonder how that would look in Forth... :)
With a macro assembler, the asm version wouldn't be much worse than the >C version. The Forth version would be fairly similar.I went to a course: Safer C. Apparently bugs per line of code is
constant across the board. The course leader doesn't understand
what the advantage is of small modules in programming.
The macro assembler illustrates the point. A 500 line assembler"Thoroughly tested" in Forth means individual programmer's discipline
program shrinks to 100 lines, if a couple of strategic macro's
are introduced, and the bugs list shrinks proportionally.
This is IMHO one of the reasons Forth is reliable, its reliance
on small components that are thoroughly tested.
not a special language property.
Write short C functions plus asserts and you are in the same ballpark.
none albert schrieb am Dienstag, 29. November 2022 um 11:21:27 UTC+1:
In article <871qpmz...@nightsong.com>,
Paul Rubin <no.e...@nospam.invalid> wrote:
SpainHackForth <jem...@gmail.com> writes:
You can do a lot in C that just would take ages in Assembly. Sure, you >> can inline code, but you would most likely embed ASM into a C
function.
Writing big programs in asm is not done much any more. The idea of >studying asm is to understand how low level programming works, not to >actually do a lot of it.
Here is the beauty of C, this is 133 lines with comments for an 8 bit
virtual cpu... you can see the how long that would take in ASM...
https://godbolt.org/z/qMeKoevEa
I wonder how that would look in Forth... :)
With a macro assembler, the asm version wouldn't be much worse than theI went to a course: Safer C. Apparently bugs per line of code is
C version. The Forth version would be fairly similar.
constant across the board. The course leader doesn't understand
what the advantage is of small modules in programming.
The macro assembler illustrates the point. A 500 line assembler"Thoroughly tested" in Forth means individual programmer's discipline
program shrinks to 100 lines, if a couple of strategic macro's
are introduced, and the bugs list shrinks proportionally.
This is IMHO one of the reasons Forth is reliable, its reliance
on small components that are thoroughly tested.
not a special language property.
Write short C functions plus asserts and you are in the same ballpark.
…because Forth is a toolkit allowing you to design your own „application-specific language”.Write short C functions plus asserts and you are in the same ballpark.But very few do, while this is common in Forth. Why? Because Forth quickly becomes hard to understand otherwise.
The fact that there is an implied stack instead of a parameter list is
one of the main features that makes the language easily extensible and modular with a simple syntax.
none albert schrieb am Dienstag, 29. November 2022 um 11:21:27 UTC+1:
In article <871qpmz...@nightsong.com>,
Paul Rubin <no.e...@nospam.invalid> wrote:
SpainHackForth <jem...@gmail.com> writes:I went to a course: Safer C. Apparently bugs per line of code is
You can do a lot in C that just would take ages in Assembly. Sure, you >>>> can inline code, but you would most likely embed ASM into a C
function.
Writing big programs in asm is not done much any more. The idea of
studying asm is to understand how low level programming works, not to
actually do a lot of it.
Here is the beauty of C, this is 133 lines with comments for an 8 bit
virtual cpu... you can see the how long that would take in ASM...
https://godbolt.org/z/qMeKoevEa
I wonder how that would look in Forth... :)
With a macro assembler, the asm version wouldn't be much worse than the
C version. The Forth version would be fairly similar.
constant across the board. The course leader doesn't understand
what the advantage is of small modules in programming.
The macro assembler illustrates the point. A 500 line assembler
program shrinks to 100 lines, if a couple of strategic macro's
are introduced, and the bugs list shrinks proportionally.
This is IMHO one of the reasons Forth is reliable, its reliance
on small components that are thoroughly tested.
"Thoroughly tested" in Forth means individual programmer's discipline
not a special language property.
But very few do, while this is common in Forth. Why? Because Forth quickly becomes hard to understand otherwise.
dxforth <dxforth@gmail.com> writes:
https://tomzimmer.files.wordpress.com/2016/06/an-interview-with-tom-zimmer.pdf
From page 5:
"Forth's most important feature has little to do with the fact that
it is a stack language, it has instead to do with the way it
interacts as a whole with the user. Forths extensibility, structure,
modularity and very simple syntax are key attributes that give the
programmer freedom to structure solutions for problems in ways that
programmers of other languages cannot understand or attempt."
Nice. I wonder what Chuck Moore would say about that.
The stack is a means to an end - not an end in itself?
dxforth <dxforth@gmail.com> writes:
The stack is a means to an end - not an end in itself?
Precisely. Now how to reconcile that with "don't use locals"? ;-)
Here is the beauty of C, this is 133 lines with comments for an 8 bit virtual cpu... you can see the how long that would take in ASM...
https://godbolt.org/z/qMeKoevEa
Wondered about writing a hardware description, to check the text size,More here... https://git.sr.ht/~rabbits/uxn11/
but could not find any documentation :----(
Jan Coombs
--
Hi all, may be my over incitement for Forth at the moment as I feel like there is so much value for it, and I have been pondering several aspects of the language, ideas on how to best leverage it and furthermore, extend the adoption of Forth and theForth way.
Question; why has Forth not been as prolific as other languages?interesting, Forth is a VM, why not extend CPU simulation on Forth, where one would test those targeted systems and make it "simple" to see how the app behaves at the hardware level and how to optimize it. I know metaprograming just looks natural in
Views:
Why is there a lack of cross compiler on Forth?
- IMHO, this is an area where Forth could do the community a great deal of good. If for example, there where crosscompilers for the embedded environments, this would potentially drive the adoption of the Language. Another thing that could be really
Further more, one are of inspiration is having something like https://cpulator.01xz.net/?sys=arm-de1soc&d_audio=48000consider the following.. .
Well, that is a dream, but if you thing about it, the front end could run on a browser, the back end could be a forth system... If that is too much to ask, consider Gerog Heinrichs neat little MikroForth, well and if that is too much to ask then
Program offset instruction Dis-assembled register/ storage (after execution) TEST001 000000 X'05C0' BALR R12,0 R12=002CE00Asubstantially over priced, under power, higher barrier to entry, where you are designing the hardware, with it's pitfalls in the development phase, then the Forth that sits o top ( Ok so forth is the machine code, cool science project, one I would like
000002 X'47F0C00E' BC 15,X'00C'(R12)
00000E X'98ECD00C' STM R14,R12,X'00C'(R13) X'002E0008' ==> X'00004CE,002CE008,..etc....'
000012 X'45E0C122' BAL R14,X'122'(R12) R14=002C0016
SUB1 000124 X'50E0C28A' ST R14,X'28A'(R12) X'002CE294' ==> X'002C0016' etc...
Ok, even a GDB interface to the ISS would be enough, really! :)
Furthermore, on the basis of use cases, I see lot's of discussion and people building FPGA based stack CPU's. I apologize in advance form my ignorance on the matter, but isn't Fort a VM for a CPU sort of speak? What can you really get out of
If Forth is a VM kernel , would it not make sense to spend the time to have a vm that has a native Programmable Interrupt Controller with built in interrupt priority levels and streamline the code executed on these systems? I look at all the bloat thatgoes into projects like OpenWRT, and I just wonder if they where not better off moving to bare metal ( FORTH ) to deliver better performance? I also see that with the excess of compute available in the Arch64 space, there is plenty of opportunities to
One area I see that this could be interesting is in high end embedded systems, where the CPU is really a peripheral of a larger systems, like dedicated cards that do networking or caching on larger servers... those systems build extensive and expensivesystems, that have all the linux bloat on them, when in the end all they run is a 10K lines of code with a very specif purpose. I thought Forth could be the kernel. for these systems.
Furthermore, Forth brings another interesting option, if you are running a forth vm on top of a forth vm that runs the app or part of the app ( think of containers speaking to each-other at CPU speed.), then near real time upgrades could be possible oreven bitecode up-gradable ( just updating the dictionary to point to a new portion of the code could be possible, that is a strong business case if you are targeting edge devices... smart meters, ect...
Just so much could be done.
Thoughts? Rebuttals? Ideas?
Where does Zimmer say locals are a viable alternative? :)
dxforth <dxforth@gmail.com> writes:
Where does Zimmer say locals are a viable alternative? :)
The objection to locals is basically that they don't strictly follow the doctrine of the stack VM. Zimmer says the stack VM is not that
important.
That to me makes the objection go away.
If the stack VM is
not important, the following the doctrine is not that important either.
dxforth <dxf...@gmail.com> writes:
The stack is a means to an end - not an end in itself?Precisely. Now how to reconcile that with "don't use locals"? ;-)
Where does Zimmer say locals are a viable alternative? :)
Where does Zimmer say anything at all about locals?Where does Zimmer say locals are a viable alternative? :)Where does Zimmer say "never use locals"?
Just now I looked at the W32F source and counted 388 definitions with locals.
Where does Zimmer say anything at all about locals?Where does Zimmer say locals are a viable alternative? :)Where does Zimmer say "never use locals"?
Just now I looked at the W32F source and counted 388 definitions with locals.Maybe Tom isn't the author of these. Or maybe he is the creator
of some of them indeed — but he created them with disgust. ;)
Where does Zimmer say anything at all about locals?Where does Zimmer say locals are a viable alternative? :)Where does Zimmer say "never use locals"?
Just now I looked at the W32F source and counted 388 definitions with locals.
Maybe Tom isn't the author of these. Or maybe he is the creator
of some of them indeed — but he created them with disgust. ;)
On Wednesday, November 30, 2022 at 3:25:38 AM UTC-5, dxforth wrote:
Where does Zimmer say locals are a viable alternative? :)
Where does Zimmer say "never use locals"?
If he believed that
then he apparently had little or no influence on his fellow W32F
programmers. Just now I looked at the W32F source and
counted 388 definitions with locals.
I am not very familiar with W32F so if anyone has better knowledge
of this please correct me if needed.
-Doug
Zbig schrieb am Donnerstag, 1. Dezember 2022 um 15:42:01 UTC+1:
Where does Zimmer say anything at all about locals?Where does Zimmer say locals are a viable alternative? :)Where does Zimmer say "never use locals"?
Just now I looked at the W32F source and counted 388 definitions with locals.Maybe Tom isn't the author of these. Or maybe he is the creator
of some of them indeed — but he created them with disgust. ;)
Masochism and delight are a true Forther's true passions.
On Wednesday, November 30, 2022 at 3:25:38 AM UTC-5, dxforth wrote:
Where does Zimmer say locals are a viable alternative? :)
Zimmer doesn't mention them at all.
Perhaps, as with life, Forth wasn't meant to be easy ...
Perhaps, as with life, Forth wasn't meant to be easy ...
This is what Moore said in 1980:
"Let me use a tool which I appreciate and if everyone can't use
this tool well, I am sorry, but that is not my goal."
Did it stop you from learning Forth and coming to grips with it? If not, then why should it stop newcomers today? Are they less capable than your generation? ISTM if anyone is telling newcomers Forth is too hard, it is those looking at other languages and saying 'wouldn't it be nice if Forth had that'.
On Thursday, December 1, 2022 at 6:51:05 PM UTC-5, dxforth wrote:
On Wednesday, November 30, 2022 at 3:25:38 AM UTC-5, dxforth wrote:
Where does Zimmer say locals are a viable alternative? :)
Zimmer doesn't mention them at all.
Then why did you ask where he said they are a viable alternative?
On Thursday, December 1, 2022 at 11:08:26 PM UTC-5, dxforth wrote:
Perhaps, as with life, Forth wasn't meant to be easy ...
Hardly a way to encourage potential new Forth programmers
that are reading this thread.
This is what Moore said in 1980:
"Let me use a tool which I appreciate and if everyone can't use
this tool well, I am sorry, but that is not my goal."
Did it stop you from learning Forth and coming to grips with it? If not,
then why should it stop newcomers today? Are they less capable than your
generation? ISTM if anyone is telling newcomers Forth is too hard, it is
those looking at other languages and saying 'wouldn't it be nice if Forth
had that'.
Moore continued immediately after that: „…In that sense Forth is an elitist
language. On the other hand, I think that Forth is a language that
a grade-school child can learn to use quite effectively if it's presented
in the proper bit-size pieces, with the proper motivation”.
So instead of insisting on locals / OOP / stuff like that the proper approach >is to learn how to use Forth's tools.
It is fair to say that his intelligence surpassed that of the
average Trump voter.
On 2/12/2022 7:12 pm, Doug Hoffman wrote:
On Thursday, December 1, 2022 at 6:51:05 PM UTC-5, dxforth wrote:
On Wednesday, November 30, 2022 at 3:25:38 AM UTC-5, dxforth wrote:
Where does Zimmer say locals are a viable alternative? :)
Zimmer doesn't mention them at all.
Then why did you ask where he said they are a viable alternative?Because it was Paul who suggested it:
https://groups.google.com/g/comp.lang.forth/c/A9c5gYMK1rY/m/XVmPkSrDCAAJ
On Thursday, December 1, 2022 at 11:08:26 PM UTC-5, dxforth wrote:
Perhaps, as with life, Forth wasn't meant to be easy ...
Hardly a way to encourage potential new Forth programmersThis is what Moore said in 1980:
that are reading this thread.
"Let me use a tool which I appreciate and if everyone can't use
this tool well, I am sorry, but that is not my goal."
Did it stop you from learning Forth and coming to grips with it? If not,
then why should it stop newcomers today?
dxforth <dxforth@gmail.com> writes:
Perhaps, as with life, Forth wasn't meant to be easy ...
How's that for a dxforth-style slogan: "Forth, the language that makes
even easy things hard."
I, OTOH, prefer to make things easy, not just for the system
implementor, but also for the system user.
On Friday, December 2, 2022 at 6:19:13 AM UTC-5, dxforth wrote:
On 2/12/2022 7:12 pm, Doug Hoffman wrote:
On Thursday, December 1, 2022 at 6:51:05 PM UTC-5, dxforth wrote:Because it was Paul who suggested it:
On Wednesday, November 30, 2022 at 3:25:38 AM UTC-5, dxforth wrote:
Where does Zimmer say locals are a viable alternative? :)
Zimmer doesn't mention them at all.
Then why did you ask where he said they are a viable alternative?
https://groups.google.com/g/comp.lang.forth/c/A9c5gYMK1rY/m/XVmPkSrDCAAJ
Wrong link? Nothing there from Paul suggesting Zimmer said locals are
a viable alternative.
On Thursday, December 1, 2022 at 11:08:26 PM UTC-5, dxforth wrote:This is what Moore said in 1980:
Perhaps, as with life, Forth wasn't meant to be easy ...
Hardly a way to encourage potential new Forth programmers
that are reading this thread.
"Let me use a tool which I appreciate and if everyone can't use
this tool well, I am sorry, but that is not my goal."
Did it stop you from learning Forth and coming to grips with it? If not,
then why should it stop newcomers today?
No. YOU said "Perhaps, as with life, Forth wasn't meant to be easy".
Potential newbies to Forth will stop right there in this forum and not research Moore to try to extract what he meant by his many statements.
On Friday, December 2, 2022 at 7:18:36 AM UTC-5, none albert wrote:
It is fair to say that his intelligence surpassed that of the
average Trump voter.
What is the intelligence of the average Trump voter and how was that >determined? This is over 74 million people. Please provide a reference.
-Doug
It is a cheap shot to substitute "Trump voter" for people in general.
It was trolling, and you fell for it.
Thanks for all the feedback.Ok the Ipad is playing with me tonight…
One thing that I still fascinating is that Dr. Ting discussed the tened for a VM for Forth particularly looking at the JAVA VM a means to get native support of Forth and most important the portability of the code *app.
On Saturday, December 3, 2022 at 5:33:45 AM UTC-5, none albert wrote:
It is a cheap shot to substitute "Trump voter" for people in general.
It was trolling, and you fell for it.
It is political commentary that doesn't belong here, and I
called you out on it.
On Sunday, December 4, 2022 at 12:48:53 AM UTC+1, SpainHackForth wrote:
Thanks for all the feedback.tened for a VM for Forth particularly looking at the JAVA VM a means to
One thing that I still fascinating is that Dr. Ting discussed the
get native support of Forth and most important the portability of the
code *app.
Ok the Ipad is playing with me tonight…
I was mentioning the importance of having a ForthVM as a means to get >portability across HW layers, reduces the efforts of the endless number
of Forth’s…
It is funny that you apparently object to the endless number ofNot sure I follow you, I never object to anything, if that is how you are interpreting, then I suggest you re-read my comments.
Forth's and not to the endless number of Java implementations that are needed to support the ForthVM.
Groetjes Albert
Where does Zimmer say locals are a viable alternative? :)
The objection to locals is basically that they don't strictly follow the doctrine of the stack VM. Zimmer says the stack VM is not that
important. That to me makes the objection go away. If the stack VM is
not important, the following the doctrine is not that important either.
It is funny that you apparently object to the endless number ofNot sure I follow you, I never object to anything, if that is how you are interpreting, then I suggest you re-read my comments.
Forth's and not to the endless number of Java implementations that are
needed to support the ForthVM.
Groetjes Albert
Just to keep the conversation going, my statement is simple, if you have a standard ForthVM ( I've not seen one yet that remotely looks like a VM) then the
issue of cross compilers is only left to the ForthVM cross deployment. This serves two purposes in my view:
1. Enable a consistent Forth language, where the Application Portability is the main benefit.
2. Limit the community effort to provide ForthVM targets rather than entire rewritten Forths
Not sure how that amuses you ( to each it's own, ) but that is my view on the subject.
Where does Zimmer say locals are a viable alternative? :)
The objection to locals is basically that they don't strictly follow the
doctrine of the stack VM. Zimmer says the stack VM is not that
important. That to me makes the objection go away. If the stack VM is
not important, the following the doctrine is not that important either.
But actually we can help ourselves in the cases when the stack becomes
too cluttered still not resorting to locals — neither by polluting the vocabulary
with temporary variable's names; I mean the proposal explained in the article „Anonymous Variables” (FD vol. 6 nr 1 page 33 — May/June 1984).
In article <bee6f122-dbe8-4eba...@googlegroups.com>,
SpainHackForth <jem...@gmail.com> wrote:
It is funny that you apparently object to the endless number ofNot sure I follow you, I never object to anything, if that is how you are interpreting, then I suggest you re-read my comments.
Forth's and not to the endless number of Java implementations that are
needed to support the ForthVM.
Groetjes Albert
Just to keep the conversation going, my statement is simple, if you have a standard ForthVM ( I've not seen one yet that remotely looks like a VM) then the
issue of cross compilers is only left to the ForthVM cross deployment. This serves two purposes in my view:
1. Enable a consistent Forth language, where the Application Portability is the main benefit.
2. Limit the community effort to provide ForthVM targets rather than entire rewritten Forths
Not sure how that amuses you ( to each it's own, ) but that is my view on the subject.
I'm looking at my ciforth. There is a limited number of primitives, on top there
is a FORTH VM . Now look at the library. PRIME? CHS RAND and other calculating
stuff is reasonable portable.
As soon as you get at TIME&DATE GET-ENV TICKS PIPE serial communication etc. those stuff are Operating System dependant.
Does Java solve any of this?
There is a new format of pictures. Do I write this in Forth or Java and then suffer an extra layer?
One thing that I still fascinating is that Dr. Ting discussed the tened
for a VM for Forth particularly looking at the JAVA VM a means to get native support of Forth and most important the portability of the code *app.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 475 |
Nodes: | 16 (2 / 14) |
Uptime: | 18:34:19 |
Calls: | 9,487 |
Calls today: | 6 |
Files: | 13,617 |
Messages: | 6,121,092 |