Hacker News new | past | comments | ask | show | jobs | submit login

I have to type this as a quick stream right now.

> 1. Encourage efficient data structures by default. I know lists are the soul of lisp but it's not good to use lists for everything. Clojure by default let you use highly optimized persistent data structures -- namely vectors and hash maps. These two data structures are highly practical, performant in most of the cases.

Scheme has vectors, and Racket adds hash tables and structs:

https://docs.racket-lang.org/guide/vectors.html https://docs.racket-lang.org/guide/hash-tables.html https://docs.racket-lang.org/guide/define-struct.html

There's also some work on matrices and arrays (beyond Scheme vectors): https://docs.racket-lang.org/math/index.html

There are some older libraries where lists (or alists) are used, when today you'd probably use hashes or structs. We could consider this an educational opportunity: there are still times when knowing how to do old-school list-processing is exactly what you need, and it's pretty fundamental data structures (e.g., singly-linked lists, trees), so we could consider it practice. :)

BTW, one difference between modern Racket lists and Scheme's is that Racket's default pairs are immutable. This turns out to be useful for optimizations, as well as encourage a healthy amount of functional programming.

Regarding #2, good point. I raised the WASM issue a couple years ago, and my thinking then (and now) is to build it for the forthcoming Chez backend, while getting plugged into the WASM standards work in the meantime. There are various ways to do JS with Racket (a big HTML5 Offline app of mine does it by generating JS and HTML from Racket), but WASM seems most promising.

Regarding #3, if Geiser works for you, great. You might also take a look at Greg Hendershott's racket-mode for Emacs: https://github.com/greghendershott/racket-mode

I appreciate that DrRacket's student-emphasizing IDE is very different than most IDEs, and it's missing some things I'd like, for editing many modules at once. If you're up to adding some features you'd like, there's an extension mechanism, and you can also do git pull requests to the DrRacket source itself. https://docs.racket-lang.org/drracket/extending-drracket.htm... https://docs.racket-lang.org/framework/index.html

Regarding #4, there are Web frameworks, and the main Racket Web Server (which you don't have to use; you can also do things like SCGI or proxy another HTTP server implementation), and you can also whip up your own frameworks very rapidly in Racket unlike many languages. I'm hoping a couple startups use Racket to get to launch, and release the light frameworks that they make along the way.

Regarding reader extensions, Racket has those, as well as a ton of great syntax extension mechanisms: https://docs.racket-lang.org/guide/hash-reader.html




An addendum to point 3:

Racket has an AMAZING debug instrumentation & tracing library, which, unfortunately, most people don't know about:

First, there's Medic:

Source: https://github.com/lixiangqi/medic

Docs: https://docs.racket-lang.org/medic/index.html

Demos: https://www.youtube.com/playlist?list=PL_U7i0VKF_mh7Vh3o2Yyt...

Paper: https://www.cs.utah.edu/plt/publications/fpw15-lf.pdf

Li, Xiangqi; Flatt, Matthew - Medic: Metaprogramming and Trace-Oriented Debugging (2015)

Building on top of Medic, but unfortunately still not packaged (unlike Medic), Li & Flatt developed (the somewhat ill-named, due to that name overlapping with something from the cryptocurrency crowd) 'Ripple', which makes debugging Domain specific languages a lot slicker:

http://www.cs.utah.edu/plt/publications/sle17-lf.pdf

Li, Xiangqi; Flatt, Matthew - Debugging with domain-specific events via macros (2017)

There's a YouTube demo here:

https://www.youtube.com/playlist?list=PL_U7i0VKF_mjF_SMiPbz-...

The published version of the above paper sits behind an ACM paywall, however, the download of the 'artifact' is open/free…:

https://dx.doi.org/10.1145/3136014.3136019

…and currently unfortunately represents the only way one can acquire the Ripple source code - and the artifact consists of a 2.4GB VM! :| (I understand why, and I consider it good scientific praxis - but I'd still appreciate a public repository in addition.)

Direct link to the artifact, for the impatient:

https://dl.acm.org/ft_gateway.cfm?id=3136019&type=zip&path=%...

Note that the artifact actually contains two very slightly different versions of the Ripple source code, a diff of which I posted over here on Github:

https://github.com/vygr/ChrysaLisp/issues/5#issuecomment-424...

(it's a two line difference in main.rkt)

If you do any of the in Racket, I can most highly recommend giving Medic (and Ripple, if you need it.) a try!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: