
Active (logged in)members seems to be around 50 daily and 100 weekly, with the number posting being 10–25% from a brief scan of the platform stats

But how many uses neither: email, slack, google groups nor reddit?

I suspect some are on irc only. Others probably follow the Racket Facebook page and group, without being on any other platform

@soegaard2 a pretty comprehensive list of communication channels that people get Racket information from is at https://gist.github.com/samdphillips/47ea14d6eb75f93e64ad20dfd1bee8dc courtesy of @samdphillips

I see. It’s always good to have multiple approaches to a problem :slightly_smiling_face: Thanks for your contribution to the Racket environment! I’m definitely going to try your tool.

Someone posted this in another Slack. It’s a page from the book “Emmy in the Key of Code”. I thought it was cool that Racket was first :slightly_smiling_face:

Java JAva JAVa JAVA

Racket doesn’t have STM. The safe behavior of call-in-os-thread
is documented here: https://docs.racket-lang.org/foreign/Operating_System_Threads.html?q=os-thread

@badkins do you mind if I post your pic on Twitter and paraphrase your comment?

Well, it’s not my pic, but I suppose posting it would be fine.

Just got a build error. :disappointed:

Trying to fix…

note that your build should still work fine; just that bit of documentation will have an error

10th line probably is responsible.

yes, i agree. what kind of machine is this on?

That expression works for me: [samth@huor:~/sw/plt/extra-pkgs/racket-lang-org (master) plt] r -I typed/racket
Welcome to Racket v7.5.0.7.
> (require math/private/flonum/flonum-bits)
> (negative? (flprev 0.0))
- : Boolean
#t

~> inxi -F System: Host: hz87m Kernel: 5.3.11-arch1–1 x86_64 bits: 64 Desktop: Gnome 3.34.1 Distro: Arch Linux Machine: Type: Desktop System: ASUS product: All Series v: N/A serial: <root required> Mobo: ASUSTeK model: H87M-PRO v: Rev X.0x serial: <root required> UEFI: American Megatrends v: 2102 date: 10/28/2014 CPU: Topology: Quad Core model: Intel Core i7–4790 bits: 64 type: MT MCP L2 cache: 8192 KiB Speed: 3886 MHz min/max: 800/4000 MHz Core speeds (MHz): 1: 3882 2: 3877 3: 3791 4: 3882 5: 3878 6: 3882 7: 3792 8: 3866 Graphics: Device–1: Intel Xeon E3–1200 v3/4th Gen Core Processor Integrated Graphics driver: i915 v: kernel Display: wayland server: http://X.Org\|X.Org 1.20.5 driver: intel unloaded: modesetting resolution: 1920x1200~60Hz OpenGL: renderer: Mesa DRI Intel Haswell Desktop v: 4.5 Mesa 19.2.4

Just added a hyphen to 0.0 and it fixed. (define -min.0 (assert (flprev –0.0) negative?))

that shouldn’t be needed

Interesting, when I build racket 7.5 having installed 7.4 there was no error at all. When tried to build 7.5 having installed 7.5, the package got this error.

The same. ~> racket -I typed/racket
Welcome to Racket v7.5.
> (require math/private/flonum/flonum-bits)
> (negative? (flprev 0.0))
- : Boolean
#t

Should it have been –0.0 instead? (since (eq? –0.0 0.0) is false)

Sorry - missed you already tried that.

Should I put all of those into the “Racket on the Web” section of the wiki front page?

Yes. Maybe it needs its own page?

I’ll update the section now (so I don’t forget) and then maybe move it in a few.

Ok

@samth So place/context
is fantastic! Is there anything similar for moving values of parameters into a place? Right now I read them outside of the place into a local variable, then write them back inside a place, which is fine, but if there’s a more idiomatic method that would be great!

There’s not a way to do that now, but writing a macro that uses place/context
+ parameterize
to do that should be pretty easy

basically: (define-syntax-rule (place/context/parameter id (param ...) body ...)
(let ([fresh (param)] ...) (place/context id (parameterize ([param fresh] ...) body ...))))

Could place/context
be extended with an optional #:parameters (param ...)
argument?

Sure, although that seems awfully specific

are there other things that could be made to work similarly?

a lot of racket’s standard library is built around parameters and relies on them pretty heavily, so it seems weird for place/context
not to support them out of the box

similar thing I could think of would be maybe opening and closing some sort of resource, like a port? but I’m not sure

yes, I think ports could do something useful too

Can ports created with make-pipe
be sent over place channels?

I agree with @notjack that parameters seem reasonable to special-case, though admittedly it is a weird design. The key issue is that parameters (and ports) have dynamic scope while place/context is for lexical scope.

yes

thinking something like this:
(define out (open-output-string))
(define in (open-input-string "First line\nSecond line"))
(place/context my-place
#:include-parameters (current-thing current-other-thing)
#:forward-ports ([to-out out] [from-in in])
(let loop ()
(define line (read-line from-in))
(unless (eof-object? line)
(write-string "line: " to-out)
(write-string line to-out)
(newline to-out)
(loop))))
(place-wait my-place)
(get-output-string out) ; should be "line: First line\nline: Second line"

~I get this on a path that does exist, is a directory, and is not a symlink.~
delete-directory/files: encountered path that is neither file nor directory

Has this been seen before? If not, prepping reproduction steps now.

Disregard: There was a corner case that caused the directory to not exist after all.

removed an integration from this channel: https://racket.slack.com/services/B4J9LJ90R\|incoming-webhook

do you have the code to implement that part off-hand?

nope, just a vague plan. general implementation strategy:
• make place/context
send an initialization message to the new place • outside the place, use make-pipe
for each forwarded port (if it’s both an input and an output port, make two pipes) • include one half of each pipe in the initialization message, along with any parameter values • start some background threads outside the place that use copy-port
to shuffle data to/from the pipes and the original ports • flush the pipes once the created place dies, then the background threads should terminate

@samth update: ports created with make-pipe
can’t be sent to/from places :(

File and TCP ports are already legal place messages

Yup, but I think any port forwarding feature in place/context
should support either all ports or none at all. Supporting only some is bound to cause confusion.

…and now that I think about it, if places are best for cpu-heavy work with minimal communication, adding a fancy feature to make it easier to pass around ports is probably not something worth doing in the first place

Parameters, yes. Ports, no.

I mean, with parameters, we’re also not proposing to make them cross-place, just to copy the “initial” value over.

I’ll admit I’ve changed my mind. I’m not sure how I feel about the java dimension in a kids book. Seems cruel.

Right. That’s simple, very useful, and works well for cpu-heavy tasks that happen to read some shared configuration settings via parameters.

Yep!

BTW, @samth, the proposed macro isn’t quite right since it uses fresh
as the name for each parameter’s temporary lexical binding. let
complains about the duplicate variable names. I’m trying to find a replacement that’s similarly short but currently failing.

(Of course you can do it with generate-temporaries
, but the code is uglier…)

AFAIK, generate-temporaries
is the right way. Ryan proposed ~indexed
but it’s right now still a PR (https://github.com/racket/racket/pull/2262).

Use define-simple-macro
, then use generate-temporaries
in a #:with
pattern directive