6 ms·
Racket mode for GNU Emacs
- mijoharas 12y agoFirst off I want to commend the author for making this. Secondly, while I realise it says: > If you've used other Lisps and Schemes before, you may prefer Geiser, which is very sophisticated. I'd like to ask if there are any reasons to use this over Geiser? It's my current choice for an emacs racket mode so I'd like to know if there are any features in this which geiser is lacking.
- brudgers 12y agoRacket-mode's author is Greg Henderschott, creator of Cakewalk. He's active under the Racket tag on StackOverflow. Based on his comments there, Racket-mode is primarily driven by his needs, and these aren't fully met by Geiser...I think he has also used it as a way to learn more about Racket. https://en.m.wikipedia.org/wiki/Cakewalk_(company) https://en.m.wikipedia.org/wiki/Cakewalk_(company)
- jarcane 12y agoI currently use racket-mode when doing Racket in Emacs. The main reason for doing so was simply that it was the easiest one to install. It's no SLIME, but it doesn't try to be, just provide some basic niceties and font-locking.
- greghendershott 12y agoSorry to be slow to notice this and to reply. First, I think Geiser is wonderful and you made a great choice. For whatever reason, as a Racket beginner some years ago Geiser just didn't "click" for me, and scheme-mode seemed to have a lot of stuff that was confusingly N/A for Racket. Part of the motivation is I think Racket deserves a mode dedicated to it, these days, for those who may prefer that. Although partly that's about perception, it also means freedom to do Racket-only things. For example racket-mode has commands to tidy or trim `require`s, or even to convert a file from `#lang racket` to `#lang racket/base`, adjusting the requires as needed. It's OK to add things like this without considering and implementing whatever the analog, if any, is in Guile Scheme (which Geiser also supports). Or more basically, racket-mode has an obvious way to "run" your program in a predictable way, much like DrRacket.
- ics 12y agoI see no mention of it in the readme, but one of the things I missed while learning Racket was the ability to use images and media the way that you can in DrRacket. It's a silly feature if you are actually experienced with either tool, but when you're learning (especially with the beginner guides on Racket's site) it sure would be nice if you could follow [almost] as you would with DrRacket.
- phaer 12y agoiirc, geiser supports images in a racket repl inside emacs.
- ics 12y agoLooks to me like the repl will display images but you can't just embed an image in the source code as in DrRacket. Any ideas?
- gcr 12y agoI wrote (part of) the patch that lets geiser display images in the REPL. It's only for interactive use: when a function returns a picture, Emacs displays it. It's not part of the file. The way Racket embeds images into your source code is actually somewhat interesting. If a `.rkt` file includes a rich element (eg. image, table, GUI structure, etc.) then the result file format is not strictly human-readable anymore. Instead, the source code is stored in the homegrown 'WXME' format which, while text-based, is not actually human-parsable anymore. That makes source code diffs a pain. Emacs could technically parse these files on load and write them on save, but that might be a bit tricky. The Racket library that reads and writes this format is documented at http://docs.racket-lang.org/gui/WXME_Decoding.html?q=wxme http://docs.racket-lang.org/gui/WXME_Decoding.html?q=wxme .
- greghendershott 12y agoThanks to the head start provided by gcr, recently I added the equivalent of geiser's support for images in the REPL, to racket-mode. As for supporting WXME format files: Although that sounds very cool, I don't think that's within the scope of what I want to attempt for racket-mode (or have time to do) now. p.s. The video of my demo at RacketCon was posted recently: https://www.youtube.com/watch?v=QWiteH8PARQ&list=LLoI3ip0MG_BCk_KUpkxeejQ&index=1 https://www.youtube.com/watch?v=QWiteH8PARQ&list=LLoI3ip0MG_... p.p.s. My "30 year old technology" comment was re the previous speaker. I am definitely not begin derogatory about Emacs. :)
- mark_l_watson 12y agoThis looks like a great first attempt at writing two Emacs major mode packages. I am going to try it tomorrow.
- nemoniac 12y agoWhat a racket-mode for emacs could really use is support for images in Racket files and for parsing the binary format thar DrRacket reverts to when a file contains images.