

using that, the code is: (define-simple-macro (place/context/parameter id (param ...) body ...)
#:with (fresh ...) (generate-temporaries #'(param ...))
(let ([fresh (param)] ...) (place/context id (parameterize ([param fresh] ...) body ...))))

Oh my, I just discovered call-with-limits
! Every day is a fun lesson with Racket :slightly_smiling_face:

In particular it distinguishes between time and memory limits when the call is halted early

Sam, but if Racket had STM and all the data structures were immutable, wouldn’t an OS thread library be safe to use? I’m guessing the answer is yes; otherwise, Clojure would have big problems handling multiple OS threads of execution. It turns out that STM isn’t as needed as was originally thought. They’re (Clojure community) mainly using atoms to maintain coherent state.

You don’t need an STM to have safe parallelism. The issue is that the Racket runtime is not designed to be thread safe in the appropriate ways for this to work in general. For example, creating a structure with struct
and loading a module with require
both involve internal implementations that are not safe to run in parallel without synchronization.

Will Racket CS make any difference to the complexity of a future solution?

Yes, Racket CS is much simpler to deal with here. For example, much more runs successfully in parallel using future
on Racket CS, and the os-thread
library is only available on Racket CS.

Hello everyone! Has someone success with build racket and racketcs together? What I do: ../configure —prefix=/usr/local —mandir=/usr/local/man —enable-cs make both -j8 CPUS="8"
Only traditional racket I see in /usr/local/bin/ Chez is installed (from AUR): /u/l/bin scheme Chez Scheme Version 9.5.2 Copyright 1984–2019 Cisco Systems, Inc.

@lars.schuetze has joined the channel

Racket PPA is building today, hopefully this time it will have CS builds too

[sage@localhost cli]$ raco exe ++lang 'racket/base' ravk.rkt
[sage@localhost cli]$ raco distribute distro ravk
split-path: contract violation
expected: (or/c path-for-some-system? path-string?)
given: 'same
Here, ravk.rkt
is a module that I designate using racket-launcher-libraries
in info.rkt
. I want to package it and all dependencies to submit to the #gamejam. This is my first time using raco exe
and raco distribute
, and I’m not sure what’s causing this.

For clarity, split-path
occurs nowhere in the source except in binaries that happened to be created at the time.
[sage@localhost vulkan]$ grep -r split-path *
Binary file cli/distro/lib/libracket3m-7.4.so matches
Binary file cli/distro/bin/ravk matches
[sage@localhost vulkan]$

@deactivateduser60718 maybe it’s https://github.com/racket/racket/issues/2536#issuecomment-473409887

tl;dr trying to create an exe from a module that uses dynamic-require
produces a similar error.

does it still fail if you use define-runtime-path
or define-runtime-module-path-index
to produce the input for dynamic-require
?

It’s been a long time since I ran into that problem, but the comment before the one I linked mentions trying to use define-runtime-path
fails in a slightly different way:
https://github.com/racket/racket/issues/2536#issuecomment-473409887
I don’t think I ever tried define-runtime-module-path-index
.

at this point only @mflatt will really know more …

should probably also check that duplicate parameters aren’t given

Also I really don’t think it should be a whole new macro, and it should instead just be an optional extra feature of place/context
. But that’s a separate thing.

Can I write a contract that accepts all functions in:
(-> any)
(-> number? any)
(-> number? number? any)
(-> number? number? number? any)
...
but not: (->* () #:rest (listof number?) any)
? (that is, accepting functions that take an arbitrary number of numbers)

I’m confused, do you mean that the function accepted by the contract should have all of those arities, or only one of them?

~one of them~ all of those arities, sorry

a contract that accepts any functions that takes numbers

->*
does not work because it demands the function to handle arbitrarily many arguments

your probably want unconstrained-domain->

Happy to accept a PR to do that.

thanks!

I also want to constrain the type of the arguments (but not the # of arguments) maybe this is not a good contract to write

make a new contract combinator?

sounds about right :new:

Ok cool, this time Racket CS did build for the PPA (with only about two changes in the packaging).

DrRacket seemed to keep getting killed by my VM though, I wonder if there’s something wrong with my setup or I’d get that out of the VM too.

@noahstorym has joined the channel

Has anyone noted that the Tabs in Dark Mode in DrRacket are pretty unreadable?


Slack’s new WYSIWYG text thing is… a thing.

I took me a while to figure out how to get out of code blocks (no it’s not <esc>:wq)

@samdphillips How do you turn dark mode on? I can’t see anything obvious, probably my eyesight again.