Re: [racket-users] [racket ursers] Keyword question

2019-08-22 Thread Tim Meehan
If it was just passing keyword arguments to your function, you might be able to do it like this: ; https://docs.racket-lang.org/guide/lambda.html ; https://docs.racket-lang.org/reference/procedures.html (define greet (lambda (given #:last surname) (string-append "Hello, " given " "

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-22 Thread Gustavo Massaccesi
[I remember an old discussion about this, but I can't find the message.] For small number of clauses, case is expanded to a bunch of if. When there are more than ¿12? it may be use a hash table or binary search. It has a few tricks:

[racket-users] [racket ursers] Keyword question

2019-08-22 Thread Kevin Forchione
> On Aug 22, 2019, at 1:33 PM, Kevin Forchione wrote: > > Hi guys, > Suppose I have something like the following: > > (define (f g . args) > (apply g args)) > > How would I be able to pass keyword arguments to g? After racking my brains for the common lisp and googling for the

Re: [racket-users] (curry map string->number) in Typed Racket

2019-08-22 Thread Jon Zeppieri
(curry (inst map (U Complex False) String) string->number) ... typechecks, but in your expression, you're going to need to handle the possibility that the pattern variables in `list-rest` pattern are #f. - Jon On Thu, Aug 22, 2019 at 4:15 PM Štěpán Němec wrote: > > > I have a hard

[racket-users] [racket ursers] Keyword question

2019-08-22 Thread Kevin Forchione
Hi guys, Suppose I have something like the following: (define (f g . args) (apply g args)) How would I be able to pass keyword arguments to g? Kevin -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and

[racket-users] (curry map string->number) in Typed Racket

2019-08-22 Thread Štěpán Němec
I have a hard time persuading Typed Racket to accept the expression "(curry map string->number)". No amount of type annotations or added `inst`s (as recommended by the guide[1]) I could come up with seem to help. Is there a way to make it work? [1]

[racket-users] Re: Splicing the result of one macro into another

2019-08-22 Thread Michael Ballantyne
Here's another implementation you might consider. In this version you can view the body of `phone-numbers` as a language consisting of the `number` and `number-list` syntactic forms. The language also supports its own kind of macros---phone number macros---that can expand to forms of the

Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-08-22 Thread George Neuner
On 8/21/2019 3:25 PM, Jon Zeppieri wrote: Racket's `case` is an implementation of this approach: http://scheme2006.cs.uchicago.edu/07-clinger.pdf It is not significantly complicated by `else`. And that approach was created in the context of Scheme, which leaves the return value unspecified

[racket-users] The truth about the death of Charles Aznavour

2019-08-22 Thread Steve Brown
Why do we have to question Canadians to know the causes of the death of Charles Aznavour ? Charles Aznavour was murdered after what he said in an interview. Canada, like many other countries, disseminates information on litigations against foreign governments and these code-form (wooden

Re: [racket-users] Racket News - Issue 14

2019-08-22 Thread Stephen Foster
By the way, Paulo: I'm happy to help with this (if you want). I can either put in some person-hours to get/install the certificate; and/or help purchase a new one. On a related note, a meta question for the community: Do we have any infrastructures in place to help financially support

Re: [racket-users] Code generation options for a self-made compiler

2019-08-22 Thread Matthew Flatt
At Tue, 20 Aug 2019 17:53:45 +0300, Dmitry Pavlov wrote: > > Your tool would use `make-compilation-manager-load/use-compiled-handler` > > In what way my tool would use that? I think you probably don't want to go this way. But if you want to support multiple build variants within the same tree,

Re: [racket-users] Seeking good benchmark code for immutable hash and hash set usage

2019-08-22 Thread Robby Findler
(sorry for the self-followup; the unifier uses immutable hashes; grep suggests the other hashes that get used a lot are mutable hashes) On Thu, Aug 22, 2019 at 9:33 AM Robby Findler wrote: > > It looks like the pattern unifier uses hashes. I'm not sure if it they > would end up being good

Re: [racket-users] Seeking good benchmark code for immutable hash and hash set usage

2019-08-22 Thread Robby Findler
It looks like the pattern unifier uses hashes. I'm not sure if it they would end up being good benchmarks (probably best to try to instrument the hashes to see if they actually get used a lot or not) but there are redex benchmarks that measure how long it takes to find specific bugs and one of

[racket-users] Re: Error when I try to use slideshow?

2019-08-22 Thread Stephen De Gabrielle
Thanks Alex! On Thursday, August 22, 2019 at 1:58:13 PM UTC+9, Alex Harsanyi wrote: > > This may or may not work for them, but ask the user to open the > "viewer.rkt" file in their racket installation (it should be in C:\Program > Files\Racket\share\pkgs\slideshow-lib\slideshow) and comment out

Re: [racket-users] handin-server: writing a first checker

2019-08-22 Thread Matthew Flatt
I'm not able to provoke this error with the pieces that you provided. Just to be sure, it's not an error in the submission that you sent to the handin server, right? Normally the error in that case would be "Error in your code", so I think that's not it. But does the error depend on the program

Re: [racket-users] Seeking good benchmark code for immutable hash and hash set usage

2019-08-22 Thread Jon Zeppieri
Thanks Ben! - Jon On Wed, Aug 21, 2019 at 10:04 PM Ben Greenman wrote: > > A few of the GTP benchmarks [1] use immutable hashes. Here's a link > with the ones that look most interesting: > > http://ccs.neu.edu/home/types/tmp/gtp-hash.tar.gz > > > And here's a small (untyped) program that uses