lexi-lambda changed the topic of #racket to: Racket v7.5 has been released: https://blog.racket-lang.org/2019/11/racket-v7-5.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
pera has joined #racket
badkins has joined #racket
vraid has quit [Read error: Connection reset by peer]
ermo has quit [Quit: ZNC 1.7.5 - https://znc.in]
ermo has joined #racket
evdubs has quit [Remote host closed the connection]
evdubs has joined #racket
Sgeo has quit [Read error: Connection reset by peer]
Sgeo has joined #racket
manicennui has joined #racket
endobson has joined #racket
iyzsong has joined #racket
badkins has quit [Remote host closed the connection]
zmt01 has joined #racket
zmt00 has quit [Ping timeout: 260 seconds]
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
endobson has joined #racket
manicennui has quit [Quit: Connection closed for inactivity]
orivej has joined #racket
rubic88 has quit [Ping timeout: 265 seconds]
ephemeron has quit [Ping timeout: 265 seconds]
ephemeron has joined #racket
rubic88 has joined #racket
aidalgol has joined #racket
FreeFull has quit []
narimiran has joined #racket
endformationage has quit [Ping timeout: 240 seconds]
Lowl3v3l has quit [Quit: Leaving.]
ArthurStrong has joined #racket
<ArthurStrong> Hi all. Excuse me, but what is the function to construct a list out of function's result? For example, I want a list of 10 random variables returned by (random) function
<ArthurStrong> Like inverse of (for-each)
_whitelogger has joined #racket
<ecraven> you could use map and iota, ignoring the index value: (map (lambda (_) (random)) (iota 10))
<ArthurStrong> ecraven: thanks!
<ecraven> racket probably has a more succinct way of doing this though ;)
<ArthurStrong> ecraven: couldn't find it, hence asking...
teardown has quit [Ping timeout: 268 seconds]
dddddd has quit [Remote host closed the connection]
Sauvin has quit [Ping timeout: 240 seconds]
gour has joined #racket
pera has quit [Ping timeout: 268 seconds]
sauvin_ has joined #racket
Sgeo_ has joined #racket
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sgeo has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 265 seconds]
sauvin_ is now known as Sauvin
endobson has joined #racket
<erkin> ArthurStrong: (build-list 10 (λ _ (random)))
<ArthurStrong> erkin: oh thanks!
<erkin> No problem.
<ArthurStrong> How to parse string like "1 2 3" to a list of numbers?
<erkin> (map string->number (string-split "1 2 3"))
<ArthurStrong> erkin: aha, thanks
<erkin> build-list passes the index of the element it's consing that iteration to the proc, so the formals are _ (ie don't-care). You can also use thunk* there.
<erkin> (thunk foo) is equivalent to (λ () foo) whereas (thunk* bar) is equivalent to (λ _ bar).
<notnotdan> oh TIL about thunk*
teardown has joined #racket
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aidalgol has quit [Quit: Using Circe, the loveliest of all IRC clients]
<ArthurStrong> What is the simplest way to update structure member? Failed with set!...
orivej has joined #racket
Fernando-Basso has joined #racket
vraid has joined #racket
vraid has quit [*.net *.split]
teardown has quit [*.net *.split]
Sgeo_ has quit [*.net *.split]
ephemeron has quit [*.net *.split]
jmiven has quit [*.net *.split]
banjiewen has quit [*.net *.split]
Trieste has quit [*.net *.split]
acarrico has quit [*.net *.split]
theruran has quit [*.net *.split]
bchar has quit [*.net *.split]
ziyourenxiang has quit [*.net *.split]
epony has quit [*.net *.split]
thallada has quit [*.net *.split]
meimeix has quit [*.net *.split]
evdubs has quit [*.net *.split]
zmt01 has quit [*.net *.split]
hexagoxel has quit [*.net *.split]
greghendershott has quit [*.net *.split]
samth has quit [*.net *.split]
Irenes[m] has quit [*.net *.split]
BitPuffin has quit [*.net *.split]
jackhill has quit [*.net *.split]
siel has quit [*.net *.split]
eagleflo_ has quit [*.net *.split]
iyzsong has quit [*.net *.split]
lexi-lambda has quit [*.net *.split]
winny has quit [*.net *.split]
mzan has quit [*.net *.split]
cky has quit [*.net *.split]
Blkt has quit [*.net *.split]
ullbeking has quit [*.net *.split]
bartbes has quit [*.net *.split]
tazjin has quit [*.net *.split]
hoek has quit [*.net *.split]
krono has quit [*.net *.split]
fridim has quit [*.net *.split]
juanfra has quit [*.net *.split]
<ArthurStrong> ... sovled
<ArthurStrong> how to add a simple contract: a function's argument must be a list of integers?
notzmv has quit [Ping timeout: 268 seconds]
zmt01 has joined #racket
evdubs has joined #racket
Irenes[m] has joined #racket
BitPuffin has joined #racket
samth has joined #racket
jackhill has joined #racket
eagleflo_ has joined #racket
greghendershott has joined #racket
siel has joined #racket
hexagoxel has joined #racket
Fernando-Basso has quit [*.net *.split]
narimiran has quit [*.net *.split]
m1dnight_ has quit [*.net *.split]
lavaflow_ has quit [*.net *.split]
tilpner has quit [*.net *.split]
nullman has quit [*.net *.split]
emacsomancer has quit [*.net *.split]
deeglaze has quit [*.net *.split]
_bryan has quit [*.net *.split]
r3x5 has quit [*.net *.split]
danderson has quit [*.net *.split]
dyl has quit [*.net *.split]
gluon has quit [*.net *.split]
akkad has quit [*.net *.split]
wingo has quit [*.net *.split]
john2x has quit [*.net *.split]
juanfra has joined #racket
danderso1 has joined #racket
jmiven has joined #racket
theruran has joined #racket
ephemeron has joined #racket
Sgeo_ has joined #racket
Trieste has joined #racket
banjiewen has joined #racket
bchar has joined #racket
vraid has joined #racket
teardown has joined #racket
ziyourenxiang has joined #racket
acarrico has joined #racket
thallada has joined #racket
meimeix has joined #racket
epony has joined #racket
ullbeking has joined #racket
iyzsong has joined #racket
lexi-lambda has joined #racket
bartbes has joined #racket
cky has joined #racket
tazjin has joined #racket
Blkt has joined #racket
fridim has joined #racket
winny has joined #racket
mzan has joined #racket
krono has joined #racket
cbarrett has quit [Ping timeout: 246 seconds]
^[ has quit [Ping timeout: 252 seconds]
nullcone has quit [Ping timeout: 260 seconds]
theruran has quit [Ping timeout: 257 seconds]
narimiran has joined #racket
dvdmuckle has quit [Ping timeout: 268 seconds]
john2x has joined #racket
krono has quit [Ping timeout: 244 seconds]
ullbeking has quit [Ping timeout: 244 seconds]
r3x5 has joined #racket
cbarrett has joined #racket
krono has joined #racket
dyl has joined #racket
dvdmuckle has joined #racket
^[ has joined #racket
mzan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nullman has joined #racket
deeglaze has joined #racket
notzmv has joined #racket
mzan has joined #racket
nullcone has joined #racket
hoek has joined #racket
nullcone has quit [Excess Flood]
tazjin has quit [Ping timeout: 272 seconds]
nullcone has joined #racket
gluon has joined #racket
tazjin has joined #racket
ullbeking has joined #racket
theruran has joined #racket
cartwright has quit [Remote host closed the connection]
cartwright has joined #racket
samlamamma has joined #racket
<samlamamma> Is there any way to convert a pict into a vector format like SVG?
<samlamamma> You know what? The library included PostScript generation, thank goodness :)
<erkin> A pict interface would be a nice addition to the simple-svg library.
<ArthurStrong> please... can anyone suggest a simple examples of contracts?
<ArthurStrong> TIA
<samlamamma> Anyone here got experience with Redex? I'm trying to generate fresh variables in a reduction-relation context and I'm not sure how to do it as a side-expression (using (fresh fresh-clause ...)).
<samlamamma> Hm. Actually I might be screwing it up in a different way
<samlamamma> Okay, so (fresh sym-var-) (the prefix of my variables) work, but that's just weird. I might just generate my own variables using a metafunction instead.
<samlamamma> Nah, it works :-D
wpdevelopment11 has joined #racket
gour_ has joined #racket
notzmv has quit [Ping timeout: 268 seconds]
<erkin> ArthurStrong: What are you having trouble with?
<ArthurStrong> erkin: I have a function that receives a list of integer as argument. I want to be sure it always be so
gour has quit [Ping timeout: 268 seconds]
<ArthurStrong> list of integers
<erkin> Go on
<ArthurStrong> This is it.
<erkin> Well, functions have return values too.
<ArthurStrong> I want to Racket to trigger exception if argument has different type
<ArthurStrong> In C/C++ I would use assert
<ArthurStrong> in Python: if type(arg)!=... raise...
<erkin> Yes, I got that.
<erkin> I'm asking for the return type.
<erkin> A contract requires the type of all arguments and also the return value.
<ArthurStrong> erkin: there is no return type... yet.. but if it would be present... what to do?
<erkin> Let's say it returns a boolean.
<erkin> And takes no other arguments.
<erkin> The contract would be (-> (listof integer?) boolean?)
<ArthurStrong> erkin: thanks, how to add this?
<erkin> Depends on how you design your project.
<erkin> If you just want to attach a contract to a single procedure, you can use the define/contract form.
<ArthurStrong> erkin: aha, thanks
<erkin> The guide is your friend. :-)
nullcone has quit [Quit: Connection closed for inactivity]
<ArthurStrong> erkin: surely, it's possible to mention a type of struct?
<erkin> Of course.
<erkin> You can make contracts of all types.
<ArthurStrong> erkin: thanks
gour_ is now known as gour
ArthurStrong has quit [Quit: leaving]
wpdevelopment11 has quit [Remote host closed the connection]
iyzsong has quit [Quit: ZNC 1.7.1 - https://znc.in]
dddddd has joined #racket
gour has quit [Remote host closed the connection]
badkins has joined #racket
notzmv has joined #racket
gour has joined #racket
badkins has quit [Ping timeout: 265 seconds]
acarrico has quit [Ping timeout: 265 seconds]
acarrico has joined #racket
samlamamma has quit [Remote host closed the connection]
endobson has joined #racket
gebrek has joined #racket
pera has joined #racket
endobson has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gebrek has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Remote host closed the connection]
vraid has quit [Quit: Leaving]
endformationage has joined #racket
notzmv has quit [Read error: Connection reset by peer]
efm has joined #racket
badkins has joined #racket
badkins has quit [Remote host closed the connection]
efm has quit [Remote host closed the connection]
efm has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 268 seconds]
nullcone has joined #racket
FreeFull has joined #racket
danderso1 is now known as danderson
manicennui has joined #racket
zmt01 has quit [*.net *.split]
evdubs has quit [*.net *.split]
hexagoxel has quit [*.net *.split]
greghendershott has quit [*.net *.split]
samth has quit [*.net *.split]
Irenes[m] has quit [*.net *.split]
BitPuffin has quit [*.net *.split]
jackhill has quit [*.net *.split]
siel has quit [*.net *.split]
eagleflo_ has quit [*.net *.split]
efm has quit [Read error: Connection reset by peer]
evdubs has joined #racket
hexagoxel has joined #racket
zmt01 has joined #racket
samth has joined #racket
siel has joined #racket
Irenes[m] has joined #racket
greghendershott has joined #racket
jackhill has joined #racket
BitPuffin has joined #racket
eagleflo_ has joined #racket
emacsomancer has joined #racket
gour_ has joined #racket
gour has quit [Ping timeout: 265 seconds]
efm has joined #racket
brettgilio has quit [Ping timeout: 252 seconds]
twee has quit [Quit: WeeChat 2.4]
twee has joined #racket
twee has quit [Client Quit]
twee has joined #racket
m1dnight_ has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 240 seconds]
efm has quit [Ping timeout: 265 seconds]
gour_ is now known as gour
efm has joined #racket
orivej has joined #racket
ober has joined #racket
narimiran has quit [Ping timeout: 260 seconds]
cartwright has quit [Remote host closed the connection]
cartwright has joined #racket
vraid has joined #racket
orivej has quit [Ping timeout: 268 seconds]
badkins has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
gour has quit [Remote host closed the connection]
efm has quit [Ping timeout: 265 seconds]
efm has joined #racket