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?
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.
As a Delphi/FPC/Lazarus veteran (10+ years), comparing one of the quickest compilers with Qt/Boost C++ development cycle looks like a joke. Much faster edit-compile cycle which scales without issues up 1e6+ LOC (yes, modules/incremental compilation done right right from the start)
Not apples to apples, but its a pretty good tradeoff for C++ IMO: you get super high turnaround times because the bulk of the UI tweaking cycle is in QML or the RAD tools and you only need slow-compiling-C++ where native performance is required.
For me, while I like fast compile times as much as the next person, its not a deal breaker -- the workflow/environment and library features are. Ie can they easily deliver the required value to my customers. QML gives me a good middle ground between productivity & quick turnaround time, native integration and native performance. If you're unwilling to make that tradeoff, well... then you're limiting yourself to the tools that don't make that tradeoff (which may be perfectly fine, of course).
It's not a good trade off for the end user. As it's not native you end up with a much slower running application with more memory overhead and bloat. Lazarus is compiled to small native applications that are easily installable for the user, fast, with both small memory and disk space usage.
I say this next piece as both a developer and an end user; developers of desktop applications are getting out of hand with how they treat these things. We are now to the point where a large segment of the developer population has so little regard for the end user that they believe bloatware Electron solutions are a good choice for "native" text based chat application.
EDIT: reading your reply to sibling comment, I think I probably misinterpreted what you are referring to here so my below response maybe is replying to the wrong thing.
Regarding your first paragraph, Qt/QML performance is very, very good, memory use isn't insane (in my personal experience at least), rendering is solid 60fps and animations are ultra smooth. Maybe Lazarus is better, but not being a good tradeoff for the user, at least in Qt's case, just isn't true.
Regarding your second paragraph, I completely agree, it those are C++ developers using frameworks like Qt doing that. They're primarily web developers who are using what they're familiar with (JavaScript) to develop desktop applications. An Electron application is very different from a Qt application.
Even with QML, which uses JavaScript, the bulk of the Qt framework is written in C++, the declarative QML is compiled to a scene graph on load, the rendering is done in OpenGL and shaders, and any heavy lifting or performance sensitive code can be done in C++ (Qt makes it VERY easy to call C++ from JS and JS from C++). Typically only non-performance-sensitive glue logic is in JS. This is very different front Electron and Qt (even with QML) is still primarily a C++ framework.
> As it's not native you end up with a much slower running application with more memory overhead and bloat.
For Qt that's just not true: you can reach 1080p / 60fps fluid animated UI on small embedded boards such as raspberry pi's. All the rendering is done using a nifty OpenGL pipeline.
To clarify, I was referring to the language choices here. Comparing Lazarus as opposed to Python in the particular case, as well as referring to even worse performance on Electron/NodeJS.
I certainly was not intending to imply that Qt is not performant as it certainly is. Qt is the default UI for Lazarus applications as well, but it does support other UI toolkits (such as Tk) out of the box.
Because QtCreator isn't up to the job compared even with Delphi 1 for Windows 3.x, but sadly the younger generations never got to use it professionally.
Delphi and Visual Basic, were like the Smalltalk/Lisp Machine (I am exaggerating a bit) of the RAD programming generation.
Try to create a database frontend or image manipulation program in QtCreator just with the GUI designer.
The UI part of a database frontend is trivial and the code is very minimal in Qt (but there still code involved, for sure).
An image manipulation program, what does Delphi provide out of the box for this? I would assume that if you have anything non-trivial, you'd have some custom code to write? I mean, they can hardly have built-in components for every possible use case so I don't have to write any code. What am I missing here?
> 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.
You misunderstood, i meant that the programmers who designed Qt's layout systems expected the programmers who will use Qt would prefer to write code for laying out their UIs (most likely because this is what most UI libraries did and still do) so they designed the APIs with that in mind. I didn't mean that Qt required from them to do it via code.
This is in contrast to Lazarus' layout system, the programmers of which expected ("assumed", "thought", "believed", etc) that the programmers that will use Lazarus will create the UIs using the IDE's UI desiger and so made the layout system be more UI friendly as opposed to code-friendly.
True. Some people may find that as a deal-breaker. Personally, with the age of web-UI's (that look very different from each other and certainly don't look like the native widgets), I don't see QtQuick's native-styled-but-non-native widgets a problem (and the OpenGL-based system has proven to be really great for performant animation).
But I can see that if you require platform-native widgets, QtQuick is probably not an option. I just think that most people don't need this ;-)
I'd argue that at this point, if you're building a desktop application, one of your goals is probably going to be the use of native widgets, which could be for e.g. accessibility concerns. Else you might as well build a web application.
The reasons to use something like Qt instead are many:
- While the widgets aren't platform-native, they emulate the native look and feel, so look a lot more native than your web application. Yes, yes, you likely won't have the accessibility features, so if that's a concern (which it probably should be), sure, Qt and other such libraries won't help. (Note that even MS don't use their own "native" widgets in, eg, Office and Visual Studio, so even within first-party windows applications, you lose consistent look and feel)
- Battery life. A C++ Qt application typically uses much less battery than a similar web application. This may or may not be a concern.
- Smooth animation. QML's OpenGL-based widget rendering has incredibly smooth animation support (and its super easy to add to your applications). Anecdotally, much nicer animations than I've ever seen in web applications.
- Platform access or native libraries. Even though your widgets aren't native widgets, you might still want to manually access platform features or C/native libraries. While some web-applications-in-a-webview tools do allow you to do this, Qt makes it trivial since you can drop down to C++ with ease. With conditional compilation, you can even make this work cross platform.
- Performance. Sometimes you have requirements that simply require C++ performance. Many industrial users of Qt, for example.
- Qt is also used for embedded UI's where a web application may not be feasible.
My point is that there are many reasons why you might choose to use a toolkit like Qt for desktop applications even if you don't need native widgets.
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
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.
Whether or not that is a negative point for Qt depends on your perspective. I mean, Qt never claimed to have JAWS support and the guy is free to submit a patch. Its unfortunate, for sure, that Qt doesn't support popular accessibility tools, but that's hardly a problem unique to Qt or open source tools. This "If you want to support users with disabilities, you probably should not rely on hippie coders right now" is unfortunately true for most open source tools, but also for many commercial offerings. Does Lazarus/Delphi fare better with accessibility and JAWS support specifically?
Also from your link: "For now, you will need to write a native UI for every platform you want to support." -- is the Lazarus/Delphi story any better in this respect?
> Does Lazarus/Delphi fare better with accessibility and JAWS support specifically?
For this particular issue, yes, because Lazarus uses Win32 for Windows applications. For Linux it uses GTK2 (can also use Qt instead) which AFAIK has good accessibility support. For Mac OS X it uses Carbon (there is a Cocoa backend but it is still in prealpha) so... it depends on how accessible Carbon apps are i suppose.
I don't think there is any special support for accessibility however, it is all about what the underlying widgets provide out of the box.
That isn't relevant to Lazarus though since - from what i can tell from its site - JAWS is a Windows-only program and Lazarus uses the native Win32 controls under Windows. So it should work fine.
I want more tools. Qt is popular and I've tried it before, but it keeps cropping up as "the new RAD" in these discussions and I was (unsuccessfully) trying to steer the discussion away from it.
You're saying that Qt is not well designed because it's accessibility support does not include certain apis needed for the JAWS screen reader? That's a very narrow definition of "not well designed". I personally find Qt 5+ with QtQuick (not the older QWidgets) very well designed and I've looked into a large number of GUI frameworks over the years in a variety of languages.
"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"
If you're interested in Basic programming then Gambas might interest you. Although not a clone of VB, it can be roughly considered being to VB what Lazarus is to Delphi: a 100% Open Source implementation.
I would prefer Lazarus anyway, but it's indeed nice to see different alternatives to proprietary dev systems.
I remember one BASIC, called RapidQ, which I really enjoyed playing with a long time ago (which was freeware, but unfortunately I think it stopped being maintained as the source was sold to another company).
It had a rather cool graphical interface to create GUIs, kind of like VisualBasic I think.
As awesome as Lazarus appears to be here, Rebol is even more amazing in my opinion. There is no designer, but the GUI DSL is mind bending. Red is a Rebol inspired language that is also tiny with a compiler as well so you can build a nice cross-platform-native GUI and distribute it as a tiny executable (~1.5 MB). You can see the GUI stuff for both Rebol and Red. There's a YouTube video by Nick Antonnacio (spelling) that shows him building something like 40 GUI apps in an hour ranging from email apps to games like tic-tac-toe and snake...it was pretty crazy to see the first time.
Very cool, the examples that he builds are very similar to what I've built when I stated in Delphi (simple chats, word processors, music players) but to course Rebol is much more concise. I wish the controls would look more "native". Currently they look like Windows 3.11. Also... Downloading code over plain HTTP? Not good idea...
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.
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.
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.
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.
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?
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?
Ah, but you only see the desktop if you have no windows other than Delphi. The moment you do, those windows start getting in the way and distracting with their content.
But you could disable it. The multi-window thing was something Delphi lifted directly from Visual Basic, and even VB dropped it (well, more like it got swallowed by VB.NET and Visual Studio.)
With monitors getting bigger we can abandon the multi window way and embrace something better, but surely not MDI which to me is even worse. Tiling is the answer: a giant single window containing the entire application, and a layout definition stating what section appears where and at what size (read: area percentage).
Options to maximize the active area can be implemented, but the goal should be freeing the user from being forced to find and move windows from below other windows or partially gone out of the screen.
I think Visual Studio has the right idea with being primarily MDI but then all of the various windows can detach and float to other screens and wherever. I think if Windows would just render your desktop background on the MDI background instead of a solid color that would be a nice system setting.
I think maybe Delphi 5 was the first version where it stopped even being an option. I remember 3 was MDI and I'm surprised I never bothered looking for the option to switch it back.
I do have two monitors and understand multi-window mode has it's uses, but for any person who used to [name standard IDE] it's frustrating first impression. It's basically gives false sense of complexity to the tech that actually easy to use.
As soon as you need 3rd-party libraries "statically compiled" is no longer the case. Or at least it's not easy, depend on platform and still bring a lot of mess.
Though in the right hands Lazarus is a great tool since relatively complex project could be completed just by one developer. E.g here is our game engine map editor:
Another thing to note is that FPC provide good performance and even used for game development and memory footprint is small. There is RTS on Steam called Cossacks 3 and it's fully in Pascal (though no idea if they using FPC outside of Linux):
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.
There are specific differences that set them apart, too. For example, the fact that Pascal has statement separators rather than statement terminators (and using a separator in a terminal position is usually an error, e.g. before "else").
Pascal rather belongs to the Algol family of languages, together with C. Algol-60 is where "begin" and "end" come from.
Ex-Delphi developer (10 years) - still do some maintenance...
The verbosity is an indicator that it does not require a huge cliff of learning to understand the syntax. (It also means the compiler can absolutely fly, which Delphi did.)
I like the conciseness of later language structures, but they all need to be learnt in order to read or write in them.
The only solution to the verbosity of Delphi was to increase your typing speed or use an IDE add-in that provided shortcuts :)
So I suppose my argument is that the syntax is not needlessly verbose. The verbosity helped the speed of compilation by the simplicity of its grammar, and the learnability of the language is quite speedy as a result of fewer grammatical options.
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.
> 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. :- )
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.
One of the main points that makes me happy about Pascal syntax compared to some C-family langs like Java is that types are placed AFTER the variable names, making it much easier to scan the left border of the editor for meaningful info.
Happy that recent languages like Go and Kotlin have learned the lesson and are going the Pascal way again.
FWIW, I took over maintenance of an in-house application written in Delpi/ObjectPascal, with practically no prior experience with Pascal (but one fun weekend looking at Ada), and I had almost no problems reading the code that were caused by Pascal's syntax. It might be because the guy initially wrote the application did a good job, but I found the code very easy to read.
I've created small projects in Lazarus and you are right in all points except in the small binary part, also I would add that it comes with db drivers for Postgrees, MySQL and Firebird SQL out of the box.
If you compare to the "modern" way of building cross-platform apps: Electron ... with its 100s of MBs, I'm definitely regarding Lazarus binaries as small :)
Depends on what you define as small but if you remove the GDB debugging information you can trim down your binaries by a huge amount. My last project was 3.4MB.
No GC is actually an advantage?
The world really changed, there are people rejoicing for procedural languages, while we have so many excellent OO and FP alternatives, and they are actually happy to shoot their own foot with manual memory management.
I'm not really sure that the change has been for the better.
No. Delphi offers reference counting, but only on interface variables. It's a huge difference really, because if your last interface variable that points to an object goes out of scope, the object is freed from memory. Even if you have raw class pointers to it.
Example:
IMyInterface = interface
procedure Foo;
end;
TMyClass = class(TInterfacedObject, IMyInterface)
procedure Foo;
end;
procedure TMyClass.Foo;
begin
WriteLn('Foo');
end;
procedure DoTheFoo(AObj: IMyInterface);
begin
AObj.Foo;
end;
procedure SomeMethod;
var
LObj: TMyClass;
begin
LObj := TMyClass.Create;
DoTheFoo(LObj);
LObj.Foo; // <-- Will cast nil pointer exception,
// as object was freed when AObj in DoTheFoo went
// out of scope
end;
For those lacking CS background, reference counting is an GC algorithm.
The 5th chapter from "The Garbage Collection Handbook", http://gchandbook.org/, one of the most renowned books in the field, there are of course other equally renowned sources I can refer to.
Reference counting isn't deterministic in the presence of large complex data structures.
You will know when memory gets deleted, but not how long it will take, nor how much stack space the destructors will require to run.
Enjoy Herb Sutter's "Leak-Freedom in C++... By Default." at CppCon 2016, where he explains how those issues affect C++ and goes on to implement a tracing GC.
Oh, in that case that's no better than C++'s shared_ptr.
I remember Delphi being fun back in the day and it still compiles way faster than C++, but C++ is evolving and maybe with modules even the compilation speed gap will disappear...
I highly doubt it's production code.
Nobody uses both objects(pointers) and interfaces simultaneously. It's a quick way to disaster.
In practice Delphi/FPC interfaces serve their purpose.
Swift also does Reference counting, the difference is huge. Speed of code is in another level. I am new to Lazarus, but I am guessing they do the same as Delphi.
I would love to switch off Delphi, but I'm heavily dependent on spring4d which is Delphi only right now. I may build some smaller programs or utilities in Lazarus.
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...
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).
Your project was probably doing something wrong or weird since the Lazarus and Free Pascal developers have gone to great lengths to avoid breaking backwards compatibility - i have code from 10 years ago that compiles almost without changes. The only change that i have to do is when i abused strings as byte buffers that wouldn't work in Free Pascal 3.0. However that was something the FPC developers said for years and they made several release candidates so that people can report back issues. Even then the change was simply replacing all uses of `string` with `rawbytestring`.
The only backwards compatibility breaking they do is when they are fixing compiler bugs that shouldn't be used anyway. For example at some point it was possible to take the address of a property getter and this usually worked, but not always. They changed that to be illegal (according to the language reference it was illegal anyway) so any code that relied on that would need to change (a simple change would be to make a new property or function that gave back the address of the private reference and mark it as inline so that you wont get any performance penalty).
Personally i am very anal about backwards compatibility and i have abandoned tons of libraries (SDL, GTK, Qt, etc) because of that. In my experience Free Pascal, LCL and Lazarus are among the most stable frameworks to the point that they prefer to keep unnecessary things around for years just in case someone is still using them or introduce unnecessary options for the framework to change behavior in case someone is still relying on the old one (this is why for example you get a `RequireDerivedFormResource:=True;` line in new projects, older projects wont have this line which affects the behavior of how forms are created).
Obviously i don't know what your project was doing but you don't really provide any description (both of the issues you mentioned i haven't encountered), so i put my counter-experience here since i wouldn't like people to get the impression that Lazarus doesn't care about backwards compatibility. For me it is a prime example of a very complex project doing backwards compatibility right (hell, the Lazarus IDE itself can even be compiled with Free Pascal compilers that are years old just in case someone might for whatever reason - like the few cases mentioned above, or use FPC from some Linux distribution that only has old versions - be stuck with them). Things that break backwards compatibility are considered important bugs and are fixed - sometimes even at the cost of getting things "right".
Broken multi-threading, broken string, ...
Care to elaborate? UTF8 move perhaps? Which native compiler/RAD got UTF8 for free? Virtually every C/C++ project was "broken" in that respect at some point or even now.
I use both Lazarus & FPC from trunk (in between releases) and even then backward compatibility is of top priority to FPC devs.
I have had best success by using the (very stable) version provided in (X)ubuntu LTS, which I'm always staying with, so I'd say it is about finding a good strategy for version selection.
I like your comment. It highlights what misses from so many discussion about languages/tools down here. Being expressive, powerful, compiled, interpreted doesn't matter much if long term stability, reliability, backward compatibility are not a top goal for the devs.
The same was for Delphi, but no one complained in such way. Your sources were to update accordingly, or you simply remained on previous version, which was not a bad thing, because it is your app, it was working yesterday, why would it break tomorrow?
For new projects you took new libraries.
Personally, I don't like the modern idea of autoupdated anything. Once program is tested and deployed, only cherry-picked (or backported) security updates must be applied.
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 :)
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.
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), now since Go supports shared object (.so/.dll) files.
I collected my (very early) research on it in this thread:
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...
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.
Perhaps clarification is needed. The glory days of RDAD (rapid database application development). While there is probably something that approaches the simplicity and speed of Delphi's glory days, I haven't found it.
I can think of at least one Delphi developer who went in to management rather than deal with the scaffolding nightmares of current systems. A lot of us followed Anders Hejlsberg when he left Delphi behind and started working on C#. It's very nice, but it's just not the same when working with databases.
I was thinking more VB (that's my background) but I'd include Delphi in that set as well. VB was a pain in the ass at the time but, even as a beginner, it still let me churn out programs at a breakneck pace.
However, with VB business users who knew a database would come up with applications that served their needs well.
These applications are still all over many companies and government departments.
In general though, these folks wouldn't be able to do the same with XCode and in addition XCode only targets a platform that isn't widespread in business and government.
IB and EOModeller once too were targeted at business users. The RADsy parts of Xcode are older than VB. It's just a bit of a historical curiosity: while RAD tools went out of fashion (at least for 'serious' programming), Xcode is still ticking away, in mainstream use.
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.
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.
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.
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.
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:
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/) is what actually driving open source going forward.
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.
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.
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! =)
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?
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.
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.
As someone who maintains a multi-MLOC application in fpc (using emacs and lazarus): discipline.
You don't grow an application to that size by simply building on what might be suitable for a 30kloc application. It requires discipline, experience, trial and error and ability to invest time in properly maintaining the codebase.
Disciplined code review by people very familiar with the codebase is vital.
My personal approach is to create a unit to contain the classes for the "thing" i am working with (e.g. for a 3D world editor, i create a unit that was a TWorld inside, perhaps with TEntity and other classes). Then create another unit for the global stuff (lately i've taken a liking to use a TDataModule which can be edited visually even though it is a non-visual thing - it allows me to place non-visual components in an IDE surface which helps assign event handlers and properties from the editor without writing code for that). Then from the GUI side i just make calls to the global unit/datamodule and/or to methods in the classes i work with.
Of course it all depends on what i'm making, for simple stuff i just throw everything in the form code directly. For more complex stuff i use the method above.
Here is an image showing an example of the approach:
The "GlobalState" window is an IDE window that represents a TDataModule (the name sucks and probably is for Delphi compatibility, it doesn't have anything to do with "Data" and because of that i ignored it for years) that contains the "SimpleViewportRenderer1" and "ViewportManager1" non-visual components - instances of the TSimpleViewportRenderer and TViewportManager component classes. This is in its own unit and can be accessed by other units, essentially providing global state (note that a data module is really a class - much like forms - but you can have a global variable with a single instance of it - again like forms). The neat thing with this approach is that it can also be seen by the IDE: the Viewport1, Viewport2, Viewport3 and Viewport4 components in the Form1 form have a property that accepts an optional TViewportRenderer component. This is presented as a combobox in the Object Inspector window and when you pull it down, one of the options is "GlobalState.SimpleViewportRenderer1" - so you can wire together components 100% visually.
That's an interesting question. Lazarus is an IDE like Visual Studio or the JetBrains ones, and it has nothing to do if you write spaghetti code or not, try google "SOLID" instead on that subject.
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.
QT is really expensive for commercial use though. And it's not as easy as Builder was. Builder basically gave you Delphi capability but in C++. You could focus 100% on the problem you're solving rather than on the UI -- true component based RAD. Drop a few components, wire them together, then add your code to do what they can't do.
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.
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.
- 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?