5 ms·
This reads out of touch with why curious people use Hy, like me who wanted to get going with an easily accessible language and ecosystem (Python) while rewritin
by emptysongglass 4y ago
This reads out of touch with why curious people use Hy, like me who wanted to get going with an easily accessible language and ecosystem (Python) while rewriting bits in Hy to grok some lisp magic.
No, of course I wouldn't have reached for CL first and it's disappointing to read the top-comment is this.
- IshKebab 4y agoBut... by using Hy you're already learning a new super niche language. If you're going to learn a new language why not ditch Python and use something good? Ecosystem size is really the only thing I can think of.
- emptysongglass 4y agoBecause I write Python to plug into a bigger ecosystem and I can mix and match Python and Hy freely. I can also use Poetry to package and manage dependencies and Poetry2nix to output a Nix derivation that is guaranteed to run on someone else's machine. I can also freely tap Python packages like Beautiful Soup or use frameworks like Django (which I am). The entire Python universe is available to me. The number of accessible tutorials for Django, videos for Pythonistas and community support channels is monumentally large. I even get to do cool things like use Django's ORM for learning how to interact with and manipulate data in Postgres, all right there available to me. I can use Discord (despite my distaste for it as a platform it has a huge Django and Python community), Telegram, IRC, and Matrix to ask for help and get metric tonnes of friendly advice, suggestions and criticisms from Pythonistas. And I can take all of this at my own pace, writing only bits in Hy and branching as I go. Every step is as gradual as I want it to be. Common Lisp is not the answer to my needs. Presenting it as so is tone deaf at the least.
- vindarel 4y agobut who's presenting CL as the answer to your needs? (me?) If you're happy with your mix of Python and Hy, well, great. But you know what, you can do what you described with CL too! Need to do some webscraping? Beautiful Soup -> lquery. Django -> well… no CL framework gives you all these batteries included, but what if you want to extract data from a Postgres DB and display it in a web app? that's very easy [1] in CL too. Django ORM -> postmodern or Mito (or more). IDK about Nix but several people are working with CL and Guix. https://github.com/CodyReichert/awesome-cl https://github.com/CodyReichert/awesome-cl What worked out for me was to write companion services in CL, instead of extending my big Django app. This new service that takes data from a FTP server, transforms it, stores it, displays it in a web app? CL. That web app that serves another kind of customers than the Django one? A CL app. It isn't for everybody and sometimes you wish for a bigger ecosystem, but anyways, many things can be done in CL. [1]: ok honestly the learning process was not that easy. It's a bit easier with my contributions now! (Cookbook etc)
- vindarel 4y agoBTW, about Postgres, data, web app… pgcharts, that turns queries into charts: https://github.com/dimitri/pgcharts https://github.com/dimitri/pgcharts is written in CL :) Speaking of Postgres, pgloader was re-written from Python to CL, here's why: https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-faster/ https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-fas...
- aeturnum 4y agoI think you're misunderstanding the appeal of ecosystems here. It's not just about install base - it's about the mental load of adjusting to a new set of assumptions and paradigms for interacting with the computer. To me, the way to think about "introducing" someone to Lisp and helping them understand the choices the language makes - you really want to focus on the things that make Lisp stand out, and one way of doing that is re-using a lot of the functionality of a language that outsiders may be familiar with. I generally agree that if you want to build something substantial you probably would choose CL over Hy, but if you want to "try a lisp" while minimizing startup costs and you have a Python background I think Hy makes way more sense.
- cjohnson318 4y agoOn top of that, just figuring out which Lisp to start with, and how to get started with it, is an ordeal. In the JVM ecosystem, Java is pretty obvious, and Kotlin is a pretty obvious alternative. In the Lisp ecosystem, the well known SCIP is targeted at Scheme, Clojure is pretty well known, then there's Racket, ChezScheme, CommonLisp, and the they all look like pretty good starting places.
- mumblemumble 4y agoIt's an expensive choice to make, too. It quickly becomes apparent that, no matter which lisp you choose, there will always be a group of people trying to convince you that you picked the wrong one, and pressuring you to second-guess yourself.
- reikonomusha 4y agoYou're saying it's expensive because... people on non-topical forums might tell you their opinion, uninformed of your circumstances? If you choose language X, I advise learning it alongside people who know and use X. It seems like a no-brainer to me, and not all that expensive.
- mumblemumble 4y ago
- stingraycharles 4y agoThere are two “ecosystems” at topic here: the language you’re writing code in, and the environment that it’s being executed in. In this case, you’re writing Hy that’s executed in a Python language environment, that allows you to tap into its entire ecosystem with Hy (in a similar way like Clojure and the JVM). These types of “alternative front ends” are a great way to bridge the gap for a new language. As such, for Hy’s target audience, I think it’s not as much “ditch a new language” as it is “I have to use Python for $reason, but I want something more like CL”. A good example of this would be any machine learning related work. Last but not least, I would expect that on HN we focus a bit more on “what could make Hy even better” rather than “what other languages are better than Hy”.
- alimov 4y agoWhy is it disappointing? It’s just a suggestion (take it or leave it), and links out to an interesting and well written article.