Author Topic: is it Forth to discuss?  (Read 12019 times)

0 Members and 1 Guest are viewing this topic.

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
is it Forth to discuss?
« on: March 28, 2017, 01:22:49 pm »
With quick searh I couldn't find anything forthwhile on this topic. Do someone still use Forth to program things. I wonder, the underlying concept and structure of forth is really tempting. It seems to be like gods gift to empedded programming (where it kind of did born).

There seems to be a few compilers (for us who aren't cooking own) for ie. arduino.

« Last Edit: March 28, 2017, 02:25:32 pm by Vtile »
 

Offline borjam

  • Supporter
  • ****
  • Posts: 908
  • Country: es
  • EA2EKH
Re: is it Forth to discuss?
« Reply #1 on: March 28, 2017, 01:51:16 pm »
I used it many years ago, an awesome language :)

The main reference you can find is the webpage of the now defunct Forth Interest Group (www.forth.org).

 
The following users thanked this post: Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #2 on: March 28, 2017, 02:30:49 pm »
Yep, the 100% modularity of it is really tempting. I need to cut my teeth on it, I just need to find a programming cable for the arduino nano.  ;D 

Code: [Select]
1
1
= +
2
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: is it Forth to discuss?
« Reply #3 on: March 28, 2017, 02:33:03 pm »
I wouldn't consider Forth a blessing for embedded programming but, then, opinions vary.  I'm not sure how to write an RTOS is Forth.  Heck, I'm not even sure how to write an interrupt handler.

What I do like about it is the ability to build programs from the bottom up.  I think that's about the only way they can be built.

