It has been a looong time since I last looked at Lazarus. So long in fact that I don’t remember exactly when it was. Whenever it was I don’t think I ever actually managed to even get it up and running at that point. Certainly I don’t remember much about it if I ever did. But with the timely Lazarus 1.0 announcement last week, I have gone back to have another look.
And this is what I found.
First up, installation was not only smooth and painless but also extremely swift. I didn’t put a clock on it but it was certainly only a few moments. Installation on OS X was slightly more involved as it required first installing FPC and FPC sources before Lazarus could actually start up, but the Win64 build seemed entirely self contained.
Once installed I fired it up:
First of all, it was a bit of a culture shock finding myself back in a Delphi 7 era undocked IDE especially as, although still quite familiar, the Lazarus IDE has adopted some of the more modern IDE changes, such as in the Options dialog.
Now, I’ll be the first to admit that – back in the day – I was a big fan of the undocked layout, primarily as I found it far more productive in a multi-monitor configuration. These days though, I now have such a huge primary display (27″ iMac) that at home I have gratefully reclaimed the desk space previously occupied by the second monitor. In the office – with a much larger desk – I still have a second monitor alongside my iMac there, but these days it is used for little else other than as a Spotify and Skype console. 🙂
I should mention at this point that there is a project to create support for the “Docked IDE” configuration, but it is not included as part of Lazarus 1.0 but is a separate download, currently still in beta. This installs as a “package”, but packages in Lazarus appear to be a slightly different animal that that which we’re used to in Delphi as installation requires a rebuild of the Lazarus IDE to incorporate it.
So I tentatively went through this process, but was pleased to find it was a simple matter of click-click-done: I opened the Lazarus package project file and when I then tried to install it was informed that the IDE needed to be recompiled and did I want to go ahead ?
I confirmed that I did, and a few seconds later it was finished and Lazarus automatically restarted. After the rebuild, I had a new KZDesktop -> Start option in the Tools menu. Selecting this cautioned me that the package was a beta – I had been warned! – and that the docked mode was now enabled and I just had to restart Lazarus for it to take effect.
There is a Restart option on the Lazarus File menu, so I guess restarting Lazarus is something that crops up quite often. But no worries, restarting takes barely a moment (literally a couple of seconds). And on this occasion I then found myself presented with the “Docked IDE”.
As you can see, the Form Designer for some reason failed to embed even though the scaffolding for it is clearly present. This may be something to do with the fact that I am using the OS X build of Lazarus (for this exercise at least – I have also looked even more briefly at the Win64 build and it is basically identical as far as I can tell… and all without a SmokingChimp in sight). I believe – from little I have gathered about Lazarus etc so far – that there is some issue with re-parenting windows in the LCL.
There is also only very limited flexibility in terms of which IDE windows can be placed where (there is no drag/drop docking that I could find, for example, only a couple of settings in an options dialog).
Hey ho – this is flagged as a “beta” and isn’t part of the Lazarus “core”, at least not yet. And frankly, the “Classic IDE” won’t take much to get used to again, I’m sure. So, for now I simply removed the KZ Desktop package to get back to “vanilla” Lazarus.
At this point I did have something of a problem.
After restoring the “Classic” IDE, most of the Lazarus windows were positioned so far to the left and top of my display that I couldn’t get to the caption bars – without that there is no way (that I know of) to drag them back into view, and keyboard controls for this seemingly aren’t part of OS X. Consequently, this exercise has also taught me something about OS X and led me to Mercury Mover. And actually it’s such a neat bit of kit that I’m quite grateful. 🙂
But I digress – back to Lazarus.
Obviously in the brief time spent with Lazarus so far I have only barely scratched the surface of it, but already I am finding things that have bugged me as not having been addressed in the Delphi IDE for a long, long time.
- The background colour for ALL elements can be set in one place. No need to change the background colour for each and every separate syntax element which you wish to have a common – the default – background colour
- I haven’t done an exhaustive comparison, but there seem to be far more syntax elements over which individual control can be exercised, not just text elements but almost every aspect of the code editor.
- As well as font selection, you also get some additional fine control over line and character spacing.
Display Options may appear superficial and cosmetic, but when you spend 8hrs+ of a working day in an environment, making it comfortable – and personal – can be important. It is to me.
Your mileage may vary. 🙂
Overall Lazarus appears to have an embarrassment of riches in this area compared to the Delphi IDE.
Frankly, the scope of the controls seemingly available is a little bewildering, but there was one which immediately leaped out at me as of incredible utility (to me) in the area of Class Completion.
Yes, Lazarus allows you to choose the prefixes for read/write property accessor methods, for field names, for the “stored” function and even the name of the parameter in generated property write accessors! 🙂
Other things help you while moving around in and editing your code too, like matched begin/end highlighting as well as parenthesis matching.
This sort of attention to detail also shows up in the messages When you compile your project. Warnings are visually more distinct (to my eye) than in Delphi and only a single-click is required to take you to the relevant and highlighted line of code.
Speaking of the message view, here’s something else that this innocuous little window revealed:
What needs to be mentioned here is that I didn’t have to explicitly perform a full build. I just hit “Run” after making a change in the project options: the IDE recognised the impact this might have on my project and made sure that a full build was performed rather than the usual compilation.
Barely Scratching The Surface and Looking Forward
I quickly came to the conclusion that I couldn’t do Lazarus justice in a single article, so I have deliberately limited this to my First Impressions – the things I noticed straight away without digging too deeply.
But I can already see that there is a lot more to Lazarus. A very great deal more.
Enough that I am determined now to make porting my existing Delphi Pascal libraries to FPC and Lazarus just as soon as possible. That means knocking them into shape for availability in Delphi first.
But just as soon as that is done, I am actively looking forward to getting to grips with Lazarus in earnest.
Quite apart from anything else, despite 1.0 only having just been released, I already have a good idea of what to expect in future deliveries.
There is a school of thought that says that such open and transparent communication with a user community is only possible if you have a hugely profitable operating system and applications division to bankroll the effort.
Given that Lazarus benefits from no such financial buttressing, seemingly what I have always believed appears to be true: that all you really need is to care.
And the team behind Lazarus seems to care. A lot.