DrRacket is open-source (LGPL) editor for Racket. Sometimes you want to make changes to it. For example today I wanted to enable online compilation on single-core machines. Here is how easy it is to do it:
- Assuming that DrRacket is already installed. This is a normal installation using the installer; you do not typically have to check out the Git repo to make changes.
- Asked Robby how to make the change. Robby is super everybody knows that, he explained the fix. The check for enabling the feature is in module-language.rkt. Here are the steps
cd /opt/racket/5.3.1/collects/drracket/private/ sudo cp module-language.rkt module-language.rkt-ORG # Made the change # View it diff module-language.rkt module-language.rkt-ORG 1329,1330c1329 < ;;(> (processor-count) 1)) < (> (processor-count) 0)) --- > (> (processor-count) 1)) 1348,1349c1347 < ;;(> (processor-count) 1)) < (> (processor-count) 0)) --- > (> (processor-count) 1)) # Tell Racket to recompile that collection (aka library) sudo raco setup -l drracket # Restart DrRacket
- Now the online compilation indicator shows up and errors are automatically flagged.
- It works fine on a 1.6GHz Pentium with 2GB of RAM.
Hope this gave you a taste of how easily and quickly you can try new stuff out in DrRacket itself.
Here is how it looks with it turned on: