<discocaml>
<juneyounglee> I will be happy to discuss about this further.
ds-ac has quit [Ping timeout: 256 seconds]
neiluj has joined #ocaml
<neiluj>
Hi! Is there a way to print stack traces of exceptions even if they are caught?
<neiluj>
basically sometimes it can happen these exceptions are triggered by legitimate errors in the code, but are caught not to crash the applications
<reynir>
I think there is a function in Printexc for that
<neiluj>
nice! will have a look
<neiluj>
oh and how do you resolve a list of Lwt promises?
<neiluj>
'a Lwt.t list
<neiluj>
Lwt.all is the answer
ds-ac has joined #ocaml
<reynir>
there are as well other options such as Lwt.(n)choose/(n)pick or using Lwt_list depending on what you want to do
<reynir>
(and Lwt.join if 'a is unit)
greaser|q has quit [Changing host]
greaser|q has joined #ocaml
greaser|q is now known as GreaseMonkey
bartholin has joined #ocaml
olle has joined #ocaml
<olle>
Any progress happening with stack-allocation or non-GC allocation in OCaml?
<discocaml>
<lukstafi> Trigger warning. Do we have a comparative study of Base vs. Stdlib+Containers vs. Batteries?
mbuf has quit [Remote host closed the connection]
mbuf has joined #ocaml
alexherbo2 has joined #ocaml
bartholin has quit [Quit: Leaving]
malte has quit [Remote host closed the connection]
malte has joined #ocaml
malte has quit [Remote host closed the connection]
malte has joined #ocaml
<discocaml>
<drupyog> @dinosaure where can I find documentation about the part of Miou which aims to "standardize API between concurency libraries"
<discocaml>
<drupyog> @dinosaure where can I find documentation about the part of Miou which aims to "standardize API between concurency libraries" ?
<discocaml>
<drupyog> the repository points to a book that starts by introducing how to write a scheduler, but with no API in sight.
malte has quit [Remote host closed the connection]
malte has joined #ocaml
<discocaml>
<drupyog> Also, you mention moonpool .. is there any way (or future ideas) to make the promises/futures/fibers compatible ?
<discocaml>
<drupyog> (For reference, we implemented https://github.com/Marsupilami1/actors-ocaml , and we rolled our own scheduler because we need richer constructs than the run-of-the-mill monadic promises. We would really prefer to offload the promise/fiber part, and gain compatibility with people that care about IO, but so far it's not clear how)
<hannes>
from the ocamlopt help, I can see the "-unsafe" "do not compile bounds checking on array and string access" -- but this doesn't seem to do what I expect it to do -- a 'String.get "foo" 1' still has bounds checks (String.unsafe_get doesn't) -- any idea what I'm doing wrong, or whether the "-unsafe" is no more supported (4.14.2 here)?
mbuf has quit [Quit: Leaving]
Anarchos has joined #ocaml
pieguy128 has quit [Ping timeout: 252 seconds]
<discocaml>
<_ggole> I think it's the operations with special syntax that `-unsafe` removes the checks for; `a.(n)` and `s.[n]`
<discocaml>
<_ggole> And the `.get` functions in `Array`, `String` and `Bytes` will keep them
<discocaml>
<_ggole> Looking at some `-dlambda` it seems that the special syntax is lowered into `.unsafe_get` with `-unsafe` and `.get` otherwise, and the `.get` functions are just left alone.
<hannes>
_ggole: ok. thanks for checking
pieguy128 has joined #ocaml
malte has quit [Remote host closed the connection]
malte has joined #ocaml
pieguy128 has quit [Ping timeout: 252 seconds]
pieguy128 has joined #ocaml
<octachron>
hannes, indeed `-unsafe` is a *parser* flag which determines how the built-in indexing operators are desugared.
malte has quit [Remote host closed the connection]
malte has joined #ocaml
<reynir>
I vaguely remember some light weight proof-ish contract-ish thing for OCaml where you could write preconditions and postconditions in comments on functions if I remember correctly. Does that ring a bell with anyone?
<discocaml>
<.armael.> Yea I was thinking that hannes’ need (afaiu from the post on discuss) could be met by gospel annotations on the unsafe_get functions + some lightweight proof checking tool for gospel
bacam_ is now known as bacam
<discocaml>
<.armael.> But the gospel is not mature enough yet I think
<discocaml>
<.armael.> gospel ecosystem*
<reynir>
that was exactly what I had in mind :D but yes gospel is not enough
<discocaml>
<.armael.> (in fact I got almost nerdsniped into coding something custom along these lines by the post on discuss… but it’s probably quite a bit of work)
<discocaml>
<.armael.> Your best bet would be cameleer which is basically why3+gospel, but I haven’t tried it recently myself
<discocaml>
<.armael.> My suspicion would be that there are still many kinks to be ironed out on the tooling/workflow side
<companion_cube>
proving is always hard :(
<discocaml>
<.armael.> The frustrating thing is that on hannes’ example, the proof part looks super easy
<discocaml>
<.armael.> Something like liquid haskell or similar would probably take care of it
<discocaml>
<.armael.> But building a tool that integrates cleanly with ocaml code and tooling is hard
<discocaml>
<.armael.> Well, a lot of work at least
<companion_cube>
you'd probably need a low-key, lightweight version of why3 with remote solvers or something :s
<companion_cube>
or bundled solvers perhaps
<Armael>
maybe the easiest option here would be to write the code in why3 and extract it to ocaml
<Armael>
that sounds more realistic
<companion_cube>
is it worth giving up on OCaml though? I think gospel is a lot better than whyml for real project
<companion_cube>
s
* reynir
should look into why3
<Armael>
if the gospel ecosystem was mature then yes
pieguy128 has quit [Ping timeout: 256 seconds]
<Armael>
(btw gospel is a specification language, so comparing gospel and whyml is a somewhat untyped statement)
<companion_cube>
ah yes, for sure. I just mean that the model of starting from .ml files is better and should win in the long term
<Armael>
ill-typed*
<Armael>
agree with that, but alas…
<companion_cube>
🤷
* Anarchos
finally compiled compcert on HaikuOS. Great achievement for me.
<companion_cube>
you do have the tenacity!@
pieguy128 has joined #ocaml
<discocaml>
<Kali> very nice
pieguy128 has quit [Ping timeout: 256 seconds]
fererrorocher has quit [Quit: WeeChat 4.2.1]
fererrorocher has joined #ocaml
<Anarchos>
companion_cube i really admire the work of Xavier from my first encounter with Caml in 1996...
Serpent7776 has quit [Ping timeout: 260 seconds]
jabuxas has quit [Ping timeout: 260 seconds]
olle has quit [Ping timeout: 268 seconds]
bartholin has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
<discocaml>
<contextfreebeer> I had some issues setting up gospel when I had a look at it, I even asked about it in this server (and people told me to just use whyml instead lol), needed to compile something from source and it wouldn't build iirc, can't remember what the problem was, maybe it's time to revisit it, seems really cool
<companion_cube>
I thought gospel used comments, so that things would always compile?
<companion_cube>
did it change? :(
<discocaml>
<contextfreebeer> oh that's right I couldn't build cameleer
<discocaml>
<contextfreebeer> companion_cube: nope, don't think so
<discocaml>
<contextfreebeer> think it was some issues regarding compiler version or dependencies or something like that
<companion_cube>
oh you mean to compile gospel itself? ok
<discocaml>
<contextfreebeer> Yea
<discocaml>
<contextfreebeer> I meant nope that hasn't changed I don't think
<discocaml>
<contextfreebeer> still special comments
Anarchos has joined #ocaml
waleee has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
neiluj has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ocaml
<hannes>
thanks for your ideas, armael etc. -- indeed, staying in OCaml would be great .. and I've done before using OCaml something with Coq & separation logic & java -- here the development experience wasn't great..
<hannes>
eventually, I should look into why3, whyml and gospel. the more code I touch, the more I understand what would be useful for my/our usecases
<hannes>
and it's for sure peano arithmetics, sometimes with "let len = String.get_uint16_be buf 0 in assert (String.length buf - 2 > len) .. let data = String.sub buf 2 len <- here the sub shouldn't emit bounds checks..
Tuplanolla has joined #ocaml
nickiminjaj has joined #ocaml
nickiminjaj has quit [Client Quit]
Serpent7776 has joined #ocaml
nickiminjaj has joined #ocaml
nickiminjaj has quit [Changing host]
nickiminjaj has joined #ocaml
nickiminjaj has quit [Client Quit]
<discocaml>
<andreypopp> toml or otoml?
nickiminjaj has joined #ocaml
nickiminjaj has quit [Changing host]
nickiminjaj has joined #ocaml
nickiminjaj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pieguy128 has joined #ocaml
malte has quit [Remote host closed the connection]
malte has joined #ocaml
mima has joined #ocaml
pieguy128 has quit [Ping timeout: 268 seconds]
nickiminjaj has joined #ocaml
bartholin has quit [Quit: Leaving]
nickiminjaj has quit [Client Quit]
bartholin has joined #ocaml
nickiminjaj has joined #ocaml
pieguy128 has joined #ocaml
nickiminjaj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nickiminjaj has joined #ocaml
nickiminjaj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
dnh has joined #ocaml
nickiminjaj has joined #ocaml
nickiminjaj has quit [Client Quit]
nickiminjaj has joined #ocaml
nickiminjaj has quit [Changing host]
nickiminjaj has joined #ocaml
malte has quit [Remote host closed the connection]
malte has joined #ocaml
nickiminjaj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexherbo2 has quit [Remote host closed the connection]