Re: [racket-users] Structured Concurrency in Racket

2019-10-08 Thread Paulo Matos



On 07/10/2019 21:01, Arie Schlesinger wrote:
> Can somebody specify how to use racket in jupyter notebook ?
> Thanks
> 

There have been earlier threads about that you might want to look at.
https://groups.google.com/d/msg/racket-users/qw7u9pNFbuQ/eot1Acw7DAAJ

I don't know the answer to your question but you might have better luck
at an answer if you post it as a separate email instead of a sub-message
to an unrelated thread.

Good luck,
Paulo

> On Mon, Oct 7, 2019 at 21:59 jab  > wrote:
> 
> Yeah, I’d say give a closer read to
> 
> https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/
> 
> Excerpting a footnote:
> 
> > For those who can't possibly pay attention to the text without
> first knowing whether I'm aware of their favorite paper, my current
> list of topics to include in my review are: the "parallel
> composition" operator in Cooperating/Communicating Sequential
> Processes and Occam, the fork/join model, Erlang supervisors, Martin
> Sústrik's article on Structured concurrency and work on libdill, and
> crossbeam::scope / rayon::scope in Rust. [Edit: I've also been
> pointed to the highly relevant golang.org/x/sync/errgroup
>  and github.com/oklog/run
>  in Golang.]
> 
> -- 
> 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/02b4c456-2af1-4306-b749-b7d54173c7dc%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/CAMJd8C5JqCU82gg3ZoRPwV4H1_SxGQTSht9UXCWFtneSp_MVOA%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/0e8e6913-fe30-3a45-2c17-eac6e1812b38%40linki.tools.


[racket-users] Re: Structured Concurrency in Racket

2019-10-08 Thread Zelphir Kaltstahl
I don't think places are a good example for good support of parallelism.

It is difficult to get a flexible multi processing implementation done,
without hard-coding the lambdas, that run in each place, because we
cannot send serializable lambdas (which also are not core, but only
exist in the web server package) over channels. That means, that one
needs to define ones lambdas ahead of time before even starting a place
and sending it the data to process. That means, that we cannot have
something like a process pool.

The other problem is, that using places means using multiple Racket VMs,
if I remember correctly, which uses some RAM. It is not like places are
super lightweight at least.

Racket threads run on a single core, I think.

I know there is a tutorial about using futures somewhere, where it
depends on the number type one uses, whether the code can be
automatically run in parallel or not, so there is also some issue there,
or at least it did not look to me like one could use futures everywhere
and have neat parallelism.


When I tried to write a process pool kind of thing (had a lot of help
from this mailing list!), which I called work distributor, the above
mentioned problems with lambdas caused me to abandon that project, until
I can send lambdas over channels.

Correct any of the things I wrote above, if they are not true, but I
think Racket definitely needs a better multi processing story. I would
love to see something like Guile Fibers. Andy Wingo even mentioned in
his video, that some of the Racket greats advised him to look at
Concurrent ML and that that is where he got some ideas from, when
implementing Guile Fibers as a library. Shouldn't Racket then be able to
have a similar library? I don't understand how Fibers really works, but
that is a thought I had many times, since I heard about the Fibers library.

Regards,

Zelphir

-- 
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/59c68f8e-b668-f08e-55ae-a977084f5bb1%40gmail.com.


[racket-users] Re: Structured Concurrency in Racket

2019-10-08 Thread George Neuner
On Tue, 8 Oct 2019 10:36:42 -0400, Luke Whittlesey
 wrote:

>I think the ceu language has a nice model of what I would consider
>"structured". http://ceu-lang.org/ It has automatic cancellation and
>finalization. Racket can easily support this model. Await statements
>are captured through delimited continuations and processes are managed
>in a tree. If a parent process exits the children are canceled and
>finalized.

Interesting.  It appears - to me, anyway - that Ceu took some
inspiration from Occam, but is implemented with coroutines instead of
threads or light-weight processes.  Ceu programs are limited to a
single core/CPU ... so there is no real parallelism possible other
than by a multiple process approach.

Racket's threads have similar single core/CPU limitations, but futures
and places do not - they can run simultaneously on a multicore CPU.
Whatever "structure" model might be adopted for Racket would need to
account for the semantic differences.

George

-- 
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/u6hqpehe84ngfk8ackss2r7g74jg99ma9v%404ax.com.


Re: [racket-users] [ANN] RacketScript working for 7.x

2019-10-08 Thread Stephen Chang
> Does that include libraries like Pict, Pict3d, and the universe/world game 
> tools?

Ideally yes, though we have only bounced around ideas and do not have
a concrete plan.

There is, however, already support for 2htdp/image and 2htdp/universe.

I should have clarified that the functionality of RacketScript has not
changed. It is in the same experimental state and supports the same
subset of Racket as before.

On Wed, Oct 2, 2019 at 2:04 PM Hendrik Boom  wrote:
>
> On Wed, Oct 02, 2019 at 01:53:46PM -0400, Stephen Chang wrote:
> > The RacketScript compiler [1] has been updated to work with Racket 7.x
> > programs, ie all tests pass (though we are still working to support
> > more primitives).
> >
> > Try it out here: http://rapture.twistedplane.com:8080/
> >
> > The next milestone is to improve RacketScript enough to compile the
> > Racket expander [2], with the longer term goal being to self-host, so
> > programs may be independently compiled and run in the browser.
>
> Does that include libraries like Pict, Pict3d, and the universe/world
> game tools?
>
> -- hendrik
>
> >
> > If anyone is interested in helping out, let me know.
> >
> >
> > [1] https://github.com/vishesh/racketscript
> > [2] https://github.com/racket/racket/tree/master/racket/src/expander
> >
> > --
> > 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/CAFfiA1LEwkRrYE56j7Y1tM%3D5ZJ4YmWXxtO3R7q26m7g%2Bq0FHRQ%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/20191002180411.d4ekgdcp73cepvpq%40topoi.pooq.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/CAFfiA1Lrb8oopxTVo7_A5D8%2BcumREuVToB6tW1YuO1JrmWXFoQ%40mail.gmail.com.


Re: [racket-users] How do I typeset mixed-code for docs.racket-lang.org?

2019-10-08 Thread William J. Bowman
This got me interested.
I tried a quick hack on my scribble-minted package to allow for nesting
different languages.
Is this something like what you want?
  https://www.williamjbowman.com/tmp/scribble-minted/nested.html

Source here:
  https://github.com/wilbowma/scribble-minted/tree/nested-minted/nested.scrbl

--
William J. Bowman

On Tue, Oct 08, 2019 at 05:06:40PM +, Sage Gerard wrote:
> One of my projects allows for embedding Racket modules within  
> elements, within a Markdown page.
> 
> ## Hello World
>