Marco Cantu

Syndicate content
Techie Italian Blogging on Delphi and More
Updated: 43 min 17 sec ago

My Visit to Australia and ADUG Symposium

Fri, 05/26/2017 - 09:33

Last week I was in Australia for the ADUG Symposium, invited by the ADUG committee. For more information about this user groups, which is one of the largest and best organized in the Delphi community, refer to

The event was nice and well organized, I ended up talking over 3 hours each day, but it was great, and we had a lot of interactions around the status of Delphi and its roadmap. The focus of my sessions was Windows 10 and the Delphi language, plus some product status. Overall there wer about 100 Delphi developers among the two events, which was very nice.

Over the week I spent time in Sydney (to visit a customer and at Code Partners office, the local Embarcadero partner), in Brisbane (another customer and the first conference), and in Melbourne (for the second conference and a meeting with the user group committee). The final weekend I had some free time in Melbourne, I used to see around and meet a couple of friends I had not seen for a long time!

Pictures and Pictures

Here are some pictures taken in the various cities I visited, more or less in chronological order. First is the view from the office of a customer I visited:

Yes, you can see the Opera House in the back. But later in the day I has some time and went there:

Following day, we got to Brisbane, where we had the first conference:

Same day we flew to Melbourne, for the next day (larger) event -- Malcolm is speaking here:

Next day I was invited to a meeting of the user group committee, to offer suggestions for events, topics, and have some chat (and some good food offered by one of the members at this house):

The same day, we got back to the city of Melbourne and over Eureka tower (the tallest tower in the Southern atmosphere). This was the view of the downtown area from the tower:

The last day I still had some fre time and ended up looking for penguins out "in the wild"... and I found some near the city, in a small protected area. It was dark, so not great pictures:

That's all. It was a nice trip... looking forward for more Delphi developers to visit around the world!

Categories: News, Blogs, and Tips

RAD Studio May 2017 Roadmap and Commentary

Thu, 05/18/2017 - 19:20

Over the last week, Embarcadero published a new official RAD Studio roadmap and an additional blog post with Product Manager comments and further information (including a section of mine).

Here are the links, in case you missed one of those:

Categories: News, Blogs, and Tips

New FireDAC Database Status Page

Wed, 05/10/2017 - 03:41

Since last year, beside our regular docwiki with the extensive product documentation (it has over a quarter million pages!) Embarcadero has a platforms status wiki indicating with versions of operating systems are supported -- and how that changes over different versions of RAD Studio. The page includes also information on just released operating system updates and fixes or workarounds for those.

Now we have added a new page listing the versions of the RDMBS FireDAC officially supports in different versions of RAD Studio. We plan adding similar workarounds and additional information as it becomes available, although in most cases newer database versions work fine with drivers tested for previous versions. The new page is at:

Categories: News, Blogs, and Tips

Speaking at ADUG 2017 Symposium Next Week (and Visiting Australia)

Tue, 05/09/2017 - 00:28

Next week on Thursday and Friday I'll be speaking at the ADUG Symposium in Brisbane and Melbourne. The event information is at I'll give two sessions, one focused on the Delphi language and one on its Windows support (including WinRT and the Desktop Bridge). I'll also give a keynote on the status of Delphi. There are other sessions for a day packed of content. If you live in the area, you should not miss the event...

Before the events, I'll spend also a couple of days in Sydney with our local partner (and friend) Malcolm Groves, meeting customers and discussing the product plans. If you can come to the events, I'll be happy to have a chat. If you cannot attent and you are in the area, we can still arrange something. Trying to get the most of the long trip!

See you down under...

Categories: News, Blogs, and Tips

Delphi Web Razor Scripting Webinar on Thursday

Tue, 05/02/2017 - 06:20

Thursday May 4th (that is, in 2 days) I'll give a webinar on Razor Scripting with Delphi WebBroker, introducing the open source library I wrote (with help of a few others). The same day is also Star Wars Day.

