User loginNavigation |
archivesImplementations of untyped lazy lambda calculusI am trying to create a very efficient implentation of John Tromp's binary lambda calculus so that it can be used as a toy language at golf.shinh.org. It is the pure untyped lambda calculus with only 3 types of operations, lambda abstraction, variable (argument) lookup, and apply. I figure the easiest way to do this is just to convert it into some other language. I only have basic knowledge of some functional languages, I would not mind learning more, but only if it is actually possible to convert the untyped lambda calculus into it. Haskell is lazy but since it is not dynamically typed it runs into problems with "cannot construct the infinite type" Ocaml might be able to get around this problem with the -rectypes but lazyness must be done manually with lazy and Lazy.force. Even if it could work, Ocaml's lazy functions might not be very efficient at all. Another option is to convert into the spineless tagless gmachine notation that Haskell uses. Alot of the Haskell optimizations are done before this step. Can any of these problems be overcome without too much cost? Or any other good languages out there that could? Any advice is appreciated, but you do not need to explain the whole thing in detail, a pointer to the right direction will be of enough help. |
Browse archivesActive forum topics |
Recent comments
22 weeks 2 days ago
22 weeks 2 days ago
22 weeks 2 days ago
44 weeks 3 days ago
48 weeks 5 days ago
50 weeks 2 days ago
50 weeks 2 days ago
1 year 6 days ago
1 year 5 weeks ago
1 year 5 weeks ago