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

2019-10-10 Thread Alexis King
tl;dr: You need to use an ellipsis, so your pattern should be ((~between x:integer 3 3) ...). A (much) more detailed explanation of why follows. ~between is an ellipsis-head pattern. The most common ellipsis-head pattern, ~optional, also works as a plain head pattern, but ~between does not.

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

2019-10-10 Thread Jonathan Simpson
This seems like it should be simple but I've never been able to figure out how to do this. What I've been doing instead is this: (x:integer ...+) to match two or more integers. (x:integer y:integer ...+) to match three or more. And so on. I'm at a point now where I need to build patterns

Re: [racket-users] Re: Structured Concurrency in Racket

2019-10-10 Thread Philip McGrath
On Thu, Oct 10, 2019 at 2:42 AM Zelphir Kaltstahl < zelphirkaltst...@gmail.com> wrote: > … If that works for arbitrary serializable-lambda with only serializable > parts, I could continue my process pool project. > Yes, this would work for any value created by `serial-lambda`. > The only issue

Re: [racket-users] Re: Parallel merge-sort leveraging futures

2019-10-10 Thread Dominik Pantůček
Hello, thanks everyone for helping me putting this into a reasonable shape. My short-term plans with futures-sort are currently to check how various construct could be improved (or'ing of touched futures is really just a quick hack for example). Also I'd like to investigate why it didn't work

Re: [racket-users] Re: Structured Concurrency in Racket

2019-10-10 Thread Zelphir Kaltstahl
Hi! Hmmm, that code example looks simple enough. If that works for arbitrary serializable-lambda with only serializable parts, I could continue my process pool project. The only issue would then be, that any user of it would have to know in advance, that they cannot define their lambdas as usual,

[racket-users] Re: Structured Concurrency in Racket

2019-10-10 Thread George Neuner
On Wed, 9 Oct 2019 16:15:14 -0400, Sam Tobin-Hochstadt wrote: >The Racket community, and even more so the design of Racket >concurrency APIs, is very strongly influenced by the academic side of >Racket. As far as I can tell, structured concurrency is fairly close >to what is traditionally called