Archive

Archive for March, 2017

Node and delphi in sweet harmony

March 31, 2017 Leave a comment

There are cases when you want to dip your toe into Delphi land. While I can’t think of anything in particular at the moment – it would be handy if you say, have some Delphi dll’s that you would like to re-use, so you don’t have to re-write the whole thing in Smart Pascal.

Enter FFI

There is this mind-blowing package over at NPM and if you don’t know it yet, you are going to love it. Its called FFI (foreign function interface) and essentially allows you to call functions from ordinary libraries (DLL, .SO and .DynLib’s). It is supported on both Windows, OS X and Linux. So yeah, now you can call Delphi from your Smart code!

So let’s say you have this awesome data backend written in Delphi and you don’t want to re-write 10 years of code. What you can do is simply create a DLL and expose a simplified API for the core functionality — and then call those from your Smart Pascal node.js server — which is just mind-bending awesome (excuse my language)!

You can also call functions exposed in the same process. So lets say you are calling node.js from your Delphi applications (or C++, or Freepascal or C# – whatever floats your boat) then you guessed it – you can now invoke methods from the “runner”.

There goes another weekend

I was going to relax this weekend but im busy compiling node.js from scratch (and you know how I feel about C++ from Linux, its like the worst date ever!) to something visual studio can eat – and then export it from that into Delphi. For some reason C++ builder goes off bonkers when I try to build it there. Which is so odd because it should be vanilla C/C++ (probably some gnu curiosity messing it up)

 

kick_ass

Create awesome full browser-desktop apps in Smart!

 

But once .DCU i-fied, how does a TNodeJS component sound? Already have TV8Engine – so yeah, interfacing with the mothership (read: Delphi) is important to us.

Anyways – if your brain didn’t just blow with the FFI info, then go and get all girly inside right now – because this bridges the gap so utterly between native and scalable, kick ass clustered JavaScript server-side!

https://www.npmjs.com/package/ffi

If you still wonder if this is powerful enough, check out the Smart based operating system that is currently kicking serious butt! It even runs 68k assembly programs (real Amiga applications) in a window! This is the core demo for the SMS update (it should have been out 2 weeks ago, I know – but its not me in charge of that bit!).

amibianrocks

An OS in smart? Sure, with a linux bootstrap ofcourse – but man does it run!

Oh and by the way, Smart Pascal now gives you access to more than 350.000 node.js packages. That is the biggest, bad-ass code-repo in existence. And you can then add typescript as well.

Ok let’s do this!

HTMLComponents, the native Delphi html rendering engine

March 26, 2017 1 comment

This review has been postponed two times, so my apologies to Alexander Sviridenkov, the author of this magnificent Delphi component package.

HTML rendering engine in Delphi

Delphi have always had its fair share of brilliant programmers. And as a result Delphi has enjoyed a vibrant component market, one that simplify the life of both novice and expert.

Sadly, html has never really been Delphi’s strong suit. Sure we have various server types and packages. From Intraweb to UniGui – each of them with positive and negative traits. We have IIS plugin packages and apache modules – and right now Embarcadero is branching into Linux as well. Sadly all of these solutions suffer the same problem: they are purely native. They lack the automatic scaling mechanisms of node.js and C# – and don’t even get me started on clustering (Netflix is written 100% in node.js, why did they pick JavaScript instead of Delphi, C# or C++? Food for thought!).

But, serving html is all well and good, and while I could write a doctorate on why node.js and Smart Pascal is a much better technology for Delphi developers when it comes to web development – it would come across as disingenuous since Smart originated with me. So people will simply have to find out for themselves.

Rendering with Delphi

Server and client aside: if there is one thing Delphi is the undisputed king of, it is desktop applications and productivity! Fueled by object pascal’s modular, component based frameworks; like the VCL and Firemonkey – no other language even comes close to what Delphi has to offer. Except for html that is ..

Traditionally there have been only two paths you could go if you wanted to display or edit HTML: you could stick with good old TWebBrowser, a thin wrapper over Microsoft’s Internet Explorer API’s. If all you want to do is to show some basic html and lack even a single fiber of taste in your body then TWebBrowser could be the ticket.

But anyone who has ever tried to work with that component, perhaps dived into the hundreds of interfaces you need to deal with in order to do anything remotely fun – knows that it leaves you frustrated and wanting. It’s also not portable and as pure a Windows component as can be. It makes absolutely no sense to use this component in 2017, especially when Firemonkey is on the menu.

The other option was TFrameBrowser or THtmlViewer, a fast, responsive browser control written purely in Delphi (by Dave Baldwin I seem to remember?). This was a commercial component back in the day, but he open sourced it as he abandoned Delphi for C# or C++ or something along those lines. You can pick this up at Github for free and there is also a Lazarus version of this.

The problem with both of these solution is the same haunting us all, namely that they are getting old. They havent seen much development for 10-15 years (give or take the port to Lazarus), and while they may work – they lack support for all the interesting tags, css styles and element types that we now take for granted. THtmlView is stuck somewhere between HTML 1 or 2, and TWebBrowser is .. well, that has a life of its own so I honestly cant tell you what it represents these days. But a little bird told me Embarcadero havent updated the ActiveX interfaces at all – so it’s not even using the new Microsoft Edge engine. Personally I suspect Microsoft is the culprit, exposing Edge as a .net assembly exclusively.

The Chromium wrappers

A third alternative appeared around 2011 / 2012 in the form of chromium embedded. This is the browser we use in Smart Mobile Studio to do background rendering and run the compiled Smart Mobile Studio applications when you hit F9.

Webkit is by far the fastest and most evolved engine out there, but it also add around 90 – 120 megabyte of dependencies and data files to your distribution. It also has a lot of quirks, and if you do hardcore coding like I do – pushing the GPU to the bleeding edge of what webkit can deliver – then prepare for crashes, unexplainable access violations and having to restart the whole application to get rid of some background process chromium has spawned outside your reach. It’s a great solution, but it comes with its own baggage and history.

HTMLComponents

Suddenly out of the blue a fourth option has emerged, this time it’s a full re-implementation of HTML 4 (with elements from HTML 5) written in pure, platform independent Delphi. This means it has no dependencies, it will render as much as 90% of modern html, it supports all the fancy tags and css style (including transitions, which I must admit I did not expect).

Not only that, it works under the traditional VCL framework and Firemonkey, so you can use the components on both desktop and mobile applications. If that doesn’t get your creative juices flowing I don’t know what will; this is frikkin awesome!

Alexander Sviridenkov has really gone to town with this package. And I must extend my gratitude for allowing me access to his codebase. We are considering using this as the primary rendering engine for the new Smart Mobile Studio IDE’s live editor. So I want to personally thank Alexander for the opportunity to investigate the components at source level.

Writing a review of this great package seems only natural. It has been years since I’ve been this stoked about a Delphi component package. If you like the idea of using HTML as a part of your Delphi application’s presentation layer – then consider this your birthday, Xmas and st. patrick day all rolled into one. HtmlComponents got you covered!

So what is it?

component_list

A rich and powerful component suite

At the heart of the package is a modern, fast, portable and 100% written in Delphi HTML rendering engine. Around this engine Alexander has made a large collection of visual controls that you use to enrich your applications. Most notably, a WYSIWYG editor akin to what you find in Adobe Dreamweaver. This is not a text editor where you write tags (well you can), but rather a full, rich word processor control where you can design your web pages.

The components most interesting to me were obviously: THtmlEditor, TDBHtmlEditor, THtTemplatePanel and THtMetroPanel, THtCategoryButtons.

These are just  5 out of 23 visual controls that ship with this package, each of them using the rendering engine to present better looking information. I mean, when you can use html to describe how each row in a listbox should appear – it goes without saying that this is a lot easier (and prettier) than spending hours with TCanvas. The now ancient TCanvas class is not exactly renowned for its blistering speed or fantastic visuals). So HtmlComponents gives you an impressive list of visual extravaganza to play with, all of whom makes it a snap to create modern, good-looking user interfaces.

