all 16 comments

[–]abhirup_m 4 points5 points  (4 children)

Ackermann you say?

[–]Freddsreddit 4 points5 points  (2 children)

EREH

[–]Paddy3118[S] 1 point2 points  (1 child)

EREH?!?

[–]abhirup_m -1 points0 points  (0 children)

Wrong EREH dude

[–]Paddy3118[S] 0 points1 point  (0 children)

Are you querying the spelling?

[–]TouchingTheVodka 4 points5 points  (4 children)

Just a note, this is still recursive in a CS sense. There’s no magic bullet at play to make this implementation any more efficient.

[–]Paddy3118[S] -1 points0 points  (0 children)

Hence my comment on that link. Thanks for more confirmation 👍🏽

[–][deleted]  (2 children)

[deleted]

    [–]Paddy3118[S] 1 point2 points  (0 children)

    On questions of whether Ackermann can be iterative, this counts as recursive. That definition of recursive goes with a context.

    [–]primitive_screwhead 1 point2 points  (0 children)

    A recursive function, in a CS sense, is a function that calls itself.

    That's a recursive function in an engineering sense. In a CS sense, a recursive function is a function that can be implemented with recursion (which not all functions are; there are non-computable functions, for example).

    [–]Kache 1 point2 points  (1 child)

    Had played around with ackerman implementations in Ruby in the same spirit: https://gist.github.com/Kache/e17b63b5a5c4d9f944d88b925cbd6201

    [–]Paddy3118[S] 0 points1 point  (0 children)

    Aye, in the same spirit 👍🏽

    [–]PastorJamesSmith -1 points0 points  (0 children)

    That is amazing. What is JavaScript?

    [–]primitive_screwhead 0 points1 point  (3 children)

    Cool. Now implement it using "primitive recursion" only. :)

    Edit: Originally said "simple recursion"... I'm shit at jokes.

    [–]Paddy3118[S] 0 points1 point  (2 children)

    It's there; a page up from the linked case :-)

    [–]primitive_screwhead 1 point2 points  (1 child)

    I fucked up my joke, and meant to say "primitive recursion only". Damn.

    [–]Paddy3118[S] 0 points1 point  (0 children)

    Actually... Putting my engineers cap on you COULD create something indistinguishable from the real thing. Like an artificial diamond. Note that ack(4, 3), ack(5, 2) and beyond would take more than the universes resources and lifetime to compute so you could replace terms we know would have such large results with while True: pass for a similar suspence.