MANY years ago ('80), I was visiting a disk drive manufacturer.  They did all their testing in Forth because they could simply add a new test to lower level code already known to work.  Literally, it was as simple as typing a single command string to create an entirely new test pattern.

I'm pretty sure Forth is a dead issue.  There are still pockets of folks using it, the same as there is with BASIC.
 
The following users thanked this post: Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #4 on: March 28, 2017, 02:39:36 pm »
I wouldn't consider Forth a blessing for embedded programming but, then, opinions vary.  I'm not sure how to write an RTOS is Forth.  Heck, I'm not even sure how to write an interrupt handler.

What I do like about it is the ability to build programs from the bottom up.  I think that's about the only way they can be built.

MANY years ago ('80), I was visiting a disk drive manufacturer.  They did all their testing in Forth because they could simply add a new test to lower level code already known to work.  Literally, it was as simple as typing a single command string to create an entirely new test pattern.

I'm pretty sure Forth is a dead issue.  There are still pockets of folks using it, the same as there is with BASIC.
Well as far as I understand it you do not need to write RTOS on Forth as it is already RTOS by nature. The interrupt handler might be interesting, but if it can be written on ASM it should be possible on Forth. Yes, I'm rookie what comes to "baremetal" programming (or any non-niche programming in general).
 

Offline borjam

  • Supporter
  • ****
  • Posts: 908
  • Country: es
  • EA2EKH
Re: is it Forth to discuss?
« Reply #5 on: March 28, 2017, 02:52:15 pm »
I wouldn't consider Forth a blessing for embedded programming but, then, opinions vary.  I'm not sure how to write an RTOS is Forth.  Heck, I'm not even sure how to write an interrupt handler.
Times have changed. Forth offered the possibility of running the whole development system in an 8 bit processor with some KB of RAM. Other approaches demanded a separate compiler and debugger, an ICE, etc.

But still Forth has some advantages of its own depending on what you want to do. You program by extending the language instead of just writing functions. Many years ago I saw an awesome example on an issue of Dr Dobbs Journal. By extending the language it was possible for a non-programming engineer to write a program to operate some machinery.

http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/DDJ/1989/8902/8902e/8902e.htm

Regarding the RTOS, it was quite easy to write a multitasking kernel in Forth. I wrote one for the HD6303 back in 1991. Again, it worked by extending the language, and I added a new type of function definition: a task.

A task had an "initialization section" and a "task body". When the whole thing was compiled, everything was stored in memory so that it would be copied to an EPROM.

During the boot process, the kernel created the process control blocks in RAM, and executed the "initialization section" of each of the processes, giving control to the "task body" which would be the main program for each task. It was a simple round robin approach, but I could have added priorities and real time constraints.

The Forth system I used, which was a version of fig-Forth running on a TDS9092 board, included support to write interrupt routines in Forth. But of course in a 8 bit processor at 1 MHz it was better to write the interrupt handlers in assembly. I actually wrote small assembly language routines to catch interrupts that needed a timely service, and those handlers registered the event description together with a timestamp in an event queue, to be serviced by the higher level code with lesser time constraints.

Nowadays you could do some of that work in Python running on a Raspberry Pi, with the same advantage of interactive debugging and testing, but back in 1990 that was unthinkable!

And, unlike my friends at the university writing a multitasking kernel for an Intel 8031 in the classical way (assembly), I did not use an in circuit emulator. Just a serial terminal and a bunch of hex dumps after executing code blocks from the command line.

Quote
do like about it is the ability to build programs from the bottom up.  I think that's about the only way they can be built.

MANY years ago ('80), I was visiting a disk drive manufacturer.  They did all their testing in Forth because they could simply add a new test to lower level code already known to work.  Literally, it was as simple as typing a single command string to create an entirely new test pattern.

Was it Maxtor? I think I saw them mentioned in a magazine.
« Last Edit: March 28, 2017, 02:59:51 pm by borjam »
 

Offline borjam

  • Supporter
  • ****
  • Posts: 908
  • Country: es
  • EA2EKH
Re: is it Forth to discuss?
« Reply #6 on: March 28, 2017, 02:54:02 pm »
Well as far as I understand it you do not need to write RTOS on Forth as it is already RTOS by nature. The interrupt handler might be interesting, but if it can be written on ASM it should be possible on Forth. Yes, I'm rookie what comes to "baremetal" programming (or any non-niche programming in general).

No, Forth was not a RTOS, although some Forth implementations included some kind of RTOS built in. But as I said the language gave you some nice facilities if you wished to implement your own multitasking or even RTOS on top of it.
 
The following users thanked this post: Vtile

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
Re: is it Forth to discuss?
« Reply #7 on: March 28, 2017, 03:01:21 pm »
Been playing with flashforth a little myself, on the PIC.
 
The following users thanked this post: Vtile

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5317
  • Country: gb
Re: is it Forth to discuss?
« Reply #8 on: March 28, 2017, 03:02:41 pm »
I got quite into Forth in the early 80s. I already had a fairly reasonable background in assembly language so it was an obvious way to go. The various BASIC based machines of the time were pretty slow, and in comparison Forth by its very nature encourages you to write your code in an efficient manner that can be easily and quickly be compiled or interpreted.

When you first encounter it, it looks daunting, but it's really quick to get over the initial learning curve and become quite proficient. I did however find it incredibly difficult to teach to people without machine/assembly language experience.

I remember writing a Breakout in an afternoon on a Jupiter Ace once as a demonstration as to what could be achieved in a short time frame. Some acquaintances of mine took Forth and altered it for use as a real time spacecraft OS which was still in use in the last decade. It ticks a lot of boxes for resource-constrained systems.
 
The following users thanked this post: Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #9 on: March 28, 2017, 03:08:01 pm »
Interesting, really interesting.
Nowadays you could do some of that work in Python running on a Raspberry Pi, with the same advantage of interactive debugging and testing, but back in 1990 that was unthinkable!
. ..But Raspberry Pi isn't embedded, but a PC with ARM processor!!  >:D
 

Offline borjam

  • Supporter
  • ****
  • Posts: 908
  • Country: es
  • EA2EKH
Re: is it Forth to discuss?
« Reply #10 on: March 28, 2017, 03:17:25 pm »
Interesting, really interesting.
Nowadays you could do some of that work in Python running on a Raspberry Pi, with the same advantage of interactive debugging and testing, but back in 1990 that was unthinkable!
. ..But Raspberry Pi isn't embedded, but a PC with ARM processor!!  >:D
It depends on how you use it! ;)

 
The following users thanked this post: Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #11 on: March 28, 2017, 03:23:42 pm »
Interesting, really interesting.
Nowadays you could do some of that work in Python running on a Raspberry Pi, with the same advantage of interactive debugging and testing, but back in 1990 that was unthinkable!
. ..But Raspberry Pi isn't embedded, but a PC with ARM processor!!  >:D
It depends on how you use it! ;)
By running some linux derived general OS. :D  The "once clear " line (note the scientific wording) between embedded and general computers have gone.  :-[
 

Offline borjam

  • Supporter
  • ****
  • Posts: 908
  • Country: es
  • EA2EKH
Re: is it Forth to discuss?
« Reply #12 on: March 28, 2017, 03:35:15 pm »
It depends on how you use it! ;)
By running some linux derived general OS. :D  The "once clear " line (note the scientific wording) between embedded and general computers have gone.  :-[
[/quote]
Well, it's kinda blurry. Would you say that QNX qualifies as an embedded OS? VxWorks?

 
The following users thanked this post: Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #13 on: March 28, 2017, 03:45:51 pm »
It depends on how you use it! ;)
By running some linux derived general OS. :D  The "once clear " line (note the scientific wording) between embedded and general computers have gone.  :-[
Well, it's kinda blurry. Would you say that QNX qualifies as an embedded OS? VxWorks?
[/quote]Can you retype it to your device from design papers?  :-//  :wtf:
 

Offline Gibson486

  • Frequent Contributor
  • **
  • Posts: 324
  • Country: us
Re: is it Forth to discuss?
« Reply #14 on: March 28, 2017, 04:31:37 pm »
I could see why you would like this if you coded in assembly and you only had 512 bytes of memory space....other than that, I do not see that as a gift to embedded programming. To each his own.
 
The following users thanked this post: Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #15 on: March 28, 2017, 04:42:12 pm »
I could see why you would like this if you coded in assembly and you only had 512 bytes of memory space....other than that, I do not see that as a gift to embedded programming. To each his own.
Why only then, if your system is not fully bloated IOT mini PC. what makes the Forth something comparable as a curse?
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: is it Forth to discuss?
« Reply #16 on: March 28, 2017, 05:14:21 pm »
I wouldn't consider Forth a blessing for embedded programming but, then, opinions vary.  I'm not sure how to write an RTOS is Forth.  Heck, I'm not even sure how to write an interrupt handler.
I'm pretty sure Forth is a dead issue.  There are still pockets of folks using it, the same as there is with BASIC.

100% agree. Not only is forth dead, but unless you're familiar with it and the utterly stupid concept of "reverse polish notation" where 3 6 + is the command for 3+6 (small rant, WTF, you have all the right characters and demanded the wrong order? C was developed only a little after forth, one is CLEARLY superior). Basically, there are a few people using and recommending forth but no one seriously suggesting it get rolled into even low end ARM projects. IMO for embedded, the last nail in the coffin for forth was 32bit processors under $5.


but if it can be written on ASM it should be possible on Forth.

That's exactly right. Forth is platform independent assembly. That's all. It's directly dealing with the stack and managing that to get things done a single step at a time but seriously... Unless your entire program is written in ASM and you need bleeding edge speed or control over every single cycle, what is the point?

To all those ideas of people using it as an interpreter - LOL - OK, look, if you can code in Forth to run some machine - you could have EASILY learned another language. To say, I can't code, but I can write in forth is to say, "nah, I can't take you to the mall, but I drive rally cars in competition".

I could see why you would like this if you coded in assembly and you only had 512 bytes of memory space....other than that, I do not see that as a gift to embedded programming. To each his own.

Exactly.

On this forum it was suggested to me to run a forth interpreter instead of a domain specific language, but I would be the ONLY person I know in my life that could ever write those forth scripts, even the other programmers I know would stumble at that, it's just so obscure. I'm glad I found a lightweight javascript interpreter instead of spending even more than a day on forth.
 
The following users thanked this post: Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #17 on: March 28, 2017, 05:30:19 pm »
 ;D ;D

Forth must be really good as it greates so much hatred in assumed C growd.

Makes me even more tempted to start to fiddle with forth. Besides I actually feel that HPs RPN calculators are a gods gift for a mankind. 

My brain myst be NOT Wired.
« Last Edit: March 28, 2017, 05:32:30 pm by Vtile »
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11708
  • Country: us
Re: is it Forth to discuss?
« Reply #18 on: March 28, 2017, 05:32:24 pm »
I used Miller Microsystems Forth back in the early 80s with it's Turtle graphics.  Borland's Turbo Pascal would run circles around it.
 
The following users thanked this post: Vtile

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: is it Forth to discuss?
« Reply #19 on: March 28, 2017, 05:40:05 pm »
Makes me even more tempted to start to fiddle with forth.
Definitely worth a play.  I did alot of FORTH in the 1980s and every now and again I get the urge to build a Jupiter Ace or equivalent... (maybe with a souped up display)...

... however IMHO FORTH programs become a bit of a nightmare as they scale and with the advent of more powerful computers and the possibility of testing code on a host platform, emulation etc and C compilers that produce tight code the advantages of C meant I hung up my FORTH boots a while back.

(I still have an RPN calculator to scare the kids)
 
The following users thanked this post: Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #20 on: March 28, 2017, 05:44:01 pm »
Makes me even more tempted to start to fiddle with forth.
Definitely worth a play.  I did alot of FORTH in the 1980s and every now and again I get the urge to build a Jupiter Ace or equivalent... (maybe with a souped up display)...

... however IMHO FORTH programs become a bit of a nightmare as they scale and with the advent of more powerful computers and the possibility of testing code on a host platform, emulation etc and C compilers that produce tight code the advantages of C meant I hung up my FORTH boots a while back.

(I still have an RPN calculator to scare the kids)
Nice. The RPL is also so nice language as a bastard child of Lisp and Forth.  ;D
« Last Edit: March 28, 2017, 05:46:38 pm by Vtile »
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 593
Re: is it Forth to discuss?
« Reply #21 on: March 28, 2017, 05:50:33 pm »
Nice. The RPL is also so nice language as a bastard child of Lisp and Forth.  ;D

Don't take any offense to this... But are you trying to solve a problem? Or are you trying to be a code hipster?  ^-^
 

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #22 on: March 28, 2017, 06:02:12 pm »
Nice. The RPL is also so nice language as a bastard child of Lisp and Forth.  ;D

Don't take any offense to this... But are you trying to solve a problem? Or are you trying to be a code hipster?  ^-^
Heh, No I don't have any problem in hand to solve. I'm also trying to avoid being a code hipster.  :D I just find the basic concept of Forth really neat and fascinating, more so than C ( the one that is closest to the religion after ++ ), ObjPascal, (Visual)Basic(.net), ASM (the anticrist), Python etc.  The bonus is that it doesn't have brackets, were they curly or not. ^-^
« Last Edit: March 28, 2017, 06:09:34 pm by Vtile »
 

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #23 on: March 28, 2017, 08:09:43 pm »
I think I start my journey of poking around with Forth and Arduino Nano that have have been garhering dust on my desk with AmForth.

https://youtu.be/gFE6oK7jkq4?t=6m24s

It is just so, uh. :)
« Last Edit: March 28, 2017, 08:15:45 pm by Vtile »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: is it Forth to discuss?
« Reply #24 on: March 29, 2017, 05:56:42 am »
I find Forth sort-of nice if you want/need a semi-interactive thing with a parser.
Being able to have appropriate action just HAPPEN when you type/send "<bunch of standard math/etc expression stuff> MYFUNC <with possible looping>", without having to deal with your own string handling, or parsing, or expression evaluation, can be great.  If that's what you need to do.

Other than that, Forth seems unpleasantly mired in 1970s-era language philosophy.   And a particular subset of that philosophy where you didn't have cross-compilers or even cross-assemblers, and loading your code involved 30-minutes in a UV-eraser and 5 minutes in a separate device programmer, if you were lucky.   So you needed to fit everything on your target system.  And it's actually rather ugly.  I mean, redefining the meaning of standard functions isn't "clever"; it's pretty close to "evil", and if the language allows it, that is NOT a 'feature' !
 

Offline gmb42

  • Frequent Contributor
  • **
  • Posts: 294
  • Country: gb
Re: is it Forth to discuss?
« Reply #25 on: March 29, 2017, 11:53:59 am »
For those interested in Forth on embedded systems jcw over at JeeLabs has made a series of posts on using Forth on his new JeeNode Zero.
 

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #26 on: March 29, 2017, 04:52:58 pm »
^^ Thanks. I'll look it up.

Here is somesort of Forth Standard page. The official ISO standard is from 1997.

http://forth-standard.org/
« Last Edit: March 29, 2017, 05:07:57 pm by Vtile »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: is it Forth to discuss?
« Reply #27 on: March 29, 2017, 05:56:19 pm »
I find Forth sort-of nice if you want/need a semi-interactive thing with a parser.
Being able to have appropriate action just HAPPEN when you type/send "<bunch of standard math/etc expression stuff> MYFUNC <with possible looping>", without having to deal with your own string handling, or parsing, or expression evaluation, can be great.  If that's what you need to do.


That sounds a lot like interactive BASIC with RPN.

[/quote]

Other than that, Forth seems unpleasantly mired in 1970s-era language philosophy.   And a particular subset of that philosophy where you didn't have cross-compilers or even cross-assemblers, and loading your code involved 30-minutes in a UV-eraser and 5 minutes in a separate device programmer, if you were lucky.   So you needed to fit everything on your target system.  And it's actually rather ugly.  I mean, redefining the meaning of standard functions isn't "clever"; it's pretty close to "evil", and if the language allows it, that is NOT a 'feature' !
[/quote]

Self-modifying code was fairly common in the '60s.  I thought we tried to get away from that with the Harvard Architecture and the way GCC puts code and data in different segments and enforces access rights.

I do like the idea of the inverted pyramid coding.  Always building on things that were written before.  In a way, I find it kind of elegant.  But I don't think I'll spend any more time with it.  I had enough of that when I was programming an HP48GX calculator.  It wasn't Forth but it was pretty close.
 
The following users thanked this post: Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #28 on: March 29, 2017, 07:21:46 pm »
I think I start to see some pitfals on Forth, but still it will be really interesting language / development environment in many cases.

Definedly not a language for writing a graphical and windowed OS, but something that interacts or controls the environment and even more so in cases where you do not have a full understanding of it and you learn by doing. Also interesting aspect is the fact that the toolchain is on the device itself so you don't need to hunt down the proper OS and virtual machine 20 years from now, just plug in terminal and keep programming (in case of some real world long living devices).

For me what makes it tempting also is that I can easily hack around the uC, which I'm not too familiar with or I don't have comp. science education/background which would restrict me to favor certain architecture or philosophy. The one similar feature of mentioned RPL programming is the ability to test around in normal environment and when working solution is found repeat the same command sequence between program delimers to use next time needed.

Also one thing which puts me away on the ie. Arduino C -environment is the peripheral libraries it turns the development a really boring action of "filling the whitespace in worksheet with functions". I don't want to file a report to communicate with computer, I want to talk with it!  ;D

Definedly not a solution for everything.
« Last Edit: March 29, 2017, 07:34:56 pm by Vtile »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: is it Forth to discuss?
« Reply #29 on: March 29, 2017, 07:34:53 pm »
Open Firmware from Sun Microsystems used Forth for processor independent device drivers among other things.  Unfortunately the world moved to UEFI.
 
The following users thanked this post: Vtile

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1668
  • Country: us
Re: is it Forth to discuss?
« Reply #30 on: March 30, 2017, 04:57:16 pm »
I recently decided I needed a small extension language for my microcontroller projects and decided to implement a Forth interpreter and compiler. I wrote it entirely in ARM assembly language for the Cortex-M parts and the whole thing is around a thousand lines of code. It's not as fast as compiled C, but I wanted it to be able to do quick and dirty things with an interactive command line. It fulfills that purpose quite well, but I wouldn't want to write anything larger than a few dozen lines in it as it starts to look like unreadable gobbledygook very quickly.

After using it for a few months, I've rethought my decision and have decided to write a Scheme interpreter instead. Languages like Scheme seem to fit my way of thinking better than Forth does.

As for the historical perspective, Forth's heyday (if it ever had one) was probably in the late 70s through the mid 80s. Open Firmware is probably the most well-known mainstream use of Forth. Other than that it's rarely used now, and most people who weren't around back then have never heard of it. It did have a reputation as a "hippy" language back in the day.
Complexity is the number-one enemy of high-quality code.
 

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #31 on: March 30, 2017, 06:06:55 pm »
I recently decided I needed a small extension language for my microcontroller projects and decided to implement a Forth interpreter and compiler. I wrote it entirely in ARM assembly language for the Cortex-M parts and the whole thing is around a thousand lines of code. It's not as fast as compiled C, but I wanted it to be able to do quick and dirty things with an interactive command line. It fulfills that purpose quite well, but I wouldn't want to write anything larger than a few dozen lines in it as it starts to look like unreadable gobbledygook very quickly.

After using it for a few months, I've rethought my decision and have decided to write a Scheme interpreter instead. Languages like Scheme seem to fit my way of thinking better than Forth does.

As for the historical perspective, Forth's heyday (if it ever had one) was probably in the late 70s through the mid 80s. Open Firmware is probably the most well-known mainstream use of Forth. Other than that it's rarely used now, and most people who weren't around back then have never heard of it. It did have a reputation as a "hippy" language back in the day.
Thank you for the insights.

I needed to googe about scheme (Lisp) and found on the wiki: "Scheme Steering Committee calls it "the world's most unportable programming language""  ;D I read similar comment about early Forth implementations. (IIRC someone somewhere spoke similarly on the C compilers of the 80s with all sorts of partial implementations) It would be interesting to know what it status would be if it would have been invented hacked together in some "cool place" like Bell Labs or in MIT instead of beeing some hackjob of entrepreneur.
« Last Edit: March 30, 2017, 06:10:43 pm by Vtile »
 

Offline borjam

  • Supporter
  • ****
  • Posts: 908
  • Country: es
  • EA2EKH
Re: is it Forth to discuss?
« Reply #32 on: March 31, 2017, 12:07:43 pm »
I don't understand some angry reactions at it. Or yes :)

I used it for several years and it did a great job. Back in the old days it had several advantages. Now, as some have pointed out, resources are not so scarce and you don't really need to run a complete development environment in a tiny processor.

That said.

There are several free versions in source form. The old fig-Forth implementations are available for several old processors, and Mitch Bradley, the main author of Open Firmware as far as I know, has a Forth implementation in C available on Github.

https://github.com/MitchBradley/cforth
 
The following users thanked this post: Vtile

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: is it Forth to discuss?
« Reply #33 on: March 31, 2017, 03:10:06 pm »
In the early years (prior to '80), I did a lot of work with one-off 8085 designs.  First code to bring up was a simple Intel Monitor that would allow me to load other programs, read and write memory, etc.  Low level stuff but easy to get running.  Page 33 et seq here:

http://www.retro.co.za/ccc/8080/SDK-80/MCS-80%20System%20Design%20Kit%20Users%20Guide.pdf

The second (and sometimes last) thing to bring up was Palo Alto Tiny Basic:

https://en.wikipedia.org/wiki/Tiny_BASIC

The advantage was the ability to write more complex diagnostics in a somewhat higher level language.  The interpreter was ROM resident so only the application code needed to be downloaded.  Later, PATB was modified to use the CP/M Operating System for file storage.

FORTH came along about the same time and there were several incantations of full blown BASIC.  FORTRAN came along as did C but the real programming environment came with UCSD Pascal.  Real, serious, business programs were being written in Pascal right up until UCSD cancelled all the licenses.

https://en.wikipedia.org/wiki/UCSD_Pascal


 
The following users thanked this post: Vtile

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: de
Re: is it Forth to discuss?
« Reply #34 on: April 02, 2017, 04:09:14 pm »
I still have a weak spot for FORTH.  The simplicity is quite elegant, the inner interpreter seems 'discovered' rather than 'invented'.  Creating a FORTH system (similar to Lisp, applications are typically delivered as 'whole world' system, i.e. one image containing user and system code) is easy - you can do it, give it a try (well, pick an early, small version, not ANS Forth).  Unfortunately, it's so easy everyone who ever programmed in FORTH created their own system.  While Lisp might not scale to projects with dozens of programmers, FORTH doesn't scale beyond teams with member count greater than one.  Collaboration in FORTH typically means someone shares his/her code and someone else re-implements it with his/her improvements.

It's great fun though, if you need to start from scratch.  Perfectly suited for a 70's-80's retro computing project with a few KiB of RAM; otherwise just forget about it.  It's a grand idea whose time has come and gone.
« Last Edit: April 02, 2017, 04:35:41 pm by guenthert »
 
The following users thanked this post: NivagSwerdna, Vtile

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: is it Forth to discuss?
« Reply #35 on: April 03, 2017, 10:59:15 am »
 
The following users thanked this post: jnz, Vtile

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: is it Forth to discuss?
« Reply #36 on: April 03, 2017, 07:59:07 pm »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf