Hello Ben,
Good call. I didn't think about the mutability of the container's contents
with respect to types. My goal is to create a type that represents an
immutable container.
After exploring, it looks like there is a workaround:
In the case of Vector, I can create a struct to hold the vector
Thank you for your very useful and timely addition to the great Scribble
functionality.
In this time of great need for on-line learning, it is much appreciated.
I hope other additions (e.g. Numbas quiz embedding), will follow in the near
future.
Congratulations for all the great work, and good
On 3/24/20, mmcdan wrote:
> Hello,
>
> I'm trying to use occurrence typing for (Vectorof Symbol) or (Boxof
> Symbol).
>
> Creating a custom predicate for (Listof Symbol) seems to work:
> ---
> #lang typed/racket
>
> (: los? (-> Any Boolean : (Listof Symbol)))
> (define los?
> (lambda (seq) (and
Hello,
I'm trying to use occurrence typing for (Vectorof Symbol) or (Boxof Symbol).
Creating a custom predicate for (Listof Symbol) seems to work:
---
#lang typed/racket
(: los? (-> Any Boolean : (Listof Symbol)))
(define los?
(lambda (seq) (and (list? seq) (andmap symbol? seq
---
However
Aha! I didn't know there was a udp-receive-evt. That's exactly what I
needed, thank you.
On Tue, Mar 24, 2020, 4:15 PM Jon Zeppieri wrote:
> On Tue, Mar 24, 2020 at 4:03 PM David Storrs
> wrote:
> >
> > I've got this code:
> >
> > (thread
> > (thunk
> > (let loop ()
> > (define-valu
On Tue, Mar 24, 2020 at 4:03 PM David Storrs wrote:
>
> I've got this code:
>
> (thread
> (thunk
> (let loop ()
> (define-values (len shost sport) (udp-receive! socket buffer))
> ...do stuff with the received message...
> (loop
>
> I'd like to be able to say "If you have
You can start a second thread that monitors the condition as well as a
timer; if the timer goes off first, then you kill the first thread; if
the condition happens first, then it continues. If you don't want the
second thread to have to monitor the condition, then the first thread
should tell the s
I've got this code:
(thread
(thunk
(let loop ()
(define-values (len shost sport) (udp-receive! socket buffer))
...do stuff with the received message...
(loop
I'd like to be able to say "If you haven't received a message in X time,
kill the thread". I'm not sure how to
On Monday, March 23, 2020 at 9:59:22 PM UTC+1, Hendrik Boom wrote:
>
> On Mon, Mar 23, 2020 at 12:16:45PM -0400, Ben Greenman wrote:
>
> >
> > Not sure about best practices, but I definitely prefer keeping typed
> > and untyped code in separate modules.
>
> It can be veru useful to be able to
Hi,
I'm trying to do something like a fold, but over a tree instead of a list.
Is there anything like that?
If it's unclear what I mean, there's a mechanism like that in guile:
https://www.gnu.org/software/guile/manual/html_node/SXML-Tree-Fold.html
They use it e.g. for XML transformations, but i
10 matches
Mail list logo