This was something like 500 Kb back in 2000, but it's still a far cry from your ~200 Mb Electron hello world.
This was something like 500 Kb back in 2000, but it's still a far cry from your ~200 Mb Electron hello world.
Lazarus should have been the golden standard for creating desktop apps. Every other solution I've tried is subpar either in licensing or costs in general, executable size and resource usage, non native components, extra dependencies etc
It’s a pity that the C family of languages won out over Wirth’s languages. Pascal’s superior string handling alone would have saved us from countless security flaws.
I think that projects that ship packaged web apps but attempt to use the system native web views where available are really nice, like Wails: https://wails.io/ (so for example, on Windows it would use Webview2, so you don't have to package an entire Chromium install yourself)
Here's a comparison of how the distribution sizes change, Wails in particular also has way faster builds than something like Tauri: https://github.com/Elanis/web-to-desktop-framework-compariso...
That said, I wish we got more native software, or even something like LCL that can target Win32, GTK, Qt or whatever else is available. Sure, writing components that are available on a lot of platforms and work similarly everywhere is a pain for the developers, but I applaud the effort regardless, since the above solutions like Wails don't actually do anything for the memory usage and CPU cycles, whereas native GUI software is better for most apps that don't try to be very interactive.
I could even see myself using Lazarus/Pascal more if it seemed to have a more active ecosystem, right now I couldn't tell you what are the equivalents of something like Spring Boot for webapps, or even consuming Web APIs in client software, handling OAuth2/OIDC/JWT, seems like mORMot 2 would fit the bill the closest?
With respect to Lazarus, I agree that the ecosystem around it is not exactly great. It would be interesting to see LCL ported to something more modern that is reasonably simple, cross-platform and has good tooling. E.g. Go, much as I dislike it as a language, would probably be a great fit for something like that. And Pascal being fairly conservative and easy enough to parse, I suspect you could even automate this translation for the most part.
Forms (windows) are deserialized during loading, which relies on this mechanism.
Be aware that this is what you're getting into when you pick dotnet for GUI applications. It's been that way for decades at this point, there are many unfixed bugs in WPF for example, in spite of it being touted as the final word in GUI development in its time and still being used for some Microsoft applications like VS.
Meanwhile, with Delphi you were using VCL 20 years ago, and you're still using VCL today, and its development velocity and performance is light years ahead of anything Microsoft put out during that time. This also applies to Lazarus's LCL.
The funny thing about Windows GUI story is that the older the framework is, generally speaking, the better it is supported. WinForms still gets bug fixes and improvements; so does WPF. OTOH if you were early on the WinRT bandwagon, tough luck, and it's been meaningless churn ever since.
https://github.com/microsoft/microsoft-ui-xaml/issues
https://github.com/microsoft/WindowsAppSDK/issues
I could use C++ and stick with Qt, but I'd much prefer Rust. Rust has no good Qt bindings. What are my options?
The app makes use of QV/HBoxLayout, QWidget, Qdialog, QPushButton, and other really standard features. It reads from the filesystem, reads and writes to SQLite, and outputs sound from mostly ogg files at various speeds (through VLC behind the scenes). I stick with Qt because I like how it integrates with KDE and other desktops flawlessly.
Also did you test similar functionality in C++, I haven’t compared many implementations but I app I use that has an SQlite db being read with Qt(C++) is pretty sluggish whenever you touch the DB.
Maybe store the values in a dict and only read/write from sqlite when needed. Dicts are very fast in python.
I've also tried implementing lazy loading and pagination, with a pseudo-infinite scroll technique based on SQL LIMIT pagination, but the resulting CPU and memory spikes are noticeable.
There are several Qt binding for rust, for example cxx-qt. I haven't tried myself but it looks maintained. Why is it not good?
Otherwise, the most promising equivalent to Qt in Rust would be Slint.
I'm not sure what you mean by avoiding copies. I'm rather stringent with memory, I don't have superfluous copies of data in memory. Or did you mean something else?
Thank you.
> I stick with Qt
These come up on search results if you combine Qt plus the language.
Go:
* https://github.com/mappu/miqt
Java:
* https://github.com/OmixVisualization/qtjambi
Nim:
* https://github.com/jerous86/nimqt
* https://github.com/seaqt/nim-seaqt
Zig:
Same for the other languages - they likely won't have the performance of C++ or Rust. But I'll test them anyway, even just for the academic exercise the endeavour is worthwhile. Thank you.
I think it's been out of date for a long time with modern computers having much more RAM and speedy SSDs (and also JVM optimizations). For actual run time performance once its loaded the JVM has had great performance in the early 00s already and improved since. And for server side it was never an issue as you don't restart the server very often (so the JVM is always already loaded).
That said, given your original request, I don't think it has much to do with language choice. Displaying a very large number of rows in a data grid or similar is a classic GUI task in line-of-business apps, and the answer has always been either virtualization (lazy loading) or pagination.
One trick to improve UX when virtualizing data is to do preloading asynchronously in the background - ideally on a separate thread - and start it before the user scrolls all the way to the end (e.g. when there's still a couple of pages of data left).
One thing that I would like to discover is how to adjust the scroll bar size so that it appears as if more records are loaded than actually are.
May be I am doing something wrong, but I had installed Android Studio, then Android emulator, SDK, etc., and before I could get a hello-world app to compile, some 30 GB were gone from my disk space.
If it comes to it, I do not personally mind using multiple tools and code for different target platforms, as much as (a) both the tools themselves and the binaries generated are lean, and (b) the development tooling itself is on a single platform just so that I do not need to maintain multiple hardware. (I currently use Windows, would likely need to move over).
Thanks.
The problem is that you need to have a huge Java runtime installed or use something like Jlink which still produces very large binaries for GUI apps.
I think wxWidgets is the Lazarus alternative that is the closest to what grandparent was asking for.
Is there something similar for Android as well?
Asking ChatGPT, it has made recommendations for Haxe most importantly, which claims to support a large number of platforms.
In particular, his tech e-mail announcement/newsletter was where I first learned of a small startup w/ the unlikely name of "Google".
But that was the static overhead of VCL core library and the benefits were considerable compared to writing raw WinAPI.
And unlike MSVC 16kB WinAPI executable you didn't have chance of sudden surprise "oh, but you need to update msvcrt.dll to run this" because Delphi (and Lazarus/FPC) default to statically linking the runtime
<input type="button" onclick="alert('hello world')" />
HTML and JS is compact. The browser is not. But often installed already, so my PWA is very small as a result, but behaves quite native.
(But if you mean, that Lazarus can do that easily with a GUI, that would still be cool. Can it?)
With Gtk, no, because it implements all widgets by itself rather than wrapping Win32, so it'll necessarily be larger. Also, statically linking it can be a pain (and AFAIK isn't even supported in Gtk 4 anymore).
Then there is .NET Native and Native AOT.
As far as Native AOT, last I checked it requires trimming which breaks WinForms (and WPF) according to the official docs.
I don't think this matters much, though. There's simply no practical reason to AOT-compile a WinForms app. Not when the framework is guaranteed to be there, and JIT compiler is plenty fast.
Qt backend should be able to do that, though (but then of course you need all those Qt DLLs).
[1]: https://learn.microsoft.com/en-us/windows/win32/winmsg/wm-wi... [2]: https://github.com/ysc3839/win32-darkmode