Archive
Launching Quartex Pascal Website
I have setup a website for all things Quartex Pascal, you can read more about my hobby project here: http://quartexpascal.wordpress.com/
Live expression view
What did i do this weekend? Well, I added a live symbolic view to the mainform. Makes it easier to see just whats going on inside DWScript. Not sure how useful it will be for others, but for me it’s very handy. It will probably need a “click to examine” feature or the list will be to large for anything practical. But it happily updates with the rest of the “auto magic” stuff so no worries.
Working on the new IDE
So. Creating an IDE. Sounds easy right? Just slap open a form, add some project stuff and bob’s your uncle? Sadly that is not the reality of writing a good IDE. Especially one that should be flexible, adaptable and easy to use.
Take, for example, the relationship between an open project file, a tab, and the editor reserved for an open pascal file. How do you link these 3 entities together in a meaningful way? Also, the IDE should respond fairly quickly, meaning it should be easy for you (or me in this case) to find an open unit, to locate the interface section of an open unit, to insert and modify the sourcecode – well the list of “must have” features grows on you.
Using generics this time I was able to cut through a lot of the old reinvention of the wheel, and in just 3 hours of work the basic project/unit/editor functionality is up and running. And the code is at least 40% faster than my previous product- so the IDE is snappy as hell. And yes! No skins this time 🙂
Templates
Another side of the IDE that was lacking earlier – was that of generating units. When you press “new unit”, where should the code come from? Well, I decided that templates was the way to go (just like native delphi does it) and implemented a nice and juicy based system. Took about an hour to setup, but now PASTA (yes that is the codename of the project) can already create a bunch of different projects, unit types and structures – all based on files and keywords. Much faster than my previous product and much more flexible. As a bonus: the user can now create new project types using notepad, which can only be a bonus.
Compiler
Not much to say here (or not much i want to share is more like it), but let’s just say that pipes and commandline is the way to go. Been playing around with mono C# and Gnu C++ for some time now.
RTL
This is the big one, the “meat” on the bones of any good system. Im not going to write much about this part. Let’s just say that this time — i wont let anyone touch the core. It will be abstract from the platform, portable, easy to adapt – no matter if you want to run stuff on iOS, XBox or the desktop. KISS — keep stuff simple.
Codegen
There are many ways to skin a cat. From the inside or the outside. Playing around with an intermediate bytecode structure, but brute force tend to be more efficient 😉
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).
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*).
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.
You must be logged in to post a comment.