5 ms·
One day, maybe when I am retired, I am going to develop a programming language-agnostic algorithm specifying language with which you can generate code for progr
by fjfaase 6y ago
One day, maybe when I am retired, I am going to develop a programming language-agnostic algorithm specifying language with which you can generate code for programming languages ;-). A kind om Mathematica, but than for software.
- throwaway_pdp09 6y agoMany compilers target C, that seems like a decent approach - any problem with that?
- fsloth 6y agoLike this? https://github.com/imatix/gsl https://github.com/imatix/gsl
- MaxBarraclough 6y ago> programming language-agnostic algorithm specifying language with which you can generate code for programming languages That's just a programming language tailored for transpilation, no? Theoretical computer science shows us there is no 'one true representation' for algorithms.
- fjfaase 6y agoI have to admit that I was little joking about this. But I do think it is possible to specify an implementation of how a complex operation can be achieve by combining more primitive operations. With digital computers, data is usually represented by certain representation of bits. An operation is usually defined on these kind of representation. Think for example of an operation for adding two numbers in a certain representation, resulting in a result with a certain representation. In computers, two most primitive adding operations are usually adding modulo some power of 2. But with these, we can implement adding for much large numbers (also using other kinds of operations and/or intermediate storage).
- AnIdiotOnTheNet 6y agoYou're basically describing a virtual machine. Compile to bytecode and the runtime JITs (or AOTs) it on the host. It is an idea decades old.