"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"
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
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
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
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
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
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
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
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
> 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
10 matches
Mail list logo