Hacker News new | past | comments | ask | show | jobs | submit login
Lazarus IDE – write once, compile anywhere (getlazarus.org)
43 points by thunderbong on Sept 11, 2022 | hide | past | favorite | 50 comments



I thought this is the official page https://www.lazarus-ide.org/ leading to the official binaries https://sourceforge.net/projects/lazarus/files/

OP's link leads to a totally different download system


getlazarus.org appears to be a fan site. The builds are unofficial, but unlikely to be harmful. Might be safest to get the software from the official site or your distro packages though.


As it happens, I'm in the market for a cross-platform, database-driven GUI right now. I'd looked briefly at Lazarus, but the fact it still uses GTK 2 (when GTK 3 has ended development and GTK 4 is available) makes me worry about the longevity of the platform.

That said, my other candidates were learning Tcl to write a Tk app (it's gotta be easier than deploying Python/Tk, right?) or biting the bullet and trying to write a single-page webapp that can talk to a local SQLite database, so maybe GTK 2 isn't the worst thing in the world.


Qt has support for various SQL database interop in its data models.

https://doc.qt.io/qt-6/examples-sql.html


Did you not consider .NET, or did you rule it out for a specific reason?


maui/xamarin is terrible( MAUI is xamarin renamed).

It can't build a macOS desktop version. This was found out a week ago in a "shipping to production" thus forcing a certain team to say no macOS version until v2.. Which is now flutter 3.x now. Flutter better? nah.. just it has a macOS desktop option now.


Honestly wasn't thinking of maui...

https://avaloniaui.net/

I used this when I had a mac and it worked well.

I wouldn't touch maui for now.


Avalonia is pretty decent. I tried it a bit but didn't want to use it because I realized I was already dealing with enough .NET and wanted a change.


Also seems pretty hostile towards KDE's MauiKit from an ethical standpoint, as it is both older and trademarked afaik.


I've been in a similar situation. I wanted to write a simple app for desktop and mobile, I didn't want to do a webapp. I'm looking into dart/flutter for this.


Would recommend, have been playing with it for the last year or so and generally have nothing but positive things to say about it.


Are there already recommended widgets for desktop? I've read a little and it seems that you have to write your own widgets or use existing ones that don't seem comparable to something like winforms/gtk. Lazarus is attractive because of RAD, but I'm also on the look for an alternative using a more familiar language.


Did you not consider Java, or did you rule it out for a specific reason?


I wrote enough Java and Clojure to realize neither would be lightweight enough.


A JavaFX app can easily run with 100MB of RAM usage, what is your target where it is not good enough?


When did 100MB for forms-oriented apps become reasonable? Just because today’s hardware allows for it doesn’t mean it makes sense.


Look at it from the other side - it is a base memory required for a hello world app. A very complex app won’t take significantly more memory than that.


No, but I will also have to package and ship the JRE, etc. Been there... I'd rather have a much smaller footprint altogether.


There is not even a JRE for quite some version now. You are supposed to bundle a slimmed down “JRE” which only contains the modules that your program uses.


So Clojure for cross-platform GUI is not good enough?


I don’t think that it is fair to say that. JavaFX is a really great, undervalued framework — and it might be even considered ultra lightweight compared to today’s Electron apps.


So you think it's possible to build good businesss stand-alone cross-platform software with JavaFX?


Yes, the java platform is performant, it has a huge ecosystem for all kinds of libraries, multiple languages and JavaFX itself has many components pre-made - though not nearly as many as web technologies.


Take a look at wxWidgets, it uses GTK3 for Linux by default.


Is there any equivalent to Lazarus that uses a modern programming language and can output standalone binaries? I really miss the days when you could build simple, _native_ desktop GUI apps for various purposes.

(I have been using Godot Engine to do some toy apps and it sort of works, but…)


What's wrong with Object Pascal?

"Plain" Pascal is about as efficient as C, uses slightly less memory, is safer because of its lower dependency on pointers, and is easy to work with, especially with strings.

Then Object Pascal has classes, units, interfaces, generics and type safety. Is it still not enough? https://castle-engine.io/modern_pascal

An alternative would be to build a Go program with a wish/tk frontend, which is also cross platform, native and simple to write. It's actually straightforward to do with go-pipes for the binding with wish, and provides a nice decoupling between the program and its UI. Also, it's fairly small and efficient unlike Qt, or worse, web technologies.


Indeed, it is a modern language even if it is rather different from what we are used to today (mostly C descendants).

It is a niche choice but it is not outdated.


As someone who wrote it 30 years ago, I have no interest in going back. And if any of my little tools become popular, I couldn't find anyone to pick them up after me.


A couple years ago I worked as a programmer in a 1-2M SLOC enterprise Delphi codebase for 6 months (I believe Delphi is basically Object Pascal). It let me do my work. Under the hood there is the same simple machine model as C and you can access it ok, but the ecosystem around it is considerably clunkier. 90's OOP craze is very present. The various container libraries are composed of different strata of types and classes that do the same things but with different philosophies that were popular over time. Mix of 0-based and 1-based indexing in various string and array types is one of the most annoying problems that I can recall.

Syntax-wise, it was weird the we had to do a lot of "PFoo" pointer-to-foo style typedefs. Syntax has a few strange "addressing" models builtin, including out vars etc. Allocation using "SetLength" is weird, a function that takes a dynamic array can realloc it but the changes would not (or only when reallocation was required?) reflect in the caller. I resorted to plain pointers and manual memory management, because everything else was too confusing for me.

To wrap up, it has a lot of fluff built in that doesn't scale because of non-orthogonality of features, and some OOP that is hard to use IMHO because it is too implicit. As a C programmer I am biased but I find that the usable parts are the C-like parts. The syntax is considerably more clunky compared to C, with all the keywords that tire the eyes and fingers after writing a couple hundreds lines of code.

On the plus side, I'm not an ecosystem guy but I'm sure the ecosystem has a lot to offer functionality-wise, including extensive coverage of the Win32 API. And the compiler is really fast, I have good memories of it and the (Embarcadero) IDE. A big reason why it's fast is that the syntax and module system are better designed than C as far as allowing efficient implementation.


I find it clunky and verbose. I wrote Pascal and Modula-2 during my VAX years and honestly don't want to go back 30 years or so... But I do find go to be an interesting alternative, as long as no web components are involved.


Lack of automatic memory management (garbage collector, smart pointers, ARC...).


Qt Creator? It definitely comes with some headaches but it ticks the boxes of being modern and cross-platform. I've used it to develop fairly complex applications that run on multiple OSes and look/feel IMHO pretty good.


I an loathe to deal with its licensing requirements, plus I've never been completely comfortable with their IDE


What's wrong with LGPL licensing?


Wouldn't PyInstaller solve this? Not a cross compiler though https://pyinstaller.org/


The state of affairs for cross-platform Python GUIs is pretty underwhelming right now, and I want something that doesn’t carry a Python disto around. We should be able to do single megabyte executables real again…


There is LiveCode from https://LiveCode.com

I have been enjoying it to make bespoke gui apps for more than a decade.


Flutter is almost certainly the answer you are looking for here. You can see what the developer experience is like here https://docs.flutter.dev/get-started/codelab


No, I don't want any JavaScript in my desktop apps, sorry.


You’re in luck then because there is none. You seem To be thinking of Electron which is something entirely different.


OP insisted on _native_ desktop apps, not wrapped web apps. Otherwise Java/Swing would have been a no-brainer.


From my current reading of Dart/Flutter[0] the output is not a wrapped webapp.

[0] https://dart.dev/tools/dart-compile


It's not a native desktop app either, it embeds a large JIT and a hello world is around 50 MB.


This might be my lack of knowledge in this area since I'm just reading at the minute but from my reading that's not the case. If you create a standalone app (exe compile option) there is no JIT, just: "A standalone, architecture-specific executable file containing the source code compiled to machine code and a small Dart runtime." that "... handles type checking and garbage collection."

Unless that runtime is what you're referring to as a JIT. But since it outputs machine code that is a compiled program, not a JIT. I obviously can't speak to the size as I've not written anything yet, I'm just practing.

Quite happy to be corrected if I'm misreading things though.


You seem to be a bit confused on this topic. Have you actually used Flutter before? What you’re describing isn’t how it works at all.


You can actually compile a Swing app with Graal for a standalone executable nowadays


They are native desktop apps. Not sure where you got any other idea from.


Dart/Flutter seem to offer this, modern language, GUI framework, and compiles to binaries or transpiles if targeting web.


What is 'modern for you, exactly?


have you tried Xojo? https://www.xojo.com/




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: