[racket-users] Cubic bezier curves in racket gui

2018-04-28 Thread
Hi, I'm using racket gui interfaces. I want to use cubic bezier curves in it. Please add functions for cubic bezier curves. I know Qt supports cubic bezier curves. SVG and canvas also support them. Haruo -- You received this message because you are subscribed to the Google Groups "Racket Use

Re: [racket-users] let-syntax example?

2018-04-04 Thread
Sorry, David. I missed your post. -- 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://grou

Re: [racket-users] let-syntax example?

2018-04-04 Thread
Thank you, Vincent. I did not know "Fear of Macros". Haruo -- 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 o

Re: [racket-users] let-syntax example?

2018-04-04 Thread
Additional question. I have read Let-Over-Lambda almost all. What is the best introduction of racket syntax? Haruo -- 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

[racket-users] Re: Simple loop control

2018-04-02 Thread
Thank you, Laurent. I mind the performance of in-range, but it seems to be no problem. #lang racket (time (for ([i (in-range 1)]) (for ([j (in-range 1000)]) (void (time (do ([i 0 (+ i 1)]) ([= i 1]) (do ([j 0 (+ j 1)]) ([= j 1000]) (void cpu

[racket-users] Simple loop control

2018-04-01 Thread
Hi, everyone. I want to write loops simpler. > (do ([i 1 (add1 i)]) ([= i 10]) (display i)) 123456789 > (for-each (lambda (i) (display i)) (range 1 10)) 123456789 In Common Lisp, I like the extended loop like "for" of C-language. [3]> (loop for i from 1 below 10 do (print i)) 1 2 3 4 5 6 7 8 9

[racket-users] Re: Implementation of threading macros

2018-04-01 Thread
Thanks for your advice, Alex. I'll be used to require point-free package. -- 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.c

[racket-users] Re: Understanding 'curry'

2018-03-31 Thread
Curry is from functional languages(Haskell, OCaml, F#, ...). Curry is the one of abbreviation of labmda. But, curry is NOT usable for racket's threading macros. #lang racket (require threading) (require 2htdp/image) (~> (star-polygon 20 20 3 "solid" "navy") (overlay/align/offset "right" "bot

[racket-users] Re: Implementation of threading macros

2018-03-31 Thread
I want to be close this issue but I cannot close by my response. Please post any message. -- 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.

[racket-users] Re: Implementation of threading macros

2018-03-31 Thread
I see. I understand that racket's threading macros are NOT SIMPLE IMPLEMENTATIONS. Racket's threading macros can reduce lambda object creations. #lang racket (require threading) (define (add2 x) (+ x 2)) (~> 1 add2) ; ok (~> 1 ((lambda (x) (+ x 2)) _)) ; ng -> ok (~> 1 ((curry + 2) _)) ; ng -> o

[racket-users] Implementation of threading macros

2018-03-31 Thread
Hi, everyone. I think that racket threading macros can mix with expressions(lambda, curry, class, ...), but not in fact. #lang racket (require threading) (define (add2 x) (+ x 2)) (~> 1 add2) ; ok (~> 1 (lambda (x) (+ x 2))) ; ng (~> 1 (curry + 2)) ; ng (define adder% (class object% (sup

[racket-users] Re: Understanding 'curry'

2018-03-31 Thread
I'm sorry for my mistake. [Wrong] Thread Macro [Right] Threading Macro Threading macros are provided by Racket Package System and its documentation is included in Racket Document. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe

[racket-users] Re: Understanding 'curry'

2018-03-31 Thread
It's very very easy. The "curry" is from functional languages(Haskell, OCaml, F#, ...). The concept of curry is powerful when the following function form: (function-name option-argument input-argument) For example, we think about 2htdp/image. #lang racket (require 2htdp/image) (overlay/align/o

[racket-users] Re: Embedding image files in a executable file

2018-03-28 Thread
It fails the following case, too: [foo.rkt] #lang racket (require 2htdp/universe) (define foo-image [ [Insert] - [Insert Image...] in DrRacket ]) (void (big-bang 0 (on-draw (lambda (s) foo-image The file "foo.rkt" is runnable. But, the compiled executable "foo.exe" displays the followin

[racket-users] Embedding image files in a executable file

2018-03-28 Thread
Hi, everyone. I'm making a simple game. I want to embed some image files in ONLY-ONE executable file. I need it for a simple distribution. Do you think that it displays the error message "no image files" when you execute the application? For example, [image.rkt] #lang racket (provide foo-imag

[racket-users] Behavior of image-color? function

2018-03-27 Thread
Hi, everyone. I'm using 2htdp/image and I wonder the color description. DrRacket version 6.12 > (require 2htdp/image) > (image-color? "red") ; will #t #t > (image-color? 1) ; will #f #f > (image-color? (color 0 0 0 0)) ; will #t #t > (image-color? "pale") ; I don't know about this. #t > (image-c