
Lazarus – A Delphi-compatible cross-platform IDE - Jack4E4B
http://www.lazarus-ide.org
======
rcarmo
I mentioned Lazarus in other threads a few days ago (since my kids are playing
around with it) and it's great to see it as a top-level post. Some random
thoughts:

\- It's somewhat amusing to realize that in 2017 this is pretty much the
easiest way to do a desktop app (besides RealBasic/Xojo which I've yet to try
- was put off by their mandatory registration)

\- I wish we had RAD environments like this for more languages (Racket,
Python, etc. - even JS).

\- On the Mac, installation is a bit fiddly. It needs a little polish and
support (a standalone, integrated bundle would be better, or at the very least
a unified installer).

\- We've been retrofitting web UIs to desktops to such an extent (I'm looking
at you, Electron) that the tiny, supremely efficient apps Lazarus spits out
put the last couple of years into stark perspective (2GB RAM used by Slack,
etc.)

I love Lazarus, and hope it helps resurrect the RAD approach for other
languages - if anyone knows of any similar environments (besides QtCreator,
etc.), could you share the links?

~~~
dkersten
I've not used Lazarus or Delphi, so I can't really compare properly. Perhaps
I'm missing something. But:

> if anyone knows of any similar environments (besides QtCreator, etc.)

Why "besides QtCreator, etc"? It sounds to me almost like "do you know any X
besides all of the popular X". Is there any particular reason you discount
QtCreator? Does it not work for your purposes? Or is it just a case of you
already know about it and want to hear about more obscure tools?

> It's somewhat amusing to realize that in 2017 this is pretty much the
> easiest way to do a desktop app

I've found Qt with QtCreator to be an incredibly productive way to develop
desktop applications. Both old-school QWidgets-based Qt with QtDesigner (the
RAD portion of QtCreator for pre-QtQuick) and QtQuick/QML with and without its
RAD interface.

> I wish we had RAD environments like this for more languages (Racket, Python,
> etc. - even JS).

I've used the Python version of Qt with QWidgets in the past and it was a
pretty nice workflow. I've never done it personally, but I know of people who
use Python + QtQuick/QML and seem pretty happy with it. There's also various
"app builder" tools for JS, but I don't know how good they are.

~~~
badsectoracula
> Why "besides QtCreator, etc"? It sounds to me almost like "do you know any X
> besides all of the popular X". Is there any particular reason you discount
> QtCreator?

I know Lazarus (almost) inside out and i've tried several times to use
QtCreator, mainly because C++ would allow me to reuse some of my C code.
However i could never get used to how QtCreator expects from me to do more
stuff, how unweildy the laying out widgets is (this is natural since Qt's
layout management was made expecting programmers to do layouts via code but
compared to Lazarus' alignment and anchor based layouts they feel like taking
a step back - although the same can be told with Lazarus' layout if you try to
do it via code) and other not necessarily big issues but still annoying enough
for me to always drop it.

~~~
dkersten
Have you tried QtQuick/QML? It sounds like its anchor/grid/constraints-based
layouts work very similarly to Lazarus.

~~~
badsectoracula
Isn't that a JSON-like language? I find describing UIs in text instead of
"drawing" them like done in Lazarus to be going backwards.

Although TBH i haven't really looked into that. Most QtQuick programs i've
seen look like something you'd see in a mobile phone or tablet instead of a
normal desktop application, so i didn't had the incentive

~~~
dkersten
> Isn't that a JSON-like language?

It is (but its actually good!), but QtCreator also has a design tool to
visually create QML-based UI's.

> I find describing UIs in text instead of "drawing" them like done in Lazarus
> to be going backwards.

This is a preference thing I guess - some people prefer visual design tools,
some prefer text. I quite like QML's approach of giving me a simple
declarative text description language and then providing me with a visual
design tool to author it with if I prefer to do so.

> Most QtQuick programs i've seen look like something you'd see in a mobile
> phone or tablet instead of a normal desktop application

Early QtQuick was very much like this, but nowadays it has pretty good
platform-style emulation (QtQuick Controls). How many applications use it, I
don't know, especially nowadays that QtQuick has iOS and Android support.
Also, since it gives you full styling freedom, I guess (for better or worse)
many people make use of them rather than trying to look native. I've seen some
very non-mobile style QtQuick applications too though, including desktop mail
clients and such and they looked great.

------
oregontechninja
I recently tried out Lazarus, and besides looking a bit dated, it works REALLY
well. I had no Pascal experience so it was also overwhelming for a hello world
app. But after the basic Pascal "Hello World" command line app, a GUI app
didn't even require a tutorial to get working. Really impressed and am
considering Pascal for a project.

