3 ms·
>"J1 is a small (200 lines of Verilog) stack-based CPU, intended for FPGAs. A complete J1 with 16Kbytes of RAM fits easily on a small Xilinx FPGA. PDS: A lon
by peter_d_sherman 6y ago
>"J1 is a
small (200 lines of Verilog)
stack-based CPU, intended for FPGAs. A complete J1 with 16Kbytes of RAM fits easily on a small Xilinx FPGA.
PDS: A long time ago, I thought that Forth was "just another computer programming language", but back then, I had no appreciation for it, because I didn't understand where it fits in on the abstraction hierarchy that we call modern day computing...
I didn't have this appreciation, at the time, because I had not worked on writing compilers at the time...
Now, let me explain to you why Forth is so gloriously wonderful!
You see, in terms of abstraction, where transistors are the lowest level, and Lisp, and Lisp-like languages are the highest, and most compilers are somewhat mid-level,
Forth is the next step up above machine language -- but a step below most compilers!
You'd know this, you'd derive this, if you ever tried to write a compiler from the bottom up (going from assembly language to a compiler) rather than from the top down (what is taught about compiler construction in most University CS classes, i.e., the "Dragon Book", etc.)
See, Forth is sort of what happens when you add an at-runtime symbol (AKA, "keyword") lookup table to your assembler code, such that addresses (AKA "labels", AKA, "functions", AKA "procedures", AKA "methods") can be dynamically executed at runtime, and you create an interpreter / stack-machine -- around this concept.
There's a little bit more to that of course, but that's the basic idea.
Then you derive Forth!
That's why Forth is so gorgeous and brilliant!
And so aesthetically pleasing, because of it's small size, yet amazing functionality!
And why you don't need big, complex CPU's to run it!
It exactly follows the "Einsteinian mantra" of
"As simple as possible, but not simpler!"
Anyway, thanks again for your great work with the J1 Forth CPU!
- fmakunbound 6y agoAgree with all that! Except: > Lisp, and Lisp-like languages are the highest, and most compilers are somewhat mid-level Most Lisps have compilers (except the toy ones), and have had compilers for several decades.
- Jtsummers 6y agoI think GP may have worded that poorly, and "most compilers" in your quoted portion would be better read as "most other languages". Taken this way, the sentence becomes something like: For computing, transistors are the lowest level of abstraction (they are literally the things doing the computing), Lisp and kin languages are at the extreme end of abstraction, and most other languages fit somewhere in between. Though not entirely true (Lisps let you get pretty low level if you want), it's a reasonable perspective if you look not at what the languages permit, but what they encourage. Forth encourages building your own abstractions from the bottom up. Lisp encourages starting with an abstract machine model and building up even higher levels of abstractions (same with most functional and declarative languages). C++ (for something in between) encourages understanding the underlying machine, but not necessarily to the degree that Forth does. Forths and Forth programs are often closely tied to a specific CPU or instruction set. C++ can be seen as abstracted across a particular machine model that's typical of many modern CPUs but not with a direct tie to a specific instruction set (doing so constrains many programs more than necessary). And Lisp's abstract model is (or can be) even more disconnected from the particular physical machine. I'd put Haskell, SQL, or Prolog and languages at their level at the extreme end of abstraction before Lisp. Their abstract machines are even further from the hardware (for most users of the languages) than Lisp's.
- tkinom 6y agoEach "J1" seems to be able to map well(easily) to a tensor. Thousands (or a lot more) of them can be mapped to a TensorFlow network....