I already wrote a bit about the project in a recent blog post (

In this webinar I'll cover the foundations of the Delphi Razor scripting language, see how it can be used as a drop-in replacement of PageProducer, see how it can handle complex dynamic website, and showcase a couple of real world examples based on Bootstrap. I'll show demos running on Windows and Linux servers.

Register now for this webinar that is coming on Thursday, May 4, 2017 on The weboanr will be given at 3 time zones, 8:00 AM CDT (3PM Europe) - 1:00 PM CDT (8PM Europe) - 8:00 PM CDT (morning of the 5th in APAC region).

Categories: News, Blogs, and Tips

Delphi Relax Web Scripting on Linux

Fri, 04/21/2017 - 02:47

I've finished porting my Delphi Relax web scripting library to RAD Studio 10.2, adding Linux support. I also added a new set of unit tests. The library is available at and we are considering adding it to GetIt as well. In two weeks I'm going to host a webinar covering the library, covering different scenarios of modern web development. Stay tuned for that.

In this blog post I want to focus on a 5 minutes demo showing Linux support. I'll probably expand the demo for the webinar. First of all, what is Delphi Razor? It is a web scripting notation heavily inspired by ASP.NET Razor notation. The Delphi tie in comes form the ability of the application to exposes objects, list of objects and datasets to the web page processing engine, by means of RTTI.

To build a simple database-driven the demo, I've created a console-dames WebBroker application, I've dropped an FDMemTable and an FDStanStorageBinLink component to the web module. This will allow me to load data from a local file (local on the web server). Next I've dropped an RlxRazorProcessor component and associated it with a local HTML file, by setting the InputFilename property to "./table.html".

I've also added a custom action to the web module, and added an event handler for it. You can see the design time components below:

Next, I've create a fairly trivial HTML file for the data. Notice this can be any HTML, based on Bootstrap (like I've done for other Delphi Razor projects) and integrating any JavaScript client library. This one is really a bare bone HTML file:

    @foreach (var emp in employee) {  
  • @emp.FirstName @emp.LastName (@emp.PhoneExt)
  • }

What this does is iterate over the element called "employee" (which happens to ba a database table) and replicate the HTML within the curly braces for each record, creating a line item for each entry with the value of three fields. The for loop defines a local loop variable "emp" that is used in the loop to refer to the record. Drop that segment of HTML with script into a nice looking HTML page and you are in business.

The last bit is adding the code to load the database table and associate it with the name "employee" used in the script. Here is the complete code of the web action event handler:

procedure TWebModule2.WebModule2WebActionItem1Action(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); var filename: string; begin filename := './employee.fds'; if not FDMemTable1.Active then begin FDMemTable1.LoadFromFile(filename); FDMemTable1.Open; end; RlxRazorProcessor1.AddToDictionary('employee', FDMemTable1, False); Response.Content := RlxRazorProcessor1.Content; end;

The binding of the internal data with the script happens by adding an entry in the processor dictionary. By copying its content to the output, the last line of the code will trigger the script processor.

Now compile and deploy to Linux, start it (like in the image below):

You'll be able to see the ugly HTML output in your browser:

Stay tuned for more information about the Delphi Razor webinar.


Categories: News, Blogs, and Tips

Linux ClientDataSet Now Available

Wed, 04/19/2017 - 01:05

To use the ClientDataSet component on Linux Delphi applications you need to distribute the library, the Linux equivalent of midas.dll. We failed to deliver it as part of the 10.2 Tokyo release, and it has been made separately available at:

The additional file belongs to the redistributable list and you should also copy it to C:\Program Files (x86)\Embarcadero\Studio\19.0\binlinux64 -- ultimately it doesn't matter much.

You can add that file to the application deployment, so that it will be copy to the Linux box via PAServer, or just copy it manually to the Linux box. Of course, you need to do so only if you want to use the ClientDataSet component in a Linux application. While we recommend the FDMemTable component as a replacement, if you have existing code based on ClientDataSet you might want to use that older solution.

Categories: News, Blogs, and Tips

RAD Studio 2017 Themes and Developers Survey

Wed, 04/12/2017 - 01:45

With 10.2 Tokyo shipping last month, we at Embarcadero have renewed our focus to future plans, while R&D is still busy with fixes, updates, and some additional Tokyo features (mostly C++ for Linux).

Themes for 2017/2018

The RAD Studio PM team (that is myself, Sarina, and David)  has published a summary of the themes for this and the next year. You can find the document at There isn't much to add to what's written there. The three key Delphi related items are:

  • Expanded native controls support for multi-device development
  • Enhanced Windows 10 platform features
  • Delphi Language Features
