Re: [racket-users] What’s everyone working on this week?

2019-12-10 Thread wanderley.guimar...@gmail.com
Started to read HtDP and I plan to training the design recipe while solving AoC challenges. So far, I am enjoying the systematic approach to right software. It is funny to realize that you started to solve a problem with a partial understanding of it. Playing a bit with rsound. My goal is to

Re: [racket-users] Playing with rsound

2019-12-07 Thread wanderley.guimar...@gmail.com
little I-IV-V-I instead of the same chord twice.) > > John > > > > > On Dec 7, 2019, at 14:39, wanderley.guimar...@gmail.com wrote: > > > > I started to playing around with rsound while reading its > documentation. I wrote the following code: > > > >

[racket-users] Playing with rsound

2019-12-07 Thread wanderley.guimar...@gmail.com
I started to playing around with rsound while reading its documentation. I wrote the following code: #lang racket (require rsound) (require rsound/piano-tones) (define (chord . notes) (rs-overlay* (map piano-tone notes))) (play (rs-overlay (rs-append (chord 60 64 67)

Re: [racket-users] Day 7 Advent of Code - continuations?

2019-12-07 Thread wanderley.guimar...@gmail.com
I solved the problem without continuations but I will study them and rewrite my solution to use them. It might be helpful in future problems. On Fri, Dec 6, 2019 at 11:58 PM Daniel Prager wrote: > Does anyone have a continuation-based solution to AoC day 7? > >

Re: [racket-users] Re: GUI (get-directory)

2019-12-05 Thread wanderley.guimar...@gmail.com
I think your point is totally valid, and I feel that I already saw such discussion in the mail list. You can simplify the process by searching a piece of the documentation in github. For example, I search for a piece of the docs from rackjure (1) which is the second result in my search. (1)

Re: [racket-users] type-checking error with immutable vectors in for loop

2019-11-25 Thread wanderley.guimar...@gmail.com
Is this a situation where the type-checker needs to be enhanced to type-check this code, or there is not enough information to type-check the code? (I am just curious about that) On Mon, Nov 25, 2019 at 6:12 AM Sam Tobin-Hochstadt wrote: > This is a situation where the problem is needing more

Re: [racket-users] eq? of quoted expressions

2019-10-25 Thread wanderley.guimar...@gmail.com
because it would make easier to read them in case expression). I switched to use match instead. My intuition was that two quoted list of constant values would eq?. > > > On Oct 25, 2019, at 09:34, wanderley.guimar...@gmail.com wrote: > > > > Why (eq? (quote a) (q

[racket-users] eq? of quoted expressions

2019-10-25 Thread wanderley.guimar...@gmail.com
Why (eq? (quote a) (quote a)) is #t but (eq? (quote (a)) (quote (a))) is #f? I would expect that if (quote (a)) was a mutable pair but it is not since (quote (a)) returns #f. It seems that guile returns #t as I was expecting. -- You received this message because you are subscribed to the

Re: [racket-users] How to efficiently simulate a video display

2019-10-22 Thread wanderley.guimar...@gmail.com
t; > I would use a really simple OpenGL draw call that just draws a > rectangle and update the texture contents with the screen bits. > > -- > Jay McCarthy > Associate Professor @ CS @ UMass Lowell > http://jeapostrophe.github.io > Vincit qui se vincit. > > On Tue

[racket-users] How to efficiently simulate a video display

2019-10-22 Thread wanderley.guimar...@gmail.com
Hi folks, I decided to write a computer simulator (16-bit machine as the one built in nand2tetris course) in Racket. The computer maps the screen to a memory space where bits represent the pixel colors (black and white). Right now, I am generating the screen image by converting the bits to a

Re: [racket-users] Syntax pattern to match a sequence with x identical elements?

2019-10-11 Thread wanderley.guimar...@gmail.com
+1 for adding the explanation to the Guide. On Fri, Oct 11, 2019 at 9:02 AM David Storrs wrote: > > Alexis, is there any way that we can get this explanation and some of > the ones you've given me added to the Guide? I've tried to add things > to the documentation before, or even just submit

Re: [racket-users] Chez Scheme history

2019-05-23 Thread wanderley.guimar...@gmail.com
Thanks for sharing this. On Thu, May 23, 2019 at 10:09 AM Josh Rubin wrote: > I am just starting to learn Racket. Thank you, all Racket developers. > I read about the concept of using the Chez Scheme runtime system to > "host" Racket, so I looked into Chez, and found an interesting paper. > >

Re: [racket-users] Re: I wrote my first macro ever!

2019-04-29 Thread wanderley.guimar...@gmail.com
Hi Jérôme, `syntax-parse` was in my list to explore! Thanks for the example! I did a new version following your example (require (for-syntax racket/base racket/syntax syntax/parse)) (begin-for-syntax (define-syntax-class (element-exp) (pattern (element:id value)

[racket-users] I wrote my first macro ever!

2019-04-28 Thread wanderley.guimar...@gmail.com
I've been following the list since I started to play with Racket (~6 months), but I've never had the courage to write a macro. It was like a kind of magic that I wanted to manipulate, but I was afraid to do that. ## Context. Story time! I discovered Racket because a friend asked me to teach

Re: [racket-users] How to refine types when filtering values

2018-12-24 Thread wanderley.guimar...@gmail.com
Thanks for the fast response. "Instantiate the type of e with types t" in the documentation was crypt to me. The examples helped to clarify that if you have generic types A and B in a type `(All (A B) A -> B)`, then the instantiate the type `(A -> B)` with `(U Number False) Number)` means that

[racket-users] How to refine types when filtering values

2018-12-24 Thread wanderley.guimar...@gmail.com
I am trying typed/racket for the first time and I can't figure out how to refine a (Listof (U Positive-Byte False)) to (Listof Positive-Byte). For example > (filter identity '(1 2 3)) - : (Listof Positive-Byte) '(1 2 3) > (filter identity '(1 2 3 #f)) - : (Listof (U False Positive-Byte)) '(1 2 3)

Re: [racket-users] typed racket backend/ir & gpu computing

2018-12-19 Thread wanderley.guimar...@gmail.com
Can you give an example of a simple eDSL language? Not that I am not lazy but I don’t have an idea of what to search. On Wed, Dec 19, 2018 at 1:19 PM Matthias Felleisen wrote: > > embedded as opposed to stand-alone > > > On Dec 19, 2018, at 3:08 PM, Greg Hendershott > wrote: > > > > What is the