Lambda Calculus
Check-in [391380a0ba]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:doc changes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:391380a0ba708cfcfbc09a9ff7575b9989541775
User & Date: bill 2012-03-20 15:52:51
Context
2012-03-20
15:53
doc changes check-in: c417d12f49 user: bill tags: trunk
15:52
doc changes check-in: 391380a0ba user: bill tags: trunk
15:44
doc changes check-in: f0dacdf977 user: bill tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lazp.wiki.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
41
42
43
44
45
46
47
48
49
50
51
52
53
@pagedown

# Lazp: An untyped, lazy Lambda Calculus with Macros and Primitives

The goal, here, isn't to make something that's super fast; it's to provide a useable untyped, lazy, lambda calculus for people to use.

To facilitate macros, Lazp uses abstract syntax trees, made from LC functions (i.e. like LISP):

a b c -> _apply (_apply (_ref a) (_ref b)) (_ref c)  
𝛌a . b -> _lambda a (_ref b)  
𝜋x y z -> _prim x (_prim (_ref y) (_ref z)) -- call a primitive function x with arguments y and z  

Template Haskell demonstrates a perceived need for metaprogramming, even in a lazy language, like Haskell.  Eval exposes the Lazp code-generator to developers which helps with creating external DSLs, among other things.

................................................................................

## Parser

(the parser should eventually be written in Lazp)  

\x . y is equivalent to 𝛌x . y  

Since \xxx\ has no meaning in Lazy, it seems like a good way to name character macros, if you don't want to use up "normal" identifiers in the name space.

## LISP-like syntax for Lazp (an alternate parser for curmudgeons)

(lambda (a) b) -> (_lambda (a) (_ref b))  
(a b c) -> (_apply (_ref a) (_ref b) (_ref c))  


|



|







 







|





1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
41
42
43
44
45
46
47
48
49
50
51
52
53
@pagedown

# Lazp: An untyped, lazy Lambda Calculus with Metaprogramming and Primitives

The goal, here, isn't to make something that's super fast; it's to provide a useable untyped, lazy, lambda calculus for people to use.

To facilitate metaprogramming, Lazp uses abstract syntax trees, made from LC functions (i.e. like LISP):

a b c -> _apply (_apply (_ref a) (_ref b)) (_ref c)  
𝛌a . b -> _lambda a (_ref b)  
𝜋x y z -> _prim x (_prim (_ref y) (_ref z)) -- call a primitive function x with arguments y and z  

Template Haskell demonstrates a perceived need for metaprogramming, even in a lazy language, like Haskell.  Eval exposes the Lazp code-generator to developers which helps with creating external DSLs, among other things.

................................................................................

## Parser

(the parser should eventually be written in Lazp)  

\x . y is equivalent to 𝛌x . y  

Since \xxx\ has no meaning in Lazy, it seems like a good way to name parser macros, if you don't want to use up "normal" identifiers in the name space.

## LISP-like syntax for Lazp (an alternate parser for curmudgeons)

(lambda (a) b) -> (_lambda (a) (_ref b))  
(a b c) -> (_apply (_ref a) (_ref b) (_ref c))