RAD Studio 2017 Developer Survey

We have also opened our yearly developers survey (available until April 25th) to our customers asking input for our future plans (for example asking for details on each of the 3 items above) and validation of some ideas we are exploring (in many existing and new areas). We know that a 97 questions survey can be intimidating (although a few questions are fairly easy and fast to answer) but this survey is the largest we do every year and we spend a lot of time examining the information our customers give us. The direct link is:

So I'm asking you personally to take the survey , but also to invite others (active Delphi or C++Builder developers, but also developers who moved to other tools and could tell us what would make them consider coming back, or just why they are not using RAD Studio any more and what they don't like), and also software developers at large who have never used our tools extensively but are interest to tell us what they like in a developer tools. If you can help us reach more developers, it will help us shape the future of the product for a broader community.

Thanks for your help.

Categories: News, Blogs, and Tips

Windows 10 Creators Update and Delphi 10.2

Thu, 04/06/2017 - 07:03
Creators Update Developers Information

Today Microsoft shipped Windows 10 Creators Update. You can read some of the key developers information in many places, including:

The most relevant change for VCL developers is the fact that High-DPI support has further changes, something we are still assessing internally. There are some interesting new APIs like "Payment Request API". Also notice the additional options for Windows Desktop Bridge apps, ranging from resource explorer handlers to COM servers, 

Installing Windows 10 Creators Update

I upgraded my main Windows 10 PC to the new release and the installed it and the process was smooth. Notice that if you are not offered an update, you can still download an application to do it sooner. Very smooth process, but not slow.

Delphi On Creators Update

I had RAD Studio 10.2 already installed on the PC, so all I have to do it start it and build some VCL and FireMonkey applications. There is no significant difference, and everything worked fairly smoothly. Including UWP applications installed using the Windows Desktop Bridge. No surprise, also because I had already installed the RTM version and previously some beta versions of Tokyo on a VM with recent builds of Windows.

And Delphi Linux in the Ubuntu / Bash Shell

The last test I did was installing also the Ubuntu Bash shell part of Windows 10 (even if still in beta). This was fairly smooth. In fact I was chatting with Matthias, who also blogged about it earlier today (in German) at

Given the bash shell has access to your file system, you can easily compile an application in Delphi for Linux and run it on the bash shell right away. This is not a VM, it runs in the native computer. Below you can see an image related with the installation and one with a simple application in the IDE and running in bash on Windows:

The missing element is PAServer (and the version of GDB it uses) still has issues running on the bash shell, something we are loooking forwrd to fix and support. Stay tuned.

Categories: News, Blogs, and Tips

Deploying Files (and PAServer) to Linux via WinSCP

Thu, 04/06/2017 - 00:42

I'm a longtime fan and user of WinSCP ( This is a nice free utility to do SCP (Secure Copy via SSH) to Linux boxes, manage files, remotely, and even perform a variety of file system operations on remove Linux boxes. All from a nice and familiar Windows UI, with local folders and remote ones side by side. This is an example:

If you use this tool to deploy PAServer to your Linux box, you can also use it to un-compress and expand the tar.gz file, using a simple command in the popup menu of the remote file:

I've created a video showing these steps, but also the following operations need to connect the IDe to PAServer and import the Linux SDK. It is available on YouTube at or below:


