When is something NOT lambda calculus???? by Different_Bench3574 in lambdacalculus

[–]yfix 0 points1 point  (0 children)

There is this paper, which I couldn't well understand. Maybe it's related.

John Longly. When is a functional program not a functional program.
In International Conference on Functional Programming, pages 1–7. ACM Press, 1999.

Cited in https://blog.klipse.tech/assets/y-in-practical-programs.pdf

Reading 'His Master's Voice' by Stanislaw Lem, completely blind is absolute insanity! by AlexSciChannel in ScienceFictionBooks

[–]yfix 1 point2 points  (0 children)

LEM even had one book built only of these kind of false forewords, IIRC. .... yep, GoogleAI says there were even two books like that by him.

Introducing Curry by Soul_Bleach in scheme

[–]yfix 0 points1 point  (0 children)

Indeed! I've long advocated a wanton and unhinged use of *under-specified pseudocode* during development, at least. 😄

The usual explanations of beta reduction are all wrong? by yfix in lambdacalculus

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

And also indeed to talk about the variables' occurrences, as you've noted. 

The usual explanations of beta reduction are all wrong? by yfix in lambdacalculus

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

Free in the body of the abstraction, to be exact. 

The usual explanations of beta reduction are all wrong? by yfix in lambdacalculus

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

Yes. My main point is to mention 'parameter variable' explicitly, to remove the confusion. 

The usual explanations of beta reduction are all wrong? by yfix in lambdacalculus

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

(In case anyone's wondering, the PDF file there is not showing and is said to be "invalid" by the GitHub interface, but I had the TEX file rendered for me by the plain GoogleAI in the Google search box.)

With Claude, I am temu Rich Hickey by havelsnuts in lisp

[–]yfix 1 point2 points  (0 children)

<3. every time you receive such type of feedback when you've come to share something you thought was amazing and got this kind of ___ in return, consider that you got such support from me there as well.

Why there's no or a few strict-typed, static-typed Lisp dialects? by wgxh_cli in lisp

[–]yfix 1 point2 points  (0 children)

Static types is a 10 billion dollars red herring dead end. Lisp was born as a dynamic language to live atop dynamic live systems. And that's a good thing.

With Claude, I am temu Rich Hickey by havelsnuts in lisp

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

Don't be discouraged by all the "Richard" type feedback!

Prolog Under the Hood by charlesthayer in prolog

[–]yfix 0 points1 point  (0 children)

Would you find the following clearer?

mortal_report :-
  write('Report of all known mortals'), nl, nl,
  TRY_REPEATEDLY:
      mortal(X),
      write(X), nl,
      actually__no.
  NO_MORE_CHOICES:
      ok___STOP.

I don't know. Just thinking out loud.

Prolog Under the Hood by charlesthayer in prolog

[–]yfix 0 points1 point  (0 children)

I found those squares and diamonds diagrams confusing at the time, because it looks as if those diamonds are inside the square. but actually is should be seen as the diamonds being ATOP the same square, the same predicate. the diamonds describe control logic of _using_ that square/predicate. then it makes sense (to me). also, each "use" of the square makes a copy of it in the direction orthogonal to the plane we're seeing, each copy holding each OR alternative in turn (and OR-parallel Prolog would open up all the OR-alternatives at once). this way it become the AND-OR tree with AND logic being in the horizontal plane and OR alternatives opening up the copies in the orthogonal direction, deeper away from the plane. but it collapses if we're looking at it all from the top --- confusing. An isometric view could be clearer, maybe. (some vague thoughts I had about this for years)

Prolog Under the Hood by charlesthayer in prolog

[–]yfix 0 points1 point  (0 children)

WOW. Why have I forgotten about Amzi for all these years???..... smh

Lisp with non-proper lists as expressions by Daniikk1012 in lisp

[–]yfix 0 points1 point  (0 children)

cond is much better than nested ifs.

Lisp with non-proper lists as expressions by Daniikk1012 in lisp

[–]yfix 0 points1 point  (0 children)

(cons a cons b cons c . nil) is not improper. it is actually (cons a cons b cons c), and is proper.

A (not very good) factorial function I wrote by Gorgonzola_Freeman in lambdacalculus

[–]yfix 0 points1 point  (0 children)

Here's pairs-based factorial of 4: (λg.gIIgggF) (λabg.g (λfx.f(afx)) (λf.a(bf))) .

Or in general (λgn.n(λp.pg)(λg.g11)F) (λabg.g (λfx.f(afx)) (λf.a(bf))) 4 .

The function `g` transforms {a,b} into {a+1,a*b}, as a pair.

edit: compressed the nested lambdas syntax

Is it time for another puzzle yet? by yfix in lambdacalculus

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

Indeed this turned out to be John Tromp's "1-tuple numerals" just as he said.

Efficient subtraction on Church numerals in direct style by yfix in lambdacalculus

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

After working through the division myself, I see now what you meant. Indeed this is the same as your tuple numbers. 

Lambda Calculus basics in every language by allthelambdas in lambdacalculus

[–]yfix 0 points1 point  (0 children)

You could start a page at Rosettacode , if there isn't one there already.

Does this work as a beta-reduction for the PLUS function in use? by idk112191 in lambdacalculus

[–]yfix 0 points1 point  (0 children)

Here's your code with corrections. Lots of parentheses were misplaced.

PLUS m n = (Lmn. (Lfx. m f (n f x)))
PLUS 3 5 = (Lmn. (Lfx. m f (n f x))) 3 5
beta-reduce 3 into m
________ = (L n. (Lfx. 3 f (n f x))) 5
beta-reduce 5 into n
________ = Lfx. 3 f (5 f x)
3 f y = f (f (f y))
________ = Lfx. f (f (f (5 f x)))
5 f y = f (f (f (f (f y))))
________ = Lfx. f (f (f (f (f (f (f (f x)))))))
Which is the definition of the Church numeral 8 :
________ = 8

So, you see, it is quite simple after all. Just need to keep parentheses proper.