Racket 8.1
blog.racket-lang.org
blog.racket-lang.org
I think the reason was because it came with batteries included and I could create complex applications using only the standard library or very few packages.
All my other previous attempts at using functional languages, like for instance Haskell, ended up in trivial applications, usually based in numerical analysis.
1. Gemini server with tons of features, that I use personally:
2. Graphical Gopher browser:
It's a claim that the standard language distribution is sufficient to accomplish common goals of new users, without hunting down additional libraries or tools.
As you say, the Python community coined the term, but their notion of its meaning perhaps slants a little too far towards their language distribution's strengths (standard library) and maybe suffers from lacunae towards their language distribution's weaknesses (a clearly-articulated way to create a GUI executable using the standard language distribution).
For one, it has a platform-independent GUI library as part of the standard library, which Python (like most other programming languages) hasn't. That makes it interesting for writing GUI applications or using it for experimental programs which might require )or benefit from) a GUI later.
Racket has also a standardized package management, which is much easier to use than the different Python facilities.
Racket has a much better performance compared to Python and that in turn makes it possible to implement many algorithms directly in Racket which would be a C extension in Python, which makes it more complex to use them.
Another thing is that Racket, as a member of the Lisp family, has also a deep low-level support. For example, it supports multi-threading with both green threads and os-level threads, futures, synchronization, making it possible to write parallel algorithms, which isn't practically possible in standard Python.
Then Python, which stuck. I tried various lisps, Haskell, Ruby, Lua for scripting, and kept returning to Python.
I realized Python was truly boring, and I needed scripting to be fun, to keep my interest up. I relearned Ruby. Ruby is fun.
http://www.randomhacks.net/2005/12/03/why-ruby-is-an-accepta...
> The Python source distribution has long maintained the philosophy of "batteries included" -- having a rich and versatile standard library which is immediately available, without making the user download separate packages. This gives the Python language a head start in many projects.
I tried reading the official docs, but while they're great for reference, probably not the best in terms of tutorials/learning.
The community isn't the largest, but you can still get an answer to the questions that you have, and having a GUI built in the standard library (which is rare amongst Schemes) allowed me to do some pretty cool things like implement Conways game of life https://gitlab.com/diegocrespo/conways-game-of-life/-/tree/m....
Congrats on the release!
It's definitely on my to-read list. Thanks for sharing!
> Write your next Ethereum Contract in Pyramid Scheme
> I create Pyramid: A dialect of the Scheme programming language that targets the Ethereum Virtual Machine(EVM). Pyramid Scheme is implemented using the appropriately-named Racket.
http://www.michaelburge.us/2017/11/28/write-your-next-ethere...
He acknowledged that Racket has excellent documentation, a wide-ranging toolset, etc. All the good stuff you've heard elsewhere.
He criticizes the language-oriented model (in comparison to languages that people are familiar with but that allow embedded Deals, like Lua or Ruby) because creating a new DSL is antithetical to code that communicates with other programmers. This is fair, and a common criticism of Lisps: the complete freedom of the macro system means that individual programmers can create their own dialects quite easily, and other users of that code have a harder time working with it than in languages where there's not as much metaprogramming.
On the "toxic" front, one of the core team apparently asked a waitress a cringy question about higher education, referred to some other educators (at the creator's institution) as doofuses and the like, and was arrogant.
And at the end of it all, though he doesn't see a use for Racket's language-oriented model, he recommends learning and using it.
DSLs communicate wonderfully with the business users paying for the program. It also allows a programmer to match the jargon / industry speak used by the users.
I know that Cadence's ASIC design tools are based on a custom Lisp dialect. I've seen a presentation at a Lisp conference from an architect who was representing myriad building regulations as Lisp expressions e.g. minimum clearance between toilet and bathroom door. There was another presentation about Lisp software for simulating aircraft engine performance based on various input parameters.
I don't know how close these applications are to Racket's ideal but I imagine they're somewhere on that spectrum.
If you start talking to older architects and civil engineers who where active in the early to mid 90s, you'll be surprised how many of them know (or at least knew) Lisp.
An ingredient that may contribute to judgment of this video testimony, is that the same person that describes this toxic environment accuses someone providing a different personal impression of the community of engaging in "micro-agression" in the video comments.
Oh, I whish ruby had a more formal way to switch to DSLs - I love ruby, but can't stand meta-heavy/DSL-heavy subsystems. The rspec test system is a prime example (saved to some small degree by its excellent and detailed documentation): https://rspec.info/
PS : what happened to the "you can't make a web app in Racket" part?
I really don’t know what this guy’s talking about in other comments. Web apps seem super easy to put together in Racket. For those curious, see:
https://docs.racket-lang.org/web-server/index.html
https://docs.racket-lang.org/continue/index.html
(The troll also acknowledges that Arc is a neat language— apparently, they think that racket is a terrible language to write bad applications, but I guess it’s good enough to write a language to write good web applications in!)
(I have heard a Racket described as the “second best programming language, the best programming language is the one you use Racket to build!)
[1]: http://arclanguage.org/install
[2]: https://beautifulracket.com/appendix/why-lop-why-racket.html
That the outputs look very good may be correlated with the author and other prominent users caring for typography and web delivery.
As-is, my impression is that generation of multiple pages seems slower than scribble/manual, but the community has been exploring use of databases to speed up caches. In this respect, I've been eyeing the work of this member in particular: https://github.com/otherjoel
All this speaks very good of the seemingly limitless flexibility of the Racket ecosystem.
Add to that some better facilities for mixing languages and it is a very nice language that is very close to racket. Yet for some reason I find guile more fun.
> immutable strings (which racket has not)
The reader makes strings in the sour code immutable by default. And if you have a mutable string you can use string->immutable-string https://docs.racket-lang.org/reference/strings.html#%28def._...
Maybe web services? https://youtu.be/ZvwE6_MMJjM
I'm a newb to the paradigm, but fiding it useful to understand Javascript better.
Thanks.
The repl is about on par with readline but with fancier output. Stuff like images and what racket calls "snips" are directly displayed in the repl. Snips implement their own rendering and interaction handling so you can do stuff like animation, plot charts, display an interactive map, etc. What I feel like it's missing is a way to collapse output/results like the console in firefox/chrome does and a way to reference the previous results (beyond just hitting the ctrl+up keybind) like in ipython.
There's a solid debugger and a tool to show each step of macro expansion if you need that while writing macros. Package manager is integrated into the editor. Autocomplete, syntax highlighting, auto indent/reinvent are all present and are fine.
It's got a bunch of little nice things like when you mouse over an identifier it draws an arrow to the where it was bound or required from a module. The reverse works too so you mouse over a binding/require and get arrows showing all the occurences. Another little thing is that it will automatically input the correct closing paren depending on context so if you're typing "(foo [bar (baz" and you then type ")" three times it'll input ")])".
That's useful for teaching but I think it might also be very handy for data visualization and symbolic representations. Perhaps even for debugging with complex data structures. I think this is a mayor innovation.
Clojure and Racket have quite a few similarities. They are both relatively minimal, and are both Lisp-1 (https://clojure.org/reference/lisps).
Racket as a Scheme has a stronger separation between compilation and run time, in order to maintain safe semantics. This has an effect on interactivity which is an important difference between Schemes and Lisps. It is easy to redefine a function in a running Clojure program and call into it without re-starting the whole program. In Racket, one does more often re-start a program.
Clojure is heavily opinionated towards functional programming. For example, all sequences are evaluated lazy, while Schemes do not do that by default. This is something it has in common with Haskell. But I also think this might be one of its many adaptations for use as a language in server and back-end environments, where sequences can become very large. These adaptations make Clojure very good for concurrency but less well-suited for true parallelism. It generates also slower code than Common Lisp.
Clojures standard implementation is tied to the Java virtual machine. This has advantages and disadvantages: A very large library of functions which programs can call into. Worse stack traces. Error reporting is limited in comparison to Common Lisp. No continuations like in Scheme. And it is much harder to call into C code when this is needed for speed, for for calling into system functions.
In Racket, it is easy to call into C code and to call into Rust code with C ABI. That means Racket can be used as a glue language, like Python (however it is not made for being embedded into C/C++ programs, that would be a flagship application for Guile).
Clojure programs have a large start-up time of potentially several seconds which is irrelevant for servers, but make int unsuitable for scripting (well, there is babashka, a Clojure implementation which improves on that https://github.com/babashka/babashka).
All in all, Clojure is fantastic for programming for the server and for concurrent tasks, and for learning functional programming.
Racket on the other hand is well suited for beginners, it has a large and well-rounded standard library and a lot of useful packages. It is easy to write a GUI with it, it is good for easy scripting, interacting with the OS, writing experimental algorithms, like Python very suitable as glue and so on.
Also, because Racket belongs to the Scheme family, if needed there is a whole host of Scheme implementations which can be used for any special needs, with very little change in the base language, so in that way Racket is one versatile power tool in a quite large tool shop.
There are also applications where I think Common Lisp is probably the best choice: Very mature implementations, very stable, availability of compilers which generate very fast code, especially a high performance in numerical algorithms, good imperative capabilities where they are needed, fastest start-up for scripts, very good documentation and books, independence from particular vendors or projects.
Edit: Found the relevant part of the docs[1], I like the automatic contract enforcement, although I guess it would be kinda hard to guess the perf impact...
[1] https://docs.racket-lang.org/ts-guide/typed-untyped-interact...
Typed-racket has some form of refinement types now as well.