And you don’t have to use the pre-defined components. HtmlComponents will happily take your html and css and draw it straight to a TCanvas (or GDI+) without complaints. So you are not stuck having to use this or that baseclass (which often is the case).

What really impressed me is the speed. Writing an html file parser that is fast is one thing, but rendering complex and composite web content? That’s not for the faint of heart, it requires some serious skill.

The first and easiest test you can do to see how quickly a rendering engine adapts and re calculate its node tree (internal stuff) – is to resize the window fast back and forth. Most homebrew browsers is going to struggle with that. Typically because they just calculate as they draw each element, which is not how to go about this particular task. I’m super impressed by Alexanders work here, because his controls are just as responsive as commercial browsers.

The editor

Since I work with web technology, the editor is ultimately what would save us time and also help lift the quality of our IDE. Smart Mobile Studio is extremely powerful, but our weak spot is without a doubt that our IDE doesn’t reflect the power of our the RTL properly. There are also things that would be simpler for our customers, editing documents directly is one of them – so the editor was really make or break for my part.

editor

The example editor program is impressive to say the least

The editor is wonderful. There are a few tidbits that I would like to see improved, but those are very specific to my needs. But I have to be honest and say that this is the most impressive WYSIWYG html editor I have seen outside of Dreamweaver. You have full control of everything, from tables to borders, margins to padding – and the active segment you are editing is easy to spot due to dotted highlighting.

