Re: [racket-users] Contracts in lambda?

2019-07-10 Thread Matthias Felleisen
[(contract (-> string? integer?) (λ (x) x) 'a 'b) "hello”] > On Jul 10, 2019, at 10:11 PM, Kevin Forchione wrote: > > Hi guys, > Is there a way to apply contracts to a lambda without associating it with an > identifier? What I want is to be able to pass lambda functions around without >

[racket-users] Contracts in lambda?

2019-07-10 Thread Kevin Forchione
Hi guys, Is there a way to apply contracts to a lambda without associating it with an identifier? What I want is to be able to pass lambda functions around without having to bind them to a symbol. I could use raise-argument-error/ raise-result-error but the contract system is more powerful and

[racket-users] Advice for porting Interactive Brokers API to Racket

2019-07-10 Thread evdubs
Hi, I am currently investigating the effort required to port the Interactive Brokers Client API to Racket. In general, there is not much complexity in the client; it establishes an open socket, builds byte buffers to send to the server, a

Re: [racket-users] Re: Thinking in scheme / racket

2019-07-10 Thread Bob Heffernan
On 19-07-10 02:46, Maciek Godek wrote: > A while ago, I wrote a booklet which used almost the same problem to > introduce to, what you called nicely in the title of this thread, "thinking > in Scheme", so if you're interested, you may want to check out the first > chapter ("Introduction"): Maci

Re: [racket-users] Capturing print?

2019-07-10 Thread Kevin Forchione
> On Jul 10, 2019, at 1:53 PM, bruno cuconato wrote: > > there's > https://docs.racket-lang.org/reference/port-lib.html#%28def._%28%28lib._racket%2Fport..rkt%29._with-output-to-string%29%29 > >

Re: [racket-users] Capturing print?

2019-07-10 Thread bruno cuconato
there's https://docs.racket-lang.org/reference/port-lib.html#%28def._%28%28lib._racket%2Fport..rkt%29._with-output-to-string%29%29 and company. would that work for you? -- bruno cuconato On Wed, 10 Jul 2019 at 17:48, Kevin Forchione wrote: > Hi guys, > Is there a wrapper or something like that

[racket-users] Capturing print?

2019-07-10 Thread Kevin Forchione
Hi guys, Is there a wrapper or something like that that I can place around a print expression so that it captures it and returns a string value? Something like: [capture-print [printf “hello, world!”)) => “hello, world!” There are times when testing I’d like to capture the output and compare it

Re: [racket-users] Seeking users to try file monitoring package

2019-07-10 Thread Ben Greenman
> I'm particularly curious if the (robust-watch) procedure provided by the > package in particular behaves consistently across operating systems. I do > not have a Mac and was hoping that a Mac+Racket user would be willing to try > this out and report his or her experience. (robust-watch) worked f

[racket-users] Specializing functions accepting keywords

2019-07-10 Thread Jens Axel Søgaard
Consider the following fishy example wherein we try to reuse a function with keyword arguments. (define (fish #:name[name #f] #:color [color #f] #:studio [studio #f] #:eyes[eyes 2]) (~a "The fish " name " is " color ", appears in a movie

[racket-users] Snip responds to scroll input

2019-07-10 Thread Kshitij Sachan
I want to make a snip that resizes based on vertical scroll input. I currently have the following snip code: #lang racket (require racket/gui racket/gui/base) ;; snip-class (define test-snip-class (make-object (class snip-class% (inherit set-classname) (super-new)

Re: [racket-users] Auto-generated AWS SDK

2019-07-10 Thread Greg Hendershott
It's definitely an interesting and smart approach, today. I hope the following doesn't sound defensive; it's just context and observations. Keep in mind that my package dates back to 2012. 1. There were a half dozen AWS services. Of those few, S3 was the 90% use case. 2. There was no API spe

[racket-users] Re: Thinking in scheme / racket

2019-07-10 Thread Maciek Godek
W dniu wtorek, 9 lipca 2019 14:09:04 UTC+2 użytkownik Bob Heffernan napisał: > > Dear all, > > I recently wanted to count the number of primes in the sequences 2^n+3 > and 2^n-3 (and a few more besides) where n is a positive integer. > > Hi! A while ago, I wrote a booklet which used almost the