Re: [racket-users] Re: Using Scribble for Course Notes?

2020-12-08 Thread Enrique Comer
 Hi Dave:

The use of the scribble-math package is great for the kind of documents that 
you plan to write in Scribble.
For embeddings I use the excellent package from Shriram, to include Google 
Forms and YouTube videos. You can check the link: 
https://github.com/shriram/scribble-embedding.

Congratulations for your project.Please Keep Safe.Enrique CómerOn Monday, 
December 7, 2020, 05:07:10 AM PST, plr...@uwaterloo.ca  
wrote:  
 
 I've been using Scribble for course notes, slides, and various PDF documents 
for distribution to students for about ten years. I got the idea from several 
Racket principals who have been doing it for even longer, but unlike them, I 
have only basic facility with the language. The scribble-math package is based 
on a short post I made to this list to describe how to use MathJax to render 
math within a Web page. Recently I incorporated "asciicasts", lightweight 
terminal recordings to illustrate livecoding. You can see various examples 
here: https://cs.uwaterloo.ca/~plragde/flaneries/ . I'm happy to consult and 
share techniques as needed. --PR

On Sunday, December 6, 2020 at 1:39:04 PM UTC-5 dyrueta wrote:

Hi All —
I have a set of course notes for a Calc I class that I routinely teach which 
includes links to Desmos graphs and pre-recorded videos on selected topics.  
Recently, I began to think about producing a version of the notes that embed 
the graphs and lectures directly into the document and can be easily 
distributed to my students. 
To be clear, I have no experience using Scribble or with website design in 
general, but many years ago I did work through HtDP cover to cover, and have 
been searching for a reason to dip back into the Racket ecosystem.  I'm hoping 
this project might be it. 
To make this work, I'd need Scribble to render standard math notation, and to 
embed graphs and video players so that students can access these resources 
within the document.  Is Scribble the right tool for this job?  Any tips and 
advice from this community of experts would be extremely helpful!  
Thanks!Dave Yrueta
Here's an example of a sample Desmos graph: 
https://www.desmos.com/calculator/wiirm0g5yj


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/9e629891-eb48-436b-804d-e55d9417d68fn%40googlegroups.com.
  

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/312044158.3735865.1607481011810%40mail.yahoo.com.


Re: [racket-users] Trouble with `set-copy`

2020-12-08 Thread Robby Findler
Sorry for the earlier confusion!

On Tue, Dec 8, 2020 at 6:48 PM Nathaniel W Griswold 
wrote:

> Ok. Thanks.
>
> > On Dec 8, 2020, at 6:47 PM, Robby Findler 
> wrote:
> >
> > Right, it is probably both things. I ran your program on yesterday's git
> build and it still returns #false, but for the mutability reason, not the
> bug that Jon mentioned.
> >
> > Robby
> >
> >
> > On Tue, Dec 8, 2020 at 6:45 PM Nathaniel W Griswold 
> wrote:
> > I think it is something more. The copied set is giving completely
> different elements. If i loop over the copied set i get 32 values from 0 to
> like 31, when i have in fact added 1000 random elements to the original set
> before copying.
> >
> > Nate
> >
> > > On Dec 8, 2020, at 6:43 PM, Robby Findler 
> wrote:
> > >
> > > No, I don't think that's it. The issue is that one is a mutable set
> and the other isn't, so they aren't equal (even if their elements aren't
> equal).
> > >
> > > > (equal? (mutable-seteqv) (list->seteqv '()))
> > > #f
> > >
> > > Maybe you wanted to call list->mutable-seteqv? Or maybe just start
> with an immutable set?
> > >
> > > Robby
> > >
> > >
> > > On Tue, Dec 8, 2020 at 6:40 PM Nathaniel W Griswold
>  wrote:
> > > Thanks. Switching to 7.9 now.
> > >
> > > Nate
> > >
> > > > On Dec 8, 2020, at 6:38 PM, Jon Zeppieri  wrote:
> > > >
> > > > I think that's this bug
> > > > [
> https://github.com/racket/racket/commit/543dab59640fa5e911443baaadaae471406dbf40
> ],
> > > > which should be fixed in 7.9. - Jon
> > > >
> > > > On Tue, Dec 8, 2020 at 7:19 PM Nathaniel W Griswold
> > > >  wrote:
> > > >>
> > > >> I don’t know if i’m missing something or what, but the following is
> confusing me:
> > > >>
> > > >> (let ([test (mutable-seteqv)])
> > > >>  (for* ([i (in-range 1000)]
> > > >> [j (random 0 1000)])
> > > >>(set-add! test j))
> > > >>  (let ([test-copy (set-copy test)])
> > > >>(printf "test-copy=~a\n" (set->list test-copy))
> > > >>(printf "Equal from stream is ~a\n" (equal? (list->seteqv
> (set->list test-copy)) test
> > > >>
> > > >> prints something like:
> > > >> test-copy=(31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13
> 12 11 10 9 8 7 6 5 4 3 2 1 0)
> > > >> Equal from stream is #f
> > > >> Equal regular is #t
> > > >>
> > > >>
> > > >> Why is this?
> > > >>
> > > >> Thanks
> > > >>
> > > >> Nate
> > > >>
> > > >> --
> > > >> You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > > >> To unsubscribe from this group and stop receiving emails from it,
> send an email to racket-users+unsubscr...@googlegroups.com.
> > > >> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/ED9A219D-41D8-42BF-9C67-9887ADFB268B%40manicmind.earth
> .
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/B11A3C69-794C-4E45-8C56-311DEB07164C%40manicmind.earth
> .
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAL3TdON3V6Qrq3U2xdemoxYzpgXUkDhRsBT3gN%3DYHjZ8aCFfgg%40mail.gmail.com
> .
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/0AED1D31-2FE2-4637-908D-D57808D55CFB%40manicmind.earth
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdOO3Gh16Bsd_mSco_aJDDqS1x8nRgWdV0rUhTxFaeNxycQ%40mail.gmail.com.


Re: [racket-users] Trouble with `set-copy`

2020-12-08 Thread Nathaniel W Griswold
Ok. Thanks.

> On Dec 8, 2020, at 6:47 PM, Robby Findler  wrote:
> 
> Right, it is probably both things. I ran your program on yesterday's git 
> build and it still returns #false, but for the mutability reason, not the bug 
> that Jon mentioned.
> 
> Robby
> 
> 
> On Tue, Dec 8, 2020 at 6:45 PM Nathaniel W Griswold  
> wrote:
> I think it is something more. The copied set is giving completely different 
> elements. If i loop over the copied set i get 32 values from 0 to like 31, 
> when i have in fact added 1000 random elements to the original set before 
> copying.
> 
> Nate
> 
> > On Dec 8, 2020, at 6:43 PM, Robby Findler  wrote:
> > 
> > No, I don't think that's it. The issue is that one is a mutable set and the 
> > other isn't, so they aren't equal (even if their elements aren't equal).
> > 
> > > (equal? (mutable-seteqv) (list->seteqv '()))
> > #f
> > 
> > Maybe you wanted to call list->mutable-seteqv? Or maybe just start with an 
> > immutable set?
> > 
> > Robby
> > 
> > 
> > On Tue, Dec 8, 2020 at 6:40 PM Nathaniel W Griswold  
> > wrote:
> > Thanks. Switching to 7.9 now.
> > 
> > Nate
> > 
> > > On Dec 8, 2020, at 6:38 PM, Jon Zeppieri  wrote:
> > > 
> > > I think that's this bug
> > > [https://github.com/racket/racket/commit/543dab59640fa5e911443baaadaae471406dbf40],
> > > which should be fixed in 7.9. - Jon
> > > 
> > > On Tue, Dec 8, 2020 at 7:19 PM Nathaniel W Griswold
> > >  wrote:
> > >> 
> > >> I don’t know if i’m missing something or what, but the following is 
> > >> confusing me:
> > >> 
> > >> (let ([test (mutable-seteqv)])
> > >>  (for* ([i (in-range 1000)]
> > >> [j (random 0 1000)])
> > >>(set-add! test j))
> > >>  (let ([test-copy (set-copy test)])
> > >>(printf "test-copy=~a\n" (set->list test-copy))
> > >>(printf "Equal from stream is ~a\n" (equal? (list->seteqv (set->list 
> > >> test-copy)) test
> > >> 
> > >> prints something like:
> > >> test-copy=(31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 
> > >> 11 10 9 8 7 6 5 4 3 2 1 0)
> > >> Equal from stream is #f
> > >> Equal regular is #t
> > >> 
> > >> 
> > >> Why is this?
> > >> 
> > >> Thanks
> > >> 
> > >> Nate
> > >> 
> > >> --
> > >> You received this message because you are subscribed to the Google 
> > >> Groups "Racket Users" group.
> > >> To unsubscribe from this group and stop receiving emails from it, send 
> > >> an email to racket-users+unsubscr...@googlegroups.com.
> > >> To view this discussion on the web visit 
> > >> https://groups.google.com/d/msgid/racket-users/ED9A219D-41D8-42BF-9C67-9887ADFB268B%40manicmind.earth.
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/B11A3C69-794C-4E45-8C56-311DEB07164C%40manicmind.earth.
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/CAL3TdON3V6Qrq3U2xdemoxYzpgXUkDhRsBT3gN%3DYHjZ8aCFfgg%40mail.gmail.com.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/0AED1D31-2FE2-4637-908D-D57808D55CFB%40manicmind.earth.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/7189B3B3-9DD4-4A91-BB82-417D5808263B%40manicmind.earth.


Re: [racket-users] Trouble with `set-copy`

2020-12-08 Thread Robby Findler
Right, it is probably both things. I ran your program on yesterday's git
build and it still returns #false, but for the mutability reason, not the
bug that Jon mentioned.

Robby


On Tue, Dec 8, 2020 at 6:45 PM Nathaniel W Griswold 
wrote:

> I think it is something more. The copied set is giving completely
> different elements. If i loop over the copied set i get 32 values from 0 to
> like 31, when i have in fact added 1000 random elements to the original set
> before copying.
>
> Nate
>
> > On Dec 8, 2020, at 6:43 PM, Robby Findler 
> wrote:
> >
> > No, I don't think that's it. The issue is that one is a mutable set and
> the other isn't, so they aren't equal (even if their elements aren't equal).
> >
> > > (equal? (mutable-seteqv) (list->seteqv '()))
> > #f
> >
> > Maybe you wanted to call list->mutable-seteqv? Or maybe just start with
> an immutable set?
> >
> > Robby
> >
> >
> > On Tue, Dec 8, 2020 at 6:40 PM Nathaniel W Griswold 
> wrote:
> > Thanks. Switching to 7.9 now.
> >
> > Nate
> >
> > > On Dec 8, 2020, at 6:38 PM, Jon Zeppieri  wrote:
> > >
> > > I think that's this bug
> > > [
> https://github.com/racket/racket/commit/543dab59640fa5e911443baaadaae471406dbf40
> ],
> > > which should be fixed in 7.9. - Jon
> > >
> > > On Tue, Dec 8, 2020 at 7:19 PM Nathaniel W Griswold
> > >  wrote:
> > >>
> > >> I don’t know if i’m missing something or what, but the following is
> confusing me:
> > >>
> > >> (let ([test (mutable-seteqv)])
> > >>  (for* ([i (in-range 1000)]
> > >> [j (random 0 1000)])
> > >>(set-add! test j))
> > >>  (let ([test-copy (set-copy test)])
> > >>(printf "test-copy=~a\n" (set->list test-copy))
> > >>(printf "Equal from stream is ~a\n" (equal? (list->seteqv
> (set->list test-copy)) test
> > >>
> > >> prints something like:
> > >> test-copy=(31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13
> 12 11 10 9 8 7 6 5 4 3 2 1 0)
> > >> Equal from stream is #f
> > >> Equal regular is #t
> > >>
> > >>
> > >> Why is this?
> > >>
> > >> Thanks
> > >>
> > >> Nate
> > >>
> > >> --
> > >> You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > >> To unsubscribe from this group and stop receiving emails from it,
> send an email to racket-users+unsubscr...@googlegroups.com.
> > >> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/ED9A219D-41D8-42BF-9C67-9887ADFB268B%40manicmind.earth
> .
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/B11A3C69-794C-4E45-8C56-311DEB07164C%40manicmind.earth
> .
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAL3TdON3V6Qrq3U2xdemoxYzpgXUkDhRsBT3gN%3DYHjZ8aCFfgg%40mail.gmail.com
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/0AED1D31-2FE2-4637-908D-D57808D55CFB%40manicmind.earth
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdOOCzogZxAk3W0n66Tqg%3DHJG-g-mm%3DQwCDQzp8vj7yp3Eg%40mail.gmail.com.


Re: [racket-users] Trouble with `set-copy`

2020-12-08 Thread Nathaniel W Griswold
I think it is something more. The copied set is giving completely different 
elements. If i loop over the copied set i get 32 values from 0 to like 31, when 
i have in fact added 1000 random elements to the original set before copying.

Nate

> On Dec 8, 2020, at 6:43 PM, Robby Findler  wrote:
> 
> No, I don't think that's it. The issue is that one is a mutable set and the 
> other isn't, so they aren't equal (even if their elements aren't equal).
> 
> > (equal? (mutable-seteqv) (list->seteqv '()))
> #f
> 
> Maybe you wanted to call list->mutable-seteqv? Or maybe just start with an 
> immutable set?
> 
> Robby
> 
> 
> On Tue, Dec 8, 2020 at 6:40 PM Nathaniel W Griswold  
> wrote:
> Thanks. Switching to 7.9 now.
> 
> Nate
> 
> > On Dec 8, 2020, at 6:38 PM, Jon Zeppieri  wrote:
> > 
> > I think that's this bug
> > [https://github.com/racket/racket/commit/543dab59640fa5e911443baaadaae471406dbf40],
> > which should be fixed in 7.9. - Jon
> > 
> > On Tue, Dec 8, 2020 at 7:19 PM Nathaniel W Griswold
> >  wrote:
> >> 
> >> I don’t know if i’m missing something or what, but the following is 
> >> confusing me:
> >> 
> >> (let ([test (mutable-seteqv)])
> >>  (for* ([i (in-range 1000)]
> >> [j (random 0 1000)])
> >>(set-add! test j))
> >>  (let ([test-copy (set-copy test)])
> >>(printf "test-copy=~a\n" (set->list test-copy))
> >>(printf "Equal from stream is ~a\n" (equal? (list->seteqv (set->list 
> >> test-copy)) test
> >> 
> >> prints something like:
> >> test-copy=(31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 
> >> 10 9 8 7 6 5 4 3 2 1 0)
> >> Equal from stream is #f
> >> Equal regular is #t
> >> 
> >> 
> >> Why is this?
> >> 
> >> Thanks
> >> 
> >> Nate
> >> 
> >> --
> >> You received this message because you are subscribed to the Google Groups 
> >> "Racket Users" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an 
> >> email to racket-users+unsubscr...@googlegroups.com.
> >> To view this discussion on the web visit 
> >> https://groups.google.com/d/msgid/racket-users/ED9A219D-41D8-42BF-9C67-9887ADFB268B%40manicmind.earth.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/B11A3C69-794C-4E45-8C56-311DEB07164C%40manicmind.earth.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAL3TdON3V6Qrq3U2xdemoxYzpgXUkDhRsBT3gN%3DYHjZ8aCFfgg%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/0AED1D31-2FE2-4637-908D-D57808D55CFB%40manicmind.earth.


Re: [racket-users] Trouble with `set-copy`

2020-12-08 Thread Robby Findler
No, I don't think that's it. The issue is that one is a mutable set and the
other isn't, so they aren't equal (even if their elements aren't equal).

> (equal? (mutable-seteqv) (list->seteqv '()))
#f

Maybe you wanted to call list->mutable-seteqv? Or maybe just start with an
immutable set?

Robby


On Tue, Dec 8, 2020 at 6:40 PM Nathaniel W Griswold 
wrote:

> Thanks. Switching to 7.9 now.
>
> Nate
>
> > On Dec 8, 2020, at 6:38 PM, Jon Zeppieri  wrote:
> >
> > I think that's this bug
> > [
> https://github.com/racket/racket/commit/543dab59640fa5e911443baaadaae471406dbf40
> ],
> > which should be fixed in 7.9. - Jon
> >
> > On Tue, Dec 8, 2020 at 7:19 PM Nathaniel W Griswold
> >  wrote:
> >>
> >> I don’t know if i’m missing something or what, but the following is
> confusing me:
> >>
> >> (let ([test (mutable-seteqv)])
> >>  (for* ([i (in-range 1000)]
> >> [j (random 0 1000)])
> >>(set-add! test j))
> >>  (let ([test-copy (set-copy test)])
> >>(printf "test-copy=~a\n" (set->list test-copy))
> >>(printf "Equal from stream is ~a\n" (equal? (list->seteqv (set->list
> test-copy)) test
> >>
> >> prints something like:
> >> test-copy=(31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12
> 11 10 9 8 7 6 5 4 3 2 1 0)
> >> Equal from stream is #f
> >> Equal regular is #t
> >>
> >>
> >> Why is this?
> >>
> >> Thanks
> >>
> >> Nate
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> >> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/ED9A219D-41D8-42BF-9C67-9887ADFB268B%40manicmind.earth
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/B11A3C69-794C-4E45-8C56-311DEB07164C%40manicmind.earth
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdON3V6Qrq3U2xdemoxYzpgXUkDhRsBT3gN%3DYHjZ8aCFfgg%40mail.gmail.com.


Re: [racket-users] Trouble with `set-copy`

2020-12-08 Thread Nathaniel W Griswold
Thanks. Switching to 7.9 now.

Nate

> On Dec 8, 2020, at 6:38 PM, Jon Zeppieri  wrote:
> 
> I think that's this bug
> [https://github.com/racket/racket/commit/543dab59640fa5e911443baaadaae471406dbf40],
> which should be fixed in 7.9. - Jon
> 
> On Tue, Dec 8, 2020 at 7:19 PM Nathaniel W Griswold
>  wrote:
>> 
>> I don’t know if i’m missing something or what, but the following is 
>> confusing me:
>> 
>> (let ([test (mutable-seteqv)])
>>  (for* ([i (in-range 1000)]
>> [j (random 0 1000)])
>>(set-add! test j))
>>  (let ([test-copy (set-copy test)])
>>(printf "test-copy=~a\n" (set->list test-copy))
>>(printf "Equal from stream is ~a\n" (equal? (list->seteqv (set->list 
>> test-copy)) test
>> 
>> prints something like:
>> test-copy=(31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 
>> 9 8 7 6 5 4 3 2 1 0)
>> Equal from stream is #f
>> Equal regular is #t
>> 
>> 
>> Why is this?
>> 
>> Thanks
>> 
>> Nate
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/ED9A219D-41D8-42BF-9C67-9887ADFB268B%40manicmind.earth.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/B11A3C69-794C-4E45-8C56-311DEB07164C%40manicmind.earth.


Re: [racket-users] Trouble with `set-copy`

2020-12-08 Thread Jon Zeppieri
I think that's this bug
[https://github.com/racket/racket/commit/543dab59640fa5e911443baaadaae471406dbf40],
which should be fixed in 7.9. - Jon

On Tue, Dec 8, 2020 at 7:19 PM Nathaniel W Griswold
 wrote:
>
> I don’t know if i’m missing something or what, but the following is confusing 
> me:
>
> (let ([test (mutable-seteqv)])
>   (for* ([i (in-range 1000)]
>  [j (random 0 1000)])
> (set-add! test j))
>   (let ([test-copy (set-copy test)])
> (printf "test-copy=~a\n" (set->list test-copy))
> (printf "Equal from stream is ~a\n" (equal? (list->seteqv (set->list 
> test-copy)) test
>
> prints something like:
> test-copy=(31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 
> 9 8 7 6 5 4 3 2 1 0)
> Equal from stream is #f
> Equal regular is #t
>
>
> Why is this?
>
> Thanks
>
> Nate
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/ED9A219D-41D8-42BF-9C67-9887ADFB268B%40manicmind.earth.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAKfDxxwNX4HXJ2YJeEAem42VmfmG3hi0H-2PrKetsg_Z%2Bwh16g%40mail.gmail.com.


[racket-users] Trouble with `set-copy`

2020-12-08 Thread Nathaniel W Griswold
I don’t know if i’m missing something or what, but the following is confusing 
me:

(let ([test (mutable-seteqv)])
  (for* ([i (in-range 1000)]
 [j (random 0 1000)])
(set-add! test j))
  (let ([test-copy (set-copy test)])
(printf "test-copy=~a\n" (set->list test-copy))
(printf "Equal from stream is ~a\n" (equal? (list->seteqv (set->list 
test-copy)) test

prints something like:
test-copy=(31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 
8 7 6 5 4 3 2 1 0)
Equal from stream is #f
Equal regular is #t


Why is this?

Thanks

Nate

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/ED9A219D-41D8-42BF-9C67-9887ADFB268B%40manicmind.earth.


[racket-users] compose in Typed Racket

2020-12-08 Thread unlimitedscolobb
Hello,

I've found out that compose in Typed Racket has the type

(: compose (All (a b c) (-> (-> b c) (-> a b) (-> a c

which means that Typed Racket's compose can only combine two functions at a 
time.

In untyped code, I tend to use compose to combine more functions (e.g., 7), 
so I wrote myself the following definitions:

(: compose-n (All (a) (-> (-> a a) * (-> a a
(define (compose-n . funcs)
  (λ (x)
(for/foldr ([x x]) ([f funcs])
  (f x

(: compose-3 (All (a b c d) (-> (-> c d) (-> b c) (-> a b) (-> a d
(define (compose-3 f1 f2 f3)
  (λ (x) (f1 (f2 (f3 x)

(: compose-4 (All (a b c d e) (-> (-> d e) (-> c d) (-> b c) (-> a b) (-> a 
e
(define (compose-4 f1 f2 f3 f4)
  (λ (x) (f1 (f2 (f3 (f4 x))

Is there a better way to chain compose calls in Typed Racket?

If the answer is no, is there any interest in including these three 
functions (as well as compose-5, 6, 7, 8) into Typed Racket?

-
Sergiu

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/98bb349f-5de9-4e19-bc7d-d8c2be4d8c9an%40googlegroups.com.


[racket-users] [TFP'21] second call for papers: Trends in Functional Programming 2021, 18-19 February (online event with Lambda Days 2021 & TFPIE 2021)

2020-12-08 Thread p.achten

-
 Second call for papers
22nd Symposium on Trends in Functional Programming
  tfp2021.org
-

Did you miss the deadline to submit a paper to Trends in Functional 
Programming
http://tfp2021.org/? No worries -- it's not too late!
Submission is open until January 15th 2021, for a presentation slot at the 
event
and post-symposium reviewing.

The symposium on Trends in Functional Programming (TFP) is an international
forum for researchers with interests in all aspects of functional 
programming,
taking a broad view of current and future trends in the area. It aspires to 
be
a lively environment for presenting the latest research results, and other
contributions.

* TFP offers a supportive reviewing process designed to help less 
experienced
  authors succeed, with two rounds of review, both before and after the
  symposium itself. Authors have an opportunity to address reviewers' 
concerns
  before final decisions on publication in the proceedings.

* TFP offers two "best paper" awards, the John McCarthy award for best 
paper,
  and the David Turner award for best student paper.

* TFP is co-located with Lambda Days in beautiful Krakow. Lambda Days is a 
vibrant
  developer conference with hundreds of attendees and a lively programme of 
talks on
  functional programming in practice. Due to the covid pandemic, the event 
is online
  with a lot of attention to interaction and getting to socialize with the 
community.


Important Dates
---

Submission deadline for pre-symposium review:   20th November, 2020  -- 
passed --
Submission deadline for draft papers:   15th January, 2021
Symposium dates:18-19th February, 2021

Visit http://tfp2021.org/ for more information.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/c7af4174-54a4-4361-9fe6-6357e07cab83n%40googlegroups.com.


Re: [racket-users] simple question about call/cc

2020-12-08 Thread Laurent
Tim, if you paste your code in the definitions in DrRacket (with the #lang
racket line), and run it (as a module, thus), you obtain this in the
interactions window:
3
10
6

The `3` is because of the `(add1 (call/cc ... 2)))` expression, which is
reduced to `(add1 2)` with the side effect of recording the continuation in
`ret`.
The `10` corresponds to `(ret 9)`.


On Tue, Dec 8, 2020 at 2:26 AM Tim Meehan  wrote:

> I've read a lot about call/cc, and each time wind up just moving on. So
> this is an early New Year's resolution: getting a better understanding of
> it.
>
> According to Wikipedia's page on continuations, the continuation of the
> statement:
>
> ((call/cc f) e2)
>
> is:
>
> (lambda (c) (c e2))
>
> #lang racket
> (define ret #f)
> (define ret2 (lambda (c) (add1 c)))
>
> (add1
>  (call/cc
>   (lambda (k)
> (set! ret k) ;; Now ret should be equivalent to ret2.
> 2)))
>
> (ret 9) ;; Why does this print twice?
> (ret2 5) ;; This only prints once, like I would have expected.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CACgrOx%2BnXZpQv_MbDwdAZJSGpMiD%2BE1gB4YH8Rsb_y3%3D6RaAnQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABNTSaG1R9eM%3DSRjbmWcBKFMyzBTou7O%3D2_0jgDg2_2qSuLb%3Dg%40mail.gmail.com.