Having problems following "Primary ColorForth" and looking for help/advice.

78 views
Skip to first unread message

Darin Murphy

unread,
Jan 15, 2021, 9:18:13 PM1/15/21
to ColorForth
Hey Everyone,

First I would like to thank Howerd for updating/maintaining ColorForth.  I have a very basic understanding of Forth in general, mainly because good documentation is so scarce/vague/not well documented/outdated.  It appears people who love Forth love working/modifying it, but not properly documenting it, or what they did document is very old and not applicable with current versions.  Anyway, I found "Primary ColorForth", which is located at: 


It is like the first chapter or two of "Starting Forth", which I'm familiar and appears to be the only really newbie friendly book on Forth, though very outdated and only applies to SwiftForth.

One of the lessons that johnmdrake shows is how to write up code for "Hello, World".  In his blog there are 3 versions of this, and after painstakingly following everyone of them to the letter, none of them work!  Very frustrating.

Anyway, I'm hoping someone could maybe take a look at them and perhaps update/correct one of them and post it here, with some idea of what it's doing?  That would help me so much as I'm sure it may help other newbies who are just as lost.  I truly believe Mr. Moore is a genus and really want to use colorForth to learn from and build on, but it's so hard when there is so little explaining anything.  Like for instance the only way I could find rotate was the look through all of the source code and try things out until I found "rot".

Thanks for listening to my call for help and my little rant.  I am so looking forward to understanding better this amazing system Mr. Moore shared with us, and so many of you have taken years to improve and adapt.  Take care now and God Bless.

Darin

Nicolas Maroudas

unread,
Jan 16, 2021, 2:51:22 AM1/16/21
to Color Forth
Hello Darin, and welcome.

"Documentation is like castor oil, programmers know it is good for them but you cannot get them to like it".  -- The Tar Pit, an Introduction to Realworld Programming.

Thanks for reminding me of Primary ColorForth, it would have been a help if I had ever read it. Instead I just jumped in over and programmed a task for which CF's speed and compactness were ideally suited at the time. (Later I  found that VFX Forth by MPE could do the same job, with a more "friendly' Programming Environment; and lower Pain Threshold of Learning.)

My question is: What can CF do for you that orthodox Forth cannot do at the present time? What is your realworld task?

When Chuck Moore launched CF we were warned by one perceptive reader that CF was simply a new language that Chuck had invented for his new Multi-Processor Chip (now sold by GreenArrays). That reader dropped out long ago but I remembered his warning. Now that CF is available from GreenArrays in a "friendly"  and well documented orthodox Forth environment (PolyForth) I suggest you invest in their Evaluation Board ($700?) and set about using CF in its own natural environment, where CF can programme 144 separate CPUs on a single chip!

The trouble with this monster invention by Chuck is that orthodox programmers do not normally have tasks that could use 144 simple CPUs (with the ability to add on thousands more if needed!). GreenArrays is like FPGA, but with hundreds of CPU and memory elements where FPGA has arithmetical elements.

So, my question once again: Do you have a real world task for multiple arrays of  simple CPU+Mem elements?

My own task is build a really high speed multi-cpu synthesiser. Other suitable tasks would be Neural Networks, and solving Non-Linear Partial Differential Equations.

Unfortunately I do not know of anyone who is working on realworld GreenArray projects. There is only one academic paper published. It compares GA versus FPGA for Linear Signal Processing, and concludes that GA can do the job but FPGA is cheaper.

--
You received this message because you are subscribed to the Google Groups "ColorForth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Color-Forth...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/Color-Forth/48f0da6d-a568-4996-b7ff-895c869f0600n%40googlegroups.com.


--
Dr NG Maroudas, 47 Hachoresh, Kyriat Tivon, Lower Galilee, Israel 36051 
Tel  Home +972 48 337 315     Cellular +972 547 602 687


***

Darin Murphy

unread,
Jan 17, 2021, 6:20:40 PM1/17/21
to ColorForth
NickM,

