News for hackers. Stuff that matters.
Re:Hy – A dialect of Lisp that’s embedded in Python by ChargingWookie on Wednesday December 03, 2014 @07:28PM (#8697220)
You can create a list comprehension using a macro. In common lisp, lisp comprehension is implemented by the loop macro. http://www.gigamonkeys.com/book/loop-for-black-belts.html

It is a little more involved, but basically you define a syntax for list comprehension and then parse it using the macro to generate the final result.

Re:Hy – A dialect of Lisp that’s embedded in Python by aidos on Wednesday December 03, 2014 @07:34PM (#8697240)
So you sort of write stuff that defines your language as a 'macro' (and it looks like the rest of the lisp?) and it executes on your code first to transform it?
Re:Hy – A dialect of Lisp that’s embedded in Python by Foxboron on Wednesday December 03, 2014 @07:39PM (#8697249)
Yes, thats where the power of lisp is. Say we want to implement do/while. In Python you would have to go into the compiler. In a Lisp, like Hy. We can just write it as a macro.

We implement yield-from on Python2 using a macro. http://dustycloud.org/blog/how-hy-backported-yield-from-to-p...