PS. Just FYI, WinSCP is mostly written in C++, and built with a familair tool ( "To build WinSCP you need: Embarcadero C++ Builder XE6 Professional"

Categories: News, Blogs, and Tips

New Warnings, Illegal Casts, and other Delphi compiler changes in 10.2 Tokyo

Tue, 04/04/2017 - 03:50

The focus for the Delphi compiler R&D for the 10.2 Tokyo release was clearly the development of a new compiler for Linux. However, there were many bug fixes and several minor changes to the compilers for all platforms worth covering.

Command Line Compilers are Large Address-Aware

You can use the 4GB memory space for common line compilation, like it happens from the IDE since 10.1 Berlin. Notice that given the command line compiler has much less memory overhead (the IDE loads design time packages and libraries in its memory space), this gives the compilers even more room in memory.

New Warnings

There are new warnings in the compiler, mostly focused on helping find potential breakage when building applications for multiple platforms and different CPU types:


W1071 Implicit integer cast with potential data loss from '' to ''


W1072 Implicit conversion may lose significant digits from '' to ''"


W1073 Combining signed type and unsigned 64-bit type - treated as an unsigned type"

Only the last of these 3 is on by default. You can disable it with a directive like {$WARN COMBINING_SIGNED_UNSIGNED64 OFF}.

You can also turn each of the warnings in an error. For more information about this issue and a complete list of the warnings (and their ID, used for configuration) is available at

Dynamic Arrays and Pointers

Assigning a dynamic array to a pointer is now considered an error, given this breaks reference counting on ARC platforms -- but can cause problems also on others. You can still do it (if you know what you are doing!) by using a hard cast.

Changes to Namespace Resolutions Rules

References do dotted unit names from uses statements have become a little more flexible. In the past, it had to be a direct match or reply on unit aliases declared in the project. Now the rule is a little more flexible. The compiler searches the non-prefixed name first, then iterate optionally specified namespaces. So, for example, "uses Classes" will first look for a unit called "Classes.pas", than go for "System.Classes.pas" and finally search in the FMX and VCL namespaces.

These new rules should be largely compatible with the old ones, as they should resolve more scenarios automatically, but specific projects with duplicated names and an odd use of aliases might end up behaving differently.

Allow Undefined to LLVM Linker

By default, the compiler asks the LLVM-based linker to resolved all external symbols (for DLLs and shared object files) passing the "--no-undefined" option to it. However you can use the "--allow-undefined" option to disable the standard behavior (and avoid indicating that linker option). This allows you linking when the symbols are not available at compile time. Occasionally this feature is handy on the Linux platform.

Categories: News, Blogs, and Tips

Konopka Controls, Radiant Shapes, TurboPack and more in GetIt for 10.2 Tokyo

Tue, 04/04/2017 - 03:20

A significant number of the components and libraries distributed on GetIt are available for the newly released RAD Studio 10.2 Tokyo, including "bonus pack" items like Konopka Controls and Radiant Shapes.

Konopka Controls and Radiant Shapes

The two add-on libraries are available and get be installed. While they still run a separate installer, this is not asking for an additional license key any more and installs the components only for 10.2 Tokyo. If you already have installed a different version on the same PC, make sure you are installing on a separate folder and don't override the previous installation.

TurboPack, Trials, and More

The TurboPack collection of controls has been updated for Berlin (see also the GitHub home page at and also some of the third-party vendors lite versions and trials (X-Files Software, InstallAware, ErroSoft, unSigned) and other free libraries like ICS and Redis Client. Here is the entire list extracted from the GetIt UI itself:

March 31st Update

Today we were able to add also Jedi's JCL and JVCL to GetIt, for both 10.2 Tokyo and 10.1 Berlin (were we had an issue in the past). These two of the most popular open source non-visual and visual component libraries for Delphi, and we have to thanks the entire "Jedi team" ( for helping us getting those ready and out so timely.

Delays in IoT

We have, instead, some delays in publishing the IoT components, BeconFence and a few additional items. Those will be made available shortly. Regarding other packages and libraries that were in Berlin, we are working with the developers and vendors to make them available for Tokyo, and also in the process of adding new ones.

Stay tuned.

Categories: News, Blogs, and Tips

Delphi 10.2 has been Released Today

Wed, 03/22/2017 - 08:27

Today Embarcadero has released Delphi, C++Builder and RAD Studio 10.2, also known as Tokyo.  The new version of the product includes our new Delphi 64-bit compiler for Linux, and much more.

Given a lot of the content of the release has already been discussed, I'm not going to add much, only a few links:

What's New in RAD Studio 10.2:

Blog announcement:

The DocWiki main page:

List of customer reported issues fixed (over 500):

Delphi Linux Server support video:

​The Feature Matrix:

Official launch webinar with PM next Monday:

I'll write again covering Delphi 10.2 in more details, for now let me say:

"Delphi for Linux is now available, Delphi is getting more traction, Delphi is back!"


Categories: News, Blogs, and Tips

Delphi Blogs of the Week/Month #51

Wed, 03/22/2017 - 02:03

It has been quite some time from the last installment, and there is a lot to cover -- although I did blog about a summary of the coming Delphi for Linux related news separately.

Embarcadero News

The company has released a new version of InterBase, read more at

Nick explains he is moving to a new role inside the company (and also covering his new book, see also below) at

Delphi DNA infographic at

Tokyo Beside Linux

While the focus of the coming release is Delphi Linux support, there is more to it. Here are some anticipations:

Previewing RAD Server Multi-Tenancy Support in 10.2 by Sarina at

What's New in C++Builder 10.2: Part 1 - The Linker by David at

Previewing FireMonkey Features in RAD Studio 10.2 by Sarina at

​RAD Studio 10.2 Tokyo & MariaDB by Fernando (in Portoguese) at

​Delphi 10.2 Tokyo Beta Blogging: Editing data in TFDMemTable during design-time by Holger at

UI Changes in the IDE's View menu by David at


Always great to have new Delphi books, even more if the author is Nick:

More Technical Blog Posts

Delphi/Object Pascal at #9 in Tiobe March 2017 index - Swift enters top 10 by DavidI at The actual Tiobe Index information is at and there you can see Delphi/Object Pascal got one notch up to the 9th position. Even if I don't think this is a real representation of use of programing languages, relative growth -- within the sane index -- is certainly a positive sign.

TListView OwnerDraw compat with Windows UI & VCL Styles by Rodrigo at

Generics, modules and typeinfo by Stefan at

The Old Vic by Steffen at

Embed Facebook SDK for Android in your Delphi mobile app (Part 2) by Allen at

Quickly Auto Generate iOS, OSX, And Android Headers For Delphi And C++Builder by Eli at -- This is extremely important for calling more native APIs than we expose or use other native third party libraries on different platforms

Perform Low Code Calculations Using LiveBindings In Delphi FireMonkey On Android And IOS by Eli at

Official quartic equation using Delphi Firemonkey by Haruyuki at

Libraries and Third Party

Redux Delphi at

​My Future plans for GExperts by Thomas at


That's a lot of links for sure, but all of them are worth reading and looking to. I know, I need to keep this more frequent, but busy getting Delphi 10.2 out of the door. Stay tuned.

Categories: News, Blogs, and Tips

Delphi for Linux is Coming

Fri, 03/17/2017 - 10:49
Does Linux Matter?

I'm personally going to switch my current server from Windows to Linux, and save quite some money in the process, but this is what other developers told us:

Getting Ready

In case you want to get back to Linux and get ready, here are a few resources:

Free O'Reilly Linux Survival book:

Installing and configuring Ubuntu for Delphi development (by Pawel):

Technical Details

I've done three blog posts with technical information about Delphi Linux compiler, RTL, database access, and web technologies:

More information can be found watching the Linux Boot Camp replay:

A Great Video

And finally Jim created a great "Get ready" video, available on YouTube and below:




Categories: News, Blogs, and Tips

Delphi for Linux Database and Web Development

Fri, 03/10/2017 - 09:42

Following my blog post on the compiler and the one on the RTL, this third post covers the focus of our Linux solution, building database web applications and web services. This blog post covers the feature we are expecting to release for the coming Delphi version including support for the server-side applications on the Linux platform

Database Access via FireDAC

Given Delphi's database access support has been a key tenet of the product since day one, the fact that the core database RTL is fully supported and available on Linux should not be surprising. TDataSet, the TFields hierarchy, and all of the remaining core DB technologies will be available.

In terms of actual database access, it will be provided by the FireDAC framework, available along with most of the database drivers we ship on Windows. There will be a few exceptions, including Windows-specific databases like Microsoft Access. Our support will start with MySQL -- almost the standard on Linux -- but include also Interbase, FireBird, ProgressSQL, and many others. Enterprise-grade databases like Oracle and Microsoft SQL Server will also be covered.

The solution is going to include also local tables access via FDMemTable and mapping of database data to XML and JSON, something often handy when building web services and web solutions.

The Web Technologies

The focus of the Delphi support for Linux is in building server side applications, which mostly ends up being HTTP-based solutions -- although via Indy we support also the development of non-HTTP Internet servers. All of the web technologies in active development on Windows will come to Linux, including:

1. WebBroker core foundations, with the direct support for building stand-alone console apps and Apache modules. All of the core elements of WebBroker -- mapping of request and response, actions, etc -- are going to be supported, along with some of the old-school HTML producer components

2. DataSnap servers, again deployed via Apache WebBroker or standalone. You should be able to migrate recent DataSnap servers to Linux.

3. The development of EMS modules for RAD Server, our newest REST service development technology. In fact, RAD Server itself is going to support Windows and Linux deployment.

Apache Demo and Conclusion

This is overall what we are expecting to deliver, but some details are still in flux, so don't take anything from this blog post as a promise. To conclude, I wanted to share this screenshot of a running Apache module, its source code, and its configuration -- detailed images added below.

In this image you can see on the left -- or the first detailed image -- the source code of the WebBroker Apache project file (generated by the wizard) and the module with a very simple action returning a string, on the right -- or the second detailed image -- above the configuration for Apache on Linux, with the module loading lines and the configuration (mapping the handler to a path), while below it you can see a browser running on Windows and pointing to the given URL. End result is you can see the simple one line of HTML text in Chrome.

While the actual result of this project -- one line of HTML -- is not terribly thrilling, the ability of creating Linux Apache modules with Delphi certainly is. Looking forward to deploy my server side code on Linux.

PS. I know that is not even legal HTML, but keeping the code as simple as possible was the goal here. I'll soon show you some real dynamic web pages deployed on Linux via Delphi. Stay tuned.

Categories: News, Blogs, and Tips

Delphi for Linux RTL units

Thu, 03/02/2017 - 10:57

I want to follow up my blog post covering the Delphi Linux compiler with a second one focused on the RTL units that are going to be available in Delphi for the Linux platform.

The System Name Space

These are the units part of the System name space that are available for the Linux platform (in alphabetic order):


System.Bindings.Consts.pas: this and following units have Live Bindings support





















System.Character.pas: this unit has Unicode support at the codepoint level

System.Classes.pas: basic classes for TComponent etc

System.ConvUtils.pas: convert units of measurement

System.DateUtils.pas: dates processing

System.pas: the core unit 


System.Generics.Collections.pas: as the name says, generic collections


System.Hash.pas: hashing support has been extended with file hashing


System.IniFiles.pas: these clone the Windows INI files






System.IOUtils.pas: support for modern file system access (input/output utilities)

System.JSON.BSON.pas: this and the following units have JSON and BSON streaming support













System.Math.pas: Core mathematical functions



System.Net.FileClient.pas: the "Net" units implement the HTTP client library









System.RegularExpressions.pas: these units have RegEx support





System.Rtti.pas: Core RTTI access unit, or reflection support




System.StrUtils.pas: core string processing utilities

System.SyncObjs.pas: threads synchronization


System.SysUtils.pas: the most classic system utilities

System.Tether.AppProfile.pas: AppTethering support






System.Threading.pas: this unit defines the Parallel Programming Library (or PPL)



System.TypInfo.pas: the more traditional RTTI access



System.VarCmplx.pas: these units offer limited variants support




System.Zip.pas: compression support



Other Name Spaces

There are other RTL name spaces, though:

- XML support via native OmniXML

- SOAP support

- REST client library support

Linux and Posix APIs

The LinuxAPI name space with units for kernel definitions and Curl, plus dozens of units implementing the Posix API:

















































There is More Than RTL

This list does not include units outside of the core RTL. which include FireDAC, DataSnap, EMS, WebBroker, Indy, and DunitX.

The new version of Delphi is bringing to the Linux platform a lot of technology. True, there is no ready-to-use GUI support, but there is lot of keep developers happy.






Categories: News, Blogs, and Tips

Case Study Webinar Tomorrow about my Mini Figures Mobile App

Wed, 02/22/2017 - 09:23

Embarcadero has asked me to give a webinar covering my experience in building and publishing my Mini Figures Mobile App, which is actually available on 3 Stores (iOS Apple, Android Google, and Windows Desktop Microsoft).

The description says "available on mobile, using many Delphi and RAD Studio technologies" and this is only partially true. In any case, I'll cover some of the lessons I learned publishing store apps, I'll show some of the technologiues used in FireMonkey, but also on the server -- there is a figure trading function backed by a WebBroker application.

Sign up at

If you are looking into publishing store apps, this should be interesting. But even if not, learning how an idea of my 11yo son, initially developed over a weekend, turned into an interesting revenue generator -- at least for him -- should be instructive. In short, we put the app on the store to simplify sharing with his friends and would not expect having a quarter million downloads!

For more info on the app, refer to its Facebook page at or download it from:

Categories: News, Blogs, and Tips

Key Traits of the Coming Delphi For Linux Compiler

Fri, 02/17/2017 - 10:32

Embarcadero is about to release a new Delphi compiler for the Linux platform. Here are some of the key technical elements of this compiler, and the few differences compared to Delphi compilers for other platforms.

Linux Intel 64-bit

Before we get to language specific features, let me clarify once more the target platform, as Delphi for Linux is a bit vague. The compiler produces Intel 64-bit executables for Linux. This is a key difference, for example, compared to the old Kylix project compiler, that was 32-bit. The new compiler does not include Linux ARM platforms, which we are considering for the future.

Another related element is that the compiler is based on the LLVM compilers architecture, like all the most recent new Delphi compilers (iOS 32 bit, Android 32 bit, and iOS 64-bit). The advantage is that it will provide some significant optimization on the generated code. The disadvantage is that compiling and linking an application takes considerable more time than when using the Windows compilers.

In the rare case you need platform specific code and when calling platform APIs, you can use the {IFDEF LINUX64}.

Object Pascal Language Compatibility

Getting to the language specifics, the level of language compatibility is going to be very high. Almost all of the classic Pascal-based languages features, OOP features, RAD support capabilities, modern Pascal features (generics, anonymous methods, reflection, attributes) are going to work the same. Some beta testers have been able to port significantly complex libraries in a fairly smooth way.

What you might find a little more trouble in is porting some "older" code, like code that is not Unicode enabled or relies heavily on Windows-ism. Below are some of the specific differences. The only area that is not meant to be fully compatible is memory management, given the new compiler is based on Automatic Reference Counting, as explained later.

Core Data Types and LongWord Blues

I'm not going to list all of the core data types that remain the same, as the list is very long, but let's look at what's specific to this compiler. Being a 64-bit compiler, all pointers are going to be 64-bit, while Integer stay 32-bit -- this is the behavior of all other Delphi 64-bit compilers (and most other programming languages, BTW).

The only caveat is for the LongWord type. This is a data type often used when making operating system calls, so the decision that was taken some time ago was to keep it matching the underlying OS. So, for example, on iOS the same API declaration with LongWord compiles to a 32-bit or 64-bit data type depending on the compiler you are using. On Windows, however, Microsoft made a non-standard decision to keep LongWord the same size of an Integer. This implies the Windows 64-bit platforms works differently from the Linux 64-bit platform in regard of this data type. For reference, among other sources, see the long type in C language on different platforms at and the first answer at

You might have to revisit you code using LongWord and decide to keep that data type or use a different one (Integer, UInt32, NativeUInt...) depending on your goal. We have done and are still doing a significant revision of the RTL to make sure we are not misusing this type. In same cases, however, we are going to keep code that behaves differently depending on the platform, particularly when changing core RTL classes would cause a lot of legitimate Windows code working for 20 years not to compile any more.

Strings and Encodings

Since Delphi 2009 the Object Pascal language string type has defaulted to UTF-16 Unicode and 2-byte Char data type. Needless to say the Linux compiler follows the same path. Since 10.1 Berlin, all compilers (including the mobile ones) received full support for the UTF8String type and also (for direct low-level processing) the RawByteString type. The Linux compiler includes these data types, and in fact the UTF8String was added to mobile mostly because we anticipated it as a key requirement for Linux. A significant part of the HTTP-based traffic uses UTF-8 and supporting this representation as a native type -- beside supporting encoding to it -- was considered a requirement for the Linux project.

It is true, however, that some other string types like AnsiString are not supported. This is mostly a "Windows-centric" data type. If you are still using strings and PChar for managing generic data structures, it is really time to move to TBytes and PByte instead -- or enable pointer math for all data structures. Also the support for the old Pascal ShortString type is limited. Declaring a string [20] variable on Linux will fail. The other string type that is not supported is WideString. This is the old pre-Unicode non-reference counted UTF-16 type used for Windows COM platform integration. In fact, any COM-specific type and feature is missing on Linux, like on all other non-Windows Delphi platforms.

Notice that the TEncoding support is available, so you can read and write text files in any format you want. What you are not directly able to do is process an AnsiString in memory with the standard language support. But you can have an array of bytes (TBytes) representing text in any format in memory, and read and write it on disk, or receive and send via a socket connection, and you can use the TEncoding support for conversions.

Linux Defaults to 1-Based String Access

What about string access via the [] operator? As you might know, there is a compiler default you can change per-project, per-unit, or even per-code fragment that determines if the compiler treats the string access operator with a 1-based Pascal-classic notation or the 0-based notation most programming languages use. While mobile compilers default to 0-based, for Linux we decided to stick with the traditional Windows model, on the ground developers are mostly likely to migrate existing Windows server side code to Linux. The recommendation is to try to use clean, agnostic code, but if you prefer forcing a given string access model for all of your Delphi code, just use the $ZEROBASEDSTRINGS directive in your projects. Just as a reminder all RTL string functions and the newer string helper methods stays the same regardless of the platform and this setting. The first group uses a 1-based logic, the second a 0-based logic. Your pick.

Here Comes ARC

The other notable change from the Windows compiler is that on the Linux platform (as in any new platform) we have decided to use the Automatic Reference Counting (ARC) model for memory management. This is the model Delphi uses for all mobile compilers plus the iOS simulator one. The long term plan is to shift the entire Delphi ecosystem in that direction -- probably keeping the VCL world on the traditional memory model. This is the reason not-picking ARC for Linux would have been very confusing, as given you need testing when adopting a new platform this is the least disruptive moment for such a transition.

Feedback from beta testers has been fairly positive on this, and migration of existing code and libraries has not bumped into big hiccups. Now I don't have room in this blog post to revisit the best practices for ARC migration, but I'll try to have some more extensive material on this in the future.

Shameless plug: My Object Pascal Handbook (and particularly the Berlin revised edition) has some good material on this.

More Information? Delphi Linux BootCamp is Coming!

For more information, sign up to the boot camp (which is actually a one hour webinar) scheduled for March 1st in 3 times zones. For more information and to sign up see

Categories: News, Blogs, and Tips

22 Years of Delphi and it Still Rocks

Tue, 02/14/2017 - 04:04

To celebrate another year of success for Delphi. I dug a bit in my archive. Here are a few old images, mostly ads from Borland, before and after the product release. You can find a higher resolution version of these images at Here are smaller versions, with some comments.

It is interesting to notice how the original business value (increased productivity for developers) is still true today with a totally changed landscape, mobile, and all. We could re-use some of the original ads, as they make sense today. The other things I noticed is that most of the other tools that were popular back than, have long been forgotten. Delphi, on the other hand, is still popular.

The Original Product Box The Trio of the Thickest Delphi 1 Books

Mine, Charlie's and Pacheco/Teixeira where the 3 classic books covering Delphi in all of its angles, and became classic books, all with many editions for following versions. I guess I have them all...

Before Delphi, Was Turbo Pascal

Before Delphi came along, the language, its earlier (and different) OOP model and Windows integration were already there. But Delphi had a new object model in the language, the concept of components, and a new library, including strong database access, and it was a breaking change from previous Turbo Pascal products.

And Borland had a magazine, here you can see the editor:

Here Comes Delphi

Delphi RAD to ROI. We should use this more today!

Visual Basic done Right... The RADical performance... ready for Windows 95. Development got easier (with the family of Borland tools). Even if the product was a bit simpler (with the product matrix fitting a single page) it was powerful.

And magazines focused to it, for which I occasionally wrote articles.

Delphi Prizes

And Delphi won many prices, celebrated when Delphi 2 shipped. See the Jolt Award announcement ("Borland is back") and description:

Delphi 2 and Delphi 3

The easy of VB with the power of C++. On Time and on Budget. Power and performance. And some reviews.


Delphi and a Duck: an anticipation of things to come...

More "Recent" Versions

Delphi 4 (pushing rocks?), Delphi 5 and the Net (meaning Internet... but kind of cryptic), Delphi 6, Kylix (Linux we are coming back real soon!), Delphi 7, Delphi 8 and .NET (ugh!). And a big push towards modeling!

Delphi BirthDay Page

I still and always have Delphi 1 launch information at a page of my regular web site, But enough of history, I'll start blogging on the Delphi language coming back to Linux tomorrow!


Categories: News, Blogs, and Tips