4 ms·
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
by gus_massa 5y ago
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?
- martyalain 5y agoThank 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 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 http://lambdaway.free.fr/lambdawalks/?view=coding for a general introduction to this project.
- gus_massa 5y agoI 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.