HN user

paultag

171 karma
Posts0
Comments39
View on HN
No posts found.
Hy 7 years ago

The speed of Python with all the readability of scheme

It does! We run tests on pypy, and it for sure works. I did at one point even test hy with rpython, I can't remember if that will still work or not, but it did compile like 4 years ago :)

Thank you so much. I'm deeply humbled and extremely grateful for this. It's the nicest thing I've read all week, and really brightened my day up. Thank you!

cgo has its own set of problems, and there is no single C API. The version comparison isn't in shared library form, and breaks API a lot. The C parser for dependencies isn't the same we use in control files, and there's no C API for parsing a deb (or unpacking control files).

Most of this just has to be done. I take your point, but I couldn't find much. And I'm a debian developer - who knows what most non-Debian people would find. The best APIs are in `libapt`, which is C++, and cgo won't work with that all that well.

So, yes, you're right. This is yet another project. That's uncool, but there's not a ton of other ways out, short of me making a clean C shared library and get everyone to switch to that :)

Thanks! (re: Hy :) )

Sorry, I didn't document this since i'm rushing stuff out as soon as I get it together -- I was looking at the Trove classifiers, and setting candidate to true iff it says it's Python 3 compatable but no Python 3 package :)

Yes, everyone's making fun of me for not saying 2 years rather then 3.

Also, our releases aren't timed, they're based on bug count, so the timing of the releases wasn't even the main point (and doesn't really matter) :)

I also typoed Python 3 as Python 2 in one of the lines, so, uh, just switch those two numbers. I'm pretty sure it works like that.

Either way, getting Buster off Python 2 means the transition will be more bug free, since we'll have a bit of slack time.

Consider contributing to Debian! We've got tons of wicked hackers working on issues on a massive scale. If you're keen on it, feel free to join #debian-mentors on oftc and say hi!

* lisp-1 (Python rules)

* Python (sucks)

* 2-way

* Yep! CLOS syntax

* Yep! hy.contrib.loop - to be promoted soon

* Yep, they're OK, relies on dispatch char that's static

* Very little, actually - it compiles to (pretty sane) Python AST / Bytecode - so good pdb works to debug Hy :)

Yeah, totally. Not sure where we're going yet, but right now those stupid warts are just harmless tumors. Hopefully we can clean it up soon.

I, of course, prefer (defn) and (first) / (rest), but I know killing (defun) (car) and (cdr) will make a few people go nuts.

We'll have to make it sane before 1.0 :)

Thanks for hacking with Hy :3

Hey dude, language author here - yeah, a (lambda) will become a Python lambda if it's a single expression, otherwise it'll turn into an anonymous function (with a name like `_hy_anon_fn_00011`) and replace the lambda with a ref to the function.

Allll taken care of :)

Try Hy 13 years ago

It's not meaningless, a lot of people (myself included) use it to talk about programs that can alter their own program in the data structures that they're good at moving around.

In Python, the AST approximates this. Perhaps I'm lax in usage, but I think there's a continuum of homoiconicity - some things (like C) have no language functionality to deal with their own source code. Other languages (like CL) are very good at this, since you write the language in it's own data structures. Other languages (like Python, or Racket) aren't homoiconic, but they approximate what makes homoiconicity special.

Try Hy 13 years ago

Well, two things.

Firstly, AST visitors in Python (or whatever) are clunky and lots of code to do what you say. Hell, I think that it's borderline unpythonic.

You have to consider lots of things, such as whether or not you can put an stmt where you're inserting code, and write a lot of, frankly ugly, Python code to do it.

Hy macros (and really Lisp macros) that are first-class members of the language are nice, because they're a lot more clean to write.

In addition, since Hy does some nasty stuff under the hood to generate clean Python AST, you can do stuff like:

   (print (if true true flase))
(Ok, that's a lie, since it'll do "print True if True else False", but if that had a (do) around everything, it'd still work by mangling the expression - just too tired to write that example right now :) )

Fundamentally, a Hy macro IS an AST macro, just on the parsed and tokenized Hy code (which turns into AST), rather then fiddling with Python AST (which isn't even a stable interface).

That answer the question? :)

Try Hy 13 years ago

Original author of hylang here - because lisp is homoiconic, you have real macros, not AST macros; although the distinction isn't exactly clear, it's nice to have them as first-class members of the language, and allow them to avoid caring about stmt vs expr internally.

Happy to answer questions.