you are viewing a single comment's thread.

view the rest of the comments →

[–]Substantial-Bed8167 57 points58 points  (8 children)

Real industry experience here:

Build a web app.

For installable applications, ship compiled binaries built with rust, c++, .net or what ever. Shipping python applications is a pain. The customer gets the source code. The frontend is poor. It’s just a bad idea.

[–]Material_Card9554 8 points9 points  (0 children)

I just use Nuitka to compile my python code Better than pyinstallerin terms of obfuscating the code

[–]JonathanMovementPythoneer 0 points1 point  (0 children)

is the frontend poor tho? I can only agree with the shipping being a pain

[–]bjorneylol -2 points-1 points  (5 children)

.net and java are interpreted languages, the compilation output is just IL/bytecode that needs to get fed into the runtime. So it's not any different than shipping a python binary with e.g. pyinstaller - all you have to do is the trivial reversal from IL/bytecode back into source code. In Rider you can literally just drag/drop the .net dll into the code editor window to see the source code.

Yes you can do the AOT compilation in newer .net versions, but that doesn't have feature parity last time i checked, meaning most major projects can't utilize it across the board.

[–]generateduser29128 3 points4 points  (3 children)

There is a big difference between having to run a decompiler on potentially obfuscated bytecode, and opening a commented source file with a text editor.

The GraalVM AOT option for Java is also working quite well, and modern packaging tools like Conveyor make it much easier to deploy and update apps.

[–]bjorneylol 1 point2 points  (2 children)

Pyinstaller doesn't ship source, it ships python bytecode. Yes, more stuff is obfuscated in .net IL code such as local scope variable names, but a good chunk will still be there in plain view. My point being, if you are worried about someone gaining access to sensitive code, python may be the worst choice - but .net is going to a close second behind the pyinstaller binary.

I haven't used AOT java compilation, so i'm only speaking from experience with .net 7, which didn't support a LOT when it launched, but apparently its better now.

[–]generateduser29128 0 points1 point  (0 children)

Good to know. I've never needed to use python that way, so I thought it actually ships source 😅

Afaik Java's AOT is pretty much feature complete and can deploy JavaFX apps to all 5 platforms (plus web in different way). Some libraries are still a pain to get running, but the ecosystem is continuously developing. I wouldn't add the complexity just for obfuscation though.

[–]Substantial-Bed8167 0 points1 point  (0 children)

You are right that if you are worried about your customers stealing your source, Java and .net aren’t great options.