Show HN: Compile C to Not Gates
145 points| tomhee | 1 year ago |github.com
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/
bangaladore|1 year ago
[1] https://github.com/Battelle/movfuscator
LPisGood|1 year ago
The sad thing about this kind of work, because I love it, is that to get paid to do it you need clearances and polygraphs and periodic reinvestigations/continuous monitoring and all sorts of things that I find unpleasant.
[1] https://github.com/Battelle/cantordust
beng-nl|1 year ago
tromp|1 year ago
tomhee|1 year ago
tomhee|1 year ago
david-gpu|1 year ago
tomhee|1 year ago
greenbit|1 year ago
Thinking about it, if all you have is "invert some (N>1?) bits somewhere and jump to somewhere" .. I could see maybe it might work if you use self modifying code and there's really a 2nd instruction that is a no-op? Seems like it might work more like a cellular automata?
Of course, one could just go look at the documentation, but where's the fun in that?
alok-g|1 year ago
pizza|1 year ago
tomhee|1 year ago
Firehawke|1 year ago
I kid, I kid.
dingdingdang|1 year ago
Is there any potential performance win in this? What I mean is; since this general direction could, in principle if not in practise, enable the targeting of say, the 5-10 most efficient CPU instructions rather than attempting to use the whole surface area... would this potentially be a win?
eimrine|1 year ago
tonetegeatinst|1 year ago
jkrshnmenon|1 year ago
tomhee|1 year ago
og2023|1 year ago
dlcarrier|1 year ago
Zamiel_Snawley|1 year ago
jvanderbot|1 year ago
tomhee|1 year ago
Imustaskforhelp|1 year ago
You would create although highly inefficient , after many years , maybe the first , language like those lisps where you could store data in sqlite and run it fromt there (but with C)
tomhee|1 year ago
Nevermnd|1 year ago
artemonster|1 year ago
tomhee|1 year ago
https://github.com/tomhea/flip-jump/wiki/Learn-FlipJump
This will let you understand how to implement the very basic "if" in flipjump.
I tried to make it as easy for newcomers, but please feel free and update me if something is written complicated.
After you understand up to the macros, you can try yourself to understand the xor macro, which most of the library is built based on it: https://github.com/tomhea/flip-jump/blob/fe51448932e78db7d76...
unknown|1 year ago
[deleted]
platz|1 year ago
tomhee|1 year ago
Jerrrry|1 year ago
The logic is within the branching.
jumploops|1 year ago
sroussey|1 year ago
dang|1 year ago
That was a long time ago, though, and the project is interesting enough, so I'm going to assume you've learned your lesson and unban you. Please stop using multiple accounts for this though!
tomhee|1 year ago
jimbob45|1 year ago
Do you keep notes on each astroturfed submission and auto-trigger reposts to notify yourself? Or did you just happen to recognize this? 20 minutes from his post to your comment is absurdly good moderation.
jpcookie|1 year ago
[deleted]
kuringganteng|1 year ago
[deleted]