Glad to hear you got this far. Consider using something like this: 

#! /bin/sh
#|
exec racket -tm "$0" ${1+"$@"}
|#
#lang racket 

(provide 
  main)

(define main
  (case-lambda
    [(the-mandatory-argument . others)
     (displayln
       `(the-mandatory-argument:
          ,the-mandatory-argument
          ,(string? the-mandatory-argument)))
     (displayln
       `(others:
          ,others
          ,(length others)))
     #true]
    [() (displayln '(help, I need somebody, help))]))


I prefer this for simple scripts. Here are some interactions: 

$ ./manage hello world, how are you doing
(the-mandatory-argument: hello #t)
(others: (world, how are you doing) 5)
#t
$ ./manage 
(help (unquote I) need somebody (unquote help))

— Matthias




> On Nov 12, 2015, at 1:09 PM, Christopher Walborn <tuir...@gmail.com> wrote:
> 
> 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.

-- 
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.

Reply via email to