4 ms·
You still need to build native versions for every platform your app will ever run on. If you had that, the package manager would be easy.
by sp332 12y ago
You still need to build native versions for every platform your app will ever run on. If you had that, the package manager would be easy.
- dangerlibrary 12y agoThat's not so bad - all we need is some kind of consistent abstraction layer we can target on every platform/OS. wait. right. I see the problem.
- tormeh 12y agoOr you could use JVM apps. Distributing LLVM intermediate representation code and doing the final compile on end hardware could also work. Building native versions on the developing end is a foolish idea not suitable for programs in general, and it is time we abandoned the approach. It made sense at the time, but much time has passed since then. Some software might benefit from the increased obfuscation, but other than that it's just shit.
- sp332 12y agoLLVM helps, but it's not nearly enough. You need a standard library including network and GUI at least. (Edit: or statically-compile everything.) Java probably would have worked, but as I recall, Microsoft killed it.
- tormeh 12y agoYes, that's true, it can't be done tomorrow, but I think it's the right approach. I'm not very familiar with Qt, but turning the more essential parts of it into a part of a LLVM standard library shouldn't take that many years, should it? And don't most standard libraries have networking now? I'm curious how Microsoft killed Java. I assume you mean Java on the desktop?
- sp332 12y agoYeah, I mean "killed" specifically for writing web apps. And by "library" maybe I meant "runtime"? I mean you just have to send the HTML and JS to the client, and everything else for running the app is already there. I guess now, you could send a Python file written to use QT and it would work equivalently on many platforms.
- tormeh 12y agoAh, yeah, well, as long as Oracle is the steward of the most popular JVM I think we shouldn't let it run non-trusted code. I was thinking more desktop (non-web) apps, really.
- deleted 12y ago[deleted]
- mattgreenrocks 12y agoUnfortunately, LLVM IR is platform-specific: http://llvm.org/docs/FAQ.html#can-i-compile-c-or-c-code-to-platform-independent-llvm-bitcode http://llvm.org/docs/FAQ.html#can-i-compile-c-or-c-code-to-p... An IR-esque approach is good, just not LLVM. Then you're back to something like the JVM.
- TD-Linux 12y agoGoogle tried to make a platform-independent LLVM IR [1], but the ended up needing to specify a bunch of additional things, like a virtual 32-bit processor target, their own ABI, their own API (Pepper), and prevent things like assembly language instructions and intrinsics (like SIMD) from passing into the bitstream. It also got locked at one particular LLVM version. This basically ends up bringing it to the level of asm.js, except with less Javascript API interoperability. [1] https://developer.chrome.com/native-client/reference/pnacl-bitcode-abi https://developer.chrome.com/native-client/reference/pnacl-b...
- snarfy 12y agoI'm OK with that. What does cross platform even mean? Windows, Linux, OSX? Maybe Android and iOS? It's still easier than rewriting all of the development tools, libraries, etc in javascript and for the browser, and your app will be responsive and fast.
- sp332 12y agoA single HTML documents will load on Win95 - Win8, old Mac Systems, OS X on PPC and Intel, a huge range of software and hardware running flavors of Unix, every smartphone OS ever, and be styled "natively" for every one of them (flat, shaded, rounded, even textured). That's only if you're coding for lowest-common-factor features, but that's not even possible for most other distributed files. If you want to get fancy, and you're willing to sacrifice compatibility with less-cool platforms, JS is generally within 2x of native performance, which is plenty fast enough to feel "responsive". http://asmjs.org/faq.html http://asmjs.org/faq.html