Live data from Hacker News

Lisp-stick on a Python

docs.hylang.org

31–40 of 170 posts

Re: Lisp-stick on a Python

#31
post #27

Earlier quoted context omitted.

slow. bloated. not particularly good at managing conses. is there tail recursion?

No, Python does not have tail recursion optimization, because Guido decided that he wanted to preserve stack frames for better tracebacks. The language team may revisit that decision someday. I assume you're referring to an optimization, because one can write tail recursion in any language that supports subroutines.

Thanks, that is what I thought, but didn't trust my memory.

Yes, I did mean optimization - without it you can blow through your stack quickly (and the traceback will be long and redundant :)

Re: Lisp-stick on a Python

#32
post #27

Earlier quoted context omitted.

slow. bloated. not particularly good at managing conses. is there tail recursion?

No, Python does not have tail recursion optimization, because Guido decided that he wanted to preserve stack frames for better tracebacks. The language team may revisit that decision someday. I assume you're referring to an optimization, because one can write tail recursion in any language that supports subroutines.

> because one can write tail recursion in any language that supports subroutines.

If only! For anyone else who got saddled with some FORTRAN 77 code, you may or may not have recursion available even with subroutines. It wasn't required by the language standard, but some implementations supported it. Not the one I "got" to use (and quickly moved on from) a while back, though.

Re: Lisp-stick on a Python

#33

If someone thinks the Hy mascot, Cuddles the Cuttlefish, looks awfully familiar to a certain crustacean mascot, you would be correct! They are both drawn by Karen Rustad Tölva! https://www.aldeka.net/

She has great Art and Designs - thanks for sharing the link to her bio/portfolio

Re: Lisp-stick on a Python

#35

  Why Hy? Hy (or “Hylang” for long; named after the insect order Hymenoptera, since Paul Tagliamonte was studying swarm behavior when he created the language)
I'm spending my HN karma to make this petty comment that if the first sentence of your docs immediately opens up with the story of how you named your project, I instantly don't want to use it or read any more.

It's like when you open a cooking recipe on a website and you get the author's entire life story

Re: Lisp-stick on a Python

#36
post #35

Why Hy? Hy (or “Hylang” for long; named after the insect order Hymenoptera, since Paul Tagliamonte was studying swarm behavior when he created the language) I'm spending my HN karma to make this petty comment that if the first sentence of your docs immediately opens up with the story of how you named your project, I instantly don't want to use it or read any more. It's like when you open a cooking recipe on a website…

This was a trend in the early 2010s on a lot of Clojure projects

Re: Lisp-stick on a Python

#37

Earlier quoted context omitted.

think of it as clojure to java, even without embodying the whole lisp ethos, it gives you a lispy base to write python code, plus extra niceties (threading -> IIRC) plus you get to benefit from paredit under emacs

Clojure is more than just a Lisp for the JVM – it is a Lisp for the JVM with a big focus on immutable data structures – whereas traditionally most Lisps put mutability first instead. There are other Java-based Lisps, such as Armed Bear Common Lisp (ABCL), which are more traditionally Lisp-like in this regard. I think Hy is more of a traditional Lisp, since it shares Python's native focus on mutable data rather than t…

i know it's not a full fledged thing like clojure, but it never had that scale in mind either. I should have added a modal in my comment above :)

Re: Lisp-stick on a Python

#38
post #35

Why Hy? Hy (or “Hylang” for long; named after the insect order Hymenoptera, since Paul Tagliamonte was studying swarm behavior when he created the language) I'm spending my HN karma to make this petty comment that if the first sentence of your docs immediately opens up with the story of how you named your project, I instantly don't want to use it or read any more. It's like when you open a cooking recipe on a website…

I’m going to follow up with a slightly more pertinent question: Why use a cuttlefish as the logo when the language is named after another animal?

Missed opportunity to spread the knlowledge about the Hymenopteras…

Re: Lisp-stick on a Python

#40

See also PEP 638 – Syntactic Macros https://peps.python.org/pep-0638/

You beat me to it. One wonders if this might become a python13 feature, whenever they get around to branching the CPython repository.

I’m contemplating pushing for it in 3.12, but it’s probably more than a year’s worth of work to implement and shepherd the PEP through. So 3.13 is more likely.

And I’m not sure it won’t get shot down anyway. It’s a big step for Python.

Post reply on HN