Category:Lambdatalk: Difference between revisions

m
→‎{lambda talk} full: adding a new link
No edit summary
m (→‎{lambda talk} full: adding a new link)
 
(2 intermediate revisions by the same user not shown)
Line 70:
Abstractions can be defined and immediately called:
 
{{lambda {o :a :b} oh:b happy day!:a} oOOOoHello aaAAaaWorld}
-> World Hello
-> oOOOoh haaAAaappy daaAAaay!
 
The abstraction {lambda {:a :b} :b :a} is first evaluated to a word (a reference to a function added into a dictionary), the application gets the awaited values oOOOoHello and aaAAaaWorld, calls the abstraction which makes the substitution and returns the result, oOOOoh haaAAaappyWorld daaAAaay!Hello.
 
Abstractions can be given a name and then called easily several times:
 
{def GOOD_DAYswap {lambda {o :a :b} oh:b happy day!:a}}
-> GOOD_DAYswap
{GOOD_DAYswap oOOOoHello aaAaaWorld}
-> World Hello
-> oOOOoh haaAaappy daaAaay!
{GOOD_DAY James Bond}
-> ♠hBond h♥ppy d♥y!James
 
Most of the time expressions are nested. The expression below returns the first word of Hello World:
Line 121:
- lambdas are pure black boxes, they '''don't create closures''' and are context free, inner lambdas don't see outer functions' arguments, there are no lexical scoping, no free variables,
 
- lambdas accept de facto '''partial function application''': called with a number of values lesser than its arity, a lambda memorizes the given values and returns a new lambda waiting for the restmissing ones,
 
- lambdas are '''variadic''': called with a number of values greater than its arity, a lambda feeds the extra values in the last argument, a kind of de facto '''variadicity'''.
 
'''Note:''': This is what Ward Cunningham wrote about such an iconoclastic implementation: ''« I was surprised that the technique worked so well in so many cases. I knew that regex are highly optimized and the cpus themselves optimize sequential access to memory which the regex must have at its core. [..] Yes, this has at its heart the repeated application of a text transformation. The fact that it is repeated application of the same transformation makes it exceptional. [..] Repeated application of Regular Expressions can perform Touring Complete computations. This works because the needed "state" is in the partially evaluated text itself. »'' All is said!
Line 168:
The {lambda way} project adds on browsers a thin overlay, {lambda tank}, giving to {lambda talk} a small ''Interactive Development Environment'' without any external dependencies and thereby easy to download (50kb) and install on any web account provider running PHP. From any web browser, on any system, complex and dynamic web pages can be created, enriched, structured and tested in real time on the web.
 
A full presentation of the {lambda way} project can be seen in this last version: http://lambdaway.free.fr/lambdaspeech followed by this last one under construction: http://lambdaway.free.fr/lambdawalks
 
Your opinion is welcome. Alain Marty