winny has quit [Remote host closed the connection]
winny has joined #racket
vats has quit [Ping timeout: 240 seconds]
lagash has quit [Remote host closed the connection]
lagash has joined #racket
notzmv has quit [Ping timeout: 260 seconds]
littlebo1eep has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
badkins has quit [Remote host closed the connection]
GreaseMonkey has quit [Remote host closed the connection]
greaser|q has joined #racket
livoreno has quit [Ping timeout: 248 seconds]
livoreno has joined #racket
ark has joined #racket
<ark> so uh
<ark> https://pastebin.com/raw/v5HdCTFG am i correct in interpreting this to mean: 1. define with list first argument = create function, 2. define with just the name = immediately eval the body and bind it to a name?
<winny> which line numbers for each question?
lowak has quit [Remote host closed the connection]
lowak has joined #racket
capfredf has joined #racket
capfredf has quit [Ping timeout: 276 seconds]
<ark> (define (x) (+ 1 1)) creating a callable thing that evaluates to 2 vs (define x (+ 1 1)) immediately binding the value to the name
<ark> essentially
badkins has joined #racket
jao has quit [Remote host closed the connection]
badkins has quit [Ping timeout: 250 seconds]
jao has joined #racket
littlebo1eep has quit [Ping timeout: 240 seconds]
littlebobeep has joined #racket
jao has quit [Ping timeout: 272 seconds]
<winny> ark: there's a few different define forms, the one that's just (define x some-value) which expands the some-value, and assigns its result to x. Then there's (define (x) some-value) which is a short-cut form for (define x (lambda () some-value)) . This binds a procedure that returns some-value when it's called like `(x)`
<ark> yeah
notzmv has joined #racket
<ark> i somehow thought the forms would be closer to each other
<ark> like how haskell 0-argument/constant functions act like literals
<ark> to my understanding at least...
<winny> https://docs.racket-lang.org/reference/define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29 i think this is a little challenging to follow (like IDK what a CVT is without thinking hard), but here's where define is documented
lowak has quit [Remote host closed the connection]
<winny> oh, does haskell have 0-argument functions?
lowak has joined #racket
<ark> yeah
<winny> or do you mean a function that takes in a unit?
<ark> i mean
<ark> constant = 5
<ark> main = print constant
<winny> if you run :type constant, the type might surprise you
notzmv has quit [Remote host closed the connection]
vats has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
notzmv has joined #racket
ermo has quit [Quit: ZNC 1.8.2 - https://znc.in]
ermo has joined #racket
vats has quit [Remote host closed the connection]
vats has joined #racket
vats has quit [Remote host closed the connection]
vats has joined #racket
zacts has joined #racket
vats has quit [Killed (NickServ (GHOST command used by vats-!~vats@103.103.93.199))]
littlebobeep has joined #racket
skapata has quit [Read error: Connection reset by peer]
vats has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
ttree has quit [Ping timeout: 250 seconds]
zacts has quit [Quit: Client closed]
vats has quit [Ping timeout: 272 seconds]
littlebobeep has joined #racket
vats has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
littlebobeep has joined #racket
livoreno has quit [Remote host closed the connection]
livoreno has joined #racket
badkins has joined #racket
capfredf has joined #racket
badkins has quit [Ping timeout: 246 seconds]
capfredf has quit [Ping timeout: 272 seconds]
littlebobeep has quit [Ping timeout: 240 seconds]
average_ has joined #racket
littlebobeep has joined #racket
lortabac has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
littlebobeep has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
littlebobeep has joined #racket
twosuns has joined #racket
twosuns is now known as asdffgadsasdas
asdffgadsasdas has quit [Client Quit]
twosuns has joined #racket
twosuns is now known as asdasafasdas
asdasafasdas has quit [Remote host closed the connection]
twosuns has joined #racket
twosuns is now known as asdaksdas
asdaksdas has quit [Client Quit]
twosuns has joined #racket
twosuns is now known as aaaasdasdasfasd
aaaasdasdasfasd has quit [Remote host closed the connection]
twosuns has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
littlebobeep has joined #racket
[deleted] has joined #racket
livoreno has quit [Ping timeout: 260 seconds]
notzmv has quit [Read error: Connection reset by peer]
twosuns has quit [Quit: ...]
twosuns has joined #racket
skapata has joined #racket
skapata has quit [Changing host]
skapata has joined #racket
dhil has joined #racket
average_ has quit [Quit: Connection closed for inactivity]
zacts has joined #racket
capfredf has joined #racket
capfredf has quit [Ping timeout: 276 seconds]
zacts has quit [Quit: Client closed]
badkins has joined #racket
badkins has quit [Ping timeout: 256 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 250 seconds]
[deleted] has quit [Quit: Quit]
Avichi has joined #racket
Avichi has quit [Quit: Client closed]
littlebobeep has quit [Ping timeout: 240 seconds]
patrice has joined #racket
Avichi has joined #racket
littlebobeep has joined #racket
capfredf has joined #racket
twosuns has quit [Quit: ...]
capfredf has quit [Ping timeout: 240 seconds]
littlebobeep has quit [Quit: leaving]
littlebobeep has joined #racket
patrice has quit [Quit: Leaving]
jao has joined #racket
capfredf has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 240 seconds]
badkins has joined #racket
Avichi has quit [Ping timeout: 252 seconds]
dhil has quit [Ping timeout: 256 seconds]
average_ has joined #racket
szkl has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
AnnArcana has quit [Remote host closed the connection]
AnnArcana has joined #racket
littlebobeep has joined #racket
AnnArcana has quit [Remote host closed the connection]
AnnArcana has joined #racket
lagash has quit [Quit: ZNC - https://znc.in]
littlebobeep has quit [Ping timeout: 240 seconds]
lagash has joined #racket
lortabac has quit [Quit: WeeChat 2.8]
jao has quit [Ping timeout: 272 seconds]
ermo has quit [Quit: ZNC 1.8.2 - https://znc.in]
ermo has joined #racket
ec has joined #racket
ttree has joined #racket
ark is now known as vapid
vapid has left #racket [#racket]
twosuns has joined #racket
capfredf has quit [Remote host closed the connection]
szkl has quit [Quit: Connection closed for inactivity]
average_ has quit [Quit: Connection closed for inactivity]
jao has joined #racket
capfredf has joined #racket
badkins has quit [Remote host closed the connection]
morte_ has joined #racket
twosuns has quit [Quit: ...]
ASau has quit [Read error: Connection reset by peer]
badkins has joined #racket
kengruven has joined #racket
rudybot_ has joined #racket
rudybot has quit [Ping timeout: 256 seconds]
jao has quit [Ping timeout: 246 seconds]
capfredf has quit [Remote host closed the connection]
xgqt has quit [Ping timeout: 256 seconds]
xgqt has joined #racket
twosuns has joined #racket
dhil has joined #racket
morte_ has quit [Remote host closed the connection]
littlebobeep has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
badkins has quit [Remote host closed the connection]
badkins has joined #racket
badkins has quit [Ping timeout: 256 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 246 seconds]
aidalgol has quit [Ping timeout: 246 seconds]
aidalgol has joined #racket
ec has quit [Remote host closed the connection]
ec has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 256 seconds]
capfredf has joined #racket
capfredf has quit [Remote host closed the connection]
capfredf has joined #racket
badkins has joined #racket
twosuns has quit [Quit: ...]
greaser|q has joined #racket
greaser|q has quit [Changing host]
greaser|q is now known as GreaseMonkey
badkins has quit [Ping timeout: 246 seconds]
ec has quit [Quit: ec]
ec has joined #racket
ec has quit [Client Quit]
ec has joined #racket
capfredf has quit [Remote host closed the connection]
capfredf has joined #racket
capfredf has quit [Ping timeout: 272 seconds]
<kengruven> i've got a struct and i want to compute some extra slots at init time (essentially a cache of expensive calculations of other fields). is the standard way to simply write a wrapper func for the constructor?
dbohdan has quit [Ping timeout: 248 seconds]
Oxyd has quit [Quit: ZNC 1.8.2 - https://znc.in]
dbohdan has joined #racket
Oxyd has joined #racket
winny has quit [Ping timeout: 240 seconds]
winny has joined #racket
<winny> kengruven: the #:guard keyword argument might help
littlebobeep has joined #racket
jao has joined #racket
twosuns has joined #racket
twosuns is now known as proportions
<kengruven> winny: oh, i didn't realize it uses the return values from the guard. that doesn't seem to be mentioned in the documentation text (though the example does use that)
proportions is now known as TCZ
TCZ is now known as twosuns
badkins has joined #racket
<winny> Feel free to open a bug, authors might have a different way to write that section to be more discoverable
badkins has quit [Ping timeout: 250 seconds]
<kengruven> oh, i see it now. it's one sentence in the middle of a long paragraph.
<winny> Regardless it wasn't easy to find?
<kengruven> well, let's just say it's not the clearest paragraph in the docs
<kengruven> is it possible to use #:guard to assign an #:auto slot? with slots (a [b #:auto]), i get an arity error at definition-time when my guard takes 3 args, and an arity error at call-time when it takes 2 args.
littlebobeep has quit [Quit: leaving]
littlebobeep has joined #racket
monkey_ has joined #racket
lagash has quit [Quit: ZNC - https://znc.in]
skapata has quit [Remote host closed the connection]
<winny> kengruven: referring to the docs it doesn't seem to have any way to initialize an #:auto field other than using #:auto-value . Haven't really ran into this issue, but one way I might try to solve it is using a different struct constructor procedure, perhaps one that calls the original constructor to do most of the work
capfredf has joined #racket
dhil has quit [Ping timeout: 256 seconds]
lagash has joined #racket
capfredf has quit [Ping timeout: 260 seconds]
ec has quit [Ping timeout: 240 seconds]