Hacker News new | ask | show | jobs
by fernly 2395 days ago
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
3 comments

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.