libera/#lisp - IRC Chatlog
Search
5:09:34
lisbeths
lambda calculus is the simplest lisp but that needs the best optimizations to be fast
5:30:55
lisbeths
what most lisps seem to be able to agree on in terms of design is how lambda functions should work with only minor syntactical or internal differences between them
5:32:39
lisbeths
algorithms written purely in lambdas in scheme can run in haskell so long as they don't refrerence any object that isn't a lambda
5:44:54
lisbeths
many lisps have tried and failed to be the next JSON and this is arguably because not everyone can agree what lisp to use
5:52:00
rozenglass
lisbeths: Can a JSON replacement be completely made up of lambdas? How would it differenciate between a key-value collection, and an array/list of objects for example? Without using any language-specific features.
5:53:23
lisbeths
I think you can encode s expressions in json that way the technology doesnt need to be changed much
5:53:52
lisbeths
thus you can encode a lambda expression with json syntax such as an algorithm in pure lambda calculus
5:55:36
lisbeths
otherwise the naming of objects and data would be to just create s expressions with symbol names in them
5:57:16
lisbeths
you can write an s-expression like structure with json. You can write a json like structure with s expressions. Json is the more complex and less elegant of the two
5:59:11
rozenglass
The only way I see to do the second (write something JSON-like in s-expressions) is to use symbols to denote some things (like arrays or key-value objects), and thus, I think, we can all disagree on what symbols to use for what, and then we fail again :p
5:59:11
lisbeths
think about if an s expression was an object, how would you "dehydrate" that object into json
6:00:22
rozenglass
I remember having to deal with the various ways different Lisp to JSON libraries treated `false` vs the empty array.
6:01:26
lisbeths
this is why you cant agree how to encode lisp you can agree how to encode PURE lambda calculus
6:02:09
lisbeths
meaning that to process data from the outside world that data first has to be transformed into pure lambdas which is often an immutable datstructure
6:02:19
rozenglass
changing parentheses into braces to denote objects sounds like something external to lambda calculus though, no?
6:03:27
lisbeths
pure lambda calculus can be represented as s expressions with nothing but symbols and parentheses. by converting the parentheses into braces and adjusting the symbol somewhat it can be encoded as JSON
6:06:14
lisbeths
not necessarily you can encode 1101 as the list containing four objects consed together
6:07:24
moon-child
at some point you end up wanting to type these monsters. That way lies ml, and no lisp
6:07:27
lisbeths
you dont have to use church numerals you can use the pair combinator, the head combinator, and the tail combinator