Show HN: Compile C to Not Gates

github.com

82 points · tomhee · 6 hours ago

Hi! I've been working on the flipjump project, a programming language with 1 opcode: flip (invert) a bit, then jump (unconditionally). So a bit-flip followed by more bit-flips. It's effectively a bunch of NOT gates. This language, as poor as it sounds, is RICH.

Today I completed my compiler from C to FlipJump. It takes C files, and compiles them into flipjump. I finished testing it all today, and it works! My key interest in this project is to stretch what we know of computing and to prove that anything can be done even with minimal power.

I appreciate you reading my announcement, and be happy to answer questions.

More links:

- The flipjump language: https://github.com/tomhea/flip-jump https://esolangs.org/wiki/FlipJump

- c2fj python package https://pypi.org/project/c2fj/


34 comments
bangaladore · 5 hours ago

Show replies

tromp · 5 hours ago
Am I right in deducing that this language gets its power from self-modifying code? I.e. flipping bits within addresses of the opcodes of the running program?

Show replies

tonetegeatinst · 1 hours ago
Looking forward to the poor security researcher who gets to reverse engineer some malware sample they compiles this into for obfuscation... Its going to be an interesting blog post.
tomhee · 5 hours ago

Show replies

jkrshnmenon · 3 hours ago
I wonder if someone has already made a Reverse Engineering CTF challenge for this concept.

Show replies