Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, I've been looking at DrRacket pretty closely lately. I jump back and forth between it and Emacs right now. Emacs is a bit easier to use for long typing sessions, but DrRacket indents better. I understand that most of the serious Racket developers use Emacs, I just haven't gotten into the flow of using it yet. I was briefly very hardcore into Vim, but I eventually realized that its lack of proper plugin control meant major headache was in store for me down the road as I grew out my installation.

There are some interesting features of the toolkit that DrRacket uses to display itself. Having done a small amount of work with formatted text editors in the past, the controls that DrRacket has for doing its syntax highlighting and inline-image-inclusion are very novel and advanced.

It's just all incomplete. There are things that seem like they should be there, like a file browser, that either aren't or I'm not seeing.

I'm not sure what is going on with Try-Racket. There was talk on the listserv about putting it on racket-lang.org, but I'm not involved in the dev group, I'm just a user. It's probably one of the many things they'd love to have, but have bigger fish to fry.



> I understand that most of the serious Racket developers use > Emacs, I just haven't gotten into the flow of using it yet.

You would be surprised how many of the die-hard Racket programmers use DrRacket for Racket programming. Nothing beats Emacs/Vi for normal text editing, but since DrRacket was written with one purpose only, namely editing Racket code it has a few tricks up its sleave.

Syntax checking while you edit your code, means that any errors you make are highlighted immediately. This also catches misspelled identifiers.

After syntax check you can right click any identifier to rename the identifier (which automatically changes all occurences of the identifier in the file). The renaming even respects lexical scope.

You can easily jump to the file where a identifier is defined (I love to see how things in the builtin libraries are written).

DrRacket will display bitmap and other image values directly in the REPL. This must more convenient than seeing <struct: bitmap>.

You can even change the default REPL printer, to print your own user defined values using gui elements.

One of the most impressive features is how precise the error messages are reported. This goes for both standard errors, but not the least when macros are involved. If you compare the error reports you get from a few errorneous macros in DrRacket and in a standard Racket implementation, you'll see that you can save a lot of time if you use DrRacket.

And while at it, don't forget to try the macro stepper...

Oh! And syntax objects are clicable, so you can see "inside" them. This is gold when debugging macros.

A recent feature: String constants are now spell checked. (if you have ispell/aspell installed).


Yes, those are all exactly the reasons I still use DrRacket. It seems it would be easier to add features to DrRacket than to write plugins for Emacs/Vi, especially considering the goals of Racket to train users, the default system should be as best of a system as time and manpower allow.


What do you mean by "DrRacket indents better"? (Genuine question :-) and not to start a war between emacs and DrRacket)

Just this week I made the switch from MIT/GNU Scheme to Racket for solving SICP exercises. Have been using DrRacket but as I am writing this I am in the middle of configuring emacs for Racket development. So far I have installed Quack and it works reasonably well. Didn't really find any differences between it's indentation and DrRacket's. Next, I will be installing Geiser that will bring the inline image support for working with the picture language exercises.

Quack: http://www.neilvandyke.org/quack/

Geiser: https://github.com/jaor/geiser


I hadn't heard of Quack. I have Geiser installed, though now it's been a little while since I last used it (honeymoon got in the way!).

DrRacket indents things rather intelligently. If you newline after the first-position element, it will indent things just past the paren before the first-position element, so that everything lines up in a list. If you newline after any of the other elements first, it will line them up ahead of the function name. But really, most importantly, it seems to understand constructs like "(let ([x 3])\n (displayln x))" should line up the displayln call under the let keyword, not under the value expressions.

Emacs, on the other hand, understands varying levels of scope by matching parens, but just indents things a set number of spaces. I fully admit that this could just be my own ignorance of how to work Emacs. But as mentioned, lacking the Macro stepper, the live syntax checking, and many other features, it just didn't seem worth it to track down this one annoyance.


In my experience Emacs with Quack (or with Geiser, or with both) indents exactly the same as DrRacket.

That's not to say there isn't some corner case where they differ, but it sounds like you're noticing more than that. Try Quack or Geiser.

That's also not to say DrRacket is bad. It feels a bit slower to me when typing, than Emacs. But it has all the cool tools others mentioned. You can also use Emacs most of the time, and use DrRacket for the tools.


As the other reply points out, Quack indents exactly like DrRacket but your other reasons for sticking with DrRacket are totally valid. My primary motivation to move to emacs is that I find myself doing too much of "C-x o" in DrRacket!


> Emacs is a bit easier to use for long typing sessions, but DrRacket indents better.

May be Racket has a very small mindshare when it comes to Emacs users, otherwise someone would have written a better indentation mode by now.

> I was briefly very hardcore into Vim, but I eventually realized that its lack of proper plugin control meant major headache was in store for me down the road as I grew out my installation.

I am not sure what you mean by proper plugin control, but pathogen and vundle have existed for some time now. I use terminal vim running under screen with a repl open in another screen window and some vim plumbing to send text to the repl for my racket experimentation.




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

Search: