Live data from Hacker News

Show HN: You can program without loop and recursion and×÷- is all you need

github.com

1–10 of 22 posts

Re: Show HN: You can program without loop and recursion and×÷- is all you need

#3

How do you go back to an earlier point in the program if you can't loop? For example, how would you do a primality test for an arbitrary input?

if you don't want to melt your brain :D you just precompute the value of any functions f(x) for x<n otherwise you need to be very clever I explained my idea in the link

Re: Show HN: You can program without loop and recursion and×÷- is all you need

#4
post #3

How do you go back to an earlier point in the program if you can't loop? For example, how would you do a primality test for an arbitrary input?

if you don't want to melt your brain :D you just precompute the value of any functions f(x) for x<n otherwise you need to be very clever I explained my idea in the link

That's why I said an arbitrary number, you can't just precompute the primality of every single number... And I'm afraid I don't really understand your proof of being able to do loops without any kind of looping construct in the language itself

Re: Show HN: You can program without loop and recursion and×÷- is all you need

#5
post #3

Earlier quoted context omitted.

if you don't want to melt your brain :D you just precompute the value of any functions f(x) for x<n otherwise you need to be very clever I explained my idea in the link

That's why I said an arbitrary number, you can't just precompute the primality of every single number... And I'm afraid I don't really understand your proof of being able to do loops without any kind of looping construct in the language itself

the language is obviously (at least to me) turing-complete in the limit of the program length. even if you don't buy my argument that it is also turing-complete without the limit notice that in ordinary programming you never need a function that is valid on all input because actual computers have time and memory limitation

Re: Show HN: You can program without loop and recursion and×÷- is all you need

#6
post #5

Earlier quoted context omitted.

That's why I said an arbitrary number, you can't just precompute the primality of every single number... And I'm afraid I don't really understand your proof of being able to do loops without any kind of looping construct in the language itself

the language is obviously (at least to me) turing-complete in the limit of the program length. even if you don't buy my argument that it is also turing-complete without the limit notice that in ordinary programming you never need a function that is valid on all input because actual computers have time and memory limitation

I must just be missing something then. How would you write a program that prints out the numbers from 1 to n, for reasonable n? (representable by a computer)

Re: Show HN: You can program without loop and recursion and×÷- is all you need

#7
post #3

Earlier quoted context omitted.

if you don't want to melt your brain :D you just precompute the value of any functions f(x) for x<n otherwise you need to be very clever I explained my idea in the link

That's why I said an arbitrary number, you can't just precompute the primality of every single number... And I'm afraid I don't really understand your proof of being able to do loops without any kind of looping construct in the language itself

(it seems like I can't reply to your last comment so I do it here) it depend how you want to display the result to the user, you can just compute a number that represent an html page showing the numbers from 1 to n

Re: Show HN: You can program without loop and recursion and×÷- is all you need

#8
post #5

Earlier quoted context omitted.

the language is obviously (at least to me) turing-complete in the limit of the program length. even if you don't buy my argument that it is also turing-complete without the limit notice that in ordinary programming you never need a function that is valid on all input because actual computers have time and memory limitation

I must just be missing something then. How would you write a program that prints out the numbers from 1 to n, for reasonable n? (representable by a computer)

(now I can reply here, let me repeat it again) it depend how you want to display the result to the user, you can just compute a number that represent an html page showing the numbers from 1 to n

Re: Show HN: You can program without loop and recursion and×÷- is all you need

#9
post #8

Earlier quoted context omitted.

I must just be missing something then. How would you write a program that prints out the numbers from 1 to n, for reasonable n? (representable by a computer)

(now I can reply here, let me repeat it again) it depend how you want to display the result to the user, you can just compute a number that represent an html page showing the numbers from 1 to n

The question isn't as to how it will be represented, that's the boring part.

When given a number n, and you want to display them, how will you actually compute the numbers from 1 to n? If you precalculate a table - then how will you do n+1? What about n+2?

Re: Show HN: You can program without loop and recursion and×÷- is all you need

#10
post #5

Earlier quoted context omitted.

the language is obviously (at least to me) turing-complete in the limit of the program length. even if you don't buy my argument that it is also turing-complete without the limit notice that in ordinary programming you never need a function that is valid on all input because actual computers have time and memory limitation

I must just be missing something then. How would you write a program that prints out the numbers from 1 to n, for reasonable n? (representable by a computer)

I think the issue here is that the language doesn't have any form of user input, so all possible programs are fully static and thus can be represented without any loops or conditionals.

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.

Post reply on HN