Hy, a Lisp that compiles to Python
github.com
github.com
#hy-console {
margin-top: 191px;
margin-left: 223px;
-webkit-transform: rotateX(-20deg) rotateY(5deg) rotateZ(5deg) skewX(4deg);
transform: rotateX(-20deg) rotateY(5deg) rotateZ(5deg) skewX(4deg);
}http://asylum.madhouse-project.org/blog/2014/01/26/hy-the-lo...
if anyone wants to learn more, we have a pretty sweet team over in #hy on freenode, and have some MLs and stuff sprinkled around.
* lisp-1 or lisp-2?
* scoping rules?
* 1-way or 2-way python interop?
* lisp support for python objects?
* any support for tco or loop/recur?
* reader macros?
* speed penalty relative to native python?
* 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 :)
lisp-1, bastardized-lexical (like python, though you could create your own binding constructs with macros), 2-way, yes, yes (loop/recur, no TCO afaict or trampolining), yes, yes
tl;dr you can actually generalize trampolining quite a bit in order to get co-operative threading.
Congrats and nice looking terminal : )
Well at least Hy is markedly different, as my goal is not to compile to Python AST/bytecode, but "merely" be implemented in (R)Python (and C for LLVM) with no access to the Python runtime.
Everything's not only about making points, but still...
Deleted comment
Why don't you go submit pull requests to every single fucking project using the WTFPL license while you are at it?
Deleted comment
Deleted comment
It's a word that you don't say, I get that, but how do you make the jump from "I must not say this word" to "I am disturbed in some way when I encounter somebody else who does not share my religious taboo"?
I don't think you actually make that jump, if you reflect on what you actually think and feel about this.
Deleted comment
Frankly, I don't believe you. If being made aware of people who do not share your religious convictions, both in style and magnitude, really effected you in a negative way, then you would be in a non-functioning emotional tizzy 24/7 unless you were living isolated away on a compound or something. No, there is no genuine emotional damage here, nothing but a purely academic notion of "offense".
Just another opportunity for cultural imperialism. Yet another failure to recognize that religious rules should not be imposed on others, and are only acceptable in modern society when applied to yourself.
Deleted comment
I ask for nothing of the sort. You may behave how you wish, but don't expect others to mime you in return as a favour to you.
Your religious rules are your religious rules. They are accepted "common decency". We certainly do not have them in common.
Hy looks like it borrows heavily from Clojure, which borrows from Common Lisp in terms of names, but they are both different languages and so they differ. About the only objectionable name I found in Hy is `assoc`, which I'd expect to return the value with given key and not set it.
And CLOS is quite a good object system, actually. I somehow missed how it's implemented in Hy, but multiple dispatch would be cute in Python.
What is the standard you're talking about? Common Lisp? Scheme? Clojure? Emacs Lisp?
Common Lisp, of course. That's what you refer to when you say Lisp today. Otherwise you'd say Scheme, Clojure or Elisp. And CLOS is quite a good object system, actually.
Yes, I agree -- my comment was referring to the fact that it is missing from Hy.Deleted comment
For the most part, everybody considers this restriction something that they should only expect of themselves (very similar to how it is unheard of for a Jewish or Muslim person in America to object to somebody else eating pork). Rarely, you encounter somebody who does not have a strong grasp on that concept.
Some people seem to believe that certain words, by their nature, have different power than other words of equivalent meaning. So you see this sanctimonious abolition of "cursing", where it's okay to say "darn" instead of "damn" and "butt" instead of "ass" and "I am displeased" instead of "this is fucking bullshit".
So this notion of "taking the Lord's name in vain" must mean something else. A little study of context tells us that many shamans and prophets and priests of various religions would "invoke" the name of their god when making decrees to lend authority to their statements.
Which doesn't work if you're trying to prove out the legitimacy of God. Whomever wrote The Bible understood some things about logic[2]. He knew that appeal to authority was a logical fallacy, and thus much of the judeochristian system is predicated on the personal relationship between man and God and the dangers of overtrusting Church leadership. "The devil will quote scripture to you."
And intent matters. If you say "it's a pleasure to meet you" with your jaw and fists clenched, you probably don't really mean it, and are basically telling a lie. A poor lie, but a lie nonetheless. Does saying "gosh darnit" really make a difference to an omnipotent and omniscient being such as God? I think He would know that you meant, "God fucking dammit all to burning hell in a whore's handbasket"[3].
Because one must understand the reasoning behind God's laws. It doesn't matter if you literally pushed the knife into a man's heart or just arranged for it to happen that someone else kill the man, you killed the man. To follow the letter of the law but not the spirit of the law is duplicitous, dishonest. This sort of behavior is held up throughout the Bible as that of the "Gentiles", the non-Jews who mince the Lord's law.
So this is where the prohibition against "taking the Lord's name in vain" comes in. It's about "do not deign to speak for God." And with that understanding, it becomes clear that it is the people who say, "you shouldn't say Goddammit, it's offensive to God" are the ones who are committing said sin in the first place.
So yeah, fuck em.[4]
[1] If you don't already, for a moment, assume the existence of the judeochristian God, if only to allow for me an easier writing job. It is not meant as an assumption that you believe in such things.
[2] emphasis on some.
[3] for example.
[4] okay, you may revert to your regularly schedule religion now.
But goddamn, I had never put together the fact that 'it is the people who say, "you shouldn't say Goddammit, it's offensive to God" are the ones who are committing said sin in the first place'. That's an excellent observation, thank you. The rest of it's well explained as well.
I was somewhat under the impression that a lot of the insane over-zealous legalism of 'modern' protestant Christianity was at least somewhat since the Victorian era. A lot of European countries (not the UK) have a much more realistic approach to 'cusswords' and 'swearwords' and so on.
Looking at many past theologians (Martin Luther, for obvious instance), you find that there was much less of an insistence of 'clean' language. We live in a dirty, messed up, stinking world. Sometimes it's appropriate to use words that reflect that. What we're called to do is help to make that world less filthy, and help heal the broken people. The words we use, although not irrelevant, are certainly of much less importance that contemporary religion seems to think.
The bible itself has a couple of instances of 'foul' language, actually. English translations normally tone it down for their audiences... Which is kind of ironic, since most of it was written originally for non-priggish earthy real people, who spoke in street language, not in high class ecclestiatical nonsense (the New Testement is in Koine (common) greek, not in formal classical Greek.).
Television in the United States is okay with the word 'damn', but there are people who consider the combined use with 'God' to be disrespectful to the word 'God' (and believers), stemming from the belief that many religions have that 'God' (and other synonyms) should be reserved for when a person is addressing that deity. Also, many believers consider it a faux pas to impose on the deity of their chosen religion. (Goddamn, meaning "God, please damn .." is issuing a direct command rather than asking for an assistance)
This means that often times on television the word 'Goddamn' has 'God' bleeped from it, to form 'Bleeep-damn', which is okay, apparently.
(Apparently it's not disrespectful to overwrite the deity's name/title with an obnoxious noise)
(Which piques my interest.)