28 ms·
Racket Is an Acceptable Python
- mac_was 7y agoWhat is the purpose of Racket? Is there any use for web development?
- molteanu 7y agoWhat is the use of a computer? Can you play games with it?
- creatornator 7y agoRacket is often used in academic circles (my University uses it to teach the fundamental CS courses), and also to prototype other programming languages, like a programming-language-language. It has good capabilities for building parsers, grammars, traversing ASTs, and code generation.
- cultus 7y agoI've heard of people using it for backend. Moreso than even most lisps, Racket is incredibly powerful. It's really good at building DSLs, since the code is just another data type with the macro system. For the frontend, there's Clojurejs.
- cpach 7y agoWhen learning to program, Racket was immensely useful to me. The concepts behind Lisp are simple, so I found Lisp to be a good language family to study in order to grasp how programming languages work. These days I prefer Python though.
- laszlokorte 7y agohackernews is built on top of racket
- lkirk 7y agoI thought that it was implemented in Arc: http://arclanguage.org/ http://arclanguage.org/
- bryanlarsen 7y agoArc is a racket dialect
- darkpuma 7y agoArc is an a lisp dialect that's been implemented in racket.
- neilv 7y agoThat's my understanding. Early on, I started doing an incomplete implementation of Arc more like what one of the parent comments suggested, and the working title was "morc: Mock Arc Programming Language as Scheme Extension". I just wanted to learn Arc, while learning Scheme macros better. Besides possibly adding to the confusion over the relationship between Arc and Racket (or PLT Scheme), my poor choice of title caused at least one community member to be upset, that I would mock (insult) Arc. When I meant only to be self-deprecating of my own exercise, like a poor-imitation or approximation, and not to seem to presume to be implementing a full Arc this way.
- deleted 7y ago[deleted]
- bryanlarsen 7y agoMany have made the statement "Racket is the best Lisp/Scheme". Many have made the statement "Lisp/Scheme is the best programming language ever!"
- JoelMcCracken 7y agoI recently rebuilt my personal website on a Racket project: https://gitlab.com/JoelMcCracken/joelmccracken.com/ https://gitlab.com/JoelMcCracken/joelmccracken.com/ My post about why I chose it: https://joelmccracken.com/entries/pollen-writing-semantic-markup.html https://joelmccracken.com/entries/pollen-writing-semantic-ma... A really good resource for understanding the motivation behind racket: https://felleisen.org/matthias/manifesto/ https://felleisen.org/matthias/manifesto/ For a taste of the build code I wrote: https://gitlab.com/JoelMcCracken/joelmccracken.com/blob/master/src/build.rkt https://gitlab.com/JoelMcCracken/joelmccracken.com/blob/mast... and https://gitlab.com/JoelMcCracken/joelmccracken.com/blob/master/src/pollen.rkt https://gitlab.com/JoelMcCracken/joelmccracken.com/blob/mast...
- tosh 7y agoI'd say Racket is a general purpose multi-paradigm language that is well designed. Good for use cases where you otherwise might find code written in JavaScript, Python, Clojure or Ruby. You can do web development with Racket https://docs.racket-lang.org/continue/ https://docs.racket-lang.org/continue/ One thing that makes Racket somewhat special is that it can be used to build your own languages (e.g. domain specific languages) with it as it comes with the tools and a community that has experience in it. https://beautifulracket.com/ https://beautifulracket.com/ There also is a great introduction to programming online course with Racket by Gregor Kiczales https://www.edx.org/course/how-code-simple-data-ubcx-htc1x https://www.edx.org/course/how-code-simple-data-ubcx-htc1x
- JadeNB 7y ago> There also is a great introduction to programming online course with Racket by Gregor Kiczales https://www.edx.org/course/how-code-simple-data-ubcx-htc1x https://www.edx.org/course/how-code-simple-data-ubcx-htc1x Probably anyone who would be interested knows it without its needing to be pointed out, but I mention in case it entices anyone that Gregor Kiczales is one of the authors of "The Art of the Meta-Object Protocol" (https://www.amazon.com/Art-Metaobject-Protocol-Gregor-Kiczales/dp/0262610744 https://www.amazon.com/Art-Metaobject-Protocol-Gregor-Kiczal... ; edited to remove abbreviation).
- jimhefferon 7y ago> The art of the MOP Please, what does that mean? I program in Racket, and have enjoyed the vidoes but googling this phrase suggests either Prof Kiczales likes to clean floors in an innovative way, or else he is a member of Hip-Hop group. I'm not finding either terribly credible.
- sea6ear 7y agoHe is the author of the book The Art of the Metaobject Protocol
- deleted 7y ago[deleted]
- seisvelas 7y agoRacket is great for web development, but it really shines for creating other programming languages.
- neilv 7y agoRacket is great for some kinds of Web development right now. (Maybe more later, with the development of additional toolkits, and/or maybe a WASM backend after the Chez work.) I've personally worked on a few industry Web "full-stack" projects in Racket -- including an important large server-heavy system that accomplished something on AWS that no one had yet done before, and a very complex data model HTML5 Offline app (which I did as a mixture of generated and Web services) -- that would not have been possible any other way with the developer resources available. I also used Racket for smaller Web tasks, as a researcher, to whip up a browser-based labeling UI for a large corpus (the corpus was also Web-scraped and massaged by Racket), and to save a big conference demo when the big Java server someone had made could not be deployed on the two-laptop LAN that would be available. But if a bunch of people hear "Racket is great for Web development" without being more specific, they will run to go look at it, then they will be confused, then they will run at you with pitchforks. Racket is potentially great for a startup doing a non-cookie-cutter MVP for which they'll have to be clever and invent some things in any case. But Racket is not going to be some variation on some currently-popular framework you already know (maybe it can be backend for one of the frontend frameworks), and you're going to have to write some code to do exactly what you want, not just glue together off-the-shelf components.
- seisvelas 7y agoI wrote a full feature search engine and web crawler in Racket and it had everything I wanted off the shelf; I was really wowed by how batteries included it was for web development. This was in 2013. It's definitely easier than Node, in my opinion.
- Y_Y 7y agoIt would be remiss not to mention that it's (somewhat) possible to write python in racket as a "hashlang" https://pkgs.racket-lang.org/package/python https://pkgs.racket-lang.org/package/python
- psychometry 7y agodustycloud.org is not an acceptable design... Seriously though, I hate having to resize my browser window in order to read something: http://webtypography.net/2.1.2 http://webtypography.net/2.1.2
- jrockway 7y agoWhat is your complaint? The text seems to expand to fill the browser window. So you set your browser to a comfortable size and then that website is a comfortable size "for free". That, to me, seems like a good thing.
- ptx 7y agoThat makes sense when (as in the old days) you have one window per web page, but most people these days have a single window (or a few) with lots of tabs inside that window. You don't want to adapt the window to one particular site when the window is shared for many other sites (for which that site's comfortable size might not be a comfortable size).
- macleginn 7y agoIt's partly compensated for by the fact that the pages plays well with the read-mode plugin in Firefox.
- psychometry 7y agoIf your design requires a plugin to be readable, it's a bad design.
- jrockway 7y agoSo you want websites to override your decision on window sizing and make the visible area smaller? That doesn't sound great to me.
- iso-8859-1 7y ago
- trurl 7y agoWhile I prefer my languages statically typed, if you're going to use a dynamically typed language, Racket is far superior to Python.
- oarabbus_ 7y agoBold statement
- spdegabrielle 7y agoBold, but true.
- oarabbus_ 7y agoCare to elaborate? Neither you or OP have backed up this rather large claim.
- paroneayea 7y agoRacket also supports several statically typed languages... look up Turnstile, Typed Racket, and Hackett
- JoelMcCracken 7y agoHackett really isn't yet usable for real programming. IDK about Turnstile, but I think Typed Racket is usable.
- paroneayea 7y agoHackett could really use some people who are excited about the intersection of lisp and haskell and want to build languages to join in on hacking on it :) I think there are quite a few of those people... maybe that gives some hope for contributions
- JoelMcCracken 7y ago
- leanthonyrn 7y agoWhat are the best library's for data science in Racket? -Finding it hard to step away from Julia when operate on a amazing large data file and not kill the CPU. How about packages to convert Racket to WASM?
- seisvelas 7y agoI'm a data engineer and avid Racketeer. Racket is not at all a satisfactory replacement for Julia if you are doing data science. Specifically if you use Flux, you should know deep learning tools are basically non-existent on Racket. Someone once made a paper called DeepRacket and a Github repo, but it hasn't been touched since. If someone out there knows more than I do please let me know because I'd love to be wrong. There is some decent linear algebra stuff, at least: https://docs.racket-lang.org/math/matrices.html https://docs.racket-lang.org/math/matrices.html Racket is both helped and harmed by it's popularity in certain academic circles. Harmed, in that a lot of graduate students make a thesis of creating some badass library in Racket only to completely abandon it. But I'm still really rooting for Racket, it deserves more hype.
- neilv 7y ago> Racket is both helped and harmed by it's popularity in certain academic circles. Exactly, in a few ways. One way is that a number of Felleisen's original grad students got professorships and kept doing systems research (and development) with Racket. But most contributors who don't get professorships, nor the handful of researcher jobs, end up working on other systems where the jobs are, academic or industry. Industry use tends to be one-person projects, often because you have a smart person doing something that can't be done with off-the-shelf (e.g., Naughty Dog's video game narrative DSL, a think tank researcher's work, some complicated data science server stuff that I worked on, and various indie moonlighting projects), and so one-person efforts aren't posting jobs. Bigger industry use would mean more contributors, but top programmers are generally ill-equipped for enterprise sales, so I'd bet on startup success stories to jumpstart greater popularity (even if you use Racket to beta, and then whatever you figured out gets rewritten in a popular commodity-worker platform).
- lunchladydoris 7y agoSince we're talking about Racket, don't forget that it's RacketCon this weekend: https://con.racket-lang.org/ https://con.racket-lang.org/
- darkpuma 7y agoI hope this year it's videoed well. In past years except the last it's been fine, but last year I'm guessing whoever normally does it wasn't available for 2018.
- paroneayea 7y agoIt's one person doing the recordings and has been the same the last few years iiuc. They were just under-resourced I believe, and last year especially. They're doing a damn good job given the constraints they've been putting things together under I think.
- regularfry 7y agoWhile I'm impressed with racket on the whole, I can't quite agree to be impressed by the GUI bits. They're extremely limited, and once I got away from "how do I put a button on the screen" I didn't find the underlying implementation lent itself to being extended. In particular the drag and drop system only goes as far as file drops, and I quite quickly hit a brick wall trying to add anything more interesting.
- darkpuma 7y agoIn principle you can get pretty far with racket/gui despite it's limited amenities because you can roll your own widgets with canvas. However I too ran into wanting to create a drag source (not merely target) for files and couldn't find a reasonable way. To be honest though, I think the biggest missed opportunity in racket is the single dispatch object system, used particularly by racket/gui. For some reason the core racket folks weren't smitten with CLOS and didn't go the Guile route of implementing something similar to it (Guile has GOOPS, which is related to Tiny-CLOS.)
- rscho 7y agoI suspect the main authors of the language did not implement multiple dispatch on purpose, as it leads to unsafe edge cases (see https://lexi-lambda.github.io/blog/2016/02/18/simple-safe-multimethods-in-racket/ https://lexi-lambda.github.io/blog/2016/02/18/simple-safe-mu...) A runtime multiple dispatch stub is available as a lib, though (https://docs.racket-lang.org/multimethod/index.html https://docs.racket-lang.org/multimethod/index.html)
- neilv 7y agoThat Racket class system isn't used much outside of the cross-platform GUI toolkit: https://news.ycombinator.com/item?id=20321095 https://news.ycombinator.com/item?id=20321095 The Racket class system has seemed fine to me for the GUI tookit (except for me not liking typing `send`). But if you find a limitation for that purpose, please post about it on the `racket-users` email list. The core developers are there. https://groups.google.com/forum/#!forum/racket-users/ https://groups.google.com/forum/#!forum/racket-users/ FWIW, Racket (when it was still PLT Scheme) got a tiny-CLOS-alike around the time that Guile got GOOPS: Eli Barzilay made Swindle: https://docs.racket-lang.org/swindle/ https://docs.racket-lang.org/swindle/ CLOS is neat, and I'd be interested to see someone make a CLOS (maybe including a MOP?) for Racket, atop the modern Racket `struct` and other features. (If you tune it, try tuning for the tentatively forthcoming Chez backend to Racket, rather than for the current JIT. IIRC, Swindle was written before the JIT.)
- pera 7y agoPyret is an even more acceptable Python: https://www.pyret.org/ https://www.pyret.org/
- skybrian 7y agoIt's designed for teaching, but I don't think it runs anywhere other than in a browser?
- zem 7y agoit doesn't :( it would have been my instant new favourite scripting language if it ran on the command line.
- AlexeyBrin 7y agoActually it does, you can run it from Node.js https://github.com/brownplt/pyret-lang https://github.com/brownplt/pyret-lang and use it as a scripting language.
- AlexeyBrin 7y agoYes, you can run it from Node.js https://github.com/brownplt/pyret-lang https://github.com/brownplt/pyret-lang and use it as a scripting language.
- nikofeyn 7y agomy understanding is that that will change. it's just that pyret's current primary use case (education) demanded that it run in the browser first.
- nickmain 7y agoPython runs on iOS, Racket does not. The need for a JIT to make Racket performant also makes it unlikely that it ever will.
- peatmoss 7y agoAs Racket moves to Chez Scheme as its back-end, I believe it’s not JIT but natively compiled: https://en.wikipedia.org/wiki/Chez_Scheme https://en.wikipedia.org/wiki/Chez_Scheme EDIT: it should also allow Racket to be ported to more backends because the move to Chez is meaning more of Racket is implemented in Racket.
- darkpuma 7y agoIf you want a lisp on mobile kick, I've heard good things about lambdanative. It would still be cool to have racket mobile apps though.
- mark_l_watson 7y agoI have only looked at the code and built the demos for lambdanative, but from what I have seen if I had to write mobile apps then I would seriously consider it. It is built in the excellent Gambit Scheme.
- hajile 7y agoI believe Lispworks supports iOS and Android. Since they compile natively, there's no JIT issues on iOS.
- KirinDave 7y agoYou could just do what Python does and accept your language runtime is unbearably slow?
- lkirk 7y agoA big use case for python is glue for high performance c/c++ code. How is racket at this? Also, is there a cython alternative for racket? I would also argue that, though racket may have more batteries included, there are definitely not as many externally developed libraries. Especially important are numpy/scipy/pandas/pysam, the list could go on... That's not to say that I'm against racket, I really like the language and its level of design and documentation.
- paroneayea 7y agoThere's a nice FFI for C stuff, but writing glue for C++ is more work.
- deleted 7y ago[deleted]
- alexhutcheson 7y agoFFI into C++ is a lot of work in any language. A lot of projects just define a plain C wrapper for the C++ code they want to call, and call that C code from whatever their glue language is. However, Python does have CLIF[1], which is the nicest solution for calling into C++ that I'm aware of. [1] https://github.com/google/clif https://github.com/google/clif
- jdc 7y agoHave you seen cppyy? https://cppyy.readthedocs.io/en/latest/ https://cppyy.readthedocs.io/en/latest/
- alexhutcheson 7y agoNot in enough detail to have an informed opinion.
- winter_blue 7y agoThere's also Boost.Python, which boasts "seamless interoperability between C++ and Python": https://www.boost.org/doc/libs/1_70_0/libs/python/doc/html/index.html https://www.boost.org/doc/libs/1_70_0/libs/python/doc/html/i... (In general, the Boost C++ libraries are well-renowned in the C++ world.)
- F-0X 7y agoAn _acceptable_ python!? More like Python is an unacceptable Racket. Racket is an absolute joy to use.
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- taloft 7y agoIf racket is an acceptable python and python is an acceptable lisp, then racket must be an acceptable lisp?
- deleted 7y ago[deleted]
- hatmatrix 7y agopython's not an acceptable lisp - no metaprogramming; no macros
- ZephyrP 7y agoHe's making reference to Steve Yegge's riff on Eric Kidd's post, which kicked off the whole "Are Xs acceptable Ys" blogpost template.
- em-bee 7y agothat would be funnier if racket wasn't already an acceptable lisp ;-)
- inputcoffee 7y agoI am always confused when people talk about the language itself. In my experience, python is used for Tensorflow, or Pandas, or Django, or Flask, or pytorch or something else that runs on top of it. Sometimes it is even more specialized and I need a wrapper for an API to let me talk to some web data. Maybe I need a crawler/scraper and a parser. There is a specialized language on top of the language. So when someone says, oh this language is better with objects, or has some syntax thing or the other, or I can reason about it I am left confused. Its like if I were talking to a professional shoe designer and I ask for hiking boots and they tell me that they're really into having at least two tones to offset the lace and the heels or something. What am I missing? I want to reason about the language too, but doesn't that pale in comparison to being able to run a specialized library?
- j88439h84 7y agoFlask equivalents exist in every language. Tensorflow bindings are available in many. Pandas is more specific to Python, but using dataframes in Python vs R vs Julia each has a different feel.
- inputcoffee 7y agoTrue, if we were talking about Data science, and you were bringing up Python or R or Julia, fair enough. But if you're talking about Racket, I would want to know what you can do with it. Does it have a data science library? A web app framework?
- j88439h84 7y agoSome task-language pairs work better than others, either because of the libraries or the language features or both. Libraries make Python better than Lisp for machine learning. Language features make Haskell better than Python for formal verification.
- kazinator 7y agoYou're missing that people write mountains of code in Python and similar languages; they are not always just for a small amount of glue to gain access to some specialized libraries.
- kazinator 7y agoI've been making a language called TXR for ... oh, ten years this coming August now. It combines a Lisp dialect ("TXR Lisp") with a whole-document pattern-based extraction language ("TXR Pattern Language"). It takes the form of a simple executable with a few satellite files in your /usr/share. Lots of "batteries" are included in TXR Lisp: object system with static and instance slots, single inheritance, GC finalization and a form of RAII, exception handling, delimited continuations, byte code compiler for virtual machine, file compilation, macros (of course), regexes, built-in lazy lists, a fantastic set of macros for partial application, a comprehensive declarative FFI, good amount of POSIX wrapage built-in, a decent REPL with history, completion, multi-line editing, visual copy-paste, ... TXR Lisp has a concept similar to CL's "generalized places" implemented differently. It supports Lisp-1-style evaluation (higher order functions used without a funcall operator), in the middle of a Lisp-2 substrate. Traditional list operations are generalized so they work on other sequences; you can mapcar over a string and such. Link: https://nongnu.org/txr https://nongnu.org/txr
- GordonS 7y agoYou didn't include any links - is it public?
- deleted 7y ago[deleted]
- 6thaccount2 7y agoFirst of all, thanks for doing this and making it free. I do a lot of shell based work (Linux commands, Awk, Python, Perl, and Powershell) and Lisp has always interested me, so this may scratch an itch. How easy is this to get setup? Just a few binaries? Also, one barrier to me has always been learning lisp as it is very different from most traditional scripting languages. I took a look at your examples and it looks neat, but a little complex. Is there a tutorial document that goes over the main functionality and commands. Like with Linux, knowing grep,cut, sort, uniq, cat, and a few others can take you a long way. I should add that although I haven't coded enough lisp to get competent, I've read two books on Common Lisp and have played with Chez Scheme, Racket, and Clojure...so I get the concepts with CONS/CAR/CDR...macros...etc.
- nixpulvis 7y agoI'm quite glad my freshman material was in Racket and not Python. I'm sad to hear some educational programs like MITs are moving the wrong direction here.
- neilv 7y agoI think MIT people had their reasons for "rethinking" and trying out Java, and then Python. One of the factors I recall was a perceived changing nature of CS practice (moving to assembling from components, rather than understanding&building from the ground up), but I can't properly represent all of the rationales here. Fortunately, the MIT SICP authors made the book freely available, so anyone can continue to work through it, as a complement to our other learning opportunities. And Racket's `#lang` support is helping to keep the particular Scheme dialect and library used by MIT SICP running on all the currently popular desktops (Unixes, Macs, and Windows): https://pkgs.racket-lang.org/package/sicp https://pkgs.racket-lang.org/package/sicp
- nikofeyn 7y ago> I think MIT people had their reasons for "rethinking" and trying out Java, and then Python. One of the factors I recall was a perceived changing nature of CS practice (moving to assembling from components, rather than understanding&building from the ground up), but I can't properly represent all of the rationales here. i really don't fully understand their rationale. as i understand it, just at the time that abelson and sussman grew tired of teaching the course, mit felt the need to restructure their curriculum to meet modern demands and changes in software engineering. of course, things have transitioned from building things up to "poking", but i feel many of the principles of sicp remain unchanged. but even ignoring that, i feel mit made a crucial mistake, in my opinion. mit is a research and education institute. as a programming language, python is not uniquely suitable for computer science research other than its machine learning and data science library support. i feel it is also not suitable for education either, especially not in the same way a lisp or scheme is. python is what is given to you and thus makes it difficult to explore and implement other paradigms of programming and other ideas in the same language like lisp and scheme can do, and certainly not in the way racket can. now, right next door to mit is northeastern, one of the major racket hubs. racket is a re-envisioned scheme and programming language. it is very much suited to computer science research, building languages for teaching and education (for example, pyret was originally implemented as a racket language), and comes with plenty of library support for general purpose programming. so other than having a lack of libraries for machine learning, data science, and scientific computing, it beats python in every category of comparison. and mit's own language, julia, takes care of those missing components. there's no reason why mit couldn't have developed libraries and teaching packages in racket for their courses. so imagine if mit had chosen racket as their language. that would bolster racket development and popularity. it could have created a bridge between northeastern and mit and would have taught racket to the thousands of mit students and online students. it could have been a huge leap for racket in terms of popularity and use. and mit could have grown to be an additional hub for racket research and development right next door. and also, racket is an evolution of the scheme language, which would have been a perfect segue from the old curriculum. but no, mit chose a language that was invented over a period of a couple weeks by a stubborn guy who wanted to replace perl. i strongly suspect that there were political and monetary reasons to choose python. and mit probably has a chip on its shoulder, like it does with everything. mit has also become a university driven by the need to raise money, and i think it has gone all in on taking all the machine learning and "ai" money it can. that later point is probably the real reason.
- zmmmmm 7y ago> But I missed parentheses. I longed for parentheses. I dreamed in parentheses I'm honestly kind of scared to ever learn a Lisp because it seems it permanently alters your brain to the point where it damages your ability to program in other languages (aka ones that you can responsibly use in an organisation can't rely on niche skill sets).
- darkpuma 7y agoMy friend offered to grill me a hamburger last Saturday when we were hanging out in his backyard, but I politely declined. His burgers look desirable, but I explained my concern that tasting one of his burgers might permanently diminish my appreciation of Big Macs. And besides, I can buy a big mac anywhere in the world except north korea, so really that's a more pragmatic preference. Well I thought I was being diplomatic, but my friend just shook his head and called me a moron. Can you believe the nerve of some people? (I don't think Lisp damages your ability to program in other languages. But I do think it puts those other languages into context and that context often makes other languages worse than they did before.)
- ASoothingEbb 7y agoIf I were forced to live in Plato's cave, I would rather have no knowledge of anything outside of it. Many people are locked into an ecosystem by, for example, employment. Why make yourself less happy with the tools you need to use if doing so is for no other benefit? Ignorance can be bliss.
- yen223 7y agoIt wasn't that long ago that Python was that weirdo language that made its practitioners unemployable.
- dragonwriter 7y ago> Many people are locked into an ecosystem by, for example, employment. Why make yourself less happy with the tools you need to use if doing so is for no other benefit? Because there is another benefit—what your job required today may not be what it requires tomorrow, and having your head stuck in the sand about everything outside of your current job requirements means your in the worst possible position when that kind of change happens.
- nimmer 7y agoI find Nim to be much closer to a statically typed Python - with the speed of C.
- treeofwife 7y agoNot really sure how this is relevant here, judging by your post history and username you seem to have a one track mind... Maybe if you provided some examples of how Nim compares to Python or Racket, weighing the pros and cons, etc, I wouldn't assume you're only here to shill Nim. Edit: Anyone care to explain why my post is flagged and the parent comment isn't? I would like to keep the discussion on topic...I didn't think I was being too harsh.
- dang 7y agoYour comment broke several of the site guidelines. That's why comments get flagged here. Would you mind reviewing them and sticking to the rules when posting to HN? https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- charlieflowers 7y agoSay your task was to read metadata about rest api endpoints and generate an sdk in c#. Would racket’s LOP features make it compelling? Or would you be more inclined to build it in c# since that is the target language?
- thothamon 7y agoFor my money, to be an acceptable Python, you have to be able to use the Python numeric, scientific and machine learning libraries -- or have other libraries that are just as good or better. That is the number one reason I would use Python in the first place.
- epr 7y agoRacket is great if you are looking for a high quality general purpose language, but if you want to use important python libraries for pythons's popular use cases: numerical/scientific computing, data science/ai, etc., then Hylang is a drop-in replacement with the added benefit of Metaprogramming facilities (Lisp-2 macros) and Clojure-like semantics. Python and Hy have 100% interoperability. Python can call Hy out of the box, and Hy can call Python out of the box. Any Python programmer can pick up Hy basics in minutes, and will be productive in a matter of hours. If you are an intermediate level Python programmer and have experience with Lisp macros, you will be writing macros in no time as well. Writing macro wrappers for numerical/scientific applications can increase your code's signal to noise ratio by quite a lot. docs: http://docs.hylang.org/en/stable/ http://docs.hylang.org/en/stable/ github: https://github.com/hylang/hy https://github.com/hylang/hy get it: pip install hy
- thanatropism 7y agoThis is amaazing! Thanks for relaying this information.
- nonbirithm 7y agoActually Hy is mentioned in the article, though the author found it didn't fit his usecase. > Alas, Hy didn't really reach my dream. That macro expansion made debugging a nightmare as Hy would lose track of where the line numbers are; it wasn't until that when I really realized that without line numbers, you're just lost in terms of debugging in Python-land. That and Python didn't really have the right primitives; immutable datastructures for whatever reason never became first class, meaning that functional programming was hard, "cons" didn't really exist (actually this doesn't matter as much as people might think), recursive programming isn't really as possible without tail call elimination, etc
- epr 7y agoDebugging macro expanded code is definitely the number one pain with Hy, although a somewhat workable solution is to view the output of hy2py (comes with hy). As far as the lack of functional programming semantics go (no tail call elimination is very sad indeed), there is no denying that either, but considering the applications I am recommending (c/c++ inter-op with python wrappers), you are hardly working in a functional domain in the first place.
- nafizh 7y agoHow is the scientific computing/machine learning ecosystem for Racket? Looking for suggestion from people who are experienced.
- sriharis 7y ago> "Lisp is too hard to learn" is a lie; if middle schoolers can learn it, so can more seasoned programmers. Please, some famous, authoritative figure, say this out loud. I'm running out of ideas to convince people of this.
- mx06v 7y agoIt might be off-topic. I see there's racket in techempower framework benchmarks [1] but I can't find racket from round 18 results [2], is it too slow? [1] https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/Racket https://github.com/TechEmpower/FrameworkBenchmarks/tree/mast... [2] https://www.techempower.com/benchmarks/#section=data-r18 https://www.techempower.com/benchmarks/#section=data-r18