Live data from Hacker News

μLithp - a Lisp in 27 lines of Ruby

fogus.github.com

101–104 of 104 posts

Re: μLithp - a Lisp in 27 lines of Ruby

#101

Earlier quoted context omitted.

In Racket, any custom data type can be turned into a function by using the `prop:procedure` structure type property. It's usually not done with things like maps and sets because this kind of "punning" is not idiomatic. Being a function is not actually a necessary condition for being "first-class" though.

I agree that it's not necessary. But it's a very strong signal, and thus illustrative. AFAICT there is not a well-understood definition of first-class outside of "first-class functions." If I had to nail it down, I'd probably include the notion of first-class as applied to functions, plus: * literal representations (where applicable) * idiomatic, as demonstrated/enabled by the standard library * well-integrated/inter…

[deleted]

Re: μLithp - a Lisp in 27 lines of Ruby

#102

Earlier quoted context omitted.

In Racket, any custom data type can be turned into a function by using the `prop:procedure` structure type property. It's usually not done with things like maps and sets because this kind of "punning" is not idiomatic. Being a function is not actually a necessary condition for being "first-class" though.

I agree that it's not necessary. But it's a very strong signal, and thus illustrative. AFAICT there is not a well-understood definition of first-class outside of "first-class functions." If I had to nail it down, I'd probably include the notion of first-class as applied to functions, plus: * literal representations (where applicable) * idiomatic, as demonstrated/enabled by the standard library * well-integrated/inter…

> AFAICT there is not a well-understood definition of first-class outside of "first-class functions."

Why not just the same notion of "first-class" as functions? In other words, that the feature is actually represented by a run-time value that can be passed around freely and stored. This is the usual definition of "first-class" that I hear most people use in the programming languages world. Examples include first class control (continuations), first class references (boxes, mutable cons cells, etc.), first class environments, first class modules (see OCaml, units, etc.), first class labels, and so on.

Re: μLithp - a Lisp in 27 lines of Ruby

#103
post #35

Earlier quoted context omitted.

Why would anyone? Clojure runs on the JVM which supports native os threads, concurrent garbage collection, etc, for one thing. Different tools for different purposes.

The JVM also takes 100MB to startup a Web server. Maybe I want to use less ram?

If you want to host a webserver on an old 386 or on a credit-card sized Java smartcard, I understand your concern.

Taking 100 MB to startup may be a problem. But not exactly for a webserver.

Re: μLithp - a Lisp in 27 lines of Ruby

#104
post #35

Earlier quoted context omitted.

The JVM also takes 100MB to startup a Web server. Maybe I want to use less ram?

If you want to host a webserver on an old 386 or on a credit-card sized Java smartcard, I understand your concern. Taking 100 MB to startup may be a problem. But not exactly for a webserver.

It certainly can. I like to create a lot of small hobby sites for fun. I pay $20 for a VM with ~700MB of ram. How many JVM web apps can I fit on it vs node web apps?

Or, I run a few hundred servers at work, also on VMs. I want to create a process that needs to run on all of them in addition to what the server is actually used for. Maybe for monitoring, maybe for server management, etc. and I want it to have a REST API. Suddenly using 100MB matters to me.

Post reply on HN