littlebobeep has joined #racket
Codaraxis_ has joined #racket
Codaraxis has quit [Ping timeout: 256 seconds]
ur5us has joined #racket
ur5us has quit [Ping timeout: 260 seconds]
Codaraxis__ has joined #racket
Codaraxis_ has quit [Ping timeout: 276 seconds]
libertyprime has quit [Ping timeout: 248 seconds]
dmh has quit [Quit: rip]
libertyprime has joined #racket
jao has quit [Ping timeout: 260 seconds]
vats has quit [Ping timeout: 276 seconds]
dostoevsky has quit [Quit: Ping timeout (120 seconds)]
dostoevsky has joined #racket
juanfra__ has quit [Remote host closed the connection]
juanfra__ has joined #racket
skapata has quit [Remote host closed the connection]
ski has joined #racket
winny has quit [Remote host closed the connection]
winny has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
vats has joined #racket
littlebobeep has joined #racket
winny has quit [Remote host closed the connection]
winny has joined #racket
kenran has joined #racket
ur5us has joined #racket
u0_a871 has joined #racket
<u0_a871> I want to compile racket, for a shared library. It did not work. It was something like "Still not supported".
u0_a871 has quit [Remote host closed the connection]
u0_a871 has joined #racket
rgherdt has quit [Read error: Connection reset by peer]
rgherdt has joined #racket
ttree has quit [Ping timeout: 260 seconds]
lowak has quit [Ping timeout: 240 seconds]
lowak has joined #racket
u0_a871 has quit [Quit: WeeChat 2.5]
libertyprime has quit [Ping timeout: 276 seconds]
notzmv has quit [Ping timeout: 252 seconds]
libertyprime has joined #racket
capfredf has joined #racket
capfredf has quit [Ping timeout: 256 seconds]
littlebobeep has quit [Ping timeout: 240 seconds]
kenran has quit [Ping timeout: 260 seconds]
kenran has joined #racket
kenran has quit [Client Quit]
badkins has joined #racket
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has joined #racket
badkins has quit [Ping timeout: 250 seconds]
ur5us_ has quit [Ping timeout: 240 seconds]
littlebobeep has joined #racket
littlebobeep has quit [Ping timeout: 240 seconds]
exondation has joined #racket
badkins has joined #racket
twosuns has joined #racket
kenran has joined #racket
badkins has quit [Ping timeout: 246 seconds]
badkins has joined #racket
badkins has quit [Remote host closed the connection]
twosuns has quit [Quit: ...]
kenran has quit [Quit: WeeChat info:version]
libertyprime has quit [Ping timeout: 250 seconds]
ormaaj has quit [Killed (NickServ (GHOST command used by ormaaj2!~ormaaj2@user/ormaaj))]
ormaaj has joined #racket
badkins has joined #racket
notzmv has joined #racket
badkins has quit [Ping timeout: 246 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 250 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
<jA_cOp> What's the equivalent of a try-finally in Racket? If I want to run a particular function when an expression ends, whether because it returned, or an exception was thrown
kenran has joined #racket
xgqt has quit [Ping timeout: 276 seconds]
xgqt has joined #racket
kenran has quit [*.net *.split]
emacsomancer has quit [*.net *.split]
AnnArcana has quit [*.net *.split]
groovy has quit [*.net *.split]
chris2 has quit [*.net *.split]
aliasless has quit [*.net *.split]
technomancy has quit [*.net *.split]
mzan has quit [*.net *.split]
chris2 has joined #racket
AnnArcana has joined #racket
mzan has joined #racket
emacsomancer has joined #racket
kenran has joined #racket
groovy has joined #racket
aliasless has joined #racket
technomancy has joined #racket
skapata has joined #racket
skapata has quit [Changing host]
skapata has joined #racket
<bremner> can't you use (begin (with-handlers ... ) ( ... finally stuff )) ? Or am I missing something about finally?
<bremner> jA_cOp: ^
<bremner> you can also roll your own syntax, see https://docs.racket-lang.org/syntax-parse-example/index.html#%28form._%28%28lib._syntax-parse-example%2Ftry-catch-finally%2F1..rkt%29._finally%29%29
<jA_cOp> bremner: so I guess that's assuming that I catch and discard the exception in a handler, right? I think the difference is that with try-finally, the exception is rethrown for me once the finally block is executed
<bremner> oic.
<bremner> then I guess you want one of the macros linked? I didn't really check the details.
<jA_cOp> thanks - the macros you linked are indeed spot on, but this is for a fairly small script so I'm probably not going to use any of these
<jA_cOp> My thinking was - if Racket's with-handlers doesn't have functionality equivalent of try-finally, is there because it doesn't need it, because there's a better way to structure it? If not, maybe users would benefit if with-handlers had support for a #:finally clause?
<jA_cOp> The structure in my script is now this: (with-handlers ([exn:break? (lambda (x) (finally-do-this) (raise x)]) body) (finally-do-this)
<jA_cOp> I feel like I'm missing something obvious! :)
<jA_cOp> Basically, all I want is to run (finally-do-this) at the end of the script, regardless of whether it ended normally, or via break. (as an aside, in this specific case I could use the equivalent of atexit (plumber?) since the end of the block is the end of the program)
<jA_cOp> Using try-finally without a catch clause is also equivalent of a destructor in RAII (ala C++), or using a guard clause, like `defer` in Go, or scope(exit) in D
badkins has joined #racket
average_ has joined #racket
badkins has quit [Ping timeout: 250 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
notzmv has quit [Ping timeout: 250 seconds]
lowak has quit [Ping timeout: 240 seconds]
exondation has quit [Ping timeout: 260 seconds]
jao has joined #racket
littlebobeep has joined #racket
exondation has joined #racket
average_ has quit [Quit: Connection closed for inactivity]
badkins has joined #racket
badkins has quit [Ping timeout: 240 seconds]
littlebobeep has quit [Ping timeout: 240 seconds]
littlebobeep has joined #racket
exondation has quit [Ping timeout: 256 seconds]
capfredf has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
notzmv has joined #racket
ur5us_ has joined #racket
capfredf has quit [Remote host closed the connection]
capfredf has joined #racket
exondation has joined #racket
capfredf has quit [Ping timeout: 248 seconds]
badkins has joined #racket
ttree has joined #racket
kengruve_ is now known as kengruven
badkins has quit [Ping timeout: 246 seconds]
<undltd> jA_cOp: maybe this can be relevant: https://docs.racket-lang.org/reference/cont.html#%28def._%28%28quote._~23~25kernel%29._dynamic-wind%29%29
badkins has joined #racket
nihilazo has quit [Remote host closed the connection]
nihilazo has joined #racket
nihilazo has quit [Remote host closed the connection]
nihilazo has joined #racket
ur5us_ has quit [Ping timeout: 240 seconds]
capfredf has joined #racket
exondation has quit [Ping timeout: 240 seconds]
capfredf has quit [Ping timeout: 256 seconds]
exondation has joined #racket
libertyprime has joined #racket
capfredf has joined #racket
badkins has quit [Remote host closed the connection]
Avichi has quit [Ping timeout: 252 seconds]
capfredf has quit [Remote host closed the connection]
capfredf has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 246 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
libertyprime has quit [Ping timeout: 276 seconds]
ur5us_ has joined #racket
capfredf has quit [Remote host closed the connection]
capfredf has joined #racket
kenran has quit [Quit: WeeChat info:version]
libertyprime has joined #racket
capfredf has quit [Ping timeout: 260 seconds]
libertyprime has quit [Ping timeout: 246 seconds]
ur5us_ has quit [Ping timeout: 240 seconds]
ur5us_ has joined #racket
badkins has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket