Re:Show HN: You can program without loop and recursion and×÷...
by rented_mule on Tuesday July 16, 2024 @01:09PM
(#40978337)
Agreed.
> It's akin to compiling a simple c program with loops unrolled and fully static variables
Yes, and optimizing compilers take this to an extreme. It turns out that "computing" a factorial only requires my runtime language to have `mov` and `ret` instructions: https://godbolt.org/z/3Y6bGcsba
Re:Show HN: You can program without loop and recursion and×÷...
by raoof on Tuesday July 16, 2024 @01:00PM
(#40978239)
in my model it's the platform job to handle the user input and your program output you just write your function and the platform calls your program for example f(time,input_data,key_a,key_b,key_c,...) . if you are very very patient and don't care about the program length you can just compute every output of your program for every possible input. according to [this](https://web.archive.org/web/20230505022436/http://page.mi.fu...) paper a single loop and four basic arithmetic operation is enough to simulate a turing machine so my idea was that to unroll the loop and my conjecture is that we don't need the loop and only four operations is enough to compute all total computable functions
I don't agree that the language is turning complete due to the lack of any runtime dynamic aspect of the language.
It's akin to compiling a simple c program with loops unrolled and fully static variables and claiming the subset of generated assembly is turning complete.