[racket-users] Searching for packages

2018-08-12 Thread Stefan Schmiedl
"Andrew J" , 12.08.2018, 02:09: > I typically use either threading or composition... > (require threading) > (define (foo x) > (~> x > f g h bar)) "threading" is not included in the default racket installer, so how do I get it? The package manager tells me that there is a "threading"

Re: [racket-users] Bitmaps and Canvas sizes

2018-08-12 Thread silverfire675
That works perfectly, thanks David! (define (resize-draw canvas0 bm) (let* ((dc (send canvas0 get-dc)) (t (send dc get-transformation))) (send dc scale (/ (send canvas0 get-width) (send bm get-width)) (/ (send canvas0 get-height) (send bm get-height))) (send dc draw

Re: [racket-users] Do I need macros to flag unbound identifiers as failing unit tests?

2018-08-12 Thread Sage Gerard
This is great feedback, thank you both so much! I like using a language for this approach as the project evolves, and You's feedback is a good stopgap that does work, and can be applied in-place. On Sat, Aug 11, 2018 at 1:01 PM Matthew Butterick wrote: > > On Aug 11, 2018, at 9:00 AM, Sage Gera

Re: bug#30680: [racket-users] Using Racket's raco on on Guix(SD)

2018-08-12 Thread Christopher Lemmer Webber
Timothy Sample writes: > Christopher Lemmer Webber writes: > >> Likewise, Gregor and Raart do not install: >> >> $ mv ~/.racket ~/.racket-borked >> $ raco pkg install gregor # lots of errors during install >> $ racket >> racket@> (require gregor) >> explode-path: contract violation >> expecte

Re: [racket-users] Do I need macros to flag unbound identifiers as failing unit tests?

2018-08-12 Thread Sage Gerard
Regarding #lang racket/koans, I opened https://github.com/zyrolasting/racket-koans/issues/24 and would appreciate comments from those more familiar with defining syntaxes if there are rough edges in this design. On Sun, Aug 12, 2018 at 10:57 AM Sage Gerard wrote: > This is great feedback, thank

[racket-users] racket 7.0 typed racket, a small problem with the type of the method set-pixel from Bitmap-DC%

2018-08-12 Thread Axel Schnell
I just encountered a problem while I was experimenting with typed racket and the drawing toolkit. I called (send my-bitmap-dc some-x-value some-y-value my-color) and the interpreter complained that set-pixel broke it's own contract. I decided to look at the type of this method (or should I bett

Re: [racket-users] Question about style

2018-08-12 Thread Greg Hendershott
As others said, naming intermediate values can make things clearer. (Taken too far, maybe it's hard to see the forest for the trees? I think it depends on the audience and the domain.) You happened to choose an example that illustrates a reason maybe not to do this with let* or define -- cleaning

Re: [racket-users] racket 7.0 typed racket, a small problem with the type of the method set-pixel from Bitmap-DC%

2018-08-12 Thread Matthias Felleisen
This sounds like a bug in the initial type environment for Typed Racket. It’s worth a Github Issue or PR. > On Aug 12, 2018, at 2:56 PM, Axel Schnell wrote: > > I just encountered a problem while I was experimenting with typed racket and > the drawing toolkit. I called (send my-bitmap-dc so

Re: bug#30680: [racket-users] Using Racket's raco on on Guix(SD)

2018-08-12 Thread Christopher Lemmer Webber
Good news: this seems fixed with this patch. Some more comments inline. Timothy Sample writes: >>> Also, I checked all of this from Racket without grafts, and it never >>> complained about compiling OpenSSL stuff. Running “raco setup” gives >>> some other errors, though. >> >> You're right... w

Re: [racket-users] Re: how to show raco full (non-abbreviated) error messages

2018-08-12 Thread Greg Hendershott
> given procedure: ...amm-3.1/util.scm:58:6 It seems you had something like `(map (lambda (x) x) (list 1 2 3) (list 1 2 3))` and the error message wants to show the name of the function. What is the name of an anonymous function? That sounds like a Zen koan. But there is an automatically inferre