Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Animation of a stackmachine

256 views
Skip to first unread message

Manuel Rodriguez

unread,
Mar 20, 2018, 2:41:57 AM3/20/18
to
I do not think, that Forth can be used for real projects, it is a
teaching only programming language like PL/0 from Niklaus Wirth. The
main purpose of Forth is not to be run on real hardware (even it is
possible in theory) but as tool for educate people about dual-stack
pushdown automata. Unfortunately, the number of Forth projects with
that background are very limited. The best introduction into Forth
would be an animation of a pushdown automaton. That means, to show
in a game how the instruction pointer is fetching the next word, and
the numbers are pushed to the datastack. So far, I've found one paper
which goes into that direction “JF Power, D Sinclair: A Formal Model
of Forth Control Words in the Pi-Calculus and its animation in Pict",
http://eprints.maynoothuniversity.ie/6421/1/JP-Forth-control-words.pdf But,
the graphics there are not very easy to read. What I want is something
which goes more into the direction of a game engine and colorful.

Before I start to program my own pushdown animation with SFML in C++,
I want to know if former projects are out there? The idea is not to
implement a Forth virtual machine on x86 CPU in assembly, but program a
Forth system against a graphic screen. That means, the user can input a
short Forth program, and this is executed slowly as a computeranimation
with a visible tape, datastack and returnstack.

jpit...@gmail.com

unread,
Mar 20, 2018, 6:09:10 AM3/20/18
to
Who are you and what is the basis/knowledge for your judgement?
Have a good read through the Forth Bookshelf https://www.amazon.co.uk/Juergen-Pintaske/e/B00N8HVEZM before you post something like this here. Or go to the C++ group. Or at least read chapter 4/5/6/ and 14/15 at https://wiki.forth-ev.de/doku.php/en:projects:a-start-with-forth:start0 to get a little bit of understanding. It seems you have not done any due diligence before posting this here.
There are many good sources of information about Forth achievements, just look at https://www.forth.com/resources/who-uses-forth/ to give you a bit of education. If you need a simulator to put some plates on a Stack you might want to do something else rather than programming.

Stephen Pelc

unread,
Mar 20, 2018, 6:10:44 AM3/20/18
to
On Mon, 19 Mar 2018 23:41:56 -0700 (PDT), Manuel Rodriguez
<a...@gmx.net> wrote:

>I do not think, that Forth can be used for real projects, it is a
>teaching only programming language like PL/0 from Niklaus Wirth.

See Candy at http://www.constructioncomputersoftware.com/

Candy makes a lot of money every month. Like several other of our
clients, the company was bought a few years ago for the technology
developed in Forth.

>Before I start to program my own pushdown animation with SFML in C++,
>I want to know if former projects are out there? The idea is not to
>implement a Forth virtual machine on x86 CPU in assembly, but program a
>Forth system against a graphic screen. That means, the user can input a
>short Forth program, and this is executed slowly as a computeranimation
>with a visible tape, datastack and returnstack.

See http://www.micross.co.uk/micross/

This is a Forth app using Glade and GTK+ for the GUI portions.

Stephen


--
Stephen Pelc, steph...@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441
web: http://www.mpeforth.com - free VFX Forth downloads

Manuel Rodriguez

unread,
Mar 20, 2018, 6:36:25 AM3/20/18
to
Am Dienstag, 20. März 2018 11:09:10 UTC+1 schrieb jpit...@gmail.com:
> just look at https://www.forth.com/resources/who-uses-forth/
> to give you a bit of education. If you need a simulator to put some
> plates on a Stack you might want to do something else rather than
> programming.


There is perhaps a small misunderstanding. At first, I like Forth very
much and i think Chuck Moore has done a wonderful work. I do not want to
use Forth for programming an operating system , or use Gforth together
with OpenGL to print something on the screen. How this can be done is
documented on the internet. What I think is, that Forth can be used
to explain how a stackmachine works. Let us first investigate who in
mainstream computer courses a computer is explained. In a youtube video
a turing machine is shown: https://www.youtube.com/watch?v=gJQTFhkhwPA
Which is nice, but a turing machine can be extended with two stacks,
than it is called an two stack pushdown automaton.

The above link https://www.forth.com/resources/who-uses-forth/ I've
read carefully, but my impression is not, that these companies are
using Forth for programming “Windows hardware driver” or implement
transputer like cpu, but they are using Forth for educate new employees,
like in computer courses the turing-machine is used as an example how a
computer works. The best Forth projects out there for example Jonesforth
have not the purpose to implement a real language, but it is a teaching
tool. That means, Forth is used on powerpoint slides and in youtube videos
for spreading out knowledge. The same is true for the “VFX Forth”,
https://www.mpeforth.com/vfxwin.htm It works different from a normal
C++ compiler. For example, the Visual Studio software is sold to the
customer because they want to use it for writing software. In contrast,
the commercial VFX Forth is more a lesson in Forth. That means, it is a
very good school book for teaching students.

