Re: [racket-users] Implementation of threading macros

2018-03-31 Thread Alex Knauth
The `~>` form provided by the `threading` package is a macro, and it treats parentheses differently than a normal function would. What you are looking for is probably the ~> *function*, provided by the `point-free` package. That has simpler behavior, doing what you expect with lambdas, curried

[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"

[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] 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 ->

[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%

[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)

Re: [racket-users] Why is there a space in the path to the Racket application on MacOSX?

2018-03-31 Thread Matthew Flatt
At Sat, 31 Mar 2018 06:45:29 -0400, Philip McGrath wrote: > My current approach is to put a file containing "/Applications/Racket > v6.12/bin" in /etc/paths.d, which adds it to the default PATH for all users. I recommend that approach, because it's simple, reliable, and easy to adjust when you're

Re: [racket-users] bookmarks?

2018-03-31 Thread Geoffrey Knauth
Thank you Laurent, I'll definitely check it out! --Geoff On Saturday, March 31, 2018 at 8:19:45 AM UTC-4, Laurent Orseau wrote: > > The quickscript-extra package (a DrRacket plugin) provides such a facility > (the 'bookmarks' script), among many other things: >

[racket-users] Re: Why is there a space in the path to the Racket application on MacOSX?

2018-03-31 Thread Geoffrey Knauth
Very interesting, good to know when I'm writing my own scripts, vs. using things others have written. Thanks. On Saturday, March 31, 2018 at 6:58:04 AM UTC-4, HiPhish wrote: > > BTW, on the topic of writing robust shell scripts, I always have a linter > run over my scripts when I save them. I

[racket-users] Re: Why is there a space in the path to the Racket application on MacOSX?

2018-03-31 Thread Geoffrey Knauth
I understand the argument that strengthening our own CLI and shell-script practice to guard against spaces in filenames is both learned and good defense, as in, "don't go into battle without some armor protection." I do that when I'm really worried, and if you want to see how big shell scripts

Re: [racket-users] bookmarks?

2018-03-31 Thread Laurent
The quickscript-extra package (a DrRacket plugin) provides such a facility (the 'bookmarks' script), among many other things: https://pkgs.racket-lang.org/package/quickscript-extra It's not perfect but should still be helpful. In case it doesn't suit you needs, quickscript should allow you to

[racket-users] Re: Why is there a space in the path to the Racket application on MacOSX?

2018-03-31 Thread HiPhish
BTW, on the topic of writing robust shell scripts, I always have a linter run over my scripts when I save them. I run Shellcheck automatically in Neovim using the Neomake plugin. The linter catches among other things missing quotations. https://www.shellcheck.net/

Re: [racket-users] Why is there a space in the path to the Racket application on MacOSX?

2018-03-31 Thread Philip McGrath
My current approach is to put a file containing "/Applications/Racket v6.12/bin" in /etc/paths.d, which adds it to the default PATH for all users. Personally, I'm command-line-oriented enough that I try to avoid spaces and special characters in file names I'm likely to work with from the command

[racket-users] bookmarks?

2018-03-31 Thread Geoffrey Knauth
This happens to me enough in DrRacket I thought I should ask. I'm looking at some code. I want to scroll around or search in the file for something to check, but later I want to come back to where I was. In Emacs I'd set a mark and jump back to it. Was the subject of bookmarks ever

Re: [racket-users] Why is there a space in the path to the Racket application on MacOSX?

2018-03-31 Thread Geoffrey Knauth
Every time I download a new version of Racket, I put it in: /Applications/Racket/ The first thing I do is replace the space in the name with a hyphen. On the more comand-liney side of things, I put /usr/local/racket/latest/bin in my PATH. Currently I have: $ which racket

[racket-users] Re: (eighth RacketCon) is St. Louis in September 2018

2018-03-31 Thread Geoffrey Knauth
Now that's a powerhouse combination of events! Last year I skipped Strange Loop because I wanted to go to RacketCon more. (I always learn something interesting from every RacketCon talk, and the community is the best.) Now you've given them back my likely attendance and added ICFP. Thanks