Haudegen has quit [Remote host closed the connection]
bartholin has quit [Ping timeout: 246 seconds]
bartholin has joined #ocaml
AtumT has quit [Quit: AtumT]
mfp has quit [Ping timeout: 248 seconds]
ygrek has joined #ocaml
Haudegen has joined #ocaml
keep_learning_M has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
addem has joined #ocaml
addem has quit [Quit: Leaving]
ygrek has quit [Ping timeout: 246 seconds]
addem has joined #ocaml
addem has quit [Quit: Leaving]
addem has joined #ocaml
Jeanne-Kamikaze has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
addem has quit [Ping timeout: 245 seconds]
hio has joined #ocaml
gravicappa has joined #ocaml
ggole has joined #ocaml
gareppa has joined #ocaml
narimiran has joined #ocaml
Jeanne-Kamikaze has quit [Quit: Leaving]
jao has quit [Ping timeout: 272 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
gareppa has quit [Quit: Leaving]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
ehirdoy has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
ziyourenxiang has joined #ocaml
ruffy_ has quit [Quit: WeeChat 2.3]
Haudegen has joined #ocaml
toolslive has joined #ocaml
toolslive has quit [Client Quit]
toolslive has joined #ocaml
toolslive has quit [Client Quit]
<xvilka>
arghh
<xvilka>
Raised at file "format.ml" (inlined), line 242, characters 35-52 drives me mad
<xvilka>
exceptions are cancer
<flux[m]>
export OCAMLRUNPARAM=b ;)
<flux[m]>
exceptions are nice. I would not enjoy having val int_of_string : string -> int Result.t.
<xvilka>
flux[m]: it doesn't work on native builds
<octarin>
yeah, faster than option return functions
<flux[m]>
it doesn't? I thought it does.
<xvilka>
flux[m]: nope, it doesn't
<flux[m]>
well, ue bytecode then :)
<flux[m]>
I just tested, they work fine as long as you use -g when compilng with ocamlopt
<xvilka>
flux[m]: it happens in production, and with this useless exception messages I am having A LOT of trouble to reproduce, then find the place where it happens
<flux[m]>
nevertheles, I get this output: fooFatal error: exception Assert_failure("foo.ml", 3, 2) Raised at file "foo.ml", line 3, characters 2-14 Called from file "foo.ml" (inlined), line 6, characters 14-20 Called from file "foo.ml", line 8, characters 8-15
<xvilka>
and some dependencies still not 4.08 ready
<xvilka>
so it is a gridlock
<xvilka>
Even mulling over the thought to rewrite existing project in Rust as well
<flux[m]>
ah, so something eats the backtrace?
<xvilka>
it has _almost_ everything
<xvilka>
yes
<flux[m]>
but in particular it has nothing to do with native code building?
<flux[m]>
not sure what Leonidas means
<flux[m]>
it certainly affects -g -compiled regular binaries
<flux[m]>
and even if Format reraises the exception, why would it not show your source code where all the control flow originates from?
<xvilka>
flux[m]: yeah, seems just a bug, not that it doesn't produce the backtrace
<xvilka>
flux[m]: I have no idea tbh
<xvilka>
f* word became my most favorite lately. I guess this is how F# name was born.
<flux[m]>
xvilka: does that code use some other library in addition to Lwt?
<flux[m]>
(I can't compile the fragment)
<xvilka>
flux[m]: yes, Core
<Leonidas>
flux[m]: yeah, I think this was incorrect.
<flux[m]>
so interestingly if I remove your exception capture code, it works fine :)
<flux[m]>
xvilka: if I reorder the code so that Printexc.get_backtrace () is first, it works as it should
<flux[m]>
so it seems the backtrace is eaten by Exn.to_string
<flux[m]>
these kind of thread-local values are quite dangerous :/
<flux[m]>
so it seems perhaps that somewhere within Exn.to_string's implementation it's expected that an exception is issued
<flux[m]>
so best to have as little code from catching the exception and inspecting it :)
jaar has joined #ocaml
jnavila has joined #ocaml
<flux[m]>
it is quite sad there is no, say, Printeexc.get_backtrace ~exn () available, as that would certainly solve the issue. I'm guessing there are performance implications.
mfp has joined #ocaml
<flux[m]>
I added a message to the discuss thread mentioning this solution. I hope it is indeed the solution ;).
<xvilka>
theblatte: yes, I know about 4.08, I use it for some parts of the project, but as a whole is not yet ready due to the numerous amount of dependencies