6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu May 09, 2024 4:19 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Mar 21, 2016 10:17 am 
Offline

Joined: Sat Mar 27, 2010 7:50 pm
Posts: 149
Location: Chexbres, VD, Switzerland
I searched some books in my university library, and I found a couple of them in both English and French language (my native language), however they were terrible. The explanation of what was going on were really unsatisfying, and they didn't contain enough exercises to assimilate the theory. The best book was decent to learn the basics (i.e. use FORTH as a calculator), but lost me as soon as an operation that implies ALLOT, CREATE and DOES> words, and my understanding is that those two words are really central and are what set apart FORTH from a simple calculator to a real programming language.

Also the book was detailed about a feature that would be seldom used (double words and how to compute using double words) but I have no idea how to display text, or use a fixed-length array, which is absolutely basic functionality for a programming language.

Finally all those books were too focused on platform specific things, and wouldn't apply to neither GFORTH (running on a modern PC hardware) nor the 6506 (extremely limited 8-bit platform). Things like memory pages or dictionary lookup are really platform specific and should be treated in annex and not in the book I guess - or at least they should be treated in a specific chapter in the book.

I know there is lots of tutorials online, but I prefer to learn programming languages with real, paper books. The reason why is very simple : When I am on my PC I have other things to do than learn a programming language.

So is there such a book that is:

1. Not platform specific (especially not about an extinct/unused platform)
2. Remains high level - if low level stuff is explained it needs to be explained apart from the high level stuff - there is no need to detail endianness or how pointer works internally in the middle of a high level chapter for instance.
3. Contain plenty of interesting/sufficient challenging exercises (not trivial things like : Do the following calculation), ideally with corrections
4. Do not explain only the basics but also advanced topics on how to get fairly complex programs working in FORTH
5. Is available in either English or French, preferably French, but English is no major problem.


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 21, 2016 6:30 pm 
Offline

Joined: Mon Jan 26, 2015 6:19 am
Posts: 85
I don't know if they meet your long list of requirements but "Starting Forth" and "Thinking Forth" by Leo Brodie are still definitive texts. You might be able to order them from Amazon but they are mainly available as downloadable files nowadays.

Maybe you should get a kindle.


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 21, 2016 9:31 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
There are some books and other documents at http://forth.free.fr/ but I can't evaluate them!


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 22, 2016 1:19 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
I would second reading "Starting Forth" and "Thinking Forth", though they are very dated and you'll have to unlearn a few things afterwards (especially loops). Still: "Starting Forth" (http://www.forth.com/starting-forth/sf0/sf0.html) is a gentle introduction to the basics and has cute drawings, so start with that. Then, after a few chapters, and even before you're done, switch to "Thinking Forth" (http://thinking-forth.sourceforge.net/) because that will get you started on the philosophy behind Forth, which will motivate you to get through the part when you're thinking that these people must be completely out of their minds. Switch back and (cough) forth for a while until you have the hang of the basics and the deeper ideas from both books.

After that: The Gforth documentation is good and will teach you ANSI, though they do some things differently. There is no other serious documentation for, say, reading things from files. Words like DEFER and CREATE/DOES are enormously powerful, so you'll want to spend some time with those by themselves. The most important thing, though, is to write something longer in Forth. I wrote a disassembler, an assembler, and then finally an emulator in Forth, and at various points, I had insights I would never have had from just reading about it.

If you have some background in functional programming (which I didn't), that helps, because you'll be used to writing little functions without side effects. I had to go through the phase where I was "coding Python in Forth", which was better than the classic "coding C in Forth", but still frustrating. The breakthrough for me was to realize that I wasn't "coding in Forth" at all, but "expanding Forth" into a specialized language for the problem space. Since you are inside the code, debugging becomes very easy, for example. After Forth, languages like Python or Go seem like closed boxes.

Good luck and don't be afraid to ask!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: