I miss 'FORTH' the programming language - Page 1
Forum section: electronics / general

author: GlennSprigg
author_rank: Super Contributor
timestamp: September 03, 2018, 02:26:22 pm
content: Countless fads in life come & go. This should have stayed, as it is/was so different !!It relies heavily on 'Stacks', and 'R.P.N.' for calculations, but was so easy to implement.'Command' words were based on certain 'Primitives', from which you built higher andhigher level 'Words' from. To the end that you virtually create such a 'High' level 'Word'or instruction, with certain parameters, that their is no 'program' as such.It was used inside a lot of Chips in specialized instruments for quite a while.I won't explain more here, but will if asked !!It REALLY shouldn't have died....

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 03, 2018, 02:39:41 pm
content: I have GForth on my Android phone. Looks alive to me.

author: artag
author_rank: Super Contributor
timestamp: September 03, 2018, 06:47:22 pm
content: Postscript is based on it. I don't think that's died.

author: kizmit99
author_rank: Regular Contributor
timestamp: September 03, 2018, 08:08:42 pm
content: ebclr - thanks for posting the link to the videoI used Forth for a summer back in the early eighties as a co-op student with IBM. It's certainly "different" as languages go, but it's also enchantingly elegant...

author: borjam
author_rank: Unknown
timestamp: September 03, 2018, 08:46:52 pm
content: I used it for embedded systems in the early 90'sI was a member of the Forth Interest Group even.By the way, Mitch Bradley (the original Open Firmware author) has a Github repository with his CForth implementation.https://github.com/MitchBradley/cforth

author: daybyter
author_rank: Frequent Contributor
timestamp: September 04, 2018, 01:47:18 am
content: Just did some work on a zylin cpu implementation. Pretty similar and also very alive.

author: darrellg
author_rank: Unknown
timestamp: September 04, 2018, 05:43:54 pm
content: https://learn.adafruit.com/alternative-languages-for-programming-SAMD-boards/forth

author: RoGeorge
author_rank: Super Contributor
timestamp: September 04, 2018, 06:06:12 pm
content: Forth is well and alive all over the place.Nowadays, in the golden era of microcontrollers, embedded and Iot, it is spreading more than ever, especially because Forth has a very small footprint, and it's very easy to deploy to various architectures (a one man job, literally).You can even practice it online if you like, no need to install or buy something (don't know if this is a good online IDE, just the first search result for 'Forth online'):https://repl.it/repls/ShowyTerribleAdmin

author: David Hess
author_rank: Super Contributor
timestamp: September 05, 2018, 02:45:52 am
content: TheOpen Firmwarestandard from Sun used FORTH to allow PCI expansion cards to operate on systems with different processors. I guess that idea was too effective and too easy because it was replaced with Intel's EFI.

author: borjam
author_rank: Unknown
timestamp: September 05, 2018, 07:24:59 am
content: Quote from: David Hess on September 05, 2018, 02:45:52 amOpen Firmware was processor independent. You ported Forth and even the device driver firmware you would need to access from Open Firmware (boot support for disk controllers, etc) would be portable. I guess Intel liked the idea of a CPU independent device support just like Microsoft loved the notion of virtual machines and the Sun/Oracle "Network Computer"

author: David Hess
author_rank: Super Contributor
timestamp: September 05, 2018, 12:34:18 pm
content: Quote from: borjam on September 05, 2018, 07:24:59 amMaybe Intel saw the potential for ARM to be a threat to their desktop market so killed processor independent firmware with EFI. In any event, it is another great idea that is now dead.

author: GlennSprigg
author_rank: Super Contributor
timestamp: September 05, 2018, 01:51:05 pm
content: Wow!... I'm glad it's interest is still current !!When I said 'dead', I meant no longer prevalent as it was in the 80's, 90's.The video link/post by ebclr amazed me !!! The Video was honestly above my level, but I followedenough to grasp the contemporary usefulness of the described Mecrisp Forth, on STM32 Microcontroller.I loved the way 'Forth', not 'Fourth', (as the original system at conception could only handle 5-char filenames!)was so immediately useable while defining 'words' without re-compiling etc. You could make it almost soEnglish like, in structuring commands/sentences, (seemingly) without a 'program' as such, but simply constantlydefining higher & higher level Words. (With parameters). Control of actual Inputs/Outputs was beautiful !!I guess i was talking here, more to those that are un-familiar :-)It was a strange beast :-) The first implementation that 'I' saw/had, was on a plug-in Cartridge on theCommodore-64. This was before I found out about it's implementation in numerous chips/devices.(35 - 40 years ago !!! :-) )

author: iMo
author_rank: Super Contributor
timestamp: September 05, 2018, 07:22:09 pm
content: Mecrisp Forth running on a J1a_enhanced CPU (UPduino iCE40UP5k FPGA)https://github.com/igor-m/UPduino-Mecrisp-Ice-15kB

author: borjam
author_rank: Unknown
timestamp: September 06, 2018, 11:26:38 am
content: Quote from: David Hess on September 05, 2018, 12:34:18 pmYes, hence my sarcasmAnother great idea killed by the Wintel duopoly. And every time I have to deal with one of those hideous "BIOS" configuration tools, clearing the screen like naive Basic programmers and forcing you to shoot videos in order to catch rare errors I get violent.FreeBSD has a Forth loader actually but without actual device drivers built in it's not so useful.https://www.freebsd.org/cgi/man.cgi?loader(Back in the early 90's you should have seen the face of a friend when I booted a Sun workstation, aborted the startup to get into OpenBoot (that's how they called OpenFirmware) and I typed several silly Forth words. He couldn't believe it!

author: LapTop006
author_rank: Unknown
timestamp: September 07, 2018, 05:45:55 am
content: Quote from: David Hess on September 05, 2018, 12:34:18 pmEFI *is* processor independent. It mostly started off as the firmware layer for Intel Itanium machines, then Apple used it when they moved from (Open Firmware) PowerPC to x86, and now more recently UEFI has replaced the old BIOS for most x86-64 PCs, and it's even used by ARM64 servers.It certainly does have it's weirdnesses, but so do all the firmware options.

author: borjam
author_rank: Unknown
timestamp: September 07, 2018, 07:19:04 am
content: Quote from: LapTop006 on September 07, 2018, 05:45:55 amOpen Firmware uses Forth, a high level language.As long as you provide the right primitives in machine code, the rest of the code is processor indepent.So, imagine that you have a PCI network card with some initialization code in firmware. If the firmware is Open Firmware, the same card with the same firmware in flash or ROM will work on a machine regardless of the processor. You don't need to choose SPARC firmware or PowerPC for example.Is that possible in EFI? Having several compiled versions for different processors doesn't count. With Open Firmware you would support even future processors without touching the ROM or flash memory in the add-on card.For someone not familiar with this notion, it would be similar to having firmware written in Python.

author: guenthert
author_rank: Frequent Contributor
timestamp: September 12, 2018, 07:28:28 am
content: OLPC-1 used Open Firmware too, which was a bit controversial due to the proprietary nature of the software and it being a one-man project (like virtually all FORTH projects). Somehow FORTH seems to attract people interested in quick initial results, rather than long term cooperation. Yeah, perhaps one could summarize FORTH as the quickest way to get to the 80% solutionSaid that, FORTH does seem to be a good fit for the retro and steam-punk computers (usually single-person projects as well) and it sure is fun. Over at forums.parallax.com Peter Jakacki quite actively maintains Tachyon, a fast FORTH implementation for the Propeller MCU.

author: borjam
author_rank: Unknown
timestamp: September 12, 2018, 10:18:16 am
content: Quote from: guenthert on September 12, 2018, 07:28:28 amSo people is using Linux on proprietary hardware with extremely proprietary processors and so on.I remember when Intel was called "open" while SPARC (despite being an open standard) was considered "proprietary". Ah, doublethink!QuoteBeing one man or team work depends on your working style. I've used Forth in the real world 20 years ago and it was certainly a quick and efficient way to build an embedded application for an 8 bit microcontroller. Nowadays, when programming begins with mastering a complex mix of poorly docuemnted multi-gigabyte class libraries, it doesn't fit of course. But that's an entirely different story.Compared to the two typical alternatives at the time, C and raw assembler, it was really awesome.

author: TheNewLab
author_rank: Frequent Contributor
timestamp: December 13, 2018, 04:31:18 am
content: US government still need FORTH programmers...go figure...

author: EEVblog
author_rank: Unknown
timestamp: December 13, 2018, 05:12:31 am
content: The data recorder that's in my logo photo runs Forth on a TMS320, compiler only available in German!

author: iMo
author_rank: Super Contributor
timestamp: December 13, 2018, 09:09:26 am
content: QuoteNone C at that time existed, imho..

author: rrinker
author_rank: Super Contributor
timestamp: December 14, 2018, 06:34:54 pm
content: Quote from: TheNewLab on December 13, 2018, 04:31:18 amI just got finished with a project that was evaluating application being used by the client for compatibility with upgraded server infrastructure. At least one of them is STILL promarily customized by programming in COBOL.FORTH has intrigued me at various times but I never really set out to learn it - perhaps I should.

author: rhb
author_rank: Super Contributor
timestamp: December 14, 2018, 10:55:39 pm
content: The Kitt Peak radio telescope was programmed in forth. And the airport baggage handling system at the Riyahd airport. Forth, Inc. is still in business, so I'd say it's a safe bet forth is used a lot more than people think.If you have to program a one off piece of real time hardware it's pretty hard to beat. It is the bare minimum you need to have a portable piece of software that accommodates incremental changes to the hardware gracefully.This is in my view the best book for understanding the forth model:https://www.amazon.com/Threaded-Interpretive-Languages-Design-Implementation/dp/007038360XWhen I looked it up a week or so ago a copy was $10.

author: tsman
author_rank: Frequent Contributor
timestamp: December 14, 2018, 11:09:36 pm
content: Quote from: borjam on September 07, 2018, 07:19:04 amYes. You can have both types in UEFI. EFI Byte Code drivers which are processor independent but need a EBC interpreter and regular executables which are tied to that architecture or platform but may be executed directly by your OS. It is up to whoever implements it.

author: stevelup
author_rank: Regular Contributor
timestamp: December 17, 2018, 09:56:45 pm
content: Quote from: rrinker on December 14, 2018, 06:34:54 pmCOBOL is still very much here...One of our primary business apps runs onthis.

author: rrinker
author_rank: Super Contributor
timestamp: December 23, 2018, 04:52:43 am
content: MicroFocus COBOL is indeed what is embedded in the HR app I was referring to.Now that's an old name - or sort of at least, I certainly remember seeing ads for MicroFocus compilers back at least to the early 80's - prior to then I rarely read computer-focused magazines, I was a PE subscriber. Read the occasional Byte at the library after I picked out my books and was waiting for my Mom and sister to finish.

author: rhb
author_rank: Super Contributor
timestamp: December 23, 2018, 01:02:03 pm
content: Focus was a major mainframe database package. MicroFocus appeared when the IBM PC was introduced. I never used Focus directly, but lots of reports I generated while processing seismic data were produced by Focus applications.

author: techman-001
author_rank: Frequent Contributor
timestamp: December 26, 2018, 12:57:02 pm
content: The rumors of the death of Forth have been greatly exaggerated ;-)I have been maintaining a Forth documentation site for Mecrisip-Stellarishttp://hightechdoc.net/mecrisp-stellaris/_build/html/index.htmlsince around 2014 and it gets about 80 - 100 unique hits a day.Mecisp-Stellaris caters for ARM Cortex-M while Mecrisp caters for MSP-430.There is also a Mecrisp-Quintus for RISC-V and PIC32, a Mecrisp-ICE which is an enhanced version of Swapforth and the J1a stack processor by James Bowman.Mecrisp-Across is a tethered Forth for the MSP430, which uses a Ti Tiva Connected Launchpad as the cross-compiler and a 4 wire JTAG umbilical. The target MSP430 MCU does not use any preloaded firmware, and will run with only 500 Bytes of Flash, appearing to have a full Forth on board with 64KB of Flash.http://hightechdoc.net/mecrisp-across/_build/html/index.htmlI have also started doing a few YouTube videos to demonstrate that Forth is keeping up with the times and also because there just aren't a lot of Forth videos around.https://www.youtube.com/watch?v=kDi-Nlz3-QA.They are pretty basic videos and not up to the high standard of eevblog, so don't expect too much!I mainly use the STM32F051 for all my projects and examples as it's cheap, fast, tiny and immensely capable.The Mecrisp* Home Page is:http://mecrisp.sourceforge.net/Cheers,Terry