samth changed the topic of #racket to: Racket v7.3 has been released: https://blog.racket-lang.org/2019/05/racket-v7-3.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
efm has quit [Ping timeout: 258 seconds]
Arcaelyx has joined #racket
orivej has quit [Ping timeout: 244 seconds]
libertyprime has joined #racket
ubLIX has quit [Quit: ubLIX]
clacke_movim has left #racket [#racket]
clacke_movim has joined #racket
Arcaelyx has quit [Ping timeout: 248 seconds]
FreeFull has quit []
ym555_ has joined #racket
clacke_movim has left #racket [#racket]
ym555 has quit [Ping timeout: 246 seconds]
selimcan has joined #racket
selimcan has quit [Remote host closed the connection]
orivej has joined #racket
clacke_movim has joined #racket
Arcaelyx has joined #racket
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #racket
selimcan has joined #racket
selimcan has quit [Remote host closed the connection]
q9929t has joined #racket
q9929t has quit [Quit: q9929t]
dddddd has quit [Remote host closed the connection]
pera has quit [Quit: leaving]
notzmv has quit [Ping timeout: 245 seconds]
libertyprime has quit [Ping timeout: 272 seconds]
sagax has joined #racket
libertyprime has joined #racket
caltelt_ has joined #racket
caltelt has quit [Ping timeout: 272 seconds]
libertyprime has quit [Ping timeout: 268 seconds]
libertyprime has joined #racket
libertyprime has quit [Ping timeout: 246 seconds]
endformationage has quit [Ping timeout: 248 seconds]
libertyprime has joined #racket
notzmv has joined #racket
josiah_sama has quit [Remote host closed the connection]
casaca has quit [Ping timeout: 272 seconds]
casaca has joined #racket
manualcrank has quit [Quit: WeeChat 1.9.1]
Arcaelyx has quit [Ping timeout: 248 seconds]
Arcaelyx has joined #racket
caltelt_ has quit [Ping timeout: 248 seconds]
sauvin has joined #racket
libertyprime has quit [Ping timeout: 244 seconds]
libertyprime has joined #racket
soegaard has joined #racket
urbanslug has joined #racket
soegaard has quit [Client Quit]
Sgeo__ has joined #racket
Sgeo_ has quit [Ping timeout: 272 seconds]
soegaard has joined #racket
urbanslug has quit [Ping timeout: 272 seconds]
DGASAU has joined #racket
urbanslug has joined #racket
jellie has joined #racket
clacke_movim has left #racket [#racket]
urbanslug has quit [Ping timeout: 272 seconds]
clacke_movim has joined #racket
dmiles has quit [Ping timeout: 258 seconds]
zenspider has quit [Ping timeout: 258 seconds]
zenspider has joined #racket
dmiles has joined #racket
jcowan has quit [Quit: Connection closed for inactivity]
Sgeo_ has joined #racket
euhmeuh has joined #racket
Sgeo__ has quit [Ping timeout: 246 seconds]
jellie has quit [Ping timeout: 258 seconds]
jellie has joined #racket
jellie has quit [Read error: Connection reset by peer]
jellie has joined #racket
soegaard has quit [Quit: soegaard]
jellie has quit [Quit: WeeChat 2.4]
soegaard has joined #racket
zipper has joined #racket
mceier has quit [Quit: leaving]
mceier has joined #racket
Sgeo__ has joined #racket
Sgeo_ has quit [Ping timeout: 258 seconds]
zipper has quit [Read error: Connection reset by peer]
zipper has joined #racket
zmt01 has joined #racket
zmt00 has quit [Ping timeout: 252 seconds]
soegaard has quit [Quit: soegaard]
Sgeo_ has joined #racket
Sgeo__ has quit [Ping timeout: 272 seconds]
soegaard has joined #racket
Sgeo__ has joined #racket
Sgeo_ has quit [Ping timeout: 268 seconds]
lavaflow has quit [Ping timeout: 258 seconds]
ym555 has joined #racket
ym555_ has quit [Ping timeout: 246 seconds]
Sgeo__ has quit [Read error: Connection reset by peer]
Sgeo__ has joined #racket
ym555 has quit [Ping timeout: 248 seconds]
soegaard has quit [Quit: soegaard]
ym555 has joined #racket
ym555 has quit [Ping timeout: 268 seconds]
zipper has quit [Read error: Connection reset by peer]
libertyprime has quit [Read error: Connection reset by peer]
zipper has joined #racket
libertyprime has joined #racket
Sgeo_ has joined #racket
Sgeo__ has quit [Ping timeout: 272 seconds]
zipper has quit [Ping timeout: 272 seconds]
vraid has joined #racket
pierpal has joined #racket
zipper has joined #racket
libertyprime has quit [Quit: Lost terminal]
iyzsong has joined #racket
Sgeo_ has quit [Read error: Connection reset by peer]
Sgeo_ has joined #racket
zipper has quit [Ping timeout: 272 seconds]
zipper has joined #racket
zipper has quit [Ping timeout: 258 seconds]
zipper has joined #racket
mpcjanssen has quit [Quit: WeeChat 1.9.1]
zipper has quit [Ping timeout: 248 seconds]
zipper has joined #racket
rubic88 has joined #racket
dddddd has joined #racket
efm has joined #racket
zipper has quit [Ping timeout: 245 seconds]
zipper has joined #racket
rubic has joined #racket
rubic88 has quit [Ping timeout: 248 seconds]
zipper has quit [Ping timeout: 246 seconds]
zipper has joined #racket
zipper has quit [Ping timeout: 272 seconds]
zipper has joined #racket
efm has quit [Ping timeout: 268 seconds]
pierpal has quit [Ping timeout: 268 seconds]
ym555 has joined #racket
zipper has quit [Read error: Connection reset by peer]
zipper has joined #racket
jcowan has joined #racket
pierpal has joined #racket
endformationage has joined #racket
iyzsong has quit [Ping timeout: 248 seconds]
ym555 has quit [Ping timeout: 246 seconds]
ym555 has joined #racket
ym555 has quit [Ping timeout: 258 seconds]
zipper has quit [Ping timeout: 276 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
zipper has joined #racket
zipper has quit [Ping timeout: 250 seconds]
lockywolf has joined #racket
euhmeuh has left #racket [#racket]
lockywolf_ has joined #racket
DGASAU has quit [Ping timeout: 258 seconds]
lockywolf has quit [Ping timeout: 244 seconds]
zipper has joined #racket
vraid has quit [Quit: Leaving]
zipper has quit [Ping timeout: 268 seconds]
pierpal has quit [Ping timeout: 258 seconds]
ekleog has joined #racket
<samth> jcowan: I don't know what you mean by "engineered" but a bunch of engineering went into writing them
ym555 has joined #racket
<ekleog> Hey! I'm doing rust and looking at racket from afar, and wondering: would someone who also know about rust understand whether racket would be able to cleanly interoperate with rust futures? (I'm considering a use case where I'd be passing rust functions that return futures to racket, using them in racket, and recovering back functions from racket to rust via embedding, with the functions from racket that
<ekleog> should return rust futures)
* ekleog considering using racket and hoping someone here already knows the async semantics of both rust and racket -- racket's futures appear quite different to rust futures from a quick read over racket docs)
efm has joined #racket
zipper has joined #racket
ym555 has quit [Quit: leaving...]
jao has joined #racket
<ekleog> like, rust's async is basically “return a (Pending|Done(value)) type and notify when we should be called again”, so racket would mostly need to just pass through this Pending|Done(value) to the caller in a way that'd ideally be transparent for the user who would notice only that they're operating on `value`
zipper has quit [Ping timeout: 272 seconds]
<ekleog> maybe a way of doing so would be to freeze a racket thread until the rust function gets its notification, at which point the rust caller could thaw the thread and try to grab its result (or re-freeze it if there's something else to wait for)? I'm kind of fearing that there will end up being two event loops that will be hard to make interoperate if I actually try to work on just that
zipper has joined #racket
ricekrispie2 has joined #racket
ricekrispie has quit [Ping timeout: 248 seconds]
<ekleog> another way might be to use a scheme_sleep callback, but I can see how to make that working only 1. assuming there's a single racket interpreter per process, and 2. if I could find a way to have more granularity than the scheme_sleep call: I'd need to know as soon as a thread becomes blocked to not block the rust event loop, not only to know when all racket threads become blocked
zipper has quit [Read error: Connection reset by peer]
urbanslug has joined #racket
ng0 has joined #racket
<greghendershott> ekleog: I don't know how to do that. It seems complicated.
<ekleog> hmm :/ I guess worst case I can always just add a queue between the racket and rust event loops, but it's ugly to add unnecessary buffers, and it would require some manual handling of function calls as if they were RPC :/
<greghendershott> Call me lazy but my first choice for two arbiteary langs to interop is to run them as two processes and use some sort of IPC - like a pipe or unix socket (local) or TCP (remote)
urbanslug has quit [Ping timeout: 268 seconds]
<greghendershott> I would very desperately try to find a way to make that the only approach required. :)
<ekleog> well it works but it's ugly, it's just not FFI
<ekleog> buffers everywhere, while one of the languages could just cleanly yield control of its event loop to the other :/
* ekleog “just” wants to take the event loop out of racket and handle it from rust
ubLIX has joined #racket
<jcowan> samth: I'm sure of that. I meant that the racket/control module is not designed as a coherent module; it is rather a set of compatibility hacks.
<samth> I don't think that's an accurate description at all
<samth> ekleog: racket futures are not related to rust futures (to a first approximation)
<samth> I don't really understand what it would mean to take the event loop out of racket
<samth> rust futures are a kind of rust value, and you could pass them in and out of racket code
<ekleog> wouldn't handling that be painful on the racket side? (racket is maybe going to be my scripting language, so things should be as transparent as possible from racket)
<samth> maybe you can say more about exactly what you trying to make happen
<ekleog> I'm writing an SMTP server, and would like to implement callbacks (say, `filter_rcpt_to`) in a scripting language so that it could be overridden by the end-user
<ekleog> (and in the primitives I'd be providing racket with, there are things like ldap lookup, etc.)
<ekleog> said primitives are rust-async, so they return Pending|Done(value), and I'd like to have the person configuring it able to ignore the async details
jao has quit [Ping timeout: 248 seconds]
<ekleog> and the function implemented in racket should be seen, from a rust pov, as a rust-async function
<samth> so what you want is a racket function that seems to block, where it's calling a rust function that returns a future?
clacke_movim has left #racket [#racket]
<ekleog> not only that, but also notify its caller that it's making it look like it's blocking, so scheme_block_until is not enough
<ekleog> (so the rust caller could return rust-`Pending` while waiting for the function to make progress)
urbanslug has joined #racket
efm has quit [Quit: Konversation terminated!]
clacke_movim has joined #racket
<samth> wait, which one is waiting for which?
jellie has joined #racket
<ekleog> well, rust would be waiting for rust through racket
urbanslug has quit [Read error: Connection reset by peer]
<ekleog> so racket would just be proxying the “please try again” request from a rust builtin to the rust embedder
<ekleog> (potentially by going through racket's own async system, which would likely be even better if it was the case, but I don't have that high hopes)
<samth> ekleog: i think the obvious way to do this is to have some racket code that uses the Future API directly (ie, directly using Task) and then when unpark is called, read the future and then send a message to the waiting racket code, using regular racket synchronization
JeanneKamikaze has joined #racket
<ekleog> hmm that is possible, for waiting on a rust future from racket, but doesn't allow racket to reply immediately “pending” to the rust caller, does it?
jellie has quit [Ping timeout: 268 seconds]
jellie has joined #racket
FreeFull has joined #racket
jellie has quit [Ping timeout: 272 seconds]
sauvin has quit [Read error: Connection reset by peer]
jellie has joined #racket
dan_f has joined #racket
jellie has quit [Ping timeout: 272 seconds]
jellie has joined #racket
selimcan has joined #racket
<samth> I think it's the rust code that replies "pending" to racket in that scenario
dan_f has quit [Quit: dan_f]
dan_f has joined #racket
jellie has quit [Ping timeout: 272 seconds]
jellie has joined #racket
acarrico has quit [Ping timeout: 248 seconds]
jellie has quit [Ping timeout: 246 seconds]
ricekrispie has joined #racket
jellie has joined #racket
ricekrispie2 has quit [Ping timeout: 258 seconds]
YuGiOhJCJ has joined #racket
jellie has quit [Ping timeout: 272 seconds]
jellie has joined #racket
clacke_movim has left #racket [#racket]
clacke_movim has joined #racket
clacke_movim has left #racket [#racket]
acarrico has joined #racket
clacke_movim has joined #racket
jellie has quit [Ping timeout: 272 seconds]
jellie has joined #racket
dan_f has quit [Quit: dan_f]
jellie has quit [Ping timeout: 246 seconds]
dan_f has joined #racket
ubLIX has quit [Quit: ubLIX]
jellie has joined #racket
manualcrank has joined #racket
jellie has quit [Ping timeout: 258 seconds]
dan_f has quit [Quit: dan_f]
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
jellie has joined #racket
orivej has quit [Ping timeout: 272 seconds]
acarrico has quit [Ping timeout: 272 seconds]
ubLIX has joined #racket
soegaard has joined #racket
ZombieChicken has joined #racket
teardown has quit [Read error: Connection reset by peer]
teardown has joined #racket
jellie has quit [Ping timeout: 246 seconds]
orivej has joined #racket
sz0 has joined #racket
jellie has joined #racket
<winny> I often find myself confusing struct accessors for struct names, as I usually separate words in my struct names with "-". Is there an alternate style I should consider? I think ":" might be ideal, but that may indicate struct inheritance, for example exn and its derived structs. Any suggestions?
<winny> My usual work around is to pick names that might not seem as self-evident, but are more unique
<samth> winny: usually people use - in struct names as well
<winny> for example I have a (struct machine (memory registers stack framebuffer)) and I might want to make each of those struct members a dedicated struct type named memory, framebuffer, and so on
ZombieChicken has quit [Remote host closed the connection]
ZombieChicken has joined #racket
ZombieChicken has quit [Remote host closed the connection]
ZombieChicken has joined #racket
soegaard has quit [Quit: soegaard]
ZombieChicken has quit [Remote host closed the connection]
rubic has quit [Remote host closed the connection]
ZombieChicken has joined #racket
ZombieChicken has quit [Remote host closed the connection]
ZombieChicken has joined #racket
<winny> also TIL: (match (list 'a (random)) [`(a ,x) x]) works (quasiquote in match expressions)
jellie has quit [Ping timeout: 245 seconds]
jao has joined #racket
ZombieChicken has quit [Remote host closed the connection]
ZombieChicken has joined #racket
ZombieChicken has quit [Remote host closed the connection]
ZombieChicken has joined #racket
ZombieChicken has quit [Remote host closed the connection]
ZombieChicken has joined #racket
ZombieChicken has quit [Remote host closed the connection]
ZombieChicken has joined #racket
ZombieChicken has quit [Remote host closed the connection]
JeanneKamikaze has quit [Read error: Connection reset by peer]
acarrico has joined #racket
ZombieChicken has joined #racket
sudden has quit [Ping timeout: 268 seconds]
ZombieChicken has left #racket [#racket]
ZombieChicken has joined #racket
ZombieChicken has left #racket [#racket]
ricekrispie2 has joined #racket
ricekrispie has quit [Ping timeout: 245 seconds]
ZombieChicken has joined #racket
ZombieChicken has left #racket [#racket]
jao has quit [Ping timeout: 268 seconds]
selimcan has quit [Remote host closed the connection]
jao has joined #racket
notzmv has quit [Ping timeout: 248 seconds]
lavaflow has joined #racket
notzmv has joined #racket
sudden has joined #racket
teardown has quit [Quit: leaving]
efm has joined #racket
ubLIX has quit [Quit: ubLIX]