Posts

Showing posts with the label programming lanuages

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...

Syntax Intuitiveness aka IQ Test

Image
A simple and real world lesson on programming language syntax intuitiveness. Introduction As a polyglot I have coded with dozens of languages, ranging from Lisp and Forth to ML and Java and even Ruby (yes, I confess!). I have seen many programming constructs and syntaxes that hardly anything surprises me (beyond Javascript). Most of the times I can somehow understand a code that is written in a language that I do not know (like Haskell). However, to put an end to my arrogance, the gods pushed me in a direction to see something such non-intuitive and mysterious that made me search the web to just roughly understand what it does. The Puzzle I was reading a piece of C++ (the almighty!) code and stumbled upon a line like below: int main() { //... aName otherName(...); //... } I tried to make sense out of line 3; I tried hard but got nowhere. "What on earth is that? Looks like a method definition but it's not....um...um...um...what the...!?" A search for aName in...

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...

A New Platform For Business Application Development

Image
Anybody who has been involved in developing a business application, has already exhausted the long list of frameworks/libraries in JVM, .NET and Python platforms searching for something that reduces the costs while increases the development speed. However it's almost proved to me that one should seek the answer in less explored/popular platforms. Let's meet Pharo! Introduction Well, the title of this blog entry may be a bit confusing as the platform I'm going to talk about is not "new" at all! In fact, it's been around evolving far more than most of us know and could imagine. As a polyglot programmer, for the past 5 years, I've been trying many different languages and platforms to find one which would help me reach my goal: to write a business application (ERP) which can be run in hosted mode (SaaS) and is easily maintainable; and I had a short list of features/characteristics I was looking for in any of them. Note: I will elaborate on software as a ...