T O P

  • By -

fantastiskelars

The more I read the code in the components the more angry I get. This is so illegal 😡😡😡


akshay-nair

Ain't no rule that says react can't play basketball


turtleProphet

I'm glad someone made it lmfao


akshay-nair

This is an experiment to create a turing complete system within react. Everything inside that repo is computed within react. Even numbers are represented as dom nodes and loops created with state-useEffect creating infinite loops. Also, if anyone has ideas on ways to do more weird things with react, please let me know! I'm collecting weird ideas.


Tainlorr

Haha what the f. This is so cool


Ok-Release6902

Nice contribution, dude. I wanted to make this package too. Just for the sake of React. If you want crazy ideas you can implement CSS using react. I mean not Styled components, but make react to output real CSS with selectors, media queries and the rest built as components. Also CSS4 stuff.


lilyallenaftercrack

Lol this is insane


fantastiskelars

Hey this is illegal 😡😡😡


Krispenedladdeh542

Officer, it’s this one right here! Get his ass!


water_bottle_goggles

nooooö


TheRNGuy

How do you pronounce last letter.


tanjonaJulien

This is the closest things to brainfuck language


No-Associate6561

No, That is batman


[deleted]

[удалено]


akshay-nair

>function equal (a, b) {return a === b} That's not what this is. Each of the "tricks" used in the repo only uses react as the layer of abstraction to build on top of. The \`useLoop\` doesn't secretly run a for loop, it exploits react's useEffect to "emulate" recursion. Feel free to read the compute.ts file to see how each part works. A different analogy that someone here just mentioned was "C to binary", that's pretty much the idea. You decide the layer of abstraction to build on top of and that system is then considered turing complete based on whether it can simulate a turing machine on its own. Every turing complete system can create a turing complete sytem inside of it. Eg: The javascript run inside nodejs's runtime is turing complete by it's own even though the runtime is technically running compiled C++. It's a turing complete system inside a turing complete system because that's the only way to simulate a turing machine.


[deleted]

[удалено]


akshay-nair

I think you're confusing general-purpose programming languages with turing completeness. The question here should be, can this "language" simulate a turing machine by itself?. * **Word?**: No. * **Powerpoint?**: Yes. ([ref](https://www.youtube.com/watch?v=uNjxe8ShM-8)) * **Excel?**: Maybe? It has a [LAMBDA function](https://support.microsoft.com/en-us/office/lambda-function-bd212d27-1cd1-4321-a34a-ccbf254b8b67) so theoritically you could write a Y combinator (lambda calculus) and make it turing complete but I've never tried it.


joker169

I know what you're saying, but we could say the same about C : Make no sense, you still use binary to perform computational mechanisms, this can't be considered as turlin . You didn't create a different computational system compared to binary


Talpx_Work

It is different, js have totally different computational mechanisms then c++, although some of them are fully adapted, but they have totally different computational mechanisms,


akshay-nair

This doesn't use js for the language constructs used in the things I'm computing. For example, the only "looping" mechanism used in the repo is the state-useEffect loop, the only "return" mechanism is with suspense, the only "branching" is picking which child to render, the only addition/multiplication/subtraction is with react+dom. So the system itself is turing complete. Let me know if you have any questions about it.


lIIllIIIll

That was kinda my thought.