spdegabrielle
2019-11-20 08:58:44

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


soegaard2
2019-11-20 09:32:42

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


spdegabrielle
2019-11-20 10:45:25

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


spdegabrielle
2019-11-20 10:50:03

@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


jerome.martin.dev
2019-11-20 11:19:15

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.


badkins
2019-11-20 15:19:59

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:


willbanders
2019-11-20 15:20:34

Java JAva JAVa JAVA


samth
2019-11-20 15:24:04

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


spdegabrielle
2019-11-20 15:25:37

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


badkins
2019-11-20 15:34:19

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


dmitryhertz
2019-11-20 15:34:32

Just got a build error. :disappointed:


dmitryhertz
2019-11-20 15:34:58

Trying to fix…


samth
2019-11-20 15:35:18

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


dmitryhertz
2019-11-20 15:38:48

10th line probably is responsible.


samth
2019-11-20 15:41:18

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


samth
2019-11-20 15:43:28

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


dmitryhertz
2019-11-20 15:51:07

~> 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


dmitryhertz
2019-11-20 16:01:29

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


samth
2019-11-20 16:01:58

that shouldn’t be needed


dmitryhertz
2019-11-20 16:03:09

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.


dmitryhertz
2019-11-20 16:07:17

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


soegaard2
2019-11-20 16:46:08

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


soegaard2
2019-11-20 16:47:08

Sorry - missed you already tried that.


samdphillips
2019-11-20 18:14:45

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


spdegabrielle
2019-11-20 18:21:05

Yes. Maybe it needs its own page?


samdphillips
2019-11-20 18:22:09

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


spdegabrielle
2019-11-20 18:22:25

Ok


pavpanchekha
2019-11-20 18:48:22

@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!


samth
2019-11-20 20:12:30

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


samth
2019-11-20 20:14:35

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


notjack
2019-11-20 20:33:52

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


samth
2019-11-20 20:34:21

Sure, although that seems awfully specific


samth
2019-11-20 20:34:48

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


notjack
2019-11-20 20:35:42

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


notjack
2019-11-20 20:37:09

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


samth
2019-11-20 20:44:20

yes, I think ports could do something useful too


notjack
2019-11-20 20:48:01

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


pavpanchekha
2019-11-20 20:52:06

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.


samth
2019-11-20 20:52:22

yes


notjack
2019-11-20 21:13:36

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"

deactivateduser60718
2019-11-20 21:39:54

~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

deactivateduser60718
2019-11-20 21:41:02

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


deactivateduser60718
2019-11-20 21:45:29

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


samth
2019-11-20 21:49:31

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


samth
2019-11-20 21:55:56

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


notjack
2019-11-20 22:04:58

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


notjack
2019-11-20 23:46:02

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


samth
2019-11-20 23:59:25

File and TCP ports are already legal place messages


notjack
2019-11-21 00:01:36

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.


notjack
2019-11-21 00:03:18

…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


notjack
2019-11-21 00:03:25

Parameters, yes. Ports, no.


pavpanchekha
2019-11-21 00:19:19

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


spdegabrielle
2019-11-21 00:19:51

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.


notjack
2019-11-21 00:21:04

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


pavpanchekha
2019-11-21 00:21:52

Yep!


pavpanchekha
2019-11-21 01:06:46

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.


pavpanchekha
2019-11-21 01:11:04

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


sorawee
2019-11-21 01:25:37

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).


notjack
2019-11-21 03:17:31

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