Alexander has also made some very interesting dialogs (see color and border dialog in the picture above). While I am missing a more dedicated css stylesheet solution (like gradient editor, image to css conversion and other handy features) – the package in general has more or less everything you need to get going. And then some (it may also be that the stylesheet thing is there. The codebase is so huge it would take s week to study every part).

In short: If you are looking for a drop-in solution for editing web documents that is platform independent, has zero dependencies, lightweight, fast and even work on mobile devices – then this is it! The same goes for rich and gorgeous rendered custom controls.

I do realize that there are other editors out there; packages like Richview is very popular, and while that is both fast and polished, it’s not an html rendering engine. Which is ultimately where HtmlComponents scores all points. The editor is not the core of the product, it’s just a control that exposes the product – which is a modern html rendering system written in pure Delphi.

It even outputs to PDF, again with no dependencies!

What about the web?

Being able to edit html documents is cool and if you are looking for a package to give you that functionality – then this is it. No doubt there. But how compatible is it? I mean, html is evolving at an alarming rate – both in terms of features but also with regards to JavaScript. How does HtmlComponents fare in that department?

I guess the obvious observation is that HtmlComponents is not a browser. It has a very capable rendering engine, editor and supports the most common tags – both old and new, but at the end of the day – it’s not designed to be a browser.

If you drop an editor on a form, set the readonly property to true, and then call LoadFromUrl() on a complex website, then odds are it will come up short. It will happily render static websites, but the moment frames and JavaScript comes into the picture – you are quickly reminded that this is ultimately an editor and rendering engine designed to leverage web technology for Delphi – and it’s not trying to be anything else either. It delivers what it says, and it does it well. What more can you ask.

browser

It has no problems with traditional, non framed or JS powered websites

Lack of scripting

I have no doubt that Alexander could turn this package into a real life browser if he so wanted. But again this package delivers compliant html editing and presentation inside Delphi applications. That is what he set out to create, and that is exactly what I need.

Alexander have also taken height for future development. The package ships with support for pascal scripting (the Jedi scripting engine), and he has thoughtfully isolated scripting in general in separate adapter classes. This means that you are free to add whatever scripting language you want. Dont like pascal script? No problem, just implement an adapter and use whatever you like.

My immediate thought goes to Besen, the open source, complete ECMAScript fifth edition, JIT powered JavaScript engine written 100% in object pascal. Hopefully Alexander will get inspired and add that as an alternative in a future edition. With besen as the primary scripting engine – and taking the time to expose all the traditional DOM objects JavaScript expects to find in a browser environment (like window, document, createElement, getElementById [and so on]) then HtmlComponents would be capable of great things. All of it in portable, platform independent Delphi.

The V8 JavaScript engine used by Chrome, Safari and all webkit browsers is also an alternative. It is a fairly humble dll that is easy to use from Delphi. But that is presently only available on Windows. Unless the Delphi maintainer decides to add Linux and OS X binaries to the repository as well. But indeed, V8 could also be added quite easily.

Final thoughts

This is a wonderful component package for Delphi, one I really hope we get to use in our own product when that time comes. There will always be bits and pieces that could be improved, but it’s quite hard to pinpoint what exactly to criticize in this package.

helpmanual

H&M is pretty solid

I did notice an access violation in the Paint() method on two occasions, which could be easily fixed by checking if csDestroying has been set – and that the device context is not null (it was in the middle of a paint when i killed the program). But that is kebab reporting on my part. All in all I am super impressed and really recommend this product – its worth every penny!

