4 ms·
Racket is a fun language. My university uses the bundled teaching languages for first year CS courses. Some people really hate it, and others silently like it.
by varun_ch 11mo ago
Racket is a fun language. My university uses the bundled teaching languages for first year CS courses. Some people really hate it, and others silently like it.
- epolanski 11mo agoAnd all of them agrees to never use it after university, which is quite telling.
- Zambyte 11mo agoAgree? Or maybe none of them graduate into a role where they get to decide what language to use?
- dleary 11mo agoEveryone gets to choose which language they use for their personal projects. Where are all the Racket personal projects? N.B. I say this as someone who personally contributed small fixes to Racket in the 90s (when it was called mzscheme) and 00s (when it was called PLT-Scheme).
- linguae 11mo agoI view Racket as an academic language used as a vehicle for education and for research. I think Racket does fine in its niche, but Racket has a lot of compelling competitors, especially for researchers and professional software engineers. Those who want a smaller Scheme can choose between plenty of implementations, and those who want a larger language can choose Common Lisp. For those who don't mind syntax different from S-expressions, there's Haskell and OCaml. Those who want access to the Java or .NET ecosystems could use Scala, Clojure, or F#. There's nothing wrong with an academic/research language like Racket, Oberon, and Standard ML.
- zelphirkalt 11mo agoI wish Standard ML had a strong ecosystem and things like a good dependency manager/package manager. I really liked it. But there is even less of an ecosystem around it than some other niche languages, and I've gone into the rabbit hole of writing everything myself too often, to know that at some point I will either hit the limit of my energy burning out, or the limits of my mathematical understanding to implement something. For example how to make a normal distribution from only having uniform distribution in the standard library. So many approaches to have an approximation, but to really understand them, you need to understand a lot of math. Anyway, I like the language. Felt great writing a few Advent of Code puzzles in SMLNJ.
- shawn_w 11mo agoRacket is my first choice for most code I write these days and I've published a fair number of libraries into the raco package manager ecosystem in hopes other people using Racket might find them useful too.
- velcrovan 11mo agohttps://defn.io/page/projects/ https://defn.io/page/projects/ https://joeldueck.com/projects.html https://joeldueck.com/projects.html
- alcidesfonseca 11mo agoIf it taught them the core concepts of writing good software, that's a win in my book.
- deleted 11mo ago[deleted]
- linguae 11mo agoI admit I'm one of those students who never used Racket in a non-academic setting (but mostly because I needed to contribute to already-existing projects written in different languages), and I was taught Racket from one of its main contributors, John Clements at Cal Poly San Luis Obispo. However, learning Racket planted a seed in me that would later grow into a love of programming languages beyond industry-standard imperative ones. I took a two-quarter series of classes from John Clements: the first was a course on programming language interpreters, and the second was a compilers course. The first course was taught entirely in Racket (then called DrScheme). As a guy who loved C and wanted to be the next Dennis Ritchie, I remember hating Racket at first, with all of its parentheses and feeling restricted by immutability and needing to express repetition using recursion. However, we gradually worked our way toward building a Scheme meta-circular evaluator. The second course was language-agnostic. Our first assignment was to write an interpreter for a subset of Scheme. We were allowed to use any language. I was tired of Racket and wanted to code in a much more familiar language: C++. Surely this was a sign of relief, right? It turned out that C++ was a terrible choice for the job. I ended up writing a complex inheritance hierarchy of expression types, which could have easily been implemented using Racket's pattern matching capabilities. Additionally, C++ requires manual memory management, and this was before the C++11 standard with its introduction of smart pointers. Finally, I learned how functional programming paradigms make testing so much easier, compared to using object-oriented unit testing frameworks and dealing with mutable objects. I managed to get the project done and working in C++, but only after a grueling 40 hours. I never complained about Racket after that. In graduate school, I was taught Scala and Haskell from Cormac Flanagan, who also contributed to Racket. Sometime after graduate school, I got bit by the Smalltalk and Lisp bugs hard....now I do a little bit of research on programming languages when I'm not busy teaching classes as a community college professor. I find Futamura projections quite fascinating. I'm glad I was taught programming languages from John Clements and Cormac Flanagan. They planted seeds that later bloomed into a love for programming languages.
- kbutler 11mo agoTo be fair, "write an interpreter for a subset of scheme" is a core use case for lisp-family languages. If it had been,"write a real-time driver for a memory-limited piece of hardware", you may have had a different preference.
- skanaley 11mo agoI use it professionally. My favorite is its seemingly complete lack of bad behavior: "3" + 1 is neither "4", "31", nor 4. It's illegal. 0 is not false, causing endless confusion on filters and &&s. For loops don't alter the iterated value within a closure to the max value when it's finally called. And some positives: Immutable/functional is the default, but mutability is easy too. Nice optional, keyword, and variable arity support. Straight forward multithreading, semaphores, shared state, and unshared state. Excellent module system: - renames both in and out, including prefixes, all applied to arbitrary scopes of identifiers (I may be using inaccurate terminology) - nested submodules - automatic tests and/or "main" submodules .....etc....... If I could be grated a wish though it would be for nice struct syntax, but I think that's in Racket's successor Rhombus; haven't personally tried it yet. I also sometimes wish it was slightly Haskell-ier in various ways, as did the talented individual who created Hackett. If I were to guess why it's not used, it's because it's not used, which has a kind of downward-spiral force thing going on with it. If you're a random guy in charge of 200 dudes at BigCo, your first thought probably isn't "We should rewrite this whole thing in Racket!", it's probably more like "We should fire everyone and have Claude rewrite our codebase into Rust!" and tell your boss you saved 200*0.5M a year and ask for a comparative bonus. But if you're solo and in charge of designing, implementing, and maintaining a system with 1 or 2 people over the next 20 years, you can use whatever language you want, and Racket's a pretty good choice.
- samdphillips 11mo ago> nice struct syntax I am curious how you would change the struct syntax?
- skanaley 11mo agoI don't have the creds to give a definitive answer, but I like C structs, JS dicts, Java object access, Haskell lenses, etc -- any kind of dot syntax. Default Racket: (potato-skin-color apotato) JS: apotato.skinColor The extra potato upsets me. Some libraries exist to address this but I believe they all have caveats. With copying or mutation, it's even worse: Racket copy: (struct-copy potato apotato [skin-color 'brown]) Racket mutate: (set-potato-skin-color! apotato 'brown) JS copy: { ...apotato, skinColor: 'brown' } JS mutate: apotato.skinColor = 'brown' None of this really ruins the language for me, considering pros vs cons as a whole, but sometimes I'm slowed down in that by the time I finish mentally spelling out and typing the struct accessing I half forget the context I was in, and in general I'm sensitive to "eye bleed". Sometimes Racket looks like: (define define match-define define define-values define begin cond define define) when the real meat of the algorithm is more like: cond ...and where Haskell's "where"s, "|"s, and "="s shine. I'm sure I've over-answered your question but it's the holidays and I'm bored :) edit: Since Racket uses dot already, it would probably have to be a different character, or the other way around.
- zelphirkalt 11mo agoSometimes it takes a couple of years, before a seed grows. I for one had a professor, who said: "I am not here to teach you C or Java. I am here to teach you computer programming." and then went on to take us on a tour through various paradigms, and included Prolog, back then Dr.Scheme (which turned into Racket), C, Java and Python. At the time I didn't understand Scheme at all. Didn't understand the idea of passing a function as an argument, so deeply rooted in the imperative world I was. But a couple of years later, I came upon HN and comments mentioning SICP ... Didn't that professor teach us something about that? What if I took a look and started learning from this book everyone is recommending? And there it was. I worked on exercises of SICP and finished approximately 40% of the book's exercises and had a very solid grasp of Scheme and Racket, and any hobby project I would take out Racket to try and build it. Along the way I learned many things, that I would still not know today, had I stuck with only mainstream imperative languages. I wouldn't be half the computer programmer, that I am today, without going the SICP and Scheme way. I also worked through The Little Schemer. What an impressive little book it is! So it is far from what you claim. In fact even a little exposure to Scheme once upon a time can make all the difference.
- pjmlp 11mo agoUniversity is to open the people's horizons, to learn how to learn, too see computing systems in action that most people on programming bootcamps never deem possible, unless they are curious to learn about computing history.
- jambutters 11mo agoWhat was the name of the class?
- Jtsummers 11mo agoIt's likely following HTDP: https://htdp.org/ https://htdp.org/
- chongli 11mo agoMight have been Waterloo's Introduction to Functional Programming (CS 135). I have TA'd (technically ISA'd) that course several times and helped countless students in office hours. The struggling students didn't just hate Racket, they hated the whole HTDP philosophy of following a "design recipe" and writing documentation prior to implementing a function. Most of those struggling students essentially waited till the last minute to do the documentation, completely flouting the intention of the course. I don't know if the strong students had the intended approach since they were never in office hours asking for help!
- nish__ 11mo agoI loved that course so much. I remember some seemed to hate it because "when are we ever going to use Scheme in real life?"
- chongli 11mo agoI really loved the course too. That's why I kept working for it! It always made me sad when students hated the course, which was most of the ones I met in office hours. I think the students who really loved the course did well enough that they didn't come to office hours, so I never met them!