Home > Delphi, OP4JS > New platform, new RTL and new compiler

New platform, new RTL and new compiler

Since airing my ideas about pascal and where it should go has led to, ahem, a rather substantial loss of intellectual property in the past – I wont divulge the inner workings of my latest platform beyond the general concepts.

So, what have I been up to the past 12 months? Well, there havent been much time to write actual code except in my spare time (which is limited) – but there has been plenty of time to think, create and play around with my ideas. Ideas that just a couple of years ago gave birth to object pascal for JavaScript (www.smartmobilestudio.com). A project I am sadly no longer involved in, but which I envisioned and realized with the help of Eric Grange (a.k.a “the stig of delphi”).

Smart mobile studio is a really kick ass system and it has been greatly expanded and perfected by Jørn, Eric and Primoz – which continue to polish the product and (to be honest) making it what Embarcadero should have done with HTML5 Builder (or Delphi for php, they keep changing the name of the product – but the product is essentially crap).

Dyson Sphere

Dyson Sphere

The missing bits

But the current architecture of OP4JS (Smart Mobile Studio) is not the complete vision. It is missing several stages which, first and foremost, is a truly universal pascal platform. This has more to do with the RTL and access to the underlying system (in this case the browser, but it could just as easily be an OS, or barebone to the kernel if need be) than actual high-level features. For those that have followed OP4JS since I first started writing about it back in 2010 – you all know the RTL has changed drastically. It has become more flexible and rich in every way (and the latest features, both in the IDE and RTL makes HTML5 Builder look like a joke), but that also means the code is more or less married to JavaScript. Which is the same mistake VCL is presently suffering – and incidentally why Firemonkey was born. Meaning.. that moving Smart Mobile Studio away from HTML5 onto “real” code is at this point impossible without a clean re-write of the entire RTL and (naturally) the codegen. The codegenerator that Eric designed is adaptable and easy to expand, so that wont be the grunt of the work (the dependencies and lingo will be more important at this point).

But, all together, the sub total undermines the entire point of the vision. Namely to create a compiler for *all* platforms, one that piggyback’s on languages rather than processor architectures; with a unified RTL that is portable in the same sense as the .net framework is portable. JavaScript was just the first stage (motivated primarily by the fact that someone said it would be “impossible”. When someone says that you just have to do it *grin*).

Architect wisely

Architect wisely

What I had in mind was, to some extent, what FPC and Lazarus started on but over time lost track of. Freepascal runs on just about everything – and the low-level units such as System and Sysutils provides a universal foundation on which the entire FCL rests upon (with some exceptions like embedded systems and mobile platforms). On top of that you have the windowing toolkit, the part which provides you with forms, buttons, listboxes and custom controls – which under lazarus is so flexible that you can actually initialize from DOS and have a fully “windows-like” system up and running without X or WinAPI taking care of the dirty bits. To sum up: Abstraction, abstraction, abstraction. The less your code depends on the OS the better.

We need a pascal that can go everywhere! A system which can quickly adapt to marked changes and new gadgets. Waiting 5 years for Embarcadero to truly support iOS is a disaster (!) The marked is saturated, every game and productivity application now already exists – and you are left with scraps. At this point you can only compete on the level of features. Thats not my idea of a living, vibrant language.

We should have been there instantly! The moment the vendor CPU specs and SDK was available – Object Pascal should have been there. Spartans forever, first in to capture the flag. Semper fidelis.

C#, C++, Javascript, Java, .net

In terms of technology Android is a curiosity, the oddball and sore thumb. It is based on java rather than C++ (although the bootstrap which is executed when your phone boots is pure C and assembler). Every other device happily runs C/++. To be more precise: GNU C++ which is the most widely used, free, C++ compiler in the world (and also the most esoteric, unix centric beast ever invented). Intel have developed their own C++ compiler which ships with their products, but most vendors simply adapt the GNU C++ toolkit to their product processor and build on that. Second through the door after C++ and Java (which in my view is not a language but an abomination) are languages like C# (via the mono project) and weird stuff like python.

Why is this? Why are these first when, to be honest, the freepascal codebase is just as easy to adapt (if not more) to a new architecture as C++?

This is where the power of the original vision comes into play. We dont compile for the CPU. We compile for whatever language is already present on the platform from the hardware vendor. So if Intel is behind the CPU, then we compile for their C++ compiler. If its a normal system then Gnu C++ or whatever fork is used. Same with iOS — we compile for Objective C and become, as the saying goes: If i have seen further, i have done so standing on the shoulders of giants.

But thats just the beginning.

And with that, I’ll leave you hanging … until my next invention is ready to make you go “holy crap thats impossible” 🙂

I am looking for investors. Proof of concept has already been given in terms of a living product.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: