samth changed the topic of #racket to: Racket v7.8 has been released: https://blog.racket-lang.org/2020/08/racket-v7-8.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
nebunez has joined #racket
ape666 has quit [Remote host closed the connection]
ArneBab has joined #racket
orivej has joined #racket
raoul1 has quit [Quit: WeeChat 2.9]
nebunez has quit [Ping timeout: 264 seconds]
aaaaaa has joined #racket
TCZ has joined #racket
ArneBab has quit [Remote host closed the connection]
catonano has quit [Read error: Connection reset by peer]
catonano_ has joined #racket
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
Fare has quit [Ping timeout: 264 seconds]
Fare has joined #racket
ski has quit [Ping timeout: 240 seconds]
acarrico has joined #racket
aaaaaa has quit [Quit: leaving]
phillbush has quit [Remote host closed the connection]
aidalgol has joined #racket
acarrico has quit [Ping timeout: 240 seconds]
dan_f has joined #racket
ski has joined #racket
aidalgol has quit [Read error: Connection reset by peer]
aidalgol has joined #racket
narimiran has joined #racket
dan_f has quit [Quit: dan_f]
dustyweb has quit [Ping timeout: 260 seconds]
dustyweb has joined #racket
andreyorst` has joined #racket
andreyorst` has joined #racket
catonano_ has quit [Quit: catonano_]
catonano has joined #racket
orivej has quit [Ping timeout: 272 seconds]
aidalgol has quit [Ping timeout: 246 seconds]
notzmv has quit [Ping timeout: 246 seconds]
aidalgol has joined #racket
notzmv has joined #racket
YuGiOhJCJ has joined #racket
gproto23 has joined #racket
<gproto23> erkin: hey man, did you get my message?
endobson has joined #racket
gproto023 has joined #racket
gproto23 has quit [Ping timeout: 240 seconds]
gproto023 is now known as gproto23
orivej has joined #racket
DGASAU has quit [Remote host closed the connection]
aidalgol has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
NieDzejkob has joined #racket
Sgeo_ has quit [Read error: Connection reset by peer]
Fare has quit [Ping timeout: 264 seconds]
_marcusE has joined #racket
<_marcusE> Hi ... picking up Racket and learning. I have a question about multiple return values and how to use them. I'm using the function (make-pipe) which returns an in- and out-port. I understand how to use let-values or define-values to get access to the return values. What I wanted to do was assign the values to a struct. Something like this (struct
<_marcusE> connector (in out)) -- and then assign the values like this (connector (make-pipe). This doesn't work and the message from racket is "result arity mismatch ... expected: 1 received: 2". Is there a way to do this directly without having to go through a let-values?
<_marcusE> this works: (let-values ([(in out) (make-pipe)]) (connector in out)) so what I'm not understanding is why the multiple return values can be used directly
<NieDzejkob> _marcusE: first off, you could use ((compose connector make-pipe)) to do this without binding the values
<NieDzejkob> in general, unless you use a special form that is ready to accept multiple return values, only the first value will be used
<_marcusE> So what is actually happening with multiple returns? You're not getting back a *single* structure (a list maybe) that has multiple values?
<_marcusE> I tried (apply connector (make-pipe)) as an alternative to "unpack" the return from make-pipe but this didn't work either -- same error about arity
<_marcusE> The compose works (thanks for that) and I can make progress on the rest of my problem. I'm just trying to understand why compose works
<NieDzejkob> well, what's actually happening with return values is that the continuation is invoked with multiple arguments
<NieDzejkob> which, if I'm correctly understanding where you're at, isn't exactly helpful :P
<NieDzejkob> compose works because it was written to handle multiple values
<_marcusE> I can see why apply fails ... it is expecting a *list* or arguments and not multiple values.
<NieDzejkob> note that you're passing the entire make-pipe to compose, and not its return values
<NieDzejkob> make-pipe gets called 'inside' of compose, and the arguments get transferred to connector
<_marcusE> Is compose a "native" implementation or can it be built up in racket from first principles?
<_marcusE> "...the continuation is invoked with multiple arguments" ... looks like it is time to invest more into understanding continuations
<NieDzejkob> ah, I totally forgot about (call-with-values make-pipe connector), that's probably preferred. If you had to pass arguments to make-pipe, you'd write (call-with-values (lambda () (make-pipe ...)) connector)
<NieDzejkob> compose can probably be built up
<NieDzejkob> I was going to look into the source code... Rust docs have a nice feature where each function has a source link which lets you conveniently study its implementation. I'd love it if Racket decided to steal that idea :P
<_marcusE> I was just looking through the source code to find the definition ...
<_marcusE> Perfect. I have enough to continue with and have some learning points as well. Thanks!
_marcusE has left #racket [#racket]
TCZ has joined #racket
jellie has joined #racket
orivej has quit [Ping timeout: 260 seconds]
acarrico has joined #racket
jellie has quit [Ping timeout: 240 seconds]
tfb has joined #racket
jellie has joined #racket
gproto23 has quit [Ping timeout: 256 seconds]
gproto23 has joined #racket
tfb has quit [Remote host closed the connection]
tfb has joined #racket
tfeb has joined #racket
bitmapper has quit [Quit: Connection closed for inactivity]
gproto023 has joined #racket
tfb has quit [Ping timeout: 240 seconds]
gproto23 has quit [Ping timeout: 260 seconds]
bitmapper has joined #racket
tfeb has quit [Read error: Connection reset by peer]
tfb has joined #racket
jellie has quit [Read error: Connection reset by peer]
acarrico has quit [Ping timeout: 246 seconds]
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
Fare has joined #racket
<samth> Tolstoy: that doesn't seem surprising to me for memory use
acarrico has joined #racket
gproto023 is now known as gproto23
FreeFull has joined #racket
acarrico has quit [Ping timeout: 260 seconds]
acarrico has joined #racket
TCZ has joined #racket
andreyorst` has quit [Quit: andreyorst`]
gproto23 has quit [Read error: Connection reset by peer]
ski has quit [Ping timeout: 240 seconds]
andreyorst_ has joined #racket
ski has joined #racket
the-smug-one has joined #racket
gproto23 has joined #racket
<the-smug-one> I've heard that CS Racket's continuations could be faster than BC Racket's. Anyone here got any anecdotal evidence supporting this?
<samth> the-smug-one: yes, they are much faster. see, for example, the ctak benchmark here: https://blog.racket-lang.org/2020/02/racket-on-chez-status.html
<the-smug-one> Whoa, that is actually very impressive
<the-smug-one> Maybe algebraic effect systems might be worth it to express I/O in Racket then.
andreyorst_ has quit [Ping timeout: 256 seconds]
andreyorst_ has joined #racket
narimiran has quit [Quit: leaving]
dan_f has joined #racket
endobson has joined #racket
andreyorst_ has quit [Quit: andreyorst_]
andreyorst_ has joined #racket
dusted has quit [Quit: WeeChat 1.9.1]
the-smug-one has quit [Ping timeout: 240 seconds]
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
true-grue has joined #racket
orivej has joined #racket
endformationage has joined #racket
aidalgol has joined #racket
jellie has joined #racket
tfb has quit []
Fare has quit [Ping timeout: 264 seconds]
Fare has joined #racket
ski has quit [Ping timeout: 256 seconds]
jellie has quit [Quit: WeeChat 3.0]
orivej has quit [Ping timeout: 240 seconds]
fridim has quit [Quit: Bye!]
acarrico has quit [Ping timeout: 256 seconds]
aaaaaa has joined #racket
TCZ has joined #racket
fridim has joined #racket
Sgeo has joined #racket
andreyorst_ has quit [Ping timeout: 260 seconds]
rj has joined #racket
real-grue has joined #racket
true-grue has quit [Ping timeout: 265 seconds]
gproto023 has joined #racket
gproto23 has quit [Ping timeout: 246 seconds]
gproto023 is now known as gproto23
benaiah` has joined #racket
drewolson9 has joined #racket
tonyg has quit [Ping timeout: 256 seconds]
tonyg has joined #racket
rubic has quit [Ping timeout: 256 seconds]
rubic88 has joined #racket
benaiah has quit [Ping timeout: 256 seconds]
benaiah` is now known as benaiah
drewolson has quit [Ping timeout: 256 seconds]
drewolson9 is now known as drewolson
nisstyre has quit [Ping timeout: 256 seconds]
`micro has quit [Ping timeout: 256 seconds]
`micro has joined #racket
dddddd has quit [Ping timeout: 256 seconds]
dddddd has joined #racket
nisstyre has joined #racket
real-grue has quit [Read error: Connection reset by peer]
gproto23 has quit [Remote host closed the connection]
gproto23 has joined #racket
terrorjack has quit [Read error: Connection reset by peer]
terrorjack has joined #racket
Blkt has quit [Read error: Connection reset by peer]
Blkt has joined #racket
juanfra has quit [Ping timeout: 256 seconds]
Fare has quit [Ping timeout: 260 seconds]
rj has quit [Quit: WeeChat 2.5]
gproto23 has quit [Ping timeout: 260 seconds]
ermo has quit [Quit: ZNC 1.8.2 - https://znc.in]
TCZ has quit [Remote host closed the connection]
ermo has joined #racket
phillbush has joined #racket
juanfra has joined #racket
TCZ has joined #racket
Fare has joined #racket