After more than a decade, Lazarus has reached version 1.0. For those that don’t know Lazarus – it’s a Delphi-like IDE for the Free Pascal Compiler and has widget sets for win32/64 GTK2, Qt, and others. It’s very very much like Delphi and instead of the VCL it has the LCL which is cross platform. Syntax is almost exactly the same as Delphi. You can create stand-alone win32/64 executables that require no .NET runtime or even an installer.
I got one word for Lazarus, but it says a lot:
underrated.
I used Delphi commercially from 1998 till early 2007. I used it for a University project before that. It was good technology handled very poorly by Borland/Innovise/Borland/codegear/Embarcadero. Shame, shame, shame! People like Alan Bauer and Charlie Calvert were my heroes. I marvelled at Anders Hejlsberg absolute frickin genius, the VCL was once a wonderful thing.
But today I wonder why we still need to make silly claims like “doesn’t need .Net runtime” when the .Net Runtime is installed by default in Windows 7, “compiles to a stand alone exe”, which is bull, as the exe requires the subsystem that arrived with the OS (e.g. Win32) and if you do anything vaguely edgy, you *will* need to include additional DLL’s (or libraries – sorry, force of habit when discussing Delphi.) And installer? Why do you need an installer? I hardly ever bother writing installers for our software, I just copy the built files to the target machine – which is surely what this is suggesting?
In short – cool. But both Delphi and Pascal are about as niche as you can get these days. Delphi jobs have completely dried up (for anything worthwhile), so it’s probably 10 years too late to gain any traction.
About all it has going for it is that they can’t hash up the LCL any more than Borland did with the CLX** did… though IIRC they have an LCL for MacOS X that tries to map Windows VCL concepts on to the Mac… hmmmm.
I know this all sounds pretty down on Free Pascal and Lazarus. I’m sorry. I just can’t get enthusiastic about it. It would be interesting to see this pick up pace and become used – but it won’t be used by anyone outside of small projects by ex Delphi fanatics (of which I was one till about 2008.)
** I alpha and beta tested Kylix… The first version I used didn’t even have a working GUI. The IDE would start, do nothing very useful, then crash. The compiler was good though. I also beta tested Delphi 6, which IIRC was codenamed Iliad. The fact that the CLX was borked on the last beta of that wasn’t a good sign to me (the alignment of the controls at run time shifted badly when you added a menu bar..)
> “compiles to a stand alone exe”, which is bull, as the exe requires the subsystem that arrived with the OS (e.g. Win32) and if you do anything vaguely edgy, you *will* need to include additional DLL’s (or libraries – sorry, force of habit when discussing Delphi.)
So are you saying nothing qualifies as a standalone exe because it uses native libraries installed with the operating system? This is *not* bull.
C/C++/Delphi and similar languages *do* compile to a stand-alone EXE. They don’t require additional runtimes. For example, .NET programs won’t run in Windows PE, Delphi/Lazarus apps will. That’s what stand alone means to me.
Let me turn this around, are you saying that the .Net framework that is installed as part of the OS is not “native”? Please define “standalone”.
Yes they do. They need the system libraries. They are native assembly level code, but ever Windows OS from Windows XP onwards has had the .Net loader as part of the native OS once the framework is installed. The framework has been installed by default since 2.0, which I believe was part of an XP service pack (sp 3?) and was certainlt part of server 2003 and Vista.
C++ is also a bad example, as the MSCRT is *not* part of the default OS install, anything compiled with Cygwin requires a bunch of DLL’s and MingW generally gets round this by statically linking anything that isn’t installed. Even Borland C++ *required* a bunch of DLL’s.
And for god’s sake, Delphi wasn’t immune. Use Midas? DLL. Use anything written in C? DLL. ActiveX? DLL. None of this is guaranteed to be installed by default.
Ah, so the definition shifts to a paired down OS intended for PreInstallation Environments? Have you ever heard of the .Net Micro Framework? Gosh, that runs on micro controllers and there’s even the netduino that is 100% .Net powered. http://netduino.com/
> Ah, so the definition shifts to a paired down OS intended for PreInstallation Environments? Have you ever heard of the .Net Micro Framework? Gosh, that runs on micro controllers and there’s even the netduino that is 100% .Net powered. http://netduino.com/
Ah, but my enterprise of several hundred thousand systems doesn’t run arduino, we run Windows, and we use Windows PE for many tasks like system imaging. In that scenario .NET won’t cut it (and I say this as someone that actually likes C# quite a bit).
Out of the box, I can run Delphi anywhere Windows does, and yes it requires Windows and it’s libraries. I can’t say the same for Win PE 3.0 and C# (built on Win 7).
But anyhow, I see your point. That standalone to you means without dependency. And I understand that in recent years .NET framework is nearly ubiquitous on at least Vista and up.
My point is that .NET isn’t always the right tool for the job. When I need to *know* that it will run because I don’t know the host, I’m writing native code that only targets native (not managed) libraries for import.
A standalone executable, once compiled, runs directly on the target platform’s hardware without any sort of interpretation or just-in-time compilation – and it does not have a dependency on any external runtime framework. Its only external dependency is on system provided API libraries.
I think the argument is that a runtime framework and a library are not the same thing… Afaik, it is not possible to compile a .net application directly into machine code that will run _without_ a system installed .NET CLR. You can, however, compile an application that way using delphi. You can also write a Delphi application that doesn’t even use the VCL at all…
I admit the distinction is very subtle. But I found the following definition to be very helpful (kudos to some anonymous developer on stackoverflow):
A Library is a tool.
A Framework is a way of life.
.Net is a framework. You have to commit your entire project to it – it become your “way of life”. A library? You can use whatever piece you feel like using and ignore the rest.
Both the VCL and .NET are runtime frameworks. But with Delphi you can statically compile the runtime into your application – hence it becomes “standalone”. You cannot do that with .NET.
That said, Win32, unlike .NET, is a library. You can selectively choose what bits to link to, and there is no runtime involved.
The meaning of ‘standalone’ is very simple. It simply means this:
Can I install the OS, and then run the executable without having to install any additional runtime libraries? If the answer is yes, then it qualifies as standalone. If the answer is no, then it doesn’t.
So basically, if .NET is included with the OS install and I can run the application without having to download anything, then it qualifies.
If you have to have the latest service pack for an OS, then I assume that still qualifies, though I suppose we could get a debate going about that
Edited 2012-09-01 23:01 UTC
your forgetting about the many many versions of .net we
have, just because it’s installed by default with win7 does not mean it’s the version you need, especially in a corporate environment where they “standardize” on a particular version of .net and it’s not easy to get them to install “newer” versions.
The savvy and clever developer will choose Lazarus/Delphi to avoid these stupid .net version issues.
The Lazarus project created a fantastic IDE. The editor is just filled with cool features – some not so obvious for the casual user, but for the working programmer it is great.
The BIG plus over Delphi, is that you have the source code. I often tweak things to suite my needs, or to fix a bug instantly. This is where Delphi falls down – it is a “black box” you can’t tinker with, and you are at the mercy of a company that doesn’t always know where it is heading.
The Free Pascal Compiler (which Lazarus uses) is also fantastic. Supporting something like 20 platforms. FPC can even generate Java bytecode applications.
Our company has been using Lazarus for the last 7 years. We have cross-platform desktop applications, Linux daemons, console utilities, CGI apps etc.
The FPC and Lazarus projects definitely deserve more attention from programmers. FPC’s Object Pascal languages has modern features, easy to read and understand, and a very fast single pass compiler.
It’s wonderful to see that the Lazarus project finally made the 1.0 milestone.
Do you still go your own GUI or have you moved to LCL…?
I think LCL is the biggest issue I have with Lazarus. The VCL was crufty by the time I bailed on Delphi dev (I used mainly Delphi 5 die to constraints put on my by my employer – I back ported a lot of Delphi 6 and Delphi 7 features, I can tell you!!) Delphi 6 was munged to support a bunch of C++ oddness, and Delphi 7, well, I just never really found it added much to the picture for me. I used the .Net versions somewhat, but the fact that Borland completely crapped all over the place and made the .Net VCL horribly unportable and used odd hacks that broke it constantly (I forget the exact reason, but I remember Alan DOH-ing big time on his Oracle of Delphi blog – something about assumed code layout and private field mapping…) made it unusable.
The problem is, if you diss the LCL, you get angry shouting… but the problem is, the LCL is based on the VCL and the VCL is obsolete and very unsuitable by modern standards. The VCL was often a far too loose wrapper round the Win32 API (but never as horrible as MFC) and breaking that makes porting code to LCL non-trivial. So, either your code is a complete re-write (then why bother?) or you’re saddled with a crufty framework. Rock, meet hard place.
I do like the Mac stuff that they’ve been doing. At least that shows some initiative and lateral thinking. And the Java byte code sounds pretty spiffy.
Yes I still develop and use fpGUI Toolkit ( http://fpgui.sourceforge.net ), instead of the LCL. My own custom drawn cross-platform GUI framework. I do use the Lazarus IDE for 90% of my coding and debugging though.
The Delphi VCL is very Windows centric, because it is essentially a wrapper for the Win32. To me that meant, not ideal for cross-platform design. But saying that, it is amazing what the Lazarus folk have accomplished with the LCL.
The Lazarus guys have also spent a lot of time developing project convertors, to help you move your Delphi VCL code over to FPC+Lazarus. Apparently that does a very good job, and a huge time saver.
Totally agree with you.
People just don’t see the value of Lazarus and Free Pascal and the amazing apps you can create that work on windows and linux (and others).
I recently created a IM server and I can cross compile the linux daemon right on my windows 7 desktop and at the same time build a debug version of the daemon that outputs logging to a win32 form app. I can then test the whole thing on windows 7 and easily build the linux executable on the same box.
Just amazing if you ask me, Lazarus is what Delphi should have been.
I have to disagree with you.
Delphi and Lazarus apps are stand alone, I can make a Lazarus app that targets win32, the LCL is statically compiled in and I can take any windows OS from 98 up and it will simply work, .net on the other hand has so many different versions it’s like java version hell.
I work in a large corporate environment and because .net changes so often it becomes a huge pain with the software packaging department because they only support a certain version of .net, and if you need .net 4.x and they will only support 3.x you are going to be fighting to get them to update all the copies of windows in the enterprise. Delphi and Lazarus apps that don’t use a dll, and you CAN create rich beautifull apps with just the LCL or VCL, can simply be put on the users desktop and it just works, people here can’t believe I can write them a app that just works from the deskotp with no issues.
.net is really for lemmings following the MS bullshit band wagon, now you have winforms and WPF, while in in Delphi and Lazarus there has only ever been the VCL or LCL.
“About all it has going for it is that they can’t hash up the LCL any more than Borland did with the CLX** did… though IIRC they have an LCL for MacOS X that tries to map Windows VCL concepts on to the Mac… hmmmm. ”
Lazarus has LCL not only for Windows and MacOS X but for GTK and QT (this means Linux FYI) as well.
Edited 2012-08-31 18:20 UTC
I think it has potential for educational use. Delphi/Pascal is really good for revealing Computer Science concepts.
“But today I wonder why we still need to make silly claims like “doesn’t need .Net runtime” when the .Net Runtime is installed by default in Windows 7, “compiles to a stand alone exe”, which is bull, as the exe requires the subsystem that arrived with the OS (e.g. Win32)”
You are blatantly wrong. Lazarus supports Win98, 2000 and later versions.
.NET definitely isn’t installed by default on Win98 or 2000.
A standalone exe is an excellent feature that Microsoft’s bloated compilers probably can’t do.
Edited 2012-09-01 17:47 UTC
unfortunately FPC+Lazarus cannot build DevC++ yet. Though at this time two forks exist
Orwel’s DevC++ and WxDevC++
But yes, it is a big milestone. If you need an alternative, mseide is also open source.
“Yes they do. They need the system libraries. They are native assembly level code, but ever Windows OS from Windows XP onwards has had the .Net loader as part of the native OS once the framework is installed. The framework has been installed by default since 2.0, which I believe was part of an XP service pack (sp 3?) and was certainlt part of server 2003 and Vista. ”
hmm, system libraries are not a run time and the .net framework is a wrapper around those system libs.
Let say you create a nice shiny new .not 4.x or whatever the latest version is these days and you have to deploy to windows XP, you simply cannot guarentee that every PC will have the required .net runtime installed. Even in a corp environment they may have standardized on .net 3.5, so you are going to have problems deploying, not to mention if you use something other than C#, then you have to deploy all the VB.net assemblies.
Now I can take Lazarus, create ONE single exe that I can take care not to use external DLLs if possible, even if I use sqlite, I can deploy a single dll for that or I can use a sqlite component set that statically links the sqlite object files into the exe and still I have one exe that will simply work all the way down to windows 98, sorry but you cannot do that with .net unless you are in a highly controlled environment. Sure you can have your setup.exe force the user to download and install the required .net runtime, but seriously….
Btw, my favorite application, Peazip, it’s developed with Lazarus.
Edited 2012-08-31 17:15 UTC
Your favourite application is a… file archiver? You must like zipping & unzipping stuff very, very much, for whatever reason
Yes it is my favorite, I send a lot of mails with attachments, GMail block executables in a compressed zip file, my option is Winrar and the prropietary rar format, but with Peazip I can compress it with the 7zip algorithm and have the same results, forgetting about the nag window winrar gives me. And it can also uncompresse rar files and every format know by man, I recommend it to you.
“But anyhow, I see your point. That standalone to you means without dependency. And I understand that in recent years .NET framework is nearly ubiquitous on at least Vista and up. ”
Folks, of course a Lazarus win32/64 app has the dependency of windows itself as it is a WINDOWS application.
Depending on the OS itself is not the same as depending on a runtime like .net or java, it does not matter that
.net is installed on XP and up either out of the box or via a SP. Bottom line is .net apps are not capable of being stand alone requiring simply the base target OS to be in existence.
Try this:
create a simple hello world app in Delphi or Lazarus and one in .net (C# whatever)
install windows XP from a older install CD that is un patched(this happens all the time folks)
Guess which hello world app is going to work? ding ding ding Lazarus/Delphi
You can try and spin the .net thing anyway you like, but having the ability to create quick or even larger scale apps that you don’t have to worry about them working on any windows OS from 98 up is a huge plus.
Remember if those system libs are not present you won’t be using Windows at all as it will not work with out them, so if you lose the system libs you lose your ability to even use the OS….
Edited 2012-08-31 17:46 UTC
I find the benefit description still a bit weak. The fact that the exe has lower dependencies and can work on older Windows and PE-environments is indeed a benefit. A much more important benefit is the reduction of overhead.
Not requiring a JIT compiler allow fast-launching of the application, low memory requirements and if you plan to do some number computation work you will like much faster execution of the code. The memory footprint of a Lazarus application is an order of magnitude lower than a .NET application.
The impact on user experience can be huge: Instead of a slow application they hate to use, can get a agile, responsive application.