<discocaml>
<joohnym> Have been out of the loop for a while, what's the consensus on ReasonML vs ReScript nowadays? Which one do you recommend most for frontend work?
<discocaml>
<joohnym> Have been out of the loop for a while, what's the consensus on ReasonML vs ReScript these days? Which one do you recommend most for frontend work?
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 268 seconds]
Haudegen has quit [Quit: Bin weg.]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 260 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 245 seconds]
<slondr>
What are people using for TLS connections in OCaml these days
<discocaml>
<chrisarmstrong> This sort of depends on whether you're using lwt, async or one of the new 5.0 effects-based libraries for concurrency, as their support kind of differs (based on what I understand of the ecosystem)
<slondr>
are there any decent tls libraries for multicore?
<slondr>
google shows me ocaml-tls which doesn't seem to have any documentation, and not much else
JuanDaugherty has quit [Quit: praxis.meansofproduction.biz (juan@acm.org)]
<discocaml>
<chrisarmstrong> piaf has some good example code on how to leverage it with eio; my own library smaws-lib does as well
alfiee has joined #ocaml
<slondr>
cool, I'll look into that, thanks!
alfiee has quit [Ping timeout: 260 seconds]
<za3k>
contificate: I can't, because I need to handle an exception from either of two long-running tasks (whichever throws first)
<za3k>
And you have to join domains in a set order
<za3k>
The linked code actually works to exit early, it's just failing to print the error on the way out
wbooze has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
troydm has joined #ocaml
divya has quit [Remote host closed the connection]
wbooze has quit [Ping timeout: 245 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 272 seconds]
<discocaml>
<yawaramin> za3k: you need to run with `OCAMLRUNPARAM=b`, otherwise exception backtraces are just not captured at all, hence nothing is printed
wbooze has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
divya` has joined #ocaml
divya` has quit [Remote host closed the connection]
<za3k>
Oh crap sorry for spamming, that was not on purpose. I was middle-clicking to paste and I guess I was scrolled up, trying to figure out why it wasn't working
<octachron>
This is probably nothing to print.
<octachron>
*There is
<za3k>
I'm trying to print the error along with a backtrace. Is that not what I'm doing?
<discocaml>
<yawaramin> za3k: read my earlier message
<octachron>
And your code does print a backtrace with OCAMLRUNPARAM=b
<za3k>
yawaramin: shoot, I missed that. thanks both
<za3k>
I'll have to filter out join/part messages, I'm clearly not set up for big rooms
<discocaml>
<yawaramin> if you were in the Discord i would have @-mentioned you and you'd get a notification
<za3k>
I probably got one from za3k: in my client too actually
alfiee has joined #ocaml
<za3k>
how do you know about OCAMLRUNPARAM? It's not mentioned in Printexc docs, I'm curious how I ought to have learnt it
<za3k>
"when an uncaught exception aborts the program" -- this does not sound like an explicit call to Printexc.print_backtrace; I *still* would not have learnt this
<za3k>
OTOH "If the call is not inside an exception handler, the returned backtrace is unspecified." and I'm not sure what an "exception handler" is, is that just the part after -> in the when clause, or something else?
<za3k>
ahh record_backtrace is a good answer, yeah
<octachron>
any right hand side of `->` in a "try with" clause
<za3k>
thanks for your help
<octachron>
But I agree that the module lacks a short introduction and usage guide.
<za3k>
i'm sure a documentation patch would be easy, maybe i'll add it to my TODO list
<za3k>
yeah mentioning -g would be good too maybe
<discocaml>
<yawaramin> could add a one-liner to the top of the module documentation for `Printexc`, eg 'Note that recording the call stack must be explicitly enabled. See record_backtrace'
<za3k>
yep! (though converting an exception to a string works). And link to debug info in -g too
<za3k>
The HTML docs are very link-free which is an interesting stylistic choice
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
<za3k>
Fun fact, apparently Printexc.record_backtrace is a per-domain setting
<discocaml>
<yawaramin> that's weird. last night i ran your code with `OCAMLRUNPARAM=b` and it printed the backtrace so clearly it took effect on multiple domains
wbooze has quit [Ping timeout: 252 seconds]
<za3k>
Yeah, the option applies to all domains!
alfiee has joined #ocaml
<za3k>
Err sorry, I mean to say, the ENV variable applies to all domains
<za3k>
But Printexc.record_backtrace apparently doesn't
<discocaml>
<yawaramin> seems like this should be documented then
<za3k>
let me double-check that it's true
<za3k>
I'm using the alternate screen buffer so I was having a little trouble telling if it's true
euphores has quit [Quit: Leaving.]
<za3k>
Yep, double-checked now that I have that working, it's true
<za3k>
(also sorry realize I'm not making any sense, that's what you get today I'm afraid)
alfiee has quit [Ping timeout: 246 seconds]
euphores has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 268 seconds]
wickedshell has quit [Read error: Connection reset by peer]
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 268 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 244 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 272 seconds]
sixfourtwelve has joined #ocaml
wickedshell has joined #ocaml
gzar has joined #ocaml
sixfourtwelve has quit [Quit: leaving]
sixfourtwelve has joined #ocaml
alfiee has joined #ocaml
rgrinberg has joined #ocaml
alfiee has quit [Ping timeout: 272 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
sixfourtwelve has quit [Quit: leaving]
chiselfuse has quit [Remote host closed the connection]