News for hackers. Stuff that matters.
Re:Scripting in Common Lisp by aasasd on Wednesday January 30, 2019 @06:34PM (#19040778)
I'm somewhat baffled that Hy didn't gain any traction.

Let's review the facts:

- A lot of people love Python.

- Plenty of people love Lisps, afaict with a sizeable overlap with the first group.

- Hy, which is a Lisp on the Python platform, has no popularity whatsoever compared to other Lisps like Clojure.

The heck?

Re:Scripting in Common Lisp by aidenn0 on Wednesday January 30, 2019 @08:21PM (#19041380)
Hy may have changed since I last looked at it, but when I had looked at it, Hy was more of an s-expression syntax bolted onto python.

Some random thoughts on why this matters:

Clojure is very much not a thin s-expression layer for java; that would have been terrible (Python is more like lisp than java which is why Hy is tenable whatsoever).

In particular, CL style macros with out some first-class concept of symbols are a footgun[1], but I'm sure I could find other issues.

Another item that can't be ignored is that Hy selected the clojure syntax, which is going to be a turn-off for anyone coming from Lisp or Scheme.

Finally, there are hundreds of thin s-expression layers on top of existing languages, and most of them are terrible; Hy has done nothing to stand out from this crowd, so most lispers will not look closely at it.

1: See https://youtu.be/cPNkH-7PRTk?t=4786 for Rich's discussion of how he managed this issue in Clojure.

Re:Scripting in Common Lisp by aasasd on Thursday January 31, 2019 @09:17PM (#19051030)
I'm actually interested in what other problems make Hy and similar languages infeasible. Even if a brief overview, as food for thought on the matter.
Re:Scripting in Common Lisp by aidenn0 on Friday February 01, 2019 @02:39PM (#19057685)
They aren't infeasible; a real lisp could target Python. However, just bolting on lisp syntax to python ends up in an uncanny valley of "not python" and also "not lisp."

I would actually recommend watching the entire youtube video I posted earlier (Clojure for Lisp programmers). Rich talks about a lot of the design decisions that went into Clojure. Some decisions I agree with, some I don't, but there was thought into creating a unified whole and he was clearly aware of work that had gone before, even when he chose to do things differently.

Note also that Clojure was his third attempt at doing a lisp/java interop, so there was a lot of previous experience backing many of those decisions.

Lastly, it's really easy to make a bad lisp-frontend for a language and a massive amount of work to make a good one. This is well known by anyone who has been in the lisp community for a while (if for no other reason than they themselves have made a bad one) so for better or worse, such frontends tend to be ignored.

Re:Scripting in Common Lisp by kazinator on Saturday February 02, 2019 @01:02PM (#19064509)
A good way to target a Lisp to Python might be to forget the Python AST and target its virtual machine directly.

The compiler could itself be written in its own target dialect, and bootstrapped with some existing Lisp.

Re:Scripting in Common Lisp by armitron on Wednesday January 30, 2019 @11:19PM (#19042291)
If I had to guess I would say the overlap is not as sizeable as you think, at least in the Common Lisp and Scheme camps.

Python really has very few things in common with Lisp and its philosophy is in many ways orthogonal to the philosophy of Lisp. From the idiotic moto "There should be one — and preferably only one — obvious way to do it" (which isn't even true in Python-land) to all the compromises that Python accepted to attract marketshare that would make any hardened Lisp user want to barf, it's crystal clear to me that Python makes an even worse platform than the JVM for Lisp.

Some examples of serious differences between Python and Common Lisp - that would make any serious CL user run away from Python/Hy - are:

+ CL (like Smalltalk) is a fully interactive language. Python's focus on interactivity is minimal if not entirely unproductive. Approaches like Jupyter come across as terrible hacks that lack most of the features that matter to people immersed in Lisp.

+ CL can be very performant. Implementations like SBCL can produce native code competitive with C compilers.

+ CL is truly multiparadigm (one can do imperative, functional, OOP, logic, aspect, nondeterministic, lazy, parallel/multicore and not feel as if the language is fighting him every step of the way). Python has too many limitations for that to be true.

+ Lisp feels conceptually clean and internally consistent. The metacircular evaluator is a thing of beauty. Python feels like a collection of gross hacks and adhoc rules thrown together by humans who didn't know better.

Re:Scripting in Common Lisp by dig1 on Thursday January 31, 2019 @06:04AM (#19043926)
For me it is language instability. I was trying with Hy multiple times, but every new release they would break something, mostly by changing or removing core functionality (eg. removing let/cons).

To me, this looks like kids playground rather than serious project.

If Hy developers doesn't know how to evolve language properly, especially hosted one, which is challenging for itself, I'd suggest they look at Clojure or take some proper language development course.

Re:Scripting in Common Lisp by ludston on Wednesday January 30, 2019 @07:17PM (#19041071)
It doesn't surprise me. It does not have a strong selling point.

I go on to the documentation page, and see that yes, it is nice clean lisp-like language, but I can't see what problem it solves that Clojure doesn't already solve. (And clojure has the existing library/community support to give it the edge.)

EDIT: That's not to say that there isn't one. I just am not immediately seeing it.

Re:Scripting in Common Lisp by lispm on Thursday January 31, 2019 @02:15AM (#19043059)
> which is a Lisp on the Python platform

'a Lisp' is a practically useless term, when you expect that usual Lisp code will run or even being able to be ported. It's incompatible with any other Lisp. Which makes it an island.

Re:Scripting in Common Lisp by auganov on Thursday January 31, 2019 @12:44AM (#19042662)
Played around with it a few months ago. The syntax is peculiar, clojure-inspired, but still very different. Breaking changes have been made, leaving most libraries unusable. The documentation didn't mention this (and is lacking in many other ways).

And btw. many of these changes weren't even features. Like core functions getting removed for philosophical reasons.

Feels like they broke and abandoned it

Re:Scripting in Common Lisp by geocar on Thursday January 31, 2019 @05:09AM (#19043726)
I imagine Clojure is more popular with Java programmers than it is with CL programmers. I did CL for over a decade and I've certainly never had a need to pick it up:

Java programmers on the other hand always seem to be looking for a reason to not use Java. But Python programmers? Always looking for a reason to use more Python.

FWIW: A lot of people also don't love Python. I particularly hate it, but the things (I perceive) it's bad at, Hy doesn't help with.

Re:Scripting in Common Lisp by coldtea on Thursday January 31, 2019 @04:51AM (#19043660)
>- Plenty of people love Lisps, afaict with a sizeable overlap with the first group.

Not that many. And not that many are non-pragmatic enough to mess with a translation layer.

Re:Scripting in Common Lisp by cellularmitosis on Thursday January 31, 2019 @03:50AM (#19043425)
They removed "cons" in the latest version :(
Re:Scripting in Common Lisp by jjtheblunt on Wednesday January 30, 2019 @07:10PM (#19041029)
Python can't use multiple cores, in contrast to the other lisps?
Re:Scripting in Common Lisp by gnulinux on Thursday January 31, 2019 @12:45AM (#19042668)
What does language have to do with "use multiple cores"? Python has both multiprocessing and threading libraries.
Re:Scripting in Common Lisp by pjmlp on Thursday January 31, 2019 @01:05AM (#19042752)
And the GIL on CPython, but yeah multiple process are also an option.