I wrote a book oh Hy, so now tomorrow I will update all the examples to version 1.0
Not counting work on my book, I don’t use Hy more than perhaps five hours a month, but it is a fun language, with good Emacs support. Thanks!
71–80 of 131 posts
I wrote a book oh Hy, so now tomorrow I will update all the examples to version 1.0
Not counting work on my book, I don’t use Hy more than perhaps five hours a month, but it is a fun language, with good Emacs support. Thanks!
I remember Hy! It blew my mind back in 2014 and is still cool today, it's great to see it still going and congrats on releasing 1.0.0! Also great timing after the recent Python Preprocessor post: https://pydong.org/posts/PythonsPreprocessor/ Could Hy hypythetically be implemented as a preprocessor like https://github.com/tomasr8/pyjsx ?
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.
Does Hy offer any features that Python lacks (e.g. dynamic binding)? I find the syntax of Lisp to be the least compelling of its many features.
Dynamically shadowing global variables is not built-in, but easy to write a macro for if you want it. See e.g. https://stackoverflow.com/a/71618732
Wonderfull! I wrote a book oh Hy, so now tomorrow I will update all the examples to version 1.0 Not counting work on my book, I don’t use Hy more than perhaps five hours a month, but it is a fun language, with good Emacs support. Thanks!
I loved the HYPE POST.[0] I work with corporate software. It is absolutely brilliant. [0] https://github.com/hylang/hy/discussions/2609
Hehe, clever.
I looked at the Hy vs Python comparison, Hy is just as (if not more) verbose as Python and harder to read and reason about.
Honest inquiry here, what is the appeal or benefit of the Lisp syntax? is it just that some people have a subjective preference for it?
I'm almost convinced people are pretending to like the Lisp syntax. I just don't get it. I looked at the Hy vs Python comparison, Hy is just as (if not more) verbose as Python and harder to read and reason about. Honest inquiry here, what is the appeal or benefit of the Lisp syntax? is it just that some people have a subjective preference for it?
In blub lang based on c:
Fn(Val Val Val) to f(1,2,3) or
Val fn val 3 + 3
In blub lang based on lisp
(Fn val val...)
I'm almost convinced people are pretending to like the Lisp syntax. I just don't get it. I looked at the Hy vs Python comparison, Hy is just as (if not more) verbose as Python and harder to read and reason about. Honest inquiry here, what is the appeal or benefit of the Lisp syntax? is it just that some people have a subjective preference for it?
In real world Lisp, alignment conventions are used that make even a fairly nested function readable at a glance. You'd also generally work using something like paredit, so you're kind of shuffling the S-expressions around like legos. It's not a language that you'd want to write in something like Notepad.
The most important thing about the syntax, though, is that since it's basically the AST, a Lisp macro can effectively manipulate the AST directly and on the fly. This is incredibly powerful, and would be hard to achieve in an Algolian language like Python.