Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Kodiologist
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
Kodiologist
2y ago
I got it to work again with a user agent from Links: `Links (2.29; Linux 6.11.0-13-generic x86_64; GNU C 13.2; text)`.
2.
▲
by
Kodiologist
2y ago
Admittedly, I've tried not to document the implementation. Yeah, they're pretty much simple dirty Common Lisp macros. Internally, they're functions that are called with the arguments converted to models (via `hy.as-model`), a
3.
▲
by
Kodiologist
2y ago
Yeah, at a certain point I realized that both the maintenance and the use of the language became much slicker if unnecessary deviations from Python were minimized. After all, when I'm writing Hy code, I'm usually spending a lot mo
4.
▲
by
Kodiologist
2y ago
You can add all the same type annotations as in Python, but from what I've seen, type-checkers expect Python source text and don't just use standard Python introspection, so you'll need to use `hy2py` first to actually check
5.
▲
by
Kodiologist
2y ago
You're welcome. There are no actual breaking changes from 0.29.0, so you're already up to date if you got that far.
6.
▲
by
Kodiologist
2y ago
Yes, such as: metaprogramming via macros and reader macros; arbitrary compile-time computation; removal of restrictions on mixing statements and expressions; and other arities for Python's binary operators. See http://hylang
7.
▲
by
Kodiologist
2y ago
Sparse? I got a whole chapter for ya: https://hylang.org/hy/doc/v1.0.0/macros
8.
▲
by
Kodiologist
2y ago
Learning Python is not required to get started and do some simple stuff, but it is effectively required to master Hy.
9.
▲
by
Kodiologist
2y ago
Hy-pothetically, yes, you could take Hy code in and spit Python code out via `hy2py`. I think at one point I considered supporting this officially, but then decided there was really no advantage.
10.
▲
by
Kodiologist
2y ago
Now I know how those guys felt who were on the same episode of Ed Sullivan that introduced the Beatles.
11.
▲
by
Kodiologist
2y ago
I don't think so? https://youtrack.jetbrains.com/issue/PY-48754/Support-for-hy...
12.
▲
by
Kodiologist
2y ago
Thanks. I enjoyed compiling a huge list of buzzwords to use for it.
13.
▲
by
Kodiologist
2y ago
I see. That's pretty similar to the feature set of [pdb]( https://docs.python.org/3/library/pdb.html ). You may then logically ask "Does Hy support pdb?". The answer is "sort of". I've
14.
▲
by
Kodiologist
2y ago
1. I don't know what a breakloop is. Hy uses Python's exception system, which is more like a traditional exception system than Common Lisp's condition system. 2. No, sorry.
15.
▲
by
Kodiologist
2y ago
> Are there Python language features I can't use in Hy? At the semantic level, no. I work to cover 100% of Python AST node types with Hy's core macros. It does take me a little bit to implement a new core macro after the CPytho
16.
▲
by
Kodiologist
2y ago
> this compiler is written in Python Yes, that's right. Hy is not self-hosted. > The various ways you can embed a Lisp look very different and have very different tradeoffs. Hy itself provides options. Typically the process is th
17.
▲
by
Kodiologist
2y ago
I eliminated a lot of whimsy from Hy and its documentation years ago because it was distracting and created noisy test failures, but I did go too far at some point, and have tried to reintroduce a little whimsy more recently.
18.
▲
by
Kodiologist
2y ago
I'm not sure. I was going to say that Mojo is proprietary software and so I've never tried it, but I just checked and apparently it's free now. If nothing else, you can probably get a lot of Hy code to run on Mojo via `hy2py`
19.
▲
by
Kodiologist
2y ago
Well, this is a little embarrassing: Clojure was one of the biggest influences on Hy in its youth, but that was mostly before I got involved in 2016. I never actually learned Clojure. So hopefully somebody who knows both Hy and Clojure well
20.
▲
by
Kodiologist
2y ago
Remarkably enough, yes, we got it to work, on our 3rd or 4th try.
21.
▲
by
Kodiologist
2y ago
The author of the e-book is a different guy, Mark Watson. He isn't involved in the development of the language.
22.
▲
Hy 1.0 – Lisp dialect for Python
(github.com)
448 points
by
Kodiologist
2y ago
|
128 comments
23.
▲
by
Kodiologist
2y ago
No, actually, although you could argue that the word "retire" isn't applied quite correctly in such cases. It's common for academics, for example, to continue doing much of the same work once they're nominally retir
24.
▲
by
Kodiologist
2y ago
Hy slower than Python? It shouldn't be, at least at run-time. I maintain Hy. If you notice any meaningful performance differences, that's a bug.
25.
▲
by
Kodiologist
3y ago
As the Hy maintainer, I'd say that assessment is pretty accurate, at least on the Hy side.
26.
▲
by
Kodiologist
4y ago
In Hy, you can include Python with `py`, as in (py "(-b + sqrt(b*b - 4*a*c))/(2*a)")
27.
▲
by
Kodiologist
4y ago
1. Nope, sorry. 2. That's right. Hy depends much more on finicky details of Python than most Python packages do, particularly Python's AST, so each 3.x release of Python usually requires some changes to Hy to support it. Each Hy r
28.
▲
by
Kodiologist
4y ago
Cool, I'm a Hy guy; glad to meet you. Hy in its early years imitated Clojure syntax much more closely, and Clojure compatibility may've been implicitly a goal even if it never got to the point of cross-testing. These days we prefe
29.
▲
by
Kodiologist
4y ago
I've been trying to steer the syntax towards imitating Python more than Clojure, the idea being that you frequently need to rapidly switch between reading Python and Hy (as when you're writing a Hy program while consulting documen
30.
▲
by
Kodiologist
4y ago
I've been working on Hy since 2016 and I've frequently encountered, but never understood, the sentiment that Hy isn't a "real Lisp". What makes for a real Lisp? There have been dozens (hundreds?) of Lisps over the d
More ›