[racket-users] Spacemacs Light & Dark Color Schemes for DrRacket
A few years back I added a DrRacket color scheme template to the Base16 project and hosted a collection of these schemes which a few people have found useful. Base16 has since changed and I haven't kept up with it. That old collection should still work, but has always required some fine-detail massaging of individual colors to really work well together in DrRacket. I probably won't touch that repo again. However, I've now ported the Spacemacs light and dark themes for Emacs to DrRacket color schemes. They are done manually and match the Emacs themes pretty closely, and I'm far more likely to update these since I tend to switch between them regularly. Here's the repo, including a couple screenshots: https://github.com/tuirgin/drracket-spacemacs-schemes -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Accessing background colors when defining new color schemes
>From https://docs.racket-lang.org/drracket/color-scheme.html I see that when >creating a new color scheme we can specify foreground color and bold, italic, >underline like this within the colors hash: #hash((name . "some name") (colors . ((framework:paren-match-color ,#(68 65 85 0.5)) (plt:module-language:test-coverage-off ,#(41 43 46) bold) ...))) But I haven't figured out how to access the background color property that is available for plt:module-language:test-coverage-of and plt:htdp:test-coverage-off. Any hints? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Re: Configuration Files
I appreciate all the responses. Time to do some reading and experimenting. At this point I've managed to read files and use regex to pull data into new variables or parameters I've set up, but I haven't gotten to the point of actually reading in racket data structures, so this gives me an angle on chiseling away at that. Thanks, Christopher -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Configuration Files
I'm looking for a way to read configuration files. The configuration file format can be anything provided it's easily human readable/writable. I found the ApacheConf solution on RosettaCode and may use that, but am wondering if there is a conf format that's more commonly used for Racket projects. There's no serious need for portability, longevity or anything else. I'm just using it to provide some settings and paths to local utilities in shell scripts which are little more than wrappers around other utilities. Thanks, Christopher -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Mandatory arguments for command-line
Ok. So you're using command-line in the body of the first case, and the-mandatory-argument takes the first word. Thanks to #:argv others, command-line can process the remaining ones. `./manage -h` would essentually give `racket -h` while `./manage anything -h` would give you help from command-line. I see how this opens a rabit hole of interesting possibilities. Maybe, too, case-lambda could be used with #:args -- let command-line deal with optional flags and keep the end user from running into accidental `racket` flag interactions, and then deal with positional arguments with the case-lambda (or maybe match?). -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Mandatory arguments for command-line
Oh, interesting. There's several new things in there for me to explore. Thank you. (And nice Beatles reference.) If you don't mind explaining -- what are the trade-offs between this approach and using the arg parsing features of racket/cmdline? Thanks, Christopher -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Mandatory arguments for command-line
Thanks, Greg, that's helpful. By the way, I love racket-mode. DrRacket is a great environment, but I get frustrated editing text in anything but Emacs (or more recently Emacs with Evil via Spacemacs). Racket-mode provides enough support that I only switch into DrRacket when I've hit the wall with debugging. It probably shows, but I'm just beginning to work with Racket proper and while the documentation is exhaustive, there's just so much to learn. I did two passes on Gregor Kiczales' Systematic Programming Design MOOC back when it was on Coursera -- once as a student, and once as a community TA. I've passed through most of Realm of Racket and am now just trying to use Racket for things that are actually useful to me, things I would normally just do through rough and raunchy adhoc shell scripting. I'm switching back and forth between the guide and the reference and grepping the codebase to find examples of in-the-wild usages. As a curiosity, I had my co-worker who doesn't code read over the original Python script I'd written, and this Racket script and he commented that he found the Racket version easier to follow. I agree. I've found it easy to get simple things done in Python, and that mostly without knowing what I'm doing. Doing the same things in Racket has required a little more effort to research how to solve the problem, but I'm happier with the end result and feel better about it, somehow. Thanks again, Christopher -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Mandatory arguments for command-line
I've just ported a small sript to Racket to investigate Racket as a scripting language for cli tasks. (My past Racket experiences have really only been with the HTDP languages.) I was quite happy with the process and the results, but I have one question I haven't been able to figure out on my own: How can I specify a mandatory argument such that without the argument the script will stop, possibly with an error, and preferably display the help? In the following, I would like to make the "-d" flag non-optional, or alternatively specify it as a required non-flag argument. Perhaps I just need to specify it as a non-flag argument and raise my own errors? Or is there a built-in way that I've not found? (define slow-copy (command-line #:program "slowcp" #:usage-help "\n Copy at a limited rate" #:once-each [("-t") time "the duration of in seconds between each copy; default: 5" (copy-delay (string->number time))] [("-d") dest "the directory to which will be copied; default: ." (destination dest)] #:args files files )) » the complete script is here: » https://github.com/tuirgin/racket-cli/blob/master/slowcp.rkt Any criticism or pointers towards a more idiomatic implementation are definitely welcome. -- Christopher D. Walborn : http://laconic-prolixity.blogspot.com 1st Gent.: Our deeds are fetters that we forge ourselves. 2nd Gent.: Ay, truly: but I think it is the world That brings the iron. (Middlemarch, George Eliot) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.