companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.2.0 released: https://ocaml.org/releases/5.2.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Quit: Leaving.]
TCZ has quit []
<discocaml> <yawaramin> (after pushing a tag)
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #ocaml
bhoot has joined #ocaml
mbuf has joined #ocaml
ygrek has quit [Remote host closed the connection]
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Serpent7776 has joined #ocaml
berberman has quit [Quit: ZNC 1.8.2 - https://znc.in]
hannes has joined #ocaml
berberman has joined #ocaml
berberman has quit [Client Quit]
berberman has joined #ocaml
bhoot has joined #ocaml
toastal has quit [Ping timeout: 252 seconds]
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bartholin has joined #ocaml
toastal has joined #ocaml
olle has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Read error: Connection reset by peer]
bhoot has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
alexherbo2 has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Client Quit]
bhoot has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Client Quit]
bhoot has joined #ocaml
bhoot has quit [Client Quit]
bhoot has joined #ocaml
ygrek has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
dreadedfrog has quit [Ping timeout: 265 seconds]
dreadedfrog has joined #ocaml
Putonlalla1 is now known as Putonlalla
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Client Quit]
bhoot has joined #ocaml
bhoot has quit [Client Quit]
bhoot has joined #ocaml
sadome has joined #ocaml
sadome has joined #ocaml
sadome has quit [Changing host]
sadome has joined #ocaml
sadome has quit [Excess Flood]
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bhoot has joined #ocaml
GreaseMonkey has quit [Quit: No Ping reply in 180 seconds.]
greaser|q has joined #ocaml
bhoot has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olle has quit [Ping timeout: 255 seconds]
Tuplanolla has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
Serpent7776 has quit [Ping timeout: 252 seconds]
dreadedfrog has quit [Ping timeout: 248 seconds]
dreadedfrog has joined #ocaml
bhoot has joined #ocaml
motherfsck has joined #ocaml
bhoot has quit [Quit: Textual IRC Client: www.textualapp.com]
shoggouth has joined #ocaml
mbuf has quit [Quit: Leaving]
waleee has joined #ocaml
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #ocaml
f[x] has joined #ocaml
ygrek has quit [Remote host closed the connection]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<twobitsprite> So, I've noticed that libraries often will return an Error | Ok option, but ocaml does support exceptions... are exceptions not preferred in ocaml?
<discocaml> <._null._> Exceptions bubble up potentially indefinitely, such `result` values cannot. Some users want the first behaviour, some the second one
<discocaml> <ada2k> twobitsprite: result values are also encoded in the type of a function, whereas the best we have for exceptions is odoc
<discocaml> <Kali> hopefully with typed effects that will not be the case, but those don't exist yet
Anarchos has joined #ocaml
<twobitsprite> ok, so typed results are more easy to handle than exceptions?
<discocaml> <._null._> Not easier to handle, rather more difficult (impossible) to forget
<twobitsprite> ah, good point
<discocaml> <yawaramin> but on the other hand, exceptions are more flexible, offer stack traces, and unwind the stack safely for you. they don't force you to use convoluted logics to handle lists of values and whatnot
<discocaml> <yawaramin> and I/O errors are always surfaced as exceptions because they come from the 'Unix' layer
<twobitsprite> So, maybe for "fatal" errors, I could use exceptions, but for handle-able errors, use result options?
<discocaml> <ada2k> yeah, that's generally good practice
<twobitsprite> ok, thanks
<discocaml> <ada2k> if you add odoc comments as well people using ides with support will be able to see hints about what exceptions a function can throw
<twobitsprite> I just use vim...
<discocaml> <ada2k> like typed exceptions?
<discocaml> <._null._> (In this context, exceptions are an instance of effects)
<twobitsprite> I've tried the vi implementation in several IDEs, including emacs vile/viper/etc, but my fingers just find unimplemented vim features and I can't adjust
<discocaml> <._null._> How well does vim support LSP ? OCaml has one, so maybe this already works
<discocaml> <Kali> there is merlin for vim, i think
<discocaml> <Kali> i tried using it but it didn't work the first time so i kinda just gave up since i don't really care about lsp features
<twobitsprite> what is LSP?
<discocaml> <ada2k> how would that work? using effects instead of exceptions, or having exceptions be a type of effect that can't continue or?
<discocaml> <Kali> "language server protocol", it's a thing for integrating your editor with the compiler of a language you're using for real-time errors and hints and stuff
<discocaml> <._null._> The latter I guess. I think it's more that exceptions behave the same as effects wrt. typing, so supporting one means supporting both
<discocaml> <ada2k> yeah, that would be less confusing than leaving exceptions untyped or having two overlapping types for control flow breaking stuff
<discocaml> <ada2k> is there any formal proposal for any of this yet?
<discocaml> <ada2k> "formal" as in somebody sketching out how it might work
<discocaml> <._null._> There are languages where this is implemented, Koka I think
<twobitsprite> doesn't java have a way to declare what exceptions a method can raise?
<discocaml> <Kali> indeed
<discocaml> <ada2k> thought koka made noodles 😉
f[x] has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
YuGiOhJCJ has joined #ocaml
bartholin has quit [Quit: Leaving]
terrorjack has quit [Read error: Connection reset by peer]
terrorjack4 has joined #ocaml
terrorjack4 has quit [Read error: Connection reset by peer]
terrorjack4 has joined #ocaml
terrorjack4 has quit [Read error: Connection reset by peer]
alexherbo2 has joined #ocaml
dreadedfrog has quit [Ping timeout: 248 seconds]
dreadedfrog has joined #ocaml
terrorjack4 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
m5zs7k has quit [Quit: m5zs7k]
m5zs7k has joined #ocaml