3 ms·
I suggest you try and implement some complex but well-defined algorithm, e.g. sha256, in some very, very simple language, say, brainfuck (which is very close to
by nine_k 6y ago
I suggest you try and implement some complex but well-defined algorithm, e.g. sha256, in some very, very simple language, say, brainfuck (which is very close to the original Turing machine language). Or, more realistically, in PDP11 assembly, which is beautifully transparent and uniform.
You might then notice that there is some kind of sweet spot in complexity: fewer features and footguns than, say, C++, but more features and abstractions than machine code.
- nullc 6y agoSHA256 is a fixed circuit. It's a particularly weird thing to implement. Other than it being a bit long, it's not complex to implement, even on a calculator. If you want an example of something moderately complex but well defined, go implement a min-heap or some other basic algorithm.