Live data from Hacker News

Show HN: Lambduck, a Functional Programming Brainfuck

imjakingit.github.io

21–29 of 29 posts

Re: Show HN: Lambduck, a Functional Programming Brainfuck

#21
Genius, great work and well done, though I might not be smart enough to do anything with it.

Please share the interpreter’s code, however bad you feel it is.

Also, definition of de Bruijn index for those of us without formal education: https://en.m.wikipedia.org/wiki/De_Bruijn_index

Re: Show HN: Lambduck, a Functional Programming Brainfuck

#22
post #21

Genius, great work and well done, though I might not be smart enough to do anything with it. Please share the interpreter’s code, however bad you feel it is. Also, definition of de Bruijn index for those of us without formal education: https://en.m.wikipedia.org/wiki/De_Bruijn_index

https://github.com/imjakingit/lambduck

Re: Show HN: Lambduck, a Functional Programming Brainfuck

#23
but bf is nothing like c, bf is a stack language, I would say it's closest real language analog is forth.

Anyhow, This is far too clear and straightforward, the bf analog to scheme would probably be unlambda, an implementation of the lambda calculus without lambda forms.

http://www.madore.org/~david/programs/unlambda/

Re: Show HN: Lambduck, a Functional Programming Brainfuck

#25
post #23

but bf is nothing like c, bf is a stack language, I would say it's closest real language analog is forth. Anyhow, This is far too clear and straightforward, the bf analog to scheme would probably be unlambda, an implementation of the lambda calculus without lambda forms. http://www.madore.org/~david/programs/unlambda/

> but bf is nothing like c, bf is a stack language, I would say it's closest real language analog is forth.

I could guess the age of the author based on this. Seems like history gets rolled up to generalizations after a while.

Re: Show HN: Lambduck, a Functional Programming Brainfuck

#27
post #23

but bf is nothing like c, bf is a stack language, I would say it's closest real language analog is forth. Anyhow, This is far too clear and straightforward, the bf analog to scheme would probably be unlambda, an implementation of the lambda calculus without lambda forms. http://www.madore.org/~david/programs/unlambda/

I did take some inspiration from Unlambda: the prefix application syntax is cool! I/O in Unlambda is super weird though! You get a read character instruction that puts it into a character register where the only thing you can do is compare it or print it out again; I don't think you can actually do any arithmetic on it.

I'm not sure if I would characterize Brainfuck as a stack language, but I suppose if you considered all the operators to be unary stack operations I could see it!

Re: Show HN: Lambduck, a Functional Programming Brainfuck

#28

Since the de Bruijn indices are limited (and presumably still Turing complete), I wonder how limited you can make them and still be Turing complete.

I suspect the answer is 3: SKI combinator calculus is Turing complete and you need 3 de Bruijn indices to define S.

Good call! I got rid of all numbers above 2, I can't count that high anyway ;-)

Re: Show HN: Lambduck, a Functional Programming Brainfuck

#29
post #4

This seems way too readable! I think you should remove the character literals in the name of purity. Also, this is likely way more compact than Brainfuck, as the lambda calculus is written essentially as usual. And seriously, very cool!

So here’s my question: is the interpreter more or less compact than a brainfuck interpreter? Which interpreter would have a lower Kolmogorov complexity, or could they be equivalent?

I have been geeking out recently on Blaise Agüera y Arcas talks about his BFF interpreter most recently at the Santa Fe Institute and how it can produce information stability out of noise using simple primitives in Brainfuck. I am looking forward to his two books on the subject and recommend checking his talks if you are in the small category of people interested in BF interpreters.

https://www.youtube.com/live/75PAyV83YqE?si=tQNO3IFS-y7cQeR2

Post reply on HN