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!
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/
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!
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.
I hope that answers your question!
It was once in the Readme but as I kept developing it more it become longer and longer, so I moved it into the wiki, and especially to here: https://esolangs.org/wiki/FlipJump
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...
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.
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?
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)
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?
I'm sure you can self modify your code so it executes only using XOR (bit flips), which is a CNOT, but I do not think this could be compiled down to an FPGA using only a billion not gates.
Actually I just convinced myself you can make an AND from three NOT gates if you can tie outputs together to get OR, so I believe you now. Sorry for the diversion! (Though I still dont see how bit flips and jumps directly can be built into a circuit, I know AND and NOT are universal so it's all good).
If I haven't understood this right, then I still do not follow how if statement works with flipjump.
The power of flipjump results in self modifying code. If I jump to a address that have the [flip 0, jump 0x1000], then I'll get to 0x1000 afterwards, right? But if I flip some specific bit in this instruction before jumping to it, it will become [flip 0, jump 0x1080]. You can call this instruction "memory bit", and the part of jumping to it and resulting in one of two possible addresses 0x1000/0x1040 based on a specific bit in it - "read the memory bit". The action is reading as you get to different place based on the value stored in this instruction. This "read" can also be seen as an "if". How you write then? For example writing "1" whould be doing a "read", and in the "read 0" case - do a flip to this address, and in the "read 1" case don't flip this memory address bit.
>> But if I flip some specific bit in this instruction before jumping to it
Isn't the 'if' really happening in the above phrase? The rest of it is a modified jump address based on the above 'if' and just jumps to the modified address.
Now if I understand this correctly, how to do the above 'if', i.e., flip the address bit or not based on some condition?
May be it would begin from some bit read from IO which modifies an address. I saw that memory-mapped IO is used.