Mark Wills

unread,
Mar 20, 2018, 6:38:03 AM3/20/18
to
On Tuesday, 20 March 2018 06:41:57 UTC, Manuel Rodriguez wrote:
> I do not think, that Forth can be used for real projects, it is a
> teaching only programming language like PL/0 from Niklaus Wirth.

^^^^ Oh dear. Face-palm.

jpit...@gmail.com

unread,
Mar 20, 2018, 6:55:43 AM3/20/18
to
How can there be a misunderstanding?
You continue to intentionally insult the Forth community
- go away to your C++ buddies.
Either your English is very bad - what we cannot do anything about - or you just cannot grasp it - which I think is the case.
In both cases use your native language with others that can help.
Starting Forth does exactly this - and probably at your level.
You sound like a school boy - and this seems to be the level of your understanding
- which is fine as well we all have started at knowledge level 0 with Forth and learnt more then - or went to the C++ or other groups.
But I for example did appreciate the knowledge and achievements of others when I started. This seems to be missing here.

gwj....@gmail.com

unread,
Mar 20, 2018, 7:23:18 AM3/20/18
to
> How can there be a misunderstanding?
> You continue to intentionally insult the Forth community
> - go away to your C++ buddies.
> Either your English is very bad - what we cannot do anything
> about - or you just cannot grasp it - which I think is the case.
> In both cases use your native language with others that can help.
> Starting Forth does exactly this - and probably at your level.

> You sound like a school boy - and this seems to be the level of
> your understanding
> - which is fine as well we all have started at knowledge level 0
> with Forth and learnt more then - or went to the C++ or other groups.
> But I for example did appreciate the knowledge and achievements
> of others when I started. This seems to be missing here.

It is disgraceful of you to be so aggressive to newcomer to the group, no wonder such people are driven away. Better to just simply correct him instead of descending into a rude rant.

jpit...@gmail.com

unread,
Mar 20, 2018, 9:27:17 AM3/20/18
to
You have your opinion - I have my opinion - about the same value.
If it is normal to you that a newcomer insults the whole group first, does not answer any question - you are showing your position.

Howerd

unread,
Mar 20, 2018, 11:54:09 AM3/20/18
to
Hi Manuel,

> I do not think, that Forth can be used for real projects
https://laughingsquid.com/someone-is-wrong-on-the-internet/
http://octodecillion.com/blog/forth-language-processor-on-comet/

> Before I start to program my own pushdown animation...
You might want to take a look at GreenArrays' GA144 simulator, available in their ArrayForth download, here :
http://www.greenarraychips.com/home/support/download-02b.html

You can run the exe file either in Windows ( Okad.bat ), or copy it onto a bootable drive and run it natively. Either way, type "softsim" and press the space bar, then the key marked "d" on your keyboard to see an animated simulation of a program running on some of the 144 F18 cpus on the GA144 chip.

The same ArrayForth system was used to develop OKAD II, which Chuck Moore used to create the GA144 chip. The simulator can be used to debug programs without the expense of real GA144 chips.

"Softsim" displays the data stack and return stack in each of the F18 cores as they step through the program, and shows how code and data can be routed to any F18 core on the chip.

> What I want is something which goes more into the direction of a game
> engine and colorful.
Let me know what you think of "Softsim" :-)

Best regards,
Howerd


Cecil Bayona

unread,
Mar 20, 2018, 3:06:55 PM3/20/18
to
Total troll, why are people answering his silly points?

--
Cecil - k5nwa

Gerry Jackson

unread,
Mar 20, 2018, 4:51:10 PM3/20/18
to
On 20/03/2018 13:27, jpit...@gmail.com wrote:
> On Tuesday, 20 March 2018 11:23:18 UTC, gwj....@gmail.com wrote:
>>> How can there be a misunderstanding?
>>> You continue to intentionally insult the Forth community
>>> - go away to your C++ buddies.
>>> Either your English is very bad - what we cannot do anything
>>> about - or you just cannot grasp it - which I think is the case.
>>> In both cases use your native language with others that can help.
>>> Starting Forth does exactly this - and probably at your level.
>>
>>> You sound like a school boy - and this seems to be the level of
>>> your understanding
>>> - which is fine as well we all have started at knowledge level 0
>>> with Forth and learnt more then - or went to the C++ or other groups.
>>> But I for example did appreciate the knowledge and achievements
>>> of others when I started. This seems to be missing here.
>>
>> It is disgraceful of you to be so aggressive to newcomer to the group, no wonder such people are driven away. Better to just simply correct him instead of descending into a rude rant.
>
> You have your opinion - I have my opinion - about the same value.

The OP wrote:
<quote>I do not think, that Forth can be used for real projects, it is a
teaching only programming language like PL/0 from Niklaus Wirth. The
main purpose of Forth is not to be run on real hardware (even it is
possible in theory) but as tool for educate people about dual-stack
pushdown automata.</quote>

To me this is just an opinion that demonstrates a lot of ignorance of
Forth and its history - something that is shared by nearly 100% of
people on the planet. To take it as an insult demonstrates that you have
a thin skin and are looking for insults where none was intended - just
like Hugh Aguilar.

After all it doesn't make sense for someone to deliberately insult a
group of people and then ask them for help.

To repeat some old advice - "engage brain before opening gob".

> If it is normal to you that a newcomer insults the whole group first, does not answer any question - you are showing your position.
>

Rubbish, it doesn't show my position at all.

--
Gerry

Gerry Jackson

unread,
Mar 20, 2018, 5:02:50 PM3/20/18
to
Sorry but I can't help you with your question.

But the paper you referenced is quite interesting. Amongst other things,
and contrary to the oft expressed opinion here that Forth has no syntax,
they present an (incomplete) EBNF grammar to specify Forth's syntax -
good job they didn't know it was impossible :)

(Hmm just learned a new word today that could prove useful in c.l.f -
ignoranus - unfortunately not in standard English dictionaries.)

--
Gerry

lsng....@gmail.com

unread,
Mar 21, 2018, 3:07:19 AM3/21/18
to
Quote from the paper:

-- Power J.F., Sinclair D.: A Formal Model of Forth Control Words ...
1291

-- While the above proof is manually constructed, it provides the raw structure
for proving equivalence between Forth programs.

Am I the only one interested in using reverse polish notation to represent mathematical notation and equation, and thus use RPN to prove theorems like the above?

Please see my other post:

https://groups.google.com/forum/#!topic/comp.lang.forth/htV-1wKxf2c

lsng....@gmail.com

unread,
Mar 21, 2018, 3:33:46 AM3/21/18
to
Hold on ... that would be bootstrap, wouldn't it?

Wait ... we have to use RPN to prove that it is indeed bootstrap? Can we?

jpit...@gmail.com

unread,
Mar 21, 2018, 4:25:27 AM3/21/18
to
mistyped, just remembered my Latin:
ignoramus
ˌɪɡnəˈreɪməs/Submit
noun
an ignorant or stupid person.
"assume that your examiner is an ignoramus and explain everything to him"

a...@littlepinkcloud.invalid

unread,
Mar 21, 2018, 5:20:12 AM3/21/18
to
Gerry Jackson <do-no...@swldwa.uk> wrote:
>> http://eprints.maynoothuniversity.ie/6421/1/JP-Forth-control-words.pdf But,
>
> Sorry but I can't help you with your question.
>
> But the paper you referenced is quite interesting. Amongst other things,
> and contrary to the oft expressed opinion here that Forth has no syntax,
> they present an (incomplete) EBNF grammar to specify Forth's syntax -
> good job they didn't know it was impossible :)

Troll! :-)

You got me to have a look, anyway, and it's the grammar for a very
abstracted version of Forth. It's an interesting idea, true enough,
but the grammar doesn't really capture any information about Forth.

Andrew.

Manuel Rodriguez

unread,
Mar 21, 2018, 7:37:03 AM3/21/18
to
Am Dienstag, 20. März 2018 16:54:09 UTC+1 schrieb Howerd:
> Let me know what you think of "Softsim" :-)

The softsim software of Greenarray goes into the right direction. The
screenshot of the program looks promising. But as far as i can see,
softsim is an addition to the real GA144 chipset. It is some kind of
support tool for programming the Forth chip. But, running Forth on real
hardware makes no sense. I think, BCPL like languages are more suited for
playing with microcontrollers or building homecomputer from scratch like
the Hive-project which was done on top of the Propeller cpu. I think,
mastering Forth can be done on a theoretical level only. That means, to
use Forth as a virtual machine which is slowed down to one instruction
per second but has the feature of easy understanding.

In my opinion Forth is a good topic for writing a master thesis. Like these
which are listed on https://liinwww.ira.uka.de/bibliography/index.html
If we are entering the term “Forth” lots of papers are shown. The
idea is to write another paper without even try out Forth in reality,
but only know the language from other papers and theoretical simulations ...

The misconception is, that some professors are thinking that Forth
is easier to understand by the newbies, if practical examples and a
hands-on-mentality are given. That is totally wrong. Forth was never
designed to be run on real hardware or hosting real programs. Like Paul
Frenger recognized correctly (Frenger, Paul. "Is forth dead?." ACM Sigplan
Notices 36.6 (2001): 23-25.), Forth can be compared with the “lingua
latīna” which is used as a subject of papers, but not for communication.

