8 ms·
Hy, a Lisp that compiles to Python
- stcredzero 13y agoHow about "HAI" -- a Lisp that compiles to Lolcode?
- jimmcslim 13y agoHas there been any work done on Light Table integration?
- Foxboron 13y agoI have been trying to pull-off a nREPL for hy. But haven't really come close yet. Going to try and do some more work on that front in the near future.
- deleted 13y ago[deleted]
- antimora 13y agoThis terminal cracked me up: http://try-hy.appspot.com/ http://try-hy.appspot.com/
- bcambel 13y agothanks for the share. It's hilarious!
- deleted 13y ago[deleted]
- elwell 13y agoLooks bad in windows chrome though. this looks better to me: #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); }
- bcambel 13y agoGreat movement from the community to show some love to FP. I really like Clojure, and will give Hy a try as well. FP really forces you to write better code and somehow your thinking starts to change slowly. What I realised is that after I started to write Clojure, I am writing much more functions in Python as well. If you haven't tried yet, give FP some chance.
- anaphor 13y agoThis doesn't make Python any more functional, all it does is change the syntax.
- bcambel 13y agoPython is already functional enough, it's the brain behind the keyboard wasn't that much functional before ( that was me )
- anaphor 13y agoOkay, well at least you can add a proper distinction between variable binding and assignment (let vs. set!) if you have macros, but that doesn't really make it more functional, just better.
- emidln 13y agoWell, you could implement proper distinction. let and setv both compile to setattr() in the current scope right now.
- Tuna-Fish 13y agoImho it lacks good types. Python with the clojure collections as default types would be awesome.
- Foxboron 13y agoI just want to note that Lisp does not really imply functional programming. Hy is nothing more then Python with Lisp syntax and the awesomesauce that comes from Lisp as macros and reader macros.
- Pirate-of-SV 13y agoMost of the programming language Y to language Z requires the user to know more Z than Y. Kind of losing the point there. Everything's not only about making points, but still...
- Foxboron 13y agoHy was originally a project to show "Hey, see how awesome Python & AST is!". Lisp being an easy choice to implement. Just awesome it have turned into something actually use able and fun to code with.
- anaphor 13y agoOne use for such a thing I can think of is to use it as a reference for teaching basic parsing techniques. E.g. have a project for an undergrad course where they learn how traditional recursive descent parsing works, and then they get to implement an s-expression parser (possibly to a simplified version of the python AST).
- prodigal_erik 13y agoFor a Lisp fan, merely learning another language is fine. It's the need to actually use that other language day to day that creates a lot of obvious wasted repetitive effort and friction. Without macros, much of what the software industry produces is essentially macro expansions done by hand (sometimes called "plumbing" or "infrastructure").
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- Crito 13y agoGive me a fucking break, neutering language because somebody somewhere might hypothetically be emotionally damaged by reading it is something that we can save for marketers writing bone-dry press releases. If you don't like that word, then you don't have to say it. Pestering other people for saying it is a joke. Why don't you go submit pull requests to every single fucking project using the WTFPL license while you are at it?
- deleted 13y ago[deleted]
- Crito 13y agoWhat does it mean to say that you were "offended" by it? What sort of emotion did it elicit? 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 13y ago[deleted]
- Crito 13y agoIf you don't like it, then don't say it. If the existence of people who do not share your religious beliefs honestly disturbs you, then you have some serious problems. 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 13y ago[deleted]
- gtaylor 13y agoYeah, it's probably not the best idea. Looks like someone opened a pull request to fix it: https://github.com/hylang/hy/pull/499 https://github.com/hylang/hy/pull/499
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- hk__2 13y agoCan someone explain for non-native English speakers what’s the problem with “goddamn”?
- serf 13y agoIt's considered profane. 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)
- Foxboron 13y agoI'll repost two recent blogposts about Hy that have been on Hackernews recently. http://fox.devport.no/?p=82 http://fox.devport.no/?p=82 http://asylum.madhouse-project.org/blog/2014/01/26/hy-the-logical-choice/ http://asylum.madhouse-project.org/blog/2014/01/26/hy-the-lo...
- paultag 13y agoLanguage author here :) 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.
- zem 13y agoi'll ask you the same questions i asked the parenjs author, and which i think are pretty much faqs if you're developing a language-hosted lisp dialect. (some of them, like the interop ones, are answered in the hy docs, but it would be nice to have a quick up-front list for reference). * 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?
- anaphor 13y agoI can answer most of these just from reading the stuff linked here and educated guesses. 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
- paultag 13y agotrampolining - confirmed
- anaphor 13y agoThen you should give this a read if you haven't: http://www.cs.indiana.edu/~dfried/ts.ps http://www.cs.indiana.edu/~dfried/ts.ps tl;dr you can actually generalize trampolining quite a bit in order to get co-operative threading.
- paultag 13y agoInteresting, thanks for that! I'll read it over on the train in the morning and see if I can't fudge it in :)
- lloeki 13y agoEither I have (good or bad?) luck or I've got some zeitgeist hunch or something, but first I had a convincing WIP of implementing Ruby in RPython when Topaz went out, and now while I'm working on a Lisp[0] — again in RPython — comes Hy. 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. [0]: https://github.com/lloeki/wasp https://github.com/lloeki/wasp
- coconutrandom 13y agoLooks great! Just a heads up here for a name clash of another wasp lisp. https://github.com/swdunlop/WaspVM https://github.com/swdunlop/WaspVM
- wilfredhughes 13y agoI think it's natural inclination. There's a basic Scheme implementation in Pypy, and I'm also working on a Lisp using RPython: https://github.com/Wilfred/trifle https://github.com/Wilfred/trifle
- Foxboron 13y agoYou see the wierd signs in the description for hy? Its actually a wierd way of spelling Hymenoptera! So, that further confirms your zeitgeist hunch. http://en.wikipedia.org/wiki/Hymenoptera http://en.wikipedia.org/wiki/Hymenoptera
- mikaelj 13y agoWhy the non-tsandard names of everything? And... CLOS?
- klibertp 13y agoWhat is the standard you're talking about? Common Lisp? Scheme? Clojure? Emacs Lisp? 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.
- mikaelj 13y agoWhat 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.
- razzmataz 13y agoAges ago, there used to be a python-lisp hybrid called e7. I wonder if that provided any inspiration.