spdegabrielle
2019-11-21 08:50:20

Submissions due in 8 days 16 hours 12 minutes 42 seconds Join jam


samth
2019-11-21 11:04:36

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


laurent.orseau
2019-11-21 12:11:00

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


laurent.orseau
2019-11-21 12:11:32

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


steveh2009
2019-11-21 14:22:55

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.


samth
2019-11-21 14:25:41

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.


steveh2009
2019-11-21 14:28:17

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


samth
2019-11-21 14:29:22

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.


dmitryhertz
2019-11-21 14:41:25

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
2019-11-21 16:29:51

@lars.schuetze has joined the channel


asumu
2019-11-21 19:05:37

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


deactivateduser60718
2019-11-21 19:06:18

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


deactivateduser60718
2019-11-21 19:21:27

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]$


popa.bogdanp
2019-11-21 20:25:05

popa.bogdanp
2019-11-21 20:27:02

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


samth
2019-11-21 20:30:52

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


popa.bogdanp
2019-11-21 20:32:24

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.


samth
2019-11-21 20:40:07

at this point only @mflatt will really know more …


notjack
2019-11-21 21:34:34

should probably also check that duplicate parameters aren’t given


notjack
2019-11-21 21:35:22

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.


shu--hung
2019-11-21 22:20:50

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)


alexknauth
2019-11-21 22:23:47

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


shu--hung
2019-11-21 22:24:08

~one of them~ all of those arities, sorry


shu--hung
2019-11-21 22:24:33

a contract that accepts any functions that takes numbers


shu--hung
2019-11-21 22:26:58

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


samth
2019-11-21 22:27:02

your probably want unconstrained-domain->


samth
2019-11-21 22:27:22

Happy to accept a PR to do that.


shu--hung
2019-11-21 22:32:34

thanks!


shu--hung
2019-11-21 22:34:06

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


ben
2019-11-21 23:22:31

make a new contract combinator?


shu--hung
2019-11-21 23:49:31

sounds about right :new:


asumu
2019-11-22 01:51:28

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


asumu
2019-11-22 01:52:28

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
2019-11-22 02:54:25

@noahstorym has joined the channel


samdphillips
2019-11-22 03:26:48

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


samdphillips
2019-11-22 03:41:30

willbanders
2019-11-22 05:54:21

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


shu--hung
2019-11-22 06:01:59

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


mark.warren
2019-11-22 07:40:54

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