mflatt
2018-5-16 11:55:53

@jbclements What’s the right alternative to (void)? (I think there may be a syntax property works, or maybe the alternative to (void) returned by set! is the right choice.)


dedbox
2018-5-16 19:19:17

Can anybody give me some pointers on debugging scribble example code? raco setup is timing out while compiling examples and the output always says [running body] where the line number should be.


ben
2018-5-16 19:20:06

what happens when you run racket FILE.scrbl ?


dedbox
2018-5-16 19:20:54

racket thinks for a second and then exits


dedbox
2018-5-16 19:20:56

no output


ben
2018-5-16 19:21:32

that’s good


ben
2018-5-16 19:21:43

what about raco scribble FILE.scrbl ?


ben
2018-5-16 19:21:56

that will render the document, if everything works


dedbox
2018-5-16 19:23:03

[Output to cmx.html] followed by lots of lines beginning with (dep or (tech


dedbox
2018-5-16 19:23:13

seems to be working on my local machine


dedbox
2018-5-16 19:23:42

dedbox
2018-5-16 19:24:08

travis does not complain either


ben
2018-5-16 19:24:42

oh, does raco setup time out on your machine?


dedbox
2018-5-16 19:24:48

no, never


ben
2018-5-16 19:25:48

ok then, I guess the package server has stricter time / memory limits


ben
2018-5-16 19:26:12

raco test has a --drdr option … I was hoping raco setup had something similar but I don’t see anything just now


dedbox
2018-5-16 19:28:11

what is drdr?


mflatt
2018-5-16 19:30:46

@dedbox From the pkg-build error, it looks like you may be creating a sandbox within the document (for examples, I assume) and that sandbox has a time limit. That is, it’s not a limit imposed by the package-build system, but probably just the package-build machine being slower. You could use call-with-trusted-sandbox-configuration to remove the limit (and all other limits) while creating the sandbox evaluator, or you could set other parameters like sandbox-eval-limits.


ben
2018-5-16 19:37:52

ben
2018-5-16 19:38:17

build/test server


dedbox
2018-5-16 19:45:50

@mflatt that’s right, this is in a sandbox. Removing the limits would be easiest.


dedbox
2018-5-16 19:46:50

Thanks!


asumu
2018-5-16 20:23:12

BTW, I started experimenting with a preview tool for slideshow in DrRacket. It’s still very experimental but I don’t have much time to hack on it so I’ll share the link in case anyone wants to contribute some hacking: https://github.com/takikawa/slideshow-preview-tool


dedbox
2018-5-16 20:31:27

Does DrDr build packages for the official catalog? Are those constraints published somewhere?


ben
2018-5-16 21:18:00

I think drdr and the package build are on different servers


githree
2018-5-16 21:54:07

@asumu I recall seeing a code doing something similar before: https://github.com/swo/laterna/blob/master/slide-watcher.rkt


asumu
2018-5-16 21:55:32

Oh nice, maybe that makes my plugin unnecessary. That would be good.


githree
2018-5-16 21:57:06

Your plugin would be useful anyway - the code I linked is quite hard to find


dedbox
2018-5-17 00:35:11

Fellow slackers,

I’d like to pre-announce the initial release of my event programming library, event-lang.

https://pkgd.racket-lang.org/pkgn/package/event-lang

This will be my first Racket package release and I’m asking for your help to get it right.

Event-lang is a Racket library that simplifies the creation of complex synchronizable events. It provides a primitive expression lifting form,

> (pure 123)
#<evt>

some event combinators,

> (sync (fmap + (pure 1) (pure 2)))
3
> (sync (app (pure +) (pure 1) (pure 2)))
3
> (sync (bind (pure 1) (pure 2) (λ xs (pure (apply + xs)))))
3

and a collection of event-friendly alternatives to base Racket forms and functions.

> (sync
   (event-let
    ([x (pure 1)]
     [y (pure 2)])
    (pure (list x y))))
'(1 2)

Composite events make progress by synchronizing constituent events, either concurrently or in a predictable sequence.

> (sync (async-set (pure 1) (pure 2) (pure 3)))
2
1
3

For an example of event-lang in the wild, look inside the cmx package, an (unreleased) communications library I’m also working on.

The event-lang project has three core objectives:

  1. Provide a sophisticated lifting form to simplify usage of the provided constructs. The event/event module contains a first approximation, but its construction was tedious and error prone, so I commented out the docs.

  2. Provide a full-blown #lang event/racket/base for producing whole modules of events and event constructors from ordinary Racket code in a principled manner.

  3. Provide support for static analysis of synchronization behaviors. Event programming in Racket is a curious form of meta-programming, and a few simple compile-time checks could reduce cognitive overhead.

If event-lang might be useful to you, or you’ve thought about making something similar, please take a look and let me know what you think.