Is it possible to build a comparatively fast untyped lambda calculus machine?

First, it is possible to compile the lambda calculus efficiently to machine code even on existing architectures. After all, scheme is the lambda calculus plus a bit extra, and it can be compiled efficiently. However, scheme & co are the lambda calculus under strict evaluation. It is also possible to compile the lambda calculus under … Read more

How did Haskell add Turing-completeness to System F?

In a word, general recursion. Haskell allows for arbitrary recursion while System F has no form of recursion. The lack of infinite types means fix isn’t expressible as a closed term. There is no primitive notion of names and recursion. In fact, pure System F has no notion of any such thing as definitions! So … Read more

How helpful is knowing lambda calculus? [closed]

The benefit of lambda calculus is that it’s an extremely simple model of computation that is equivalent to a Turing machine. But while a Turing machine is more like assembly language, lambda calculus is more a like a high-level language. And if you learn Church encodings that will help you learn the programming technique called … Read more

Why are λ-calculus optimal evaluators able to compute big modular exponentiations without formulas?

The phenomenon comes from the amount of shared beta-reduction steps, which can be dramatically different in Haskell-style lazy evaluation (or usual call-by-value, which is not that far in this respect) and in Vuillemin-Lévy-Lamping-Kathail-Asperti-Guerrini-(et al…) “optimal” evaluation. This is a general feature, that is completely independent from the arithmetic formulas you could use in this particular … Read more

Why is Haskell (GHC) so darn fast?

I agree with Dietrich Epp: it’s a combination of several things that make GHC fast. First and foremost, Haskell is very high-level. This enables the compiler to perform aggressive optimisations without breaking your code. Think about SQL. Now, when I write a SELECT statement, it might look like an imperative loop, but it isn’t. It … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)