off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
Gustavo Bertolino 2020-09-04T01:59:12.340200Z

Hi guys, I'm trying to find the best channel for asking my question and I was told to use this. I took part of a good discussion with colleagues yesterday about the requirements a language should have to be considered as part of the Lisp family. In this case, they argued that LFE is not effectively Lisp, but just a language with syntax similar to Lisp, because for instance it doesn't have homoiconicity (I'm not sure about this statement). Why is it this way exactly? The same rationale would apply to Clojure?

dpsutton 2020-09-04T01:59:59.340500Z

What is LFE?

Gustavo Bertolino 2020-09-04T02:00:54.340600Z

Lisp Flavoured Erlang https://lfe.io/

Gustavo Bertolino 2020-09-04T02:01:50.340900Z

A project headed by Robert Virding, one of the Erlang's creator.

seancorfield 2020-09-04T02:40:32.342500Z

@gustavobertolino Clojure definitely has homoiconicity: Clojure code is also well-formed Clojure data, and that's how macros work, by being "just" functions that take code as data as arguments and return updated data that can be read as code.

Gustavo Bertolino 2020-09-04T13:49:58.355600Z

What would it be "self-hosted" in this context?

Gustavo Bertolino 2020-09-04T14:10:30.355800Z

I didn't get this idea of "self-hosted" implementations of eval. In this case, you meant that eval ability is hosted in those specific repl server's implementations, @seancorfield?

mauricio.szabo 2020-09-04T15:19:08.359100Z

@gustavobertolino the ClojureScript compiler is written in Clojure, so it needs a JVM to compile code. That being said, when you are running ClojureScript you probably don't have a JVM available

mauricio.szabo 2020-09-04T15:20:17.359300Z

Self hosted means ClojureScript compilers that are written mostly in ClojureScript, with probably a thin layer of JS just to be able to bootstrap the compiler

mauricio.szabo 2020-09-04T15:20:51.359500Z

As these implementations don't need a JVM, they support eval out of the box

Gustavo Bertolino 2020-09-05T00:43:36.361700Z

Sure, thanks for the explanation, @mauricio.szabo. Just to double-check. So those cljs compilers mean that the eval will be executed on a JS runtime instead JVM, right? In other words, with this thin JS layer the compiled code gains support to eval even running on a JS runtime, correct?

mauricio.szabo 2020-09-05T13:48:35.376700Z

Yes, because these cljs compilers are written in JS (with this thin layer). That's why they don't need the jvm. But, this also means that macros on they behave differently than "normal cljs" too

Gustavo Bertolino 2020-09-05T14:20:48.376900Z

Really interesting!

Gustavo Bertolino 2020-09-04T02:47:35.342600Z

Yes, Sean, I definitely agree with you. When I was discussing one of my colleagues explained in the same direction, which makes totally sense for me. I just thought a bit strange LFE to be not considered Lisp just because its semantics is different, as some guys argued during the discussion. I mean, semantics in this case for LFE is all the process and entities running (and existing) on BEAM.

seancorfield 2020-09-04T02:54:40.344700Z

A quick look through the docs seems to indicate it follows Common Lisp syntax more closely than Clojure does, and instead of Clojure's (some-ns/some-fn arg1) it uses (some-module:some-fn arg1). I can't understand why your colleagues think LFE is not "a Lisp".

2020-09-04T02:54:41.344800Z

I do not know if you have come across a particular individual who seems to argue that anything that is not Common Lisp is not a Lisp -- hopefully you haven't. If so, I would ignore that particular person.

1☝️
Gustavo Bertolino 2020-09-04T03:01:26.345Z

Yes Sean, exactly! I didn't see the point to not consider it as a Lisp for real, because even though it might not have read/eval capabilities, it has macros and, thus, the ability to deal with code as data, which seems an essential part of Lisp. One of the guys made exactly that point that not being able to read/eval is enough to not consider it as a Lisp, but I don't think it's a good criteria.

Gustavo Bertolino 2020-09-04T03:06:25.345300Z

I was not sure @andy.fingerhut, I just gave the benefit of doubt for all for the sake of the arguments and discussion at that moment πŸ˜€. But you're right, I agree... We should take care to not falling into traps like that.

seancorfield 2020-09-04T03:06:39.345500Z

ClojureScript doesn't have eval either -- but it is definitely still a Lisp πŸ™‚

seancorfield 2020-09-04T03:07:37.346700Z

There are #other-lisps and #other-languages channels which can often be good spaces to discuss/compare languages (but this channel was a good place to ask the initial question).

1
lilactown 2020-09-04T03:20:03.347900Z

There are a lot of lisp zealots who are very eager to gate keep what is and is not a lisp

lilactown 2020-09-04T03:20:22.348400Z

Many consider Clojure not a lisp, for many reasons

lilactown 2020-09-04T03:21:12.350400Z

For instance, it’s heretic use of literals like [] and {} 😁

dpsutton 2020-09-04T03:21:36.351300Z

yeah. i've also never really learned anything from those discussions either. and the weird definition used is quite arbitrary. and even if it excluded Clojure, it doesn't change Clojure, it just withholds their own bespoke stamp of approval.

lilactown 2020-09-04T03:23:00.353200Z

Yeah. Ultimately what is a lisp or not is not really useful. It’s fair enough to say it’s in the family of languages borne from lisp, and we can colloquially refer to those languages as lisps because who cares 😜

1☝️
jsa-aerial 2020-09-04T16:30:12.360100Z

It's also sort of funny / worth noting, that when CL was being 'defined' (collected together...) many people didn't think it was a 'true' lisp either 😐

dpsutton 2020-09-04T03:24:30.354400Z

the conversation in #beginners about namespaced keywords is way more interesting to me than talking to someone who's definition of a lisp is whether it can run character for character programs from mccarthy's 61 paper. that argument is not exaggerated but what i remember

1
Gustavo Bertolino 2020-09-04T04:25:04.354500Z

Hum, interesting... I didn't know cljs doesn't have eval. But doesn't this short gist article show the quite contrary? https://gist.github.com/mfikes/66a120e18b75b6f4a3ecd0db8a976d84

seancorfield 2020-09-04T04:41:46.354700Z

Core ClojureScript doesn't have eval (the implementation throws), but alternative implementations can bind in their own version of eval, e.g., the various self-hosted ones, using whatever machinery they want. How much of "Clojure" is evaluated by such things is implementation-defined @gustavobertolino

1πŸ‘Œ
seancorfield 2020-09-04T04:47:02.354900Z

It's an interesting read... as it says, you can patch the main ClojureScript system to have a limited form of eval, but a lot of what is really needed for eval simply isn't available in the JS runtime version of the compiled code. The self-hosted implementations have more capability.

1
Gustavo Bertolino 2020-09-04T13:49:58.355600Z

What would it be "self-hosted" in this context?

Gustavo Bertolino 2020-09-04T14:10:30.355800Z

I didn't get this idea of "self-hosted" implementations of eval. In this case, you meant that eval ability is hosted in those specific repl server's implementations, @seancorfield?

walterl 2020-09-04T14:46:07.357700Z

The discussion above reminded me of a long standing question: as someone who learned Clojure as their first lisp (I came from Python), what value (if any) is there in learning some other lisp? Is it worth it? (The question is deliberately a bit vague, as I'm looking for opinions.)

Endre Bakken Stovner 2020-09-04T14:51:59.358Z

I was actually thinking the same thing. I played around with CL some and leafed through the paulg lisp books, but it seems to me that Clojure is just plain better. This is not an answer though, just a comment XD

1πŸ‘
dpsutton 2020-09-04T14:54:41.358500Z

the hardest part of using other lisps is figuring out how to declare dependencies and projects. messing around at the repl is nice but figuring out how to require other things is quite tricky in my experience. This makes it hard to do much (for me) beyond simple programs. However learning scheme or common lisp, just as learning any other language, almost always conveys some benefit

2020-09-04T15:05:20.358700Z

Might be worth learning elisp if you have any interest in getting into hard-core emacs stuff.

jaihindhreddy 2020-09-04T15:18:12.358900Z

elisp for emacs, and scheme for SICP (rather, Scheme through and for SICP). Although, I've been putting off learning emacs for a long time now.

mauricio.szabo 2020-09-04T15:19:08.359100Z

@gustavobertolino the ClojureScript compiler is written in Clojure, so it needs a JVM to compile code. That being said, when you are running ClojureScript you probably don't have a JVM available

mauricio.szabo 2020-09-04T15:20:17.359300Z

Self hosted means ClojureScript compilers that are written mostly in ClojureScript, with probably a thin layer of JS just to be able to bootstrap the compiler

mauricio.szabo 2020-09-04T15:20:51.359500Z

As these implementations don't need a JVM, they support eval out of the box

Gargarismo 2020-09-04T15:34:21.359700Z

I also came to Clojure from python, so I can't tell you what the experience will be like going from "lisp-y language A" to Clojure is, but I can make some generalizations about the reverse. TL;DR: Although there's a bit more of an overhead, I think you actually get a lot out of starting with Clojure, rather than another lisp. In spite of a lot of all the elitist blather out there about Clojure not being a real lisp, I found that after putting in the time to learn how to use Clojure most of those skills translated completely to languages like Scheme, CL, and of course some of Clojure's modern descendants like Fennel and Janet (disclaimer, have only played around with these as toys). Clojure is kind of special, in that there was an extraordinary amount of thought put into the implementation of the language, and this is where an enormous portion of the value in Clojure is, beyond it being a lisp. If you started with Scheme, you might learn the value associated with using a lisp, but you probably wouldn't learn the value of first-class immutability and the wonderfully designed CSP paradigm you get with core.async. And finally, for what it's worth: if you can get past tooling together a complicated Clojure project, you can get past tooling in any language.

jsa-aerial 2020-09-04T16:30:12.360100Z

It's also sort of funny / worth noting, that when CL was being 'defined' (collected together...) many people didn't think it was a 'true' lisp either 😐

chucklehead 2020-09-04T17:12:18.360700Z

I think that's true that a lot of Clojure's value isn't in it's relative level of Lispiness, but the data structures, the ecosystem it sits in, the pragmatism and care around interop, etc. It also makes it hard to disentangle all of those properties and see what everyone is bringing to the party if you haven't seen the concepts elsewhere. E.g. the LISP 1.5 manual spends like 6-7 fairly short pages explaining cons, car, cdr, eq, and atom and then basically says "ok, so that should be about all you need to build the world from first principles" and then goes about doing it, which is kind of eye-opening even if you never go on to use LISP 1.5.

1πŸ‘