News for hackers. Stuff that matters.
Re:Alligator Eggs and Lambda Calculus (2007) by bitwize on Monday January 20, 2025 @11:59AM (#42770588)
I always thought this was up there with "monads are like burritos" in terms of how it makes things more complicated instead of simplifying them. Maybe that's just my old ass, and kids would appreciate it more. When I was a kid one of my teachers referred to the > and < symbols as "alligator mouths" and said "Just remember the alligator mouth eats the bigger number." Helped me keep those symbols straight for years.
Re:Alligator Eggs and Lambda Calculus (2007) by gs17 on Monday January 20, 2025 @01:34PM (#42771615)
Yeah, I "get" it, but I can only think that as a kid I would have been too upset about all the senseless alligator deaths to internalize the patterns. I guess if they're not old enough to know algebra, (λx.x λy.y)(λz.z) might be more scary than a reptilian predator.
Re:Alligator Eggs and Lambda Calculus (2007) by bitwize on Monday January 20, 2025 @09:41PM (#42775827)
The thing that made me grok lambda calculus was someone[0] in a tutorial online treated as a simple substitution game. They said: Imagine "λx.chocolate covered x" is a lambda expression, and if you apply that to "peanuts" you get "chocolate covered peanuts" and if you apply it to "ants" you get "chocolate covered ants". I knew at that time that LAMBDA was an operator for creating "anonymous functions" in Lisp you could pass to MAP or APPLY, but the "chocolate covered" thing was what made the penny drop that in pure LC, a lambda is just a template with a variable, and application (beta reduction) is substituting values for variables in the templates.

[0] It was probably Jim Larson: https://www.cs.unc.edu/~stotts/COMP204/Lambda/scheme.html

Re:Alligator Eggs and Lambda Calculus (2007) by southpawflo on Tuesday January 21, 2025 @03:18AM (#42777676)
thanks for the link, I enjoyed reading that
Re:Alligator Eggs and Lambda Calculus (2007) by selimthegrim on Tuesday January 21, 2025 @01:59AM (#42777313)
I suppose birds are a kind of reptile if they like reading Smullyan.
Re:Alligator Eggs and Lambda Calculus (2007) by laszlokorte on Monday January 20, 2025 @05:23PM (#42773804)
Thats exactly how my teacher in second grade when I was 8 years old (in Germany) taught us about greater than ans less than.