QtCS2024: Compile once, Run everywhere
wiki.qt.io
wiki.qt.io
Justine writes some pretty cool software.
I do weird/fun stuff on my own time but I get paid to do mostly boring stuff.
Based on the project github page, it seems that this is their version of weird/fun stuff, that is not done as a part of their job.
Work for any huge corporation that has to pay huge salaries for people to work on soul-less projects for a couple of years, then retire and hack away. In the case of Justine, it seems the corporation was Google.
So either be born rich, or slave away until you no longer have to worry about not eating. Then you can work on all your pet projects and feel fulfilled about your job and life. If you're not dead yet from all the accumulated stress, that is.
Nice try, I'm on nVidia Jetson and everything depends on a fixed version of libc, so if I want to use nVidia's gpu libraries, I better use their version of libc.
I also can't envision a common scenario in which I would have a machine that doesn't have a c compiler but I would be able to run an APE executable. Even in that uncommon case, I still think I would be better off using software that I could compile with a standards compliant c compiler and ship the binary that _I_ built myself to the machine that lacked a c compiler.
99.99% of people who want to run executables on mac or windows don't have a C or C++ compiler installed and wouldn't have the knowledge to operate it if they did. And if you want to install the default one for these platforms (MSVC or XCode) it's at least 30 minutes of download + 30 minutes of installation. For me this really solves an actual problem I've had customers & team members ask me hundreds of time - "how can I compile a Qt app for Mac when I'm on Windows" (and the inverse)
> running with the vnc QPA
The demo they have running has no native display or input support; it just serves the interface over a socket via VNC.
While it's kind of expected it'd be big... that's really large. :(
And then the cycle begins anew.
For many applications the size of "assets" like images, localization data and other stuff will vastly outweight the code.
For instance, check out the demo on slide 10: now you can have janky sliders that don't match the platform's version on every platform!
WASM could solve all this, but that would mean all OSes would need WASM runtimes that supported a consistent set of standards and APIs. Have fun getting that to happen.
I mean if that's your solution to the problem, then Java already solved it.
As it stands now, because the JVM is merely an application, it needs tomfoolery to JNI out to anything interesting. One can see this in effect with Eclipse's SWT which to the best of my knowledge uses JNI for all its UI trickery (e.g. https://github.com/eclipse-platform/eclipse.platform.swt/tre... )
Pour one out, I guess: https://en.wikipedia.org/wiki/JavaOS although it's a fascinating thought experiment to invert that problem where JavaOS actually uses JNI to run Proton/Wine :-D
Generally, though, third party libraries are the biggest problem I've had building Qt apps on different platforms. Qt itself "just works," but getting arbitrary open source libraries building on OSX and Windows can be a pain.
I've not heard of this before. Who is using it and for what? And how?
Also, who / what is .Adam?
It is an interesting and intriguing technology, but pretty useless if not even dangerous, IMHO.
I agree that this might be a dangerous thing to use, but it's not unprecedented. This has a lot in common with using cross-compiling process. If performance is good, it could potentially replace something like AppImage I guess. However, making all your dependencies compile with this thing and then debugging the result may end up being harder than maintaining however many separate builds. It sounds amazing to me that they got Qt to work with this tool. I don't see myself using this but I might take a closer look one day for the hell of it.
Here's your use-case: providing a saner alternative to Electron. The Qt solution is more performant than the current solution.
Electron provide a solution for that https://www.electronforge.io/
So you whip up a web app, throw it into the forge, and bam you got your binaries.
But I'm sure the platform owners, notably Apple and Microsoft, will find ways to prevent the widespread use of such technology. You have to buy certificates, notarize, sign, get reviewed, etc., so they can make extra money off developers and keep total control of their users in the name of some fake security theater. That's why everybody is writing web apps instead.
Again, platform checks are run at every binary run instead just once at compilation time.
This can also lead to security issues, as it encourages the use of shared folders or USB drives for carrying around executables. You should never reuse executables from other systems - always download one from the first party.
All I hear is "ewww, physical media!"
Security-wise, copying executables b/w systems amplifies the risk of escalating partial write access on one system to full system access on many other systems. This would be an easy building block for "Advanced Persistent Threat"[1] attacks.
[1]: https://en.wikipedia.org/wiki/Advanced_persistent_threat
Proper build tooling still doesn't change the fact that you need to stamp out one binary per OS and CPU architecture, potentially using different compilers. This is always brittle (I would know: https://github.com/floooh/sokol-tools/actions/runs/107248810...)
Did I also contribute to the discussion of the tool?
I've blogged about all the AI usage at https://www.qt.io/blog/examples-of-local-llm-usage
> Cosmopolitan Libc makes C a build-anywhere run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine.
WebAssembly would not achieve the same thing as it's in the same category as Java bytecode where you need some interpreter/VM/JIT/compiler to actually run it.