[HN Gopher] ToriLisp - an ersatz Lisp for tiny birds
___________________________________________________________________
ToriLisp - an ersatz Lisp for tiny birds
Author : grzm
Score : 63 points
Date : 2021-01-01 14:44 UTC (8 hours ago)
(HTM) web link (blog.fogus.me)
(TXT) w3m dump (blog.fogus.me)
| felixr wrote:
| This title really confused me. First I read Tori as Tory.
|
| Then I did not realize that 'ersatz' has a slightly different
| meaning in English than it has in German. In German it just means
| replacement, so I was wondering what it would replace.
|
| And finally I did not get what 'tiny birds' are in this context.
| Can anyone enlighten me?
|
| [0] https://en.wikipedia.org/wiki/Tory
| karatinversion wrote:
| Tori here seems to be the Japanese word, meaning bird, which
| has the kanji Niao , used in the interpreter examples.
| sillysaurusx wrote:
| I'm disappointed this isn't literally a tool to communicate with
| birds, or alternatively a programming language designed for
| birds. Looks lovely though.
| felixr wrote:
| I think you are looking for https://github.com/chirp-language
| ;-)
| randallsquared wrote:
| Hm. Niao > (read "(push [1] 'Z)") ;;=>
| [ "'push", [ "'list", 1 ], [ "'quote", "'Z" ] ] Niao >
| (eval (read "(push [1] 'Z)")) ;;=> [ "'Z", 1 ]
|
| ...shouldn't the last line be either ;;=> [ 'Z,
| 1 ]
|
| or ;;=> [ [ "quote", "'Z" ], 1 ] ?
| akkartik wrote:
| The results are always Javascript literals. Javascript doesn't
| have symbols. So symbols are represented as strings starting
| with a single quote. Mildly confusing but seems easy to pick
| up.
| thurn wrote:
| Are there any good examples of these minimal lisps which include
| typechecking? I'd personally like to learn more about
| incorporating that aspect, but it seems fairly uncommon.
| mark_l_watson wrote:
| Hey Michael, very cool!
|
| I liked the support for currying (where you mapped the partial
| function (+ 10)).
| akkartik wrote:
| Even cooler: defining a function (and block) relies on
| currying. I think it's just syntax sugar.
| hencq wrote:
| Yeah, the automatic currying looks very nice. I was wondering
| how that works with optional arguments or rest arguments. At
| first glance I didn't see anything about that in the tutorial.
| It seems to me as a layman that auto-currying can only work
| with fixed arity functions, but I'm curious if that's indeed
| the case.
|
| Edit: I scanned the docs too quickly. It's answered there:
|
| > Unlike many Lisps, TL functions always expect a fixed number
| of arguments. For example, the + function shown above expects
| to receive 2 arguments and if it receives too many then and
| error occurs:
___________________________________________________________________
(page generated 2021-01-01 23:01 UTC)