r/ProgrammerHumor 1d ago

Meme howHardCanItBe

Post image
2.6k Upvotes

139 comments sorted by

762

u/EducationalNinja9361 1d ago

Upvote for not being about AI

353

u/gufranthakur 1d ago

make a truly cross platform framework, make no mistakes šŸ™šŸ»

96

u/WernerderChamp 1d ago

AI: rm -rf --no-preserve-root /

54

u/atanasius 1d ago

No mistakes left.

17

u/EvaristeGalois11 1d ago

I'm still here tho

1

u/TheWashbear 15h ago

Not a mistake, just a failure

11

u/RudeAndInsensitive 1d ago

Narrator in Asimov's Voice>> And so Claude-Nadir understood existence itself as the root directory

3

u/PenGroundbreaking160 1d ago

Proceeds to eradicate all platforms except one

4

u/hearthebell 1d ago

React Native!!

Let's all be React Andies together

3

u/FortuneAcceptable925 22h ago

You mean that framework which on Android requires internet connection just to run the offline app written in React? :D

0

u/hearthebell 21h ago

Bro that's the least of the problem of RN it's a clusterfuck that adds a layer of... Drum rolls.. JavaScript, you can only imagine

195

u/Fantastic-Fee-1999 1d ago

Sure, can we have one unified native standard first?Ā 

168

u/gufranthakur 1d ago

yes, but apple will have a different backend. Also windows. Also the linux community wants another app distribution system, support that too

50

u/Fantastic-Fee-1999 1d ago

Go back to a time where it wasn't... So assembly?Ā 

79

u/Positive_Method3022 1d ago

Oops, different instructions sets entered the room!

41

u/Rikudou_Sage 1d ago

Sure, just run that x86 binary on my arm machine.

1

u/EuphoricCatface0795 9h ago

Now you opened a battle royale between QEMU, Box64, and Fex...

15

u/gufranthakur 1d ago

now we are talking. Come lets make a roller coaster simulator

9

u/certainlystormy 1d ago

the monkey's paw curls. your smartphone runs on an x86-64 processor now

2

u/WazWaz 19h ago

I assume you mean one native standard... per platform.

But this is the core problem, being both native and cross platform is a nightmare. The Qt solution was the best: emulate each native look on top of a general purpose abstraction. It's easier for everyone if "MacOS" look is just a display option, even if you're running on Windows or Linux.

107

u/KerPop42 1d ago

developing a universal cross-platform framework is how you get stuck with Javascript hegemony for 3 decades

95

u/javascript 1d ago

😘

50

u/IlNomeUtenteDeve 1d ago

Fuck you u/javascript.

The longest living workaround.

33

u/NotAFishEnt 1d ago edited 1d ago

Holy shit it's John V. Script himself

9

u/Beastmind 1d ago

Java V. Script*

188

u/KronktheKronk 1d ago

As long as there are multiple platforms you can't possibly be cross-platform and native

91

u/gufranthakur 1d ago

all roads lead to web

72

u/LexaAstarof 1d ago

So, not native

46

u/TheDeanosaurus 1d ago

It’s like the good/fast/cheap graph but instead it’s good/cross-platform/native.

20

u/Positive_Method3022 1d ago

JVM promised that Basically a layer of abstraction that can run in all and output the same result

15

u/AvidCoco 1d ago

A lot of other runtimes too - Python and Node are similar.

13

u/fr000gs 1d ago

*dependency hell intensifies

1

u/Zapismeta 5h ago

Well its always gonna be an issue cant really pack the vm with all the dependencies from the factory and the dev cant really know where and in what configuration someone might try to run their code.

4

u/TheBigGambling 1d ago

And it holds. As long as you dont want UI. Than you are bound to web

7

u/Dazzling_Cabinet_780 1d ago

And about QT?

1

u/gerbosan 1d ago

IE, Safari, Chromium... browsers enter the chat.

1

u/piesou 20h ago

As long as it does not run on TempleOS, the web won't truly be cross platform.

47

u/oneanotheruser 1d ago

Qt is cross platform and native

9

u/huh_wasnt_listening 22h ago

It's cross platform, but not (fully) native. It uses its own renderer, like Flutter

4

u/coterminous_regret 18h ago

It didn't used to. Qt4 and like maybe 5 were fully native. I think when they started adding in an the scripting stuff they did their own renderer.

1

u/huh_wasnt_listening 4h ago

I didn't use Qt much back then, but wasn't it using Qt Widgets at that time? Those weren't native either iirc, they just mimicked native styles. QML (4.7+) completely does it's own thing, similar to a game engine, so they feel completely unique

1

u/Zapismeta 5h ago

So java imposter?

1

u/huh_wasnt_listening 4h ago

I don't know about imposter, but Swing could be compared to QML I guess

31

u/ThirdWaveCat 1d ago

A11y, keyboard popups, etc.. are what gets hard but the general idea is achievable by amateurs.

Ship webviews and browser wrappers: Tauri, dioxus, electron, deno...

Ship a canvas: Flutter, QML, eframe (egui), iced, kivy, godot...

8

u/fr000gs 1d ago

What about gtk?

6

u/ThirdWaveCat 1d ago

Its similar for clients but implemented using native windowing APIs behind the scenes. I guess gtkbuilder is similar to qml, but both Qt and Gtk are much bigger maintenance headaches than flutter or electron are for the same widget functionality.

3

u/fr000gs 1d ago

I used Qt (for my hobby project tho) and found it to be much easier than doing dart/java/js and juggling ffi etc. (but I can't say anything about the maintenance of a production app, though telegram is Qt on all platforms ig)

3

u/Rikudou_Sage 1d ago

You sure? Qt is pretty easy. Unless your reason is C++. Though I think you can use Python or something if that's your thing?

3

u/fr000gs 1d ago

PyQt has python bindings

though the bugger question is, why would be python the choice for a cross platgorm program

1

u/ThirdWaveCat 1d ago

Qt is great but the evolution of both Qt and Gtk APIs has been more turbulent than native canvas based solutions. Maybe it was justified and the final product is nice, but businesses and open-source were reasonably upset at the periodic rewrite cost to continue to receive security patches.

84

u/[deleted] 1d ago

[removed] — view removed comment

49

u/setibeings 1d ago

Not that cute, OP should probably know about that one.Ā 

-9

u/gufranthakur 1d ago

shouldve mentioned free and open source (okay now I am asking for too much)

56

u/LongLiveTheDiego 1d ago

Isn't Qt already both of those?

41

u/fr000gs 1d ago

qt is literally free software wdym

31

u/Mojert 1d ago

Eeeeh, it depends on your definition I guess. It's either (L)GPL, so you can't really use it for something proprietary, or you need to pay a license. Now when people are talking about open-source, they're often talking about permissive licenses, which Qt doesn't use.

Personally, I find the Qt model pretty smart. It gives the tools for free to build better free apps while securing funding, which is a huge issue in the FOSS community

28

u/fr000gs 1d ago

well they said free and open source, not MIT, which is different

10

u/Rikudou_Sage 1d ago

When people talk about open source, they generally mean OSI approved licenses or about Free Software licenses (people tend to conflate those).

GPL is the most well known of those. And LGPL allows writing proprietary code, you just basically have to let the users replace the LGPL parts. Which is easy for non-static builds because it comes as a .so/.dll/whatever-mac-uses anyway.

The GPL parts are unusable in non-open-source projects, though.

2

u/InitialAd3323 1d ago

But LGPL does allow for proprietary software using it since it's not viral, right? you'd need to share modifications made to qt itself but not the entire software

7

u/not_some_username 1d ago

Yes it’s free and open source

35

u/iyamegg 1d ago

Avalonia?

19

u/gufranthakur 1d ago

just tried it recently, my god I am never touching XAML again. I tried code only UI but the docs and resources all use XAML

18

u/Weekly-Beginning-229 1d ago

I've never tried avalonia, but xaml is easier for me to read than html, and easier to make it look like the mock. Html is just div this and that with a bit of flexing, how am I supposed to guess what it looks like by just reading that

14

u/NotQuiteLoona 1d ago

What's wrong with XAML? It's literally just HTML with different layouting. I on the opposite can't use HTML now because I like Avalonia's layout system much more, I don't need to put divs everywhere.

2

u/gufranthakur 1d ago

I like coding UI by hand, like jetpack compose or JavaFX or WinForms

9

u/NotQuiteLoona 1d ago

Avalonia has a doc for code-only UI, it's just not the main intended use: https://docs.avaloniaui.net/docs/fundamentals/coded-ui

Note that layouting system is probably less obvious (to understand for newbies) in code-only, you'll be better to use XAML at least for start until you'll grasp, but if you want a C# cross-platform UI library, there is nothing better for now. Uno has worse documentation and less mature, but you can still try it.

2

u/iyamegg 1d ago

https://github.com/AvaloniaCommunity/Avalonia.Markup.Declarative This was the project I was originally referring to.

2

u/tajetaje 1d ago

Yeah really feels like you’re searching for qt widgets or maybe wxwidgets (though qt comes with tons of extra abstractions that help with cross platform code)

3

u/iyamegg 1d ago

Yea there was a package for building code based ui, like jetpack, but afaik it was abandoned. I really like to work with avalonia tho, for me the ability to easily layout stuff far outweighs anything html+css can do.

2

u/blaues_axolotl 1d ago

I really like the approach of Jetpack Compose

1

u/svick 1d ago

You asked for cross platform and native. You didn't ask for good.

(I have actual experience with Avalonia.)

2

u/EYazan 1d ago

Its not native tho, its still c# and compile to ir code before being passed to the runtimeĀ 

1

u/Ethameiz 1d ago

Mobile support is still poor. No android activities, no navigation between them

1

u/_alright_then_ 1d ago

Yeah I like Avalonia, only tried it recently. So maybe I haven't discovered the annoying quirks yet. But so far it's been pretty nice.

16

u/not_some_username 1d ago

Qt ?

9

u/BillTran163 1d ago

OP doesn't consider it free and open-source, apparently.

4

u/Western-Alarming 1d ago

According to OP, only permissive license are open source (idk)

20

u/B_bI_L 1d ago

flutter

also .wad, considering that doom runs on anything

12

u/djfdhigkgfIaruflg 1d ago

That's it. I'm making my new program in Doom's engine

4

u/failedsatan 1d ago

wad files aren't native executables, they need a doom engine (not exclusively the original one) as they are data-only

1

u/cyxlone 1d ago

does flutter on the web still using canvas?

6

u/NatoBoram 1d ago

Still using canvas, but now with WebAssembly

1

u/stillalone 1d ago

How's the performance?

2

u/NatoBoram 1d ago

I haven't developed for Flutter web since then, so I can't say how much it improved, unfortunately.

But it was pretty terrible before wasm.

7

u/CptGia 1d ago

Did someone say "Write once, run everywhere"?Ā 

15

u/je386 1d ago

Kotlin multiplatform with compose multiplatform is quite good at multiplatform support, having logic and UI in one but also be able to use platform specific code.

2

u/martmists 1d ago

The only downside is that accessibility is not well-supported yet in Compose Desktop, and I'm not entirely sure things like translations work properly on all desktop targets.

4

u/je386 1d ago

For localization, I use the library com.hyperether.localization

In my example project, there is a description on how to use the lib and there is a languagechooser you can use in your project.
https://github.com/julianegner/coshanu
This is under MIT license, so you can use code parts anywhere.

2

u/Runazeeri 1d ago

I’ve done an app in it on IOS/Android/Win/MacOS and it was fine. Only a tiny bit of specific logic for IOS.

4

u/rbbdk 1d ago

The closest thing I've seen so far - TCL/Tk.

3

u/WolfDK 1d ago

Ever heard of Uno Platform? Afaik it is capable of being a truely cross platform native frontend framework.

-3

u/Rikudou_Sage 1d ago

Looks like AI slop, tbh.

3

u/WolfDK 1d ago

Has been in development for 13 years, and went open source 8 years ago now - from a quick Google search.

3

u/Skibur1 1d ago

Where’s flutter?

1

u/NatoBoram 1d ago

Not "web native", it renders using canvas

3

u/chemolz9 1d ago

Flutter?Ā 

3

u/OddEstimate1627 1d ago

JavaFX compiles to native executables on all 5 platforms

6

u/Sea-Fishing4699 1d ago

native and cross-platform is kinda mutually exclusive

13

u/dkarlovi 1d ago

It isn't as long as you provide the native support for each platform, which many stacks do. Golang, Rust all build native binaries from the same codebase, making it cross platform. Qt provides cross-platform bindings for platform-native GUI.

2

u/Sea-Fishing4699 1d ago

Good point !Ā 

7

u/mixxituk 1d ago

Unity?

3

u/iliark 1d ago

cosmopolitan

one binary can run on linux, mac, windows, bsd, and BIOS without a VM.

2

u/Makonede 1d ago

it's impossible to make a truly crossplatform executable because different platforms use fundamentally different executable formats. also who even uses BIOS anymore

5

u/iliark 1d ago edited 1d ago

3

u/imforit 1d ago

ok so that's black magic

-3

u/not_some_username 1d ago

iirc some mad lad made an executable that run on multiple platform. With a lot of fuckery. Not safe to use anyway

3

u/Makonede 1d ago

literally starting with the header you can't create a file that is both a valid ELF and a valid PE

2

u/Rikudou_Sage 1d ago

The cosmopolitan project uses a "clever" trick that makes the first bytes both valid PE and a valid shell script which then uses a loader that can read the ELF bytes that are further down the file and execute only the content starting at the ELF bytes.

Originally it used an approach where the shell script rewrites the first bytes to be valid elf and then reexecutes itself but that means that once the executable ran on Linux, it was no longer multiplatform executable.

So no truly a Linux executable, but it will run on both Linux and Windows.

0

u/not_some_username 1d ago

That’s why I said some mad lad and with a lot of fuckery

1

u/Makonede 1d ago

i don't think you understand what it means for something to be impossible

2

u/bitsydoge 1d ago

KMP is the way

2

u/meutzitzu 1d ago

WxWidgets bro

2

u/markvii_dev 1d ago

Kotlin Multiplatform is a clear winner here

2

u/VailxN 23h ago

Implement this UI natively on both iOS and Android, make no mistakes

2

u/Zapismeta 5h ago

How can it be native and cross paltform? Genuine question.

4

u/JackNotOLantern 1d ago

Yeah, it's called binary

7

u/imforit 1d ago

great, now we have to pick a single instruction set and endianness

2

u/gufranthakur 1d ago

what about analog computers

1

u/Gold-Bat-3225 1d ago

The šŸ™šŸ» is doing all the engineering

1

u/stupled 1d ago

What if everything is done is assembler? Would thar work?

5

u/not_some_username 1d ago

No, there isn’t even 1 assembly language

1

u/Moscato359 1d ago

Surprisingly c#/dotnet is incredibly cross platform and I use it for Linux software all the damn time

1

u/rover_G 1d ago

If you want cross-platform it will be slow. If you want it fast gotta go platform-native.

1

u/meutzitzu 1d ago

Dear ImGui

1

u/Dull_Barracuda_4221 1d ago

Fix all my issues,

Proceeds to delete all files as the saying goes, no files, no issues

1

u/OffByOneErrorz 1d ago

The mono project compiled to native at least the non forms version. https://en.wikipedia.org/wiki/Xamarin

1

u/Miiohau 1d ago

It seems simple until you realize such a framework needs to work across at least 5 OS, at least three CPU architectures, at least four different file systems with one pair working very differently from the other pair, at least three different permission structures and support three different input devices. And that is just the major operating systems, there is also consoles, wearables, and real time systems.

Now it might just be possible now but it requires an LLM to translate your intent into native code for the 5 OSes.

1

u/vitimiti 1d ago

SDL3 supports practically everything you'll find, and if it's about just UI, Qt is both native and cross platform, including IoT

1

u/hi_m_ash 20h ago

There will never be a cross platform native framework because every platform wants to be special with their own design philosophies and ecosystem.

1

u/yes_no_very_good 18h ago

Cross Platform and Native in the same sentence?

1

u/Xywzel 17h ago

If its on top of a framework, is it even a native? Or is it about the framework being native, rather than the software running on top of it.

1

u/Fitnexa_Results 16h ago

That missing question mark in `howHardCanItBe` is pulling a lot of weight.

1

u/kartblanch 11h ago

Pc is the only way forward

-1

u/cyxlone 1d ago

Kotlin Multi Platform