~~~
SXX
For me as for the guy who only look at Lazarus not as developer, but as user
who just go to compile map editor of our game (developed by other very skilled
developer) main frustration was multi-windows interface.

Not that I can't understand why some would prefer to work in that mode, but
that alone make it feel more dated than it's actually is. It's still weird why
they still ship it in multi-window mode by default, but fortunately all you
need to do is install "anchor docking" and then it's become a lot more usable
for guys like me.

Also ability to patch and recompile your own IDE on the fly without waiting
for half of hour to it to compile is just great. Nothing like that is possible
in case of 99% C++ projects.

~~~
wolfgke
> main frustration was multi-windows interface.

Multiple windows are very comfortable if you have multiple displays connected
to your computer.

~~~
gfody
Lazarus is basically a Delphi 2 clone. Delphi ditched the multiple floating
windows design starting in version 3 and every subsequent version has been the
more traditional "MDI" design similar to Visual Studio. I really like that
Lazarus kept the floating window design because it's nice to be able to see
your desktop, the wallpaper is more pleasant than whatever solid color
background is on the MDI client, and you can access tools and things by just
clicking through to your desktop icons. Lazarus is like the best version of
Delphi frozen in time.

~~~
yardshop
The floating windows were still very much present in Delphi 7, my preferred
arrangement [0]. D7 was the last "good" version before the .NET era. Actually
I remember the buzz around Lazarus and Free Pascal really growing when the
.NET versions of Delphi came out. So I think its fair to say Lazarus took
plenty of influence from versions later than D2.

[0] [http://i.imgur.com/gHQR6aH.png](http://i.imgur.com/gHQR6aH.png)

~~~
gfody
oh dang I used D7 for years and didn't know you could configure it into this
mode. I would've preferred it at the time.

I'd say clearly Lazarus is tracking the best of Delphi, not just version 2
from 1995.

~~~
yardshop
It's been years since I worked in Delphi regularly, but I still have it
installed and have been looking around in it this evening for the first time
in a long while. Right now I can't find the option to change from this to a
single-window mode, but I'm not sure there is one.

I think the trick is to just not run it maximized, then undock the various
parts from the main editor window. Then once you have things resized and
placed where you want, you save it as a Desktop layout. I don't know how far
back that feature goes.

I would have to reinstall it from scratch somewhere to see how it looks by
default. I really want to do this and dare say I even intend to! I may even
have D5 and D3 somewhere in a box too, but now I'm approaching self-promise
overload!!

Here it is maximized and docked. Is that something like what you remember?

[http://i.imgur.com/aeTYPjb.png](http://i.imgur.com/aeTYPjb.png)

~~~
gfody
it's a real blur but I do recall doing the unmaximize and undock stuff to get
things looking just right. I distinctly recall no longer being able to do that
in some version.. I thought it was 5 but you've proven me wrong. maybe D2005?

------
samuell
Lazarus/FPC checks so many nice boxes:

[x] Statically compiled

[x] Native UI on Linux/Mac/Win

[x] Typically compiled without code changes on Linux/Mac/Win

[x] Small binaries

[x] No GC

[x] Readable, somewhat python-like syntax

[x] Still, doesn't rely on indentation for nested blocks

[ ] (Fill in)

~~~
brass9
> [x] Readable, somewhat python-like syntax

I have a rather different opinion on OP that it has a needlessly verbose
syntax.

Pythonic it is definitely not. Even C# (which is another creation of Anders
Hejlsberg, after MS poached him from Borland) has a better, readable and
concise syntax.

I used to be a Delphi evangelist in it's glory days. Now I bristle when I read
Pascal source code, there's so much unnecessary visual noise. Of course if
your brain is habituated enough to parse Pascal code, eventually you will tend
to filter out the begin..end's.

Pascal syntax belongs to C family of language.

As regards to Python-like syntax, I think you are referring to the Nim
language, whose syntax happens to be similar to that of Pascal.

~~~
epx
My feeling as well. In my heart I am really happy that Lazarus (and Harbour,
the Clipper-compatible compiler) exist, but being rational the days of desktop
applications are over.

Python is being run on microcontrollers these days; I actually wrestle with
the non-adoption of Python (or Ruby, or Javascript, or Tcl) as 1st-class
citizen language for desktop and mobile; it does not make sense for me.
Certainly writing desktop/web apps in C++ or Pascal make even less sense.

Perhaps I am forgetting the big number of fellow developers that work on ERP
systems and outdated software, for them it is a blessing to have free tools,
while in the 90s such a tool could cost $3k.

~~~
microcolonel
> My feeling as well. In my heart I am really happy that Lazarus (and Harbour,
> the Clipper-compatible compiler) exist, but being rational the days of
> desktop applications are over.

Oh boy, I hadn't heard about Harbour until now; earlier today I was looking at
the Wikipedia page for id Tech 5, and it says it uses Clipper so I was really
scratching my head wondering how they pulled that off and why. Now I know,
thanks for mentioning it. :- )

~~~
int_19h
Wait. Why would a 3D game use Clipper? What for?

~~~
microcolonel
That's what I was wondering, I'm thinking of tracking down whoever added that
to the Wikipedia page, because I don't know how they found out.

~~~
justin66
I very strongly suspect that some confused person (or algorithm?) saw that
that the level design tool Radiant has a "clipper" and ran with it.

~~~
microcolonel
[https://en.wikipedia.org/w/index.php?title=Id_Tech_5&diff=pr...](https://en.wikipedia.org/w/index.php?title=Id_Tech_5&diff=prev&oldid=585705338)

Hard to say, bots usually have usernames, so probably a person.

[https://en.wikipedia.org/wiki/Special:Contributions/99.100.1...](https://en.wikipedia.org/wiki/Special:Contributions/99.100.138.37)

They also seem to have added a similar section to the id Tech 6 article, it's
possible they're just an insider.

[https://en.wikipedia.org/w/index.php?title=2015&diff=prev&ol...](https://en.wikipedia.org/w/index.php?title=2015&diff=prev&oldid=610736224)

But looking at other edits from this address it sees like they might just be a
vandal; or at least somebody who is very confused about how Wikipedia works.

------
WildParser
I've made the mistake to write a complex project in Free Pascal. As far as I
can tell pretty much every release of Lazarus is breaking something. And
surprisingly often those breaks are major (like e.g. broken multi-threading,
broken-strings, ...).

For me the whole thing looks more like a playground for hobbyists and is not
really useful for anything productive. There's not much continuity in the
language. And for the devs something like 95% compatibility seems to be good
enough.

For small projects it might be ok to use, but you better keep your snapshot of
the compiler locked in a safe place.

On the other hand: If you're young and want to make history as the guy who
replaced all those begin/end in pascal with smileys: This project might be
your chance...

~~~
Johnny_Brahms
I work with a multi-mloc application in fpc. We have migrated the code over
many compiler versions with hardly any issues at all.

With every update they post a list of things breaks compatibility, and if you
are affected, the refactoring tools are almost always enough.

We had two tries at a full recompile migrating from 2.6.something to 3.0.2,
and passed all tests within 13 hours of starting the process. (some of the
larger stuff were however already fixed since we keep a close eye on the
development).

~~~
throwaway7645
What are you doing with a million lines of Pascal? It sounds interesting!

------
samuell
Btw, OmniPascal for VSCode is also worth a mention as an alternative for quick
edits, or for coding those CLI apps in pure FPC. A really nice project, which
also helps showing that Pascal is Alive and Kicking :)

[http://www.omnipascal.com](http://www.omnipascal.com)

(Only issue is Linux support is not (yet) on par with Windows and Mac ... but
then, it is open source, so that could change!)

~~~
Zablus
Just wanted to mention OmniPascal :)

What's about Linux support? It's working on all platforms, isn't it?
[http://blog.omnipascal.com/omnipascal-0-14-0-mac-and-
linux-s...](http://blog.omnipascal.com/omnipascal-0-14-0-mac-and-linux-
support/)

~~~
leledumbo
Yes it is, finally :) I like the ability to extract build information from
.lpi, despite still needs a lot of work (macros won't work), already lifts the
burden to write the unnecessary build scripts.

------
samuell
One of the things I'm excited about, is using FPC/Lazarus as GUI for
computationally heavy Go code (Now with the recent efforts to use Go for
datascience ... see [http://gopherdata.io](http://gopherdata.io)), now since
Go supports shared object (.so/.dll) files.

I collected my (very early) research on it in this thread:

[https://forum.lazarus.freepascal.org/index.php?topic=24948.0](https://forum.lazarus.freepascal.org/index.php?topic=24948.0)

... where some users report they tried it already. Seems to work, if not super
smooth. Hope it can be improved in the future.

~~~
Jack4E4B
Great news, the key comment there was that Go supports calling from other
languages: [https://dev.to/vladimirvivien/calling-go-functions-from-
othe...](https://dev.to/vladimirvivien/calling-go-functions-from-other-
languages)

------
whitea
mORMot framework is also a nice example for modern Pascal...
[https://synopse.info/fossil/wiki?name=SQLite3+Framework](https://synopse.info/fossil/wiki?name=SQLite3+Framework)

It has DDD, SOA, MVC, ORM (even for NoSql), REST, caching, logging and
security features and works with Lazarus.

~~~
zoom6628
Looks great - have added to my research list on FPK. Thanks.

~~~
edwinyzh
mORMot is very full-featured and powerful! I'd suggest to start with its rich
set of samples
([https://github.com/synopse/mORMot/tree/master/SQLite3/Sample...](https://github.com/synopse/mORMot/tree/master/SQLite3/Samples))
and this blog:
[https://tamingthemormot.wordpress.com/](https://tamingthemormot.wordpress.com/)

------
bigtunacan
A bit funny seeing this on here tonight. My teenage daughter was looking to
create a native desktop app and I pointed her to Lazarus just today. Then I
login and check Hacker News...

------
int_19h
While we're at it, for those times when you're hacking on console apps,
FreePascal also has a very nice text-mode (TUI) IDE that is basically a
Turbo/Borland Pascal 7.0 IDE clone - but cross-platform.

To do that, they had to port Turbo Vision (or rather its open source fork Free
Vision). It's still a great TUI library... it's a shame it's Pascal-specific.
Would be interesting to have an implementation of it for, say, Python, for
system tools and the like.

~~~
pjmlp
The Turbo Vision IDE was actually introduced with version 6.0 as an example
what the framework was capable of.

It was later available in C++ as well, and there is a port available.

[http://tvision.sourceforge.net/](http://tvision.sourceforge.net/)

~~~
int_19h
Yeah. I was thinking more like C (with possibly glib as the object model), so
that it can then be wrapped in Python etc.

------
tomc1985
I miss the glory days of RAD

~~~
pvg
Xcode is a RAD tool at heart so we're in the glory decade of RAD. We just
don't call it that.

~~~
laythea
In my opinion, I wouldn't call XCode the pinnacle. That position is for VB/C#.

~~~
skrebbel
Still, things didn't get any more Rapid than they were in 1998 and that's a
bit sad. In terms of productivity, C# with WPF/XAML is at best _equally good_
IMO.

~~~
tonyedgecombe
WPF/XAML can give you amazing results but I'm nowhere near as productive with
it as I was with VB6.

~~~
int_19h
I would venture that WinForms is actually more RAD'ish than WPF.

A lot of that productivity came from the drag-and-drop form editing. And what
made it possible (and easy) was complete disregard for any kind of advanced
dynamic layouts. Delphi's VCL, .NET's WinForms and the nameless VB6 UI toolkit
are all designed around the notion of widgets manually placed on a 2D grid,
and the most that you can get in terms of dynamic resizing is "anchoring"
their corners to containers.

~~~
pjmlp
While true, WPF development when coupled with Blend design can be very
expressive.

The main hurdle is getting how templates, styles, triggers and code interact
together.

If one happens to work in enterprise projects, it is quite easy to get WPF
component libraries.

------
cturner
I use Free Pascal at times. In case there are any FP developers here: your
build arrangements hamper my use. I tried installing earlier this week from
source and could not get it going.

My ideal would be a single configure/Makefile combination in the root
directory. Consider if the user does not have root, how are they to set a
prefix?

The idea of the 'build' download is good, but not if it needs to link to
recent shared-objects. Particularly recent shared objects like libc. Maybe you
could put statically-linked tools in the 'build' version.

~~~
MageSlayer
I guess you need to contact devs to clarify. I regularly build from sources
for Linux and cross-compile for Windows both x32 and x64 using just single
"make ..." command.

------
samuell
For the FPC/Lazarus project as a whole, it is also good news that there is
some work going on to build up a foundation (it exists already), with funding
and stuff, to support further development:

[https://foundation.freepascal.org/](https://foundation.freepascal.org/)

Among founders being Delphi luminaire Boian Mitov (author of Visuino /
OpenWire / OpenWireStudio etc).

Hoping the foundation can take off with some good funding.

~~~
edwinyzh
I've been watching the foundation since it's creation (I think it's over one
year ago), I don't think it has done any significant help to the FPC/Lazarus
development so far. Anyhow, such effort is plausible. On the other hand, open
source projects like this ([http://newpascal.org/](http://newpascal.org/)) is
what actually driving open source going forward.

------
scardine
I wish porting projects from Delphi was easier. I was trying to make Python
bindings for the AcBR library[1] and failed miserably.

Shameless plug: if you think you are up to the task and is not too expensive
contact paulo at xtend.com.br

[1] [http://acbr.sourceforge.net/drupal/](http://acbr.sourceforge.net/drupal/)

~~~
rgacote
I'd definitely use it more if I could port over the last few Delphi apps I
have in production. My Delphi 7 is getting a bit old...

Aside from single-file executables, the biggest advantage to Lazarus (and also
Delphi) [to me] is that all the libraries are also built in the language. No
needing to bounce down to opaque DLLs just to display some GUI element.

~~~
iajrz
Just in case, I found this:
[http://wiki.lazarus.freepascal.org/Delphi_Converter_in_Lazar...](http://wiki.lazarus.freepascal.org/Delphi_Converter_in_Lazarus)

------
fithisux
Do not forget also the tremendous effort in the Free Pascal other big IDE

[https://sourceforge.net/projects/mseide-
msegui/](https://sourceforge.net/projects/mseide-msegui/)

It is a pitty dev pascal didn't catch up or ported to FPC.

~~~
dvfjsdhgfv
Looks interesting. What are its advantages when compared to Lazarus?

~~~
leledumbo
Smaller and simpler (written in old Delphi, with some 3rd party packages, so
Windows only), nothing else I guess. Lazarus is far superior in every other
aspects.

~~~
fithisux
Simply not true. Runs on Unix and windows, built on free pascal.

------
Jack4E4B
Lazarus is awesome because of the speed of the compiler, the fact that it has
a GUI that works, and is OPEN SOURCE.

So one wonders WTH is going on with all the other compiled languages that have
nothing like this? And no QT is not the answer, we need a built-in good enough
GUI! =)

~~~
necessity
IIRC Delphi compilers are usually single pass and thus really fast

~~~
gardnr
That is correct and it is why all the variables must be declared before the
"implementation" section of a unit. The compilation felt instantaneous.

------
throwaway7645
I see Lazarus pop up on HN occasionally. It's an IDE for FreePascal right? I
guess I'll have to open the article again. How are the database drivers? I've
been told they're ageing. Is there 64 bit support for Windows or only 32?

~~~
DisownedWheat
I'm no expert by any means, but I just opened Lazarus to look at the DB
drivers and they seem pretty respectable. The MySQL driver only goes up to 5.6
but works well in my experience. I haven't tried the SQLite, Postgres, ODB or
MSSQL drivers though.

Also it does support 64 bit, I have a 64 bit Lazarus installed on my Windows
VPS.

~~~
leledumbo
As MySQL develops, the bindings are updated as well, but most people will have
to wait for stable release. If you use trunk, though, you can enjoy it right
away because MySQL bindings has been designed rather easy to port a new
version.

------
samuell
For anyone looking for a proper, "modern" introduction to Object Pascal, as
found in FPC/Lazarus, don't miss this excellent guide:

[http://castle-engine.io/modern_pascal_introduction.html](http://castle-
engine.io/modern_pascal_introduction.html)

------
systems
How do you avoid spaghetti code, in an environment like lazarus?

~~~
analognoise
I'll take this one - architecture.

So you can setup a very standard MVC or MVVM architecture using Lazarus.

I bought this book to
help:[http://www.apress.com/br/book/9781484222133](http://www.apress.com/br/book/9781484222133)
it uses Delphi, so there's translation to do, but the concepts are the same.

Also, Lazarus has an amazing community that's a joy to be a part of, and is
extremely welcoming.

I'm a hardware jockey (mostly) so if they can explain it to me, literally
anyone can get it.

To boot, there are a number of excellent older texts that are just a few
dollars, and all the concepts are the same.

There's new material being produced more and more for it as well.

What I'm trying to say is: join us... One of US. One of US. One of US....

------
0xbear
Now someone just needs to clone C++ Builder and we'll be all set. Power of C++
with the simplicity of Delphi.

~~~
Tom4hawk
QT Creator is really nice.

~~~
leledumbo
No other RAD claiming IDE has the same RAD capabilities as Lazarus or Delphi
(or C++ builder), including QT Creator. Live database connection and
manipulation while designing your form and data module? Nah, it doesn't even
know what a data module is.

------
sctb
We've updated the description from “Proving That Pascal Is Alive and Kicking
Ass”. Submitters: the guidelines ask that you please don't editorialize
titles.

~~~
Jack4E4B
That headline made people read... and your current title is not fully
accurate. It is a Delphi inspired Pascal for sure, but not fully compatible,
more like a free alternative.

~~~
Tomte
Exactly. Your title was clickbait and dishonest.

We don't accept that here.

