Posts

Showing posts with the label forth

Forth Interpreter and Abstract Machine

Image
Forth interpreter and abstract machine illustrated in one image. Forth has such a strikingly well thought out simple execution model that it can fit in one small diagram:

More Thoughts On A JVM-Based Forth

Image
Wrapping up the fundamental design challenges for a Forth implementation on JVM. Introduction This post is the continuation of the ideas discussed earlier in my previous post Thoughts On JVM-based Forth Implementation (please read it if you haven't done so yet), in which a general execution model and an overall stack design was introduced. However, three major topics were either very shallowly discussed or were left untouched. They shall be covered in this post. Level of Abstraction Forth was designed in a period when RAM was an incredibly expensive resource to equip your system with; during the absolute reign of micro-controllers and custom-made boards/systems where 64KB of RAM would have been considered a luxury. Therefore it was designed with almost no abstractions over the raw hardware to allow full utilisation of it by the systems programmer. Nowadays, however, 2GB of RAM is a normal specification for even a cheap laptop [1] . And general programming focus, thanks to high...

Thoughts On JVM-based Forth Implementation

Image
Is it possible and worth to implement Forth on top of JVM? Forth : A language which looks as weird as it is simple and powerful --and it looks extremely weird! I, first, came to know Forth with help of my good friend Michael a.k.a. ttmrichter and immediately Forth placed itself on top of the favourite language pyramid in my mind, alongside only Lisp family. Since then, I've been eager to do serious coding in Forth. However, there's a problem: most of Forth'ers work in the system/chip programming field which means that there are hardly any higher level libraries (e.g. UI toolkits or database connectors) for someone like me to try Forth in business applications. It's definitely possible to write all those libraries starting from the scratch but even the thought of it turns my stomach! Recently I've been thinking about implementing Forth on JVM. JVM Forth has several advantages: It will be platform independent. It will have access to tons of existing libraries...