Hacker News new | ask | show | jobs
by manifestsilence 2393 days ago
The python ones, Hy and Pixie, look pretty cool. Two very different takes on what it means to "use python" for a lisp.

Pixie uses the RPython toolchain and is totally its own language, with its own VM and JIT.

Hy appears to be python with lisp syntax.

Both sound fascinating.

2 comments

Hy is indeed very cool, but other than a different syntax it is still at the end of the day, identical to python.

Pixie does look very cool, but the project on github seems dead?

Yeah, I thought so too. I've been teaching myself Lisp as a side project, working through online tutorials and, more productively, Paul Graham's "ANSI Common Lisp", using SBCL and CLISP in a terminal window. OK, cool, try another Lisp, leverage my Python knowledge.

Took a look at the github of Pixie: "pre-alpha" and no docs whatever. Not for the student.

Hy is cleanly packaged, installed with pip3, has complete(ish) docs[1], great. So I installed it and started it, it puts up a REPL prompt, and I paste in one of the functions I've worked out:

    (defun hello ()
      (write-line "this is the prompt:")
      (let ( (name (read-line)) )
         (format t "Hello, ~A.~%" name)
         )
     )
Error message: "empty expressions are not allowed at top level"

Sorry? Exactly that usage, an empty expression when a function takes no argument, is used on (I just checked) page 20 of Graham. But ok, I try it without, "(defun hello" etc.

Error message: "NameError: name 'defun' is not defined"

You what? defun is introduced on page 14, and defined in the "Language Reference" Appendix of Graham. OK, wait, what does Hy use, if not defun? Search their tutorial chapter: "Define named functions with defn".

OK, this is a deal-breaker for somebody trying to learn (ahem) COMMON Lisp. Why would you do that, just arbitrarily change the probably third or fourth name a student learns after car, cdr and setv? And more importantly, if you have taken it on yourself to dick around with (ahem) Common Lisp at this basic point, what else have you changed that will break the examples in my textbook or online tutorial?

    pip3 uninstall hy
[1] https://docs.hylang.org/en/master/index.html
Hy isn't a Common Lisp implementation, and it isn't trying to be one, so I think this criticism is a little misplaced.
> Hy is cleanly packaged, installed with pip3, has complete(ish) docs

But is not, and does not claim to be, an implementation of Common Lisp, so judging it harshly for being inconsistent with—and a poor tool for learning—Common Lisp makes as much sense as complaining C++ is a poor tool for learning Algol 68.

Why you think Hy has anything to do with Common Lisp is beyond me.