Hacker News new | past | comments | ask | show | jobs | submit login

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.



> 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.


I 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).


You'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.


Many compilers target C, that seems like a decent approach - any problem with that?





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: