Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This code is indented incorrectly:

  {{lambda {:a :b}
            bla bla bla :b :a bla bla bla}
            hello world}
It should be:

  {{lambda {:a :b}
           bla bla bla :b :a bla bla bla}
   hello world}


I agree with you, the lambda is applied to the two words which should be aligned with the second curly brace. Here my choice was to mimick the find & replace request of which it was a rewrite. It's a matter of choice. I hope you have gone a little further ...


I read the full article, but I use Racket most of the time so to understand the code I secretly ignore the parenthesis and use the indentation instead.

I like Scratch for kids for very small programs, and perhaps for programs with some easy to encapsulate subparts, but my feeling is that once you need to use recursion the friendly part of Scratch is a problem. My daughter used it for a month or two, but she preferred to go back to a language with text representation that makes cut&paste easy.

About the rest of the article: Does the compiler use some trick to make arithmetic operations faster under the hood or you are using just the unary/binary representation in lists?


Thank you for reading. In this page everything is evaluated using the minimal toolkit, lambadas & defs. And as usual with numbers as lists evaaluations are slow and limited to small numbers. You could have a look to this page http://lambdaway.free.fr/lambdawalks/?view=oops6 to see how (very) big numbers can computed at the lambda-calculus level, and to http://lambdaway.free.fr/lambdawalks/?view=coding for a general introduction to this project.


I noticed that even `if` are functions that use `lambdas` for the branches. It's good because it's possible to remove another magical special form and it's good for static code analysis, but it's bad for performance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: