3 ms·
Seeing that most popular languages - Java, C#, Python, Javascript, etc. - run on top of VM and you can develop on one architecture and deploy to another, why do
by scarface74 6y ago
Seeing that most popular languages - Java, C#, Python, Javascript, etc. - run on top of VM and you can develop on one architecture and deploy to another, why does it matter?
I develop on a Windows laptop and deploy to Linux all of the time. I have some Python programs that have native dependencies. I still develop on Windows, push and the CI/CD pipeline runs on Linux and packages a Windows build.
But even with my first job out of college back in the 90s, I was writing C code that I developed on Windows and was cross compiled for DEC VAX and Stratus VOS mainframes.
- scarface74 6y agoI still develop on Windows, push and the CI/CD pipeline runs on Linux and packages a Windows build. Should be “packages a Linux build” “ I was writing C code that I developed on Windows and was cross compiled for DEC VAX and Stratus VOS mainframes.” Of course cross compiles is not the correct terminology. We built the same code on the target machines.
- pjmlp 6y agoEven with languages like C, targeting bytecode as distribution format is also an option. Mainframes do it, as means to integrate C and C++ into their language environments. Back in the early mobile OS wars, there was a company selling J2ME like stack, but using C and C++ instead. Then there is the LLVM bitcode used by Apple on iOS and watchOS (which happens to be more platform neutral than regular LLVM bitcode). Oh and WebAssembly and MSIL as well.
- scarface74 6y agoLLVM won’t allow that type of portability. That was a myth that was dispelled by none other than Chris Lattner during an interview on ATP. The transcript of the interview is now returning a 404 though. https://atp.fm/205 https://atp.fm/205
- pjmlp 6y agoLLVM open source version, yes you are correct. LLVM proprietary Apple own internal fork, as used in iOS and watchOS, is another matter. As a matter of fact, there is a WWDC talk about how it allowed the seamless migration of 32 to 64 on watchOS.
- scarface74 6y agoLattner also said later on Twitter that he was purposefully being vague during the interview. The 64 bit chip built for the watch and LLVM bitcode was designed in concert. https://mobile.twitter.com/clattner_llvm/status/1046960724646465541 https://mobile.twitter.com/clattner_llvm/status/104696072464...
- pjmlp 6y agoYeah, so we get into these kind of discussions, because everyone just talks about open source variant of LLVM. Apple does whatever they feel like with their proprietary fork, to the point that Apple's clang also gets its own column on cppreference. Just like Sony and Nintendo haven't contributed anything back to LLVM that would disclose any capability from their consoles.
- scarface74 6y agoI think Chris Latner has just a little insight on the inner workings of LLVM and it’s capabilities - even the proprietary portions that Apple hasn’t released in the open. I tweeted @atp and let them know that the transcript was returning a 404. They have since fixed it. https://atp.fm/205-chris-lattner-interview-transcript https://atp.fm/205-chris-lattner-interview-transcript John Siracusa: The same thing I would assume for architecture changes, especially if there was an endian difference, because endianness is visible from the C world, so you can’t target different endianness? Chris Lattner: Yep. It’s not something that magically solves all portability problems, but it is very useful for specific problems that Apple’s faced in the past.
- wenc 6y ago> I develop on a Windows laptop and deploy to Linux all of the time. I have some Python programs that have native dependencies. I still develop on Windows, push and the CI/CD pipeline runs on Linux and packages a Windows build. Only peripherally related to your point, but I develop with Python on Windows and found that deploying to Linux, while in possible, can be a hassle in practice. For instance, I use turbodbc on Windows to access SQL Server databases via ODBC. This works fine. However, when I try to port the same code to ARM Linux (on Raspberry Pi), I learn that ODBC has dependency on the native ODBC driver which doesn't exist on the ARM platform. So I have to jump through all kinds of loops to compile FreeTDS and unixODBC, which aren't trivial. Not only that, I had to cross-compile on an x64-Linux VM to the ARM architecture because the Raspberry Pi itself didn't have enough disk space for gcc and such. I think cross-architecture compilation isn't the issue -- it's cross-platform deployment, especially when there's no parity in dependency availability.