tonyg changed the topic of #racket to: The Racket Programming Language -- https://racket-lang.org/ -- https://gather.town/app/wH1EDG3McffLjrs0/racket-users -- http://pasterack.org -- logged at https://libera.irclog.whitequark.org/racket/ -- This is the right place to ask for help with (Dr)Racket. Remember to wait around for an answer!
Origin has joined #racket
codaraxis has joined #racket
codaraxis has quit [Remote host closed the connection]
codaraxis has joined #racket
codaraxis has quit [Remote host closed the connection]
Tuplanolla has quit [Quit: Leaving.]
jeosol has joined #racket
Origin has quit [Ping timeout: 246 seconds]
libertyprime has quit [Ping timeout: 260 seconds]
liberalartist has joined #racket
libertyprime has joined #racket
liberalartist has quit [Ping timeout: 244 seconds]
notzmv has quit [Remote host closed the connection]
notzmv has joined #racket
notzmv has quit [Ping timeout: 260 seconds]
shawnw has joined #racket
terrorjack has joined #racket
terrorjack has quit [*.net *.split]
mange has quit [*.net *.split]
skapata has quit [*.net *.split]
m1dnight has quit [*.net *.split]
libertyprime has quit [*.net *.split]
haskal has quit [*.net *.split]
henrytill has quit [*.net *.split]
pounce has quit [*.net *.split]
sm2n has quit [*.net *.split]
JoelMcCracken has quit [*.net *.split]
ifreund has quit [*.net *.split]
matta has quit [*.net *.split]
artyn has quit [*.net *.split]
jakzale has quit [*.net *.split]
djelic has quit [*.net *.split]
oter has quit [*.net *.split]
koluacik_ has quit [*.net *.split]
ormaaaj has quit [*.net *.split]
HerlockSholmes has quit [*.net *.split]
hexology has quit [*.net *.split]
Ekho has quit [*.net *.split]
cow_2001 has quit [*.net *.split]
xgqt has quit [*.net *.split]
ori has quit [*.net *.split]
gomes has quit [*.net *.split]
energizer has quit [*.net *.split]
mzan has quit [*.net *.split]
dzoe has quit [*.net *.split]
linj has quit [*.net *.split]
ratzkewatzke has quit [*.net *.split]
lowhope_ has quit [*.net *.split]
ec has quit [*.net *.split]
krjt has quit [*.net *.split]
dbohdan has quit [*.net *.split]
groovy has quit [*.net *.split]
ncf has quit [*.net *.split]
GreaseMonkey has quit [*.net *.split]
nisstyre has quit [*.net *.split]
samth has quit [*.net *.split]
casaca has quit [*.net *.split]
cpli has quit [*.net *.split]
sudden has quit [*.net *.split]
fun-safe-math has quit [*.net *.split]
ns12 has quit [*.net *.split]
m5zs7k has quit [*.net *.split]
mdhughes has quit [*.net *.split]
Oxyd has quit [*.net *.split]
skeemer has quit [*.net *.split]
shawnw has quit [*.net *.split]
Putonlalla has quit [*.net *.split]
dTal has quit [*.net *.split]
jeosol has quit [*.net *.split]
munksgaard has quit [*.net *.split]
ecraven has quit [*.net *.split]
jsoo has quit [*.net *.split]
raghavgururajan has quit [Read error: Connection reset by peer]
listentolist has quit [Write error: Connection reset by peer]
mzan has joined #racket
HerlockSholmes has joined #racket
ratzkewatzke has joined #racket
hexology has joined #racket
libertyprime has joined #racket
cow_2001 has joined #racket
haskal has joined #racket
xgqt has joined #racket
lowhope has joined #racket
koluacik_ has joined #racket
dzoe has joined #racket
gomes has joined #racket
ec has joined #racket
jsoo has joined #racket
mdhughes has joined #racket
Oxyd has joined #racket
sudden has joined #racket
dTal has joined #racket
Putonlalla has joined #racket
fun-safe-math has joined #racket
skeemer has joined #racket
m1dnight has joined #racket
ns12 has joined #racket
m5zs7k has joined #racket
shawnw has joined #racket
ori has joined #racket
ecraven has joined #racket
jeosol has joined #racket
terrorjack has joined #racket
skapata has joined #racket
terrorjack has quit [Max SendQ exceeded]
skapata has quit [Max SendQ exceeded]
dTal has quit [Max SendQ exceeded]
dbohdan has joined #racket
groovy has joined #racket
krjt has joined #racket
GreaseMonkey has joined #racket
samth has joined #racket
nisstyre has joined #racket
ncf has joined #racket
energizer has joined #racket
ormaaaj has joined #racket
pounce has joined #racket
Ekho has joined #racket
msiism has joined #racket
<msiism> I have a function that transforms a date list in the from '(year_num month_num day_num) into an integer representation: (define (make-integer-date lst) (+ (* (car lst) 10000) (* (cadr lst) 100) (caddr lst)))
munksgaard has joined #racket
linj has joined #racket
<msiism> Now, the problme with this is that there's no length check for the input list.
<msiism> It seems the cleanest way to solve this is to make that function take three numbers as input, instead of a list.
<msiism> Now, to make my life easier, I would define a function that splits the input list (simply returning every value in it).
<msiism> Then I would wrap the actual integer transformation in a function that does the splitting so I don't have to do it every time I want to make an integer date.
<msiism> Anything wrong with this approach?
jeosol has quit [Ping timeout: 246 seconds]
m5zs7k has quit [Ping timeout: 250 seconds]
m5zs7k has joined #racket
<msiism> Okay, apparently, you can't just return elements of a list without any structure.
Tuplanolla has joined #racket
<bremner> msiism: not sure what you mean "return elements of a list" are you thinking about "values" ?
<msiism> Yes.
<msiism> I mean, doing this would already be problematic because you could never be sure about the type of the returned values.
<msiism> It would just be whatever is in the list.
<msiism> But then, the same goes for things like `car`.
<bremner> maybe you want to use structs?
<msiism> Yeah, I was already thinking, having dtaes as lists is not ideal.
<msiism> I mean, dates have pretty strictly defined fields, even thtoughout different representations. Lists don't mirror that.
<msiism> Also, `make-integer-date` taking an appropriate struct would solve my problem, I guess.
<shawnw> Why not use the standard Racket date or date* types?
<shawnw> https://docs.racket-lang.org/reference/time.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._date%29%29
<msiism> Okay, I'll look into that.
mwnaylor has quit [Ping timeout: 260 seconds]
shawnw has quit [Ping timeout: 240 seconds]
shawnw has joined #racket
msiism has left #racket [Konversation vaporized.]
shawnw has quit [Read error: Connection reset by peer]
lucasta has joined #racket
libertyprime has quit [Quit: leaving]
morte_ has joined #racket
morte_ has quit [Read error: Connection reset by peer]
lucasta has quit [Quit: Leaving]
thegeekinside has joined #racket
notzmv has joined #racket
cwebber has quit [Ping timeout: 264 seconds]
eron has joined #racket
eron has left #racket [#racket]
notzmv has quit [Ping timeout: 264 seconds]
thegeekinside has quit [Read error: Connection reset by peer]
thegeekinside has joined #racket
Oxyd has quit [Ping timeout: 250 seconds]
Oxyd has joined #racket
thegeekinside has quit [Read error: Connection reset by peer]
notzmv has joined #racket
liberalartist has joined #racket
thegeekinside has joined #racket
skapata has joined #racket
FreeFull has joined #racket
skeemer__ has joined #racket
skeemer has quit [Ping timeout: 250 seconds]
FreeFull_ has joined #racket
FreeFull_ has quit [Client Quit]
thegeekinside has quit [Remote host closed the connection]
thegeekinside has joined #racket
notzmv has quit [Ping timeout: 244 seconds]
mwnaylor has joined #racket
Oxyd has quit [Quit: WeeChat 3.8]
Oxyd has joined #racket
thegeekinside has quit [Read error: Connection reset by peer]
libertyprime has joined #racket
codaraxis has joined #racket
thegeekinside has joined #racket
liberalartist has quit [Ping timeout: 246 seconds]
libertyprime has quit [Quit: leaving]
Tuplanolla has quit [Quit: Leaving.]
thegeekinside has quit [Read error: Connection reset by peer]