What I thought CF could do for me, was/is provide a public domain, open source, forth that can run on bare metal as well as through bochs inside my Windows 10.  If you know of another forth that can do all that and is documented or at least ANSI compatible enough so I could use the forth documentation out there like "Starting Forth" and "Thinking Forth", I would be so grateful.  I do , from my rather limited understanding and experience, agree with you that CF does appear to be a different language which is similar to traditional Forth, but also it breaks away from Forth is many profound ways.  While I think Color Forth is cool, I don't feel it's as interactive as the normal forth command line, and I really don't like being forced to use a dvorak's keyboard layout with it's limited keys.  From what I've read in this group it would also require an extensive operation to change it to use qwerty's 102 keys, which is very unfortunate and probably while I won't be using it.  I have recently found and I am currently working with Winforth, because it's pubic domain and fairly ANSI compatible, so I can use what documentation there is available, while I finish up learning the basics of Forth.  I think Forth is such an amazing and miss-utilized and misunderstood language.  It's just too bad that there are so many factors limiting it's acceptance.  Forth is Lisp without being chained to "(", ")", lists, and an overly complex compiler/interpreter, while still pretty fast and very interactive.  Thank you for replying to my inquiry and explaining your perspectives of Color Forth.   Take care now and God Bless. 

Darin 

Nicolas Maroudas

unread,
Jan 18, 2021, 3:24:47 AM1/18/21
to Color Forth
Darin,

"What I thought CF could do for me, was/is provide a public domain, open source, forth that can run on bare metal as well as through bochs inside my Windows 10"

The original Chuck Moore CF was capable of running an Intel board, but Chuck was interested only in developing CF for his multi-processor chip.

The GreenArrays chip and software gives you both worlds: a well documented tried-and-tested commercial PolyForth (thrown in for free) runs a modern Intel chip in a full Windows environment; and the PForth communicates with an eval board on which one programs 144 ColorForth CPUs each in their native language CF -- as near "bare metal" as most programmers can get.

John Drake

unread,
Jan 19, 2021, 12:20:05 AM1/19/21
to Color...@googlegroups.com
Hello.  This tutorial you linked to is rather old and ColorForth has changed some.  Specifically the word "space" is no longer 
defined out of the box.  At lest not with arrayForth which is the version you can download from GreenArrays.com.   The word
space is easily defined as:

: space 0 emit ;

After doing that I went through the tutorial and everything seems to work fine for me.  I'll do a screencast in the next day or so and 
upload my results.

John

--

Darin Murphy

unread,
Jan 20, 2021, 9:33:10 PM1/20/21
to ColorForth
Thank you NickM for your suggestion and while the Improved GA144-1.20 Evaluation Kits EVB002 looks cool, I don't have $495.00 to spend on it, or the space and the tools to build the more economical, but very DYI  Breadboarding on a Budget Now, if someone were to sell a cleaned up and enclosed/packaged the latter of the two options at a reasonable price (i.e., under $100) it would be an easier sell.  I feel for Mr. Moore and the rest of the GreenArrays team.  I do think they made an amazing chip with a lot of possibilities, especially in machine learning, but I can also see how it's very limited RAM per computer would feel like a very tight restraint.  I was able to find "Win32forth" and freeforth, which are both public domain and run under Windows 10.  Their both were built in assembly like Colorforth and Win32forth uses a lot of ANSI so I can follow along with "Starting Forth" and Thinking forth.  Anyway,  I still have a lot of work and learning ahead of me.  Thanks again NickM for the help and God bless.

Darin Murphy

unread,
Jan 20, 2021, 9:33:12 PM1/20/21
to ColorForth
Thank you jmdrake for the info and suggestion.  I am currently putting my education of forth with ColorForth on hold for the time being, and moving the Win32Forth to continue my education.  Thanks again and God bless!

Howerd

unread,
Jan 21, 2021, 3:47:59 AM1/21/21
to ColorForth
Hi Darin,

Great that you are interested in colorForth :-)
Thank you for thanking me - I think that colorForth is so unusual that it deserves to be better understood, and this needs documentation.
For conventional Forth "Starting Forth" is excellent - there is an updated version available online form Forth, Inc. : https://www.forth.com/starting-forth/
You can also try out SwiftForth for free : https://www.forth.com/download/ - this should match "Starting Forth".

Which colorForth system are you running? John Drake's blog examples are from 2009, and he mentions ColorForth 2.0 and Roman Pavlyuk's Windows versions.
I think I have these in my colorForth archive, but they will most likely not work on Windows 7 or later.

This can run in QWERTY mode, so avoids the difficulty of learning the Dvorak keypad instead of the full keyboard.

Alternatively, my latest distribution of colorForth is cf2019 : https://github.com/Howerd/colorForth
(hopefully there will be a cf2021 this year, but I skipped cf2020 ;-).
cf2019 has no QWERTY mode, so you will have to learn about the keypad, documented here : http://www.inventio.co.uk/cf2019_colorForth.pdf
Also there is no "locate" and no "find" yet. But there is colour-blind mode if you press F4 twice...

The problem is that all colorForths are in a state of development, and documentation for one from 2009 will probably not apply to the same colorForth in 2021, and certainly not to other colorForths.

If you tell me which colorForth system you are using, we can take a look at the "Hello World" examples, and update them...

Cheers,
Howerd

John Drake

unread,
Jan 22, 2021, 5:40:24 PM1/22/21
to Color...@googlegroups.com
There have been other papers such as this dissertation about using a C like programming language called chlorophyll to program a GreenArrays chip to use an accelerometer to do gesture recognition.



Here is a paper on implementing cryptographic primitives on a GA144 in ColorForth.




Darin Murphy

unread,
Jan 23, 2021, 2:01:22 PM1/23/21
to ColorForth
Howard,

I just got fed up with trying to learn Forth again, for the 3-4th time now and just deleted it all from my hard drive.  I really like the concept of Forth, but the "Hoops and Loops" a newbie has to go through is ridiculous.  Even with using Gforth the tutorials are either overly complicated or outdated.  I know I could use Swift Forth to follow "Starting Forth", but even that isn't complete meaning it doesn't have blocks, and doesn't follow the book completely.  Now I'm sure I could shoot an email here about ColorForth, but that's not really teaching me forth, only have to use ColorForth and it's quirky "unforth-like" system.  I also know I could go to "comp.lang.forth" and try to get my questions answered, but it's like a "warzone" there.  Everybody is quick to tell you how great Forth is, but also how bad this group in ANSI is or how your better off spending hundreds of dollars on a commercial forth.  If you search down the history in "comp.lang.forth" , you'll see the flame war I started just because I wanted a bare-metal Forth on my RPI.  I don't know why I need coming back to try to learn Forth, there still isn't any good tutorials beyond the basics (i.e., swap, drop, rot, r>, >r, etc.,.) that actually work with the version of Forth that's available.  I also have studied and learned C including Pointer Arithmetic, so I'm not completely lost, but learning C, and Lisp (i.e., Scheme, Common Lisp) is so much simpler to learn that it is Forth because there is a lot of updated, relevant tutorials, guides, examples, samples out there, while Forth has a few bits and pieces shattered here and there, and a community always on the verge of eating itself.  While my think that Forth, as far as I can judge, is an awesome system, but it's never going to grow beyond "The best secret weapon in your toolbox" analogy if the community can't pull itself together and create some helpful and useful tutorials that are relevant and updated.  Also I do know about some tiny toy like stuff to help educate children and that's cool and all, but it's not plug-in-play ready, and outside of the very basics of Forth it doesn't help.  Learning Stack Juggling isn't hard, but building date structures, manipulating the order of evaluation/compilation, isn't as easy to do properly or how to determine why and when to do it, that's the parts of Forth that need the most hand holding and it's also the parts that is the hardest to find good documentation/tutorials/help.

Anyway, sorry for the rant.  You do not need to hear it or deserve it.  From what I've seen online you've done a lot to help Forth.  I appreciate what information you have given me and thanks again for replying to my threads, but I'm just too frustrated right now to think about Forth.  If I come back to it again and need help I'll be sure to post something.  Take care now and God bless!

Pk Sharma

unread,
Jan 24, 2021, 5:20:01 AM1/24/21
to Color...@googlegroups.com, PKSharma...@gmail.com, pksharm...@gmail.com
Reply all
Reply to author
Forward
0 new messages