Forth is not dead for all applications. Only for driving real computers and
program real software Forth makes no sense. In contrast, Forth as a teaching
language has a wonderful future, and the language is superior to all others.

Liang Ng

unread,
Mar 21, 2018, 8:52:20 AM3/21/18
to
If you want my guess, I suspect the New World Order finally sensed the threat from Forthers -- and is sending this guy to destroy us all ....

;-)

jpit...@gmail.com

unread,
Mar 21, 2018, 9:45:04 AM3/21/18
to
On Wednesday, 21 March 2018 12:52:20 UTC, Liang Ng wrote:
> If you want my guess, I suspect the New World Order finally sensed the threat from Forthers -- and is sending this guy to destroy us all ....
>
> ;-)

I fail to understand why anybody would learn Forth to use another language mostly afterwards - this belongs into the Comp Lang Masochist. ;)

Liang Ng

unread,
Mar 21, 2018, 10:01:44 AM3/21/18
to
I suspect Forth will become another Tower of Babel -- threatening God -- when it unites all the programming languages first, then all human natural languages later.

And God do exist -- in the form of the New World Order -- or a Darth Vader type institution, exerting control to us all.

;-)

Anton Ertl

unread,
Mar 21, 2018, 10:41:24 AM3/21/18
to
jpit...@gmail.com writes:
>I fail to understand why anybody would learn Forth to use another language mostly afterwards - this belongs into the Comp Lang Masochist. ;)

To learn the idiomatics and pragmatics of Forth in its native
environment. You can then reuse the ideas you have learned in the
other language. TL;DR: To broaden your programming skills.

And why would you consider learning a language that you then don't use
to be masochistic?

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2017: http://euro.theforth.net/

Manuel Rodriguez

unread,
Mar 21, 2018, 11:51:12 AM3/21/18
to
Am Mittwoch, 21. März 2018 15:41:24 UTC+1 schrieb Anton Ertl:
> To learn the idiomatics and pragmatics of Forth in its native
> environment. You can then reuse the ideas you have learned in the
> other language.

The MMIX cpu was designed with the same principle in mind. The MMIX cpu is a
register machine, while Forth is assuming a stackmachine. Did anyone tried
to port a Forth VM to the MMIX?, i only found this interesting discussion
https://cs.stackexchange.com/questions/6640/don-knuth-and-mmixal-vs-chuck-moore-and-forth-algorithms-and-ideal-machines

Alex McDonald

unread,
Mar 21, 2018, 12:31:50 PM3/21/18
to
The paper isn't very good; this one sentence encapsulates its failings.

"However, these specifications [Knaggs 1993 and Stoddart 1996]
concentrated on the execution of Forth programs, whereas our
specification also incorporates the actions of the Forth compiler."

Ouch. The separation of Forth-executing-stuff vs Forth-while-compiling
is a killer to any adequate understanding of Forth. It took me a long
time to realise that this is where Forth is absolutely different from
any other language; and why it is liberating as a result.

--
Alex

Paul Rubin

unread,
Mar 21, 2018, 3:40:07 PM3/21/18
to
Manuel Rodriguez <a...@gmx.net> writes:
> Forth was never designed to be run on real hardware or hosting real
> programs.

This sentence is so egregiously wrong that it kills the credibility of
everything else you might say. Do the words "Kitt Peak" in relation to
Forth mean anything to you? Forth was unquestionably designed to run
real programs on real hardware. Whether it's really viable for those
purposes today is debateable, but in its heyday it had significant
success.

> Frenger, Paul. "Is forth dead?." ACM Sigplan Notices 36.6 (2001)

Thanks, that's an interesting paper. To quote from it:

"real" programmers consider Forth to be an engineer's language, like
"ladder logic" and CNC lathe control languages. No programmer sees
real status in these "grunt" languages.

Again, the "real programmers" (something like today's "architecture
astronauts"?) disdained Forth BECAUSE Forth was about getting actual
stuff done on actual hardware.

> Forth as a teaching language has a wonderful future, and the language
> is superior to all others.

Again I think you're conflating Forth with the vast family of RPN and
concatenative language that it's a tiny representative of. You might
like the paper "Why concatenative languages matter" if you want an
academic take on that class of languages.

Gerry Jackson

unread,
Mar 21, 2018, 6:57:36 PM3/21/18
to
No, I know what ignoramus means and I did latin at school.

Google what I typed - it was not a typo

--
Gerry

JUERGEN

unread,
Mar 22, 2018, 3:36:26 AM3/22/18
to
Had a look, not much different - what you said.
So that we are all on the same level of understand what you said and meant:
from google : https://en.wiktionary.org/wiki/ignoranus

Noun. ignoranus (plural ignoranuses) (slang, vulgar, derogatory) A person who is both stupid and rude; an ignorant asshole.
ignoranus - Wiktionary
0 new messages