alanz has quit [Read error: Connection reset by peer]
alanz has joined #racket
rgherdt has quit [Ping timeout: 272 seconds]
tilpner_ has joined #racket
tilpner has quit [Ping timeout: 260 seconds]
tilpner_ is now known as tilpner
caente has quit [Ping timeout: 246 seconds]
teardown has joined #racket
teardown_ has quit [Ping timeout: 240 seconds]
cantstanya has quit [Ping timeout: 240 seconds]
cantstanya has joined #racket
phillbush has quit [Quit: Leaving]
orivej has joined #racket
endformationage has quit [Quit: WeeChat 2.9]
YuGiOhJCJ has joined #racket
teardown_ has joined #racket
teardown has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 246 seconds]
teardown has joined #racket
teardown_ has quit [Ping timeout: 240 seconds]
narimiran has joined #racket
Sgeo has quit [Read error: Connection reset by peer]
teardown_ has joined #racket
teardown_ has quit [Remote host closed the connection]
teardown has quit [Ping timeout: 240 seconds]
teardown has joined #racket
dvdmuckle has quit [Quit: Bouncer Surgery]
dvdmuckle has joined #racket
rgherdt has joined #racket
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
<narimiran>
what is the racket equivalent of python's `*my_list` (list unpacking)?
<dzoe>
narimiran: Do you want to bind certain number of values stored in the list to some names and the rest should end up in *my_list?
<narimiran>
dzoe: i've written a function `f2` that accepts 5 arguments. i have a function `f1` which returns 4 values. i would like to do `(f2 a (f1 b))`
<narimiran>
dzoe: `f1` returns `(values x y z w)`, if that matters (or if i should do that differently)
<dzoe>
Well... depends on other usage.
<dzoe>
If you never plan to use it with define-values or so, plain old list actually is better.
<dzoe>
This solves your problem, but definitely it does look ugly.
<dzoe>
If you would return a list, (apply f2 1 (f1 2)) does the trick.
<dzoe>
Oh, actually the cons is redundant in this case, the positional argument can be passed as-is. But the values->list conversion is still needed.
<narimiran>
dzoe: i can return a list from `f1`
<narimiran>
"(apply f2 1 (f1 2)) does the trick" - hmm, doesn't seem so
<dzoe>
When returning list?
<narimiran>
wait
<narimiran>
i was calling the wrong function
* narimiran
hides in shame
<dzoe>
Ah :)
<dzoe>
And I just prepared MWE :)
<dzoe>
(define (f1 b) (list b b b b)) (define (f2 a b c d e) (+ a b c d e)) (apply f2 1 (f1 2))
<dzoe>
Here you go anyway.
<dzoe>
But you probably got it already :)
<narimiran>
dzoe: yeah, `apply` does the trick! thank you!!
<narimiran>
it is more elegant than `define-values` just to pass those values to `f2`
<dzoe>
The multiple return values paradigm is well-suited for other use-cases.
<dzoe>
Although going from list to values is as easy as (define-values (a b ...) (apply values lst))
phillbush has joined #racket
drewolson has quit [Ping timeout: 240 seconds]
drewolson has joined #racket
Diagon has joined #racket
extrowerk has joined #racket
brettgilio has quit [Ping timeout: 240 seconds]
brettgilio has joined #racket
notzmv has quit [Remote host closed the connection]
orivej has joined #racket
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #racket
TheSchemer has joined #racket
<TheSchemer>
Good Morning (well i assume its morning, but then again, different time zones).
TheSchemer has quit [Quit: WeeChat 2.9]
aeth has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 264 seconds]
caente has joined #racket
aeth has joined #racket
tilpner has quit [Remote host closed the connection]
fanta1 has joined #racket
tilpner has joined #racket
tilpner has quit [Client Quit]
tilpner has joined #racket
tilpner has quit [Client Quit]
tilpner has joined #racket
tilpner has quit [Client Quit]
rekahsoft has joined #racket
notzmv has joined #racket
tilpner has joined #racket
Sgeo has joined #racket
orivej has joined #racket
orivej has quit [Ping timeout: 260 seconds]
endformationage has joined #racket
andreyorst` has quit [Quit: andreyorst`]
Steeve has joined #racket
Lowl3v3l has quit [Read error: Connection reset by peer]
Lowl3v3l has joined #racket
Diagon has quit [Ping timeout: 240 seconds]
<narimiran>
i'm using racket 7.9 (that's what comes with manjaro linux), and it seems i cannot install `threading` library!? (and i remember i had it installed on some previous version of racket, probably 7.8 or 7.7)
<bremner>
narimiran: "raco pkg install threading" completes OK with 7.9 on Debian
<danisanti>
trafaret1: I see it is a reference to the Chicken language. I cannot take much information out of it. What I really want to know is if Racket compiles code directly into assembly?
<danisanti>
or if it does Racket -> C -> Assembly .
<danisanti>
I have other question and this is taking way to long to answer such a simple question. Anyone? Fellow programmer here 👈
<evdubs>
danisanti, you can also send an email to racket-users@googlegroups.com
<danisanti>
evdubs: thank you for this information