The product is also used by a list of well established companies. Applications like Help & Manual isn’t exactly small potatoes, nor is Coffeecup html editor some unknown application. These are used by thousands of people every day.

Have a look at Alexander’s gallery and I’m sure you agree that this package has merit.

As far as I’m concerned, this will form the basis of our future template and content editor.

Jon-Lennart Aasenden
 The Smart Company AS

Amibian + Smart pascal = A new beginning

March 25, 2017 Leave a comment

In the Amiga community there is a sub-group of people with an agenda. They hoard and collect every piece of hardware they can get their hand on – then sell them at absurd prices on ebay to enrich themselves. This is not only ruining the community at large, ensuring that ordinary users cannot get their hands on a plain, vanilla Amiga without having to fork out enough dough to buy a good car.

“We also have a working Facebook clone – but we’re not
going into competition with Mark Zuckerberg either”

Thankfully not everyone is like that. There are some very respected, very good people who buy old machines, restore them – and sell them at affordable prices. People that do this as a hobby or to make a little on the side. Nothing wrong with that. No, its people that try to sell you an A2000 for $3000, or that pimp out Vampire accelerator cards at 700€ a piece thats the problem.

As for the price sharks, well – this has to stop. And Gunnar’s Amibian distro has already given the Amiga scalpers a serious uppercut. Why buy an old Amiga when you can get a high-end A4000 experience with 4 times as much power for around $35? This is what Gunnar has made a reality – and he deserves a medal for his work!

And myself, Thomas and the others in our little band of brothers will pick up the fight and stand by Gunnar in his battle. A battle to make the Amiga affordable for ordinary human beings that love the platform.

Amiga as a service

Yesterday I did a little experiment. You know how Citrix and VMWare services work? In short, they are virtualization application servers. That means that they can create as many instances of Windows or Linux as they want – run your applications on it – and you can connect to your instance and use it. This is a big part of how cloud computing works.

While my little experiment is very humble, I am now streaming a WinUAE instance display from my basement server pc, just some old bucket of chips I use for debugging, directly into Amibian.js (!). It worked! I just created the world’s first Amiga application server. And it took me less than 30 minutes in Delphi !

Amibian, Amibian.js, appserver, what gives?

Let’s clear this up so you dont mix them:

Amibian. This is the original Linux distro made by Gunnar Kristjansson. It boots straight into UAE in full-screen. All it needs is a Raspberry PI, the Amiga rom files and your workbench or hard disk image. This is a purely native (machine code) solution.

Amibian.js – this is a JavaScript remake of AmigaOS that I’m building, with the look and feel of OS 4. It uses uae.js (also called SAE) to run 68k software directly in the browser. It is not a commercial product, but one of many demos that ship with Smart Mobile Studio. “Smart” is a compiler, editor and run-time library sold by The Smart Company AS. So Amibian.js is just a demo, just like Amos shipped with a ton of demo’s and Blitzbasic came with a whole disk full of examples.

Amiga application server (what I mentioned above) was just a 30 minute experiment I did yesterday after work. Again, just for fun.

I hope that clears up any confusion. Amibian.js is a purely JavaScript based desktop made in the spirit of the Amiga – it must not be confused with Amibian the Linux distro, which boots into UAE on a Raspberry PI. Nor is it an appserver – but rather, it can connect to an appserver if I want to.

genamiga

Generation Amiga post on Amibian.js earlier when I added some look & feel

With a bit of work, and if everything works as expected (I don’t see why not), I will upload both source and binaries to github together with Amibian.js.

There is only one clause: It cannot be used, recreated, included or distributed by Cloanto. Sorry guys, but the ROMS belong to the people, and until you release those into public domain, you wont get access to anything we make. Nothing personal, but pimping out roms and even having audacity to fork UAE and sell it as your own? You should be ashamed of yourself.

Are you in competition with FriendOS?

This question has popped up a couple of times the past two weeks. So I want to address that head on.

I make a product called Smart Mobile Studio. I do that with a group of well-known developers, and we have done so for many years now. The preliminary ideas were presented on my blog during the winter 2009, early 2010 and we started working (and blogging) after that. Smart Mobile Studio and it’s language, Smart Pascal (see Wikipedia article), takes object pascal (like freepascal or Delphi) and compiles to JavaScript rather than machine code.

smsamiga

The Smart compiler is due for OS4 once i get the A1222 in my hands

