Re: [racket-users] Re: ask a pict its colour?

2020-04-18 Thread Robby Findler
I basically agree with Alex, as the internal structures of pict don't really keep information in that way, but a "best effort" might be to draw it into a bitmap and then use the bitmap to find the average color or the most common color (perhaps with some error bounds on what colors count as "the sa

[racket-users] Re: ask a pict its colour?

2020-04-18 Thread Alex Harsanyi
I don't think such a procedure can be written. at least not for the general case. First, the color of `(filled-rectangle 30 30)` is not black, but whatever color was installed in the drawing context when the filled rectangle was rendered. You can change it to red using: (colorize (filled-rec

Re: [racket-users] DrRacket and command line arguments

2020-04-18 Thread David Storrs
Okay, so "edit the file" is the answer. That works for me. Thanks! On Sat, Apr 18, 2020 at 2:30 PM Michael MacLeod wrote: > You can parameterize `current-command-line-arguments` like so: > > ``` > #lang racket > > (require racket/cmdline) > > (define foo (make-parameter 7)) > > (parameterize (

Re: [racket-users] DrRacket and command line arguments

2020-04-18 Thread Michael MacLeod
You can parameterize `current-command-line-arguments` like so: ``` #lang racket (require racket/cmdline) (define foo (make-parameter 7)) (parameterize ([current-command-line-arguments #("--thing" "9")]) (command-line #:program "foo" #:once-each [("--thing") thing "The thing" (foo thi

[racket-users] DrRacket and command line arguments

2020-04-18 Thread David Storrs
Is there a way to specify command line arguments when running inside DrRacket? For example: #lang racket (define foo (make-parameter 7)) (command-line #:program "foo" #:once-each [("--thing") thing "The thing" (foo thing)] ) (displayln (foo)) If running in DrRacket, how can I make this spit

[racket-users] ask a pict its colour?

2020-04-18 Thread Raoul Schorer
Hi, Using the 'pict' library, I could not find predicates regarding color in the doc. Is there something like (get-color (filled-rectangle 30 30)) --> "black" somewhere? If not, how can I make a reliable color predicate? Thanks, Raoul -- You received this message because you are subscribed t

[racket-users] Error building racket BC snapshot from source

2020-04-18 Thread bedeke
Hello, I was trying to build racket snapshot using the using the files on the utah server[1]. Afterwards I basically do make && make DESTDIR="${pkgdir}" install This is part of a PKGBUILD script I have been using reliably on arch for the last few years. However somewhere around the beginning of