Skip to content

A Forth interpreter, entirely written as bash script. But by now is yoda (https://github.com/Bushmills/yoda) the better bashforth.

License

Notifications You must be signed in to change notification settings

goblinrieur/Bashforth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bashforth

Will I guess only add few more words to get it better & more usable. I will never try to have a full ANS forth compatibility.

If you need a full forth, prefer gnu-forth, swiftforth, figforth, pforth, or any other interpreter. Here is a bash exercise at first !

already usable

pic1

will now include a forth written words library

default will be named library.fs

lib

while in bashforth interpreter :

include lib/library.fs

keep bash interaction available

pic

forked on Tue Jul 18 2023

This Forth interpreter, entirely written as bash script, is a F³ (Fully Functional Forth), albeit a tad slow. Some would call it "sluggish". As rough indication, an ARM SBC which I'm running Bashforth on takes about 15 second for an empty loop of 100,000 iterations. It has built-in doc and see facilities, simplifying exploration of Bashforth. Bashforth lacks floating point support and vocabularies, but comes with essentials like defining word builder, exception handling. It also provides an extra string stack, along with a set of words, operating on string stack.

Those interested in bashforth might like yoda which does away with the virtual machine and compiles directly to bash functions. As consequence can a substantial performance difference be realised (yoda is faster by a factor of somewhere between 30 and 50 times).
At this point yoda has progressed enough that I can say that now yoda is the better bashforth, being more potent while it's still smaller than bashforth. And it supports automatically including libraries.

About

A Forth interpreter, entirely written as bash script. But by now is yoda (https://github.com/Bushmills/yoda) the better bashforth.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 98.2%
  • Forth 1.8%