One of the examples that has shipped with Smart Mobile Studio, and also been available through a library called QTX, is something called Quartex Media Desktop. Which is an example of a NAS server front-end, a kiosk front-end (ticket ordering, cash machines etc) or just an intranet desktop where you centralize media and files. It is also node.js powered to deal with the back-end filesystem. This is now called amibian.js.

In other words – it has nothing to do with Friend software labs at all. In fact, I didn’t even know Friend existed until they approached me a few weeks ago.

15590846_10154070198815906_4207939673564686511_o

The Quartex Media desktop has been around for ages

Amibian.js is just an update of the Quartex Media Desktop example. It is not a commercial venture at all, but an example of how productive you can be with Smart pascal.

And it’s just one example out of more than a hundred that showcase different aspects of our run-time library. This example has been available since version 1.2 or 1.3 of Smart, so no, this is not me trying to reverse engineer FriendOS. Because I was doing this long before FriendOS even was presented. I have just added a windowing manager and made it look like OS4, which also happened before I had any contact with my buddies over at Friend Software Labs (why do you think they were interested in me).

16805402_1914020898827741_149245853_o

Early 2017 Linux bootloader by Gunnar

So, am I in competition with Friend? NO! I have absolutely no ambition, aspiration or intent for anything of the sorts. And should you be in doubt then let me break it down for you:

  • Hogne, Arne, David, Thomas, Francois and everyone at Friend Software Labs are friends of mine. I talk almost daily with David Pleasence who is a wonderful person and an inspiration for everyone who knows him.
  • Normal people don’t sneak around stabbing friends in the back. Plain and simple. That is not how I was raised, and such behavior is completely unacceptable.
  • Amibian.js is 110% pure Amiga oriented. The core of it has been a part of Smart for years now, and it has been freely available for anyone on google code and github.
  • For every change we have made to the Smart RTL, the media desktop example has been updated to reflect this. But ultimately it’s just one out of countless examples. We also have a working Facebook clone – but we’re not going into competition with Mark Zuckerberg for that matter.
  • People can invent the same things at the same time. Thats how reality works. There is a natural evolution of ideas, and great minds often think alike.

Why did you call it Amibian.js, it’s so confusing?

Well it’s a long story but to make it short. The first “boot into uae” thing was initially outlined by me (with the help of chips, the UAE4Arm maintainer). But I didn’t do it right because Linux has never really been my thing. So I just posted it on my retro-gaming blog and forgot all about it.

Gunnar picked this up and perfected it. He has worked weeks and months making Amibian into what it is today – together with Thomas, our spanish superhero /slash/ part-time dictator /slash/ minister of propaganda 🙂

We then started talking about making a new system. Not a new UAE, but something new and ground breaking. I proposed Smart Pascal, and we wondered how the Raspberry PI would run JavaScript performance wise. I then spent a couple of hours adding the icon layout grid and the windowing manager to our existing media desktop – and then fired up some HTML5 demos. Gunnar tested them under Chrome on the Raspberry PI — and voila, Amibian.js was born.

amidesk

And that is all there is to it. No drama, no hidden agendas – and no conspiracy.

I should also add that I do not work at Friend Software Labs, but we have excellent communication and I’m sure we will combine our forces on more than one software title in the future.

On a personal note I have more than a few titles I would like to port to FriendOS. One of my best sellers of all time is an invoice and credit application – which will be re-written in Smart Pascal (its presently a mix of Delphi and C++ builder code). The same program is also due to Amiga OS 4.1 whenever I get my A1222 (looking at you Trevor *smile*).

Well, I hope that clears up any misunderstanding regarding these very separate but superficially related topics. Amibian.js will remain 100% Amiga focused – that has been and remains our goal.

Ode to our childhood

Amibian is and will always be, an ode to the people who gave us such a great childhood. People like David Pleasence who was the face of Commodore in europe. A man who embody the friendliness of the Amiga with his very being. Probably one of the warmest and kindest people I can think of.

Francois Lionet, author of Amos Basic. The man who made me a programmer and that I cannot thank enough. And I know I’m not alone about learning from him.

Mark Sibly, the author of BlitzBasic, the man who taught me all those assembler tricks. A man that deserves to go down in the history books as one of the best programmers in history.

And above all – the people who made the Amiga itself; giants like Jay Miner, Dave Haynie, Carl Sassenrath, Dave Needle, RJ Michal (forgive me for not listing all of you. Your contributions will never be forgotten).

That is what Amibian.js is all about.

Patents and greed may have killed the actual code. But we are free to implement whatever we like from scratch. And when I’m done – your patents will be worthless..

 

Amiga revival, Smart Pascal and growing up

March 11, 2017 1 comment

Maybe its just me but the Amiga is kinda having a revival these days? Seems to me like the number of people going back to the Amiga has just exploded the past couple of years. Much of that is no doubt thanks to my buddy Gunnar Kristjannsen’s excellent work on the Amibian distro for Raspberry PI. Making a high-end Amiga experience that would have cost you thousands of dollars available at around $35.

amifuture

Looking forward to some cosy reading

While Gunnar’s great distro is no doubt a huge factor in this, I believe its more than just easy access. I think a lot of us that grew up with the system, who lived the Amiga daily from elementary school all the way to college – have come full circle. We spend our days coding on PC’s, Mac’s or making mobile software – but deep down inside, I think all of us are still in love with that magical machine; The Commodore Amiga.

I am honestly at a loss for words on this (and that’s a first, most days you can’t get me to shut the hell up). Why should a 30-year-old system attract me more, and still cause so much joy in my life – compared to the latest stuff? I mean, I got a fat ass I7 that growls when you start it with 64 gigabyte ram, SSD and all the extras; I got macs all over the house, the latest consoles – and enough embedded boards to start my own arcade if I so desired.

Yet at the end of the day, when the kids are in bed and GF firmly planted in front of her favorite tv show, fathers are down in basements all around europe. Not watching porn, not practising black magic or trying to transform led into gold, nope: coding in assembler on a mc68k processor running at a whopping 7Mhz and loving every minute of it!

Today the madness held no bounds and forced me, out of sheer perverted joy, to order 4 copies of Amiga Future magazine (yes there are still magazines for the Amiga, believe it or not), a few posters, a mousemat and (drumroll) the ever sexy A1222. Actually that was a lie, I ordered that weeks ago, Trevor Dickenson over at A-EON hooked me up so im getting it as soon as it comes off the assembly line. And for those that don’t know, the A1222 is the new affordable Amiga that is released today. It’s not a remake of the older models, but a brand new thing. I havent been this giddy about a piece of silicon since I fell into a double-d cup at a beach in Spain last year.

Smart Pascal

It made sense to unite my two great computing passions, namely the object pascal language and Amiga into one package. So whenever I have some spare time I work my ass off on the update for Smart Mobile Studio. And it’s getting probably the biggest “demo” ever shipped with a programming language.

What? Well, a remake of the Amiga operating system. But not just a simple css-styled shallow lookalike. You know me, I just had to go all the way. So I married the system with something called uae.js. Which is essentially the JavaScript version of the Amiga emulator. Its compiled with EmScripten – a post processor that takes LLVM compiled bitcode compiled with C/C++ and spits out Asm.js optimized code.

amidesk

You just cant kill it, Amiga is 4ever

So, Smart Pascal in one hand – C/C++ in the right hand. Its like being back in college all over again. Only thing missing now is that Wacom suddenly returns and Borland rise from the grave with another Turbo product. But yes, JavaScript is something I really enjoy. And being able to compile object pascal to JavaScript is even better.

The end result? Well since I don’t have too much time on my hands it’s roughly 31-32% done, and when we hit 50% is when UAE.js will be activated. So right now its a sexy cloud front end. It has a virtual filesystem that runs fine over localstorage, but it can also talk to node.js and access the real filesystem on your server.

But when UAE.js kicks in you will be able to run your favorite Amiga demos, applications and games in your browser. I am actually very excited about seeing the performance. It runs most demos OK (using the Aros rom-files). I imagine running things like blitzbasic, Amos basic and SAS-C/C++ should work fine. Or at least be within the “usable” range if you got a powerful PC to play with.

The V8 JavaScript engine in webkit is due for an overhaul next year – and while I can only speculate I’m guessing real-life compilation will be the addition. They already do some heavy JIT’ing but once you throw LLVM based actual compilation into the picture – large JS applications is going to fly side by side with native stuff. And that’s when cloud front-ends like ChromeOS and other FriendOS is going to take off.

My little remake is not that ambitious, but I do intend to make this an absolute kick-ass system as far as Amiga is concerned. And for Smart Pascal developers? Well, lets just say that this demo project has pushed the RTL for all it’s worth and helped fix bugs and expand the RTL in a way that makes it a real power-house!

Growing up

Do we ever really grow up? I’m not sure any more. I look at others and see some that have adopted this role, this image of how an adult should be like — but its more often than not tied into the whole A4 family thing or some superficial work profile. And since most Amiga fanatics are in their 40’s and 50’s (same age as Delphi hooligans, Turbo was released in 1983 same year as the Amiga came out), I guess this is when kids have grown up enough for people to go “wait a minute, what .. where is my Amiga!“.

But good things come to those who wait. If someone told me that I would one day work side by side with giants like David John Pleasance, Francois Lionet and the crew at FriendUp systems – I would never have believed them. A member of quartex in meetings with the head of Commodore? My teenage self would never have believed it. Both of these men, including all the tech guys at Commodore, Mark Sibly the guy behind BlitzBasic — these were my teenage heroes. And now I get to work with two of them. That is priceless.

As for growing up – if that means losing that spark, that trigger that when lost would render us incapable of enjoying things like the Amiga, reduced to a suit in a grey world of PCs – you know, then I’m happy to be exactly where I am. If you can go to work wearing an Amiga T-Shirt, tracker music on your iPod, a family you love at home, cool people to work with – I would call that a wrap.

And looking at the hundreds and thousands of people returning to the Amiga after 30 years in the desert – something tells me I wont be alone .. 😉

 

The Smart Desktop

March 5, 2017 Leave a comment

Right, if you checked out my previous post you know that I have been working on a cloud desktop for a while. It’s basiclly an example that will ship with the next release of Smart Mobile Studio, but it’s also a labour of love since I’m a huge Amiga fan.

My good friend Gunnar Kristjansson, the author behind Amibian, the Linux distro that more or less turns your Raspberry PI3b into a real live Amiga, booting straight into UAE4All on ARM based devices – has been helping out with testing and general opinions as well. We have decided to fork the base and call that “Amibian.js” since it is capable of running real-life 68k Amiga software right in the browser (!)

screenshot

Anyways if you find this interesting head over to github and pull the source from my smart repository. You will need the NG version of the RTL to compile, but that should be in the Alpha channel next week (unless something needs more love before its released).

Why should this matter?

The cloud desktop is not trying to be something it’s not. It’s meant as a conceptual example, meaning that it demonstrates what can be achieved (and expanded upon) with Smart Mobile Studio.

Having said that, it’s not just a pretty face! Making sexy css graphics is easy these days, but our RTL adds a bit of depth to the whole paradigm.

First of all, I implemented a virtual filesystem on top of Localstorage. This means that files can be read/written to the browser cache — and it will all be stored inside a single serialized item. This would be what people call “ram disk”. Essentially the capacity to store files in ram.

screenshot2

The same filesystem, which is naturally based on a common ancestor class, talks to the node.js backend server. Which means that once the server is finished – the desktop will have access to a region of the actual harddisk. This is where the fun starts!

What about applications

The desktop shows 3 windows when you start it. The first is a fully working text-editor. The second is a Deluxe Paint clone (pixel based editor) and last but not least – a music tracker (player) application.

Now all of these are pure JavaScript. Some of them are hosted elsewhere. So this is just an example of how easy it is to bind together local and external services.

Lets pixel like its 1999!

Lets pixel like its 1999!

I will naturally, when time allows, isolate these locally as a part of the repository – so that the applications can start as normal. They need to be adapted, because right now they run inside their own IFrame – which cause problems with window focus (as you will notice).

What can I use it for?

It should be a fairly good starting point if you want to create your own windowing cloud applications. I have given you the basics, like windowing classes, preferences and such things. The code is easy to read and play with – so it should be a good place to begin.

Personally I use this in my NAS developments. I discovered that my Asustor NAS (which has a similar concept) is a bit shit – so I decided I could write a better one myself.

Thankfully Gunnar Kristjannson, the guy behind Amibian, is helping me out with the Linux distro – and it boots directly into this system (if you have a screen attached). You can also connect to the NAS via ordinary http. And from that interface I can now control what the NAS does. And its all thanks to node.js and SMS.

The cool part? Replace the NAS with your favorite cloud supplier and you get the idea 😉