3 ms·
> If you write your app using win32, you won’t be able to port is very easily. Is this still true? eg, Shopify saying porting is now easy so no need for abstr
by socalgal2 10d ago
> If you write your app using win32, you won’t be able to port is very easily.
Is this still true? eg, Shopify saying porting is now easy so no need for abstractions.
- fsloth 10d agoPorting has never been hard. Just follow the platform guidelines. Make sane architecture. Done. I mean _it's just work_. You don't need to invent anything. Just do the work. What _is_ hard is when people run after silver bullets to avoid all this work. Because people who don't understand software decide it would be cheaper to implement something only once. Or someone who does not really understand what they are doing insists that same C++ code runs automatically on all platforms. AI has given the software engineers permit from the beancounters to do the sane thing. Good software development orgs _have always_ done proper per platform ports. Also - there is nothing wrong in supporting only one platform as such!
- DeepSeaTortoise 10d ago> Good software development orgs _have always_ done proper per platform ports. I really wonder why this was never fundamentally fixed. How performant a certain instruction on a specific platform is, how well it is supported and potential equivalents or sets of other instructions to emulate an equivalent are usually all very well understood. So there should be some graph of operations which can transform any software from and to the specifics of each platform. Especially because firmware + compliers + platform abstracting libraries are basically already just that graph, although (usually?) to lossy to be applied in reverse. Add the recent developments in very large scale statistics to it and it'd probably be quite possible to transform from and to generic intent in the implementation to the uniqueness of each platform. E.g. the theming differences between a MacOS UI and a terminal application served over serial or the processing capabilities of a VLIW CPU compared to a FPGA or a GPU server. Considering the enormous amount of work that went into compilers, better debugging and intermediate representations it seems like a huge missed opportunity nobody seriously asked the question whether information could be emitted that would allow for decompiling all the way back to the generic intent.
- articulatepang 8d agoThe hard part of porting to a different platform is usually not the instruction set. It’s the OS and system abstractions. For example, if you have a program that just does raw math and pointer arithmetic and data structure manipulation —- that is, pure computation — then porting it to a different CPU might well be trivial. Just recompile. As long as your language toolchain supports it, this will Just Work. But if your program works with the filesystem and sockets and threads, then it’s less likely to work. This is the promise of POSIX: if your program uses only what’s offered by the POSIX standard and uses those functions correctly, then it’s supposed to work on any POSIX-compliant system. Just recompile. But if your program has a GUI, or does 3D graphics, or uses special methods for high-performance networking, or accesses gyroscopes or accelerometers or touch sensors, well then you have to do work to port. And notice that this work isn’t about which CPU instruction to use. It’s about figuring out —- deciding —- what the right thing to do is, for your app, given a slightly different set of available system capabilities.