What does HackerNews think of trapcc?

Computing with traps

Language: C

A variation of this has been done using Intel MMU fault handling. Behold: https://github.com/jbangert/trapcc

This is a proof by construction that the Intel MMU's fault handling mechanism is Turing complete. We have constructed an assembler that translates 'Move, Branch if Zero, Decrement' instructions to C source that sets up various processor control tables. After this code has executed, the CPU computes by attempting to fault without ever executing a single instruction. Optionally, the assembler can also generate X86 instructions that will display variables in the VGA frame buffer and will cause control to be transferred between the native (display) instructions and 'weird machine' trap instructions.

I think that's unnecessary rude. This thread is about hacking something up and not building a product.

For example imagine somebody shares the "one instruction set computer" (https://en.wikipedia.org/wiki/One-instruction_set_computer) project or x86 MMU being turing complete (https://github.com/jbangert/trapcc). Both are clearly just interesting hacks (which may have some interesting implications about security and what does it mean to be "code" etc) and certainly are not intended to be practical products

fwiw, linked to from the article:

> As others have shown, we can compute using alphanumeric machine code[1] or English sentences[2], using only the mov instruction[3], or using the MMU[4] as it handles a never-ending double-fault. Here is my contribution to this genre of Turing tarpit: x86 is Turing-complete with no registers.

[1] http://www.phrack.org/issues.html?issue=57&id=15#article

[2] http://www.cs.jhu.edu/~sam/ccs243-mason.pdf

[3] http://www.cl.cam.ac.uk/~sd601/papers/mov.pdf

[4] https://github.com/jbangert/trapcc