adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
TakinOver has joined #ocaml
ygrek__ has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
spew has quit [Quit: Connection closed for inactivity]
Jesin has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
rgrinberg has quit [Ping timeout: 246 seconds]
bytesighs has quit [Ping timeout: 246 seconds]
lynn has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
lynn has joined #ocaml
bytesighs has joined #ocaml
TakinOver has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
malina has joined #ocaml
Jesin has quit [Quit: Leaving]
RalfJ has quit [Ping timeout: 258 seconds]
kleisli has quit [Ping timeout: 258 seconds]
kleisli has joined #ocaml
<nicolaus> Leonidas: do you know any good documentation regarding lwt/async?
FreeBirdLjj has joined #ocaml
oni-on-ion has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
TakinOver has joined #ocaml
dborisog has joined #ocaml
malina has quit [Remote host closed the connection]
RalfJ has joined #ocaml
RalfJ has quit [Ping timeout: 272 seconds]
ereiisreallycool has joined #ocaml
ereiisreallycool has quit [Remote host closed the connection]
narimiran has joined #ocaml
bartholin has quit [Quit: Leaving]
fre2 has quit [Ping timeout: 265 seconds]
RalfJ has joined #ocaml
Serpent7776 has joined #ocaml
andreas303 has quit [Ping timeout: 240 seconds]
andreas303 has joined #ocaml
FreeBirdLjj has joined #ocaml
RalfJ has quit [Remote host closed the connection]
malina has joined #ocaml
RalfJ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
malina has quit [Remote host closed the connection]
ggole has joined #ocaml
narimiran has quit [Read error: Connection reset by peer]
narimiran has joined #ocaml
fre2 has joined #ocaml
<Leonidas> nicolaus: for Async there is RWO, for Lwt, there is, uhm, reading the signatures and API docs.
<Leonidas> companion_cube: yes, batteries 3.0 was a surprise
vicfred has quit [Quit: Leaving]
kleisli has quit [Ping timeout: 265 seconds]
Serpent7776 has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
Serpent7776 has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
fraxamo has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
Serpent7776 has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
dhil has joined #ocaml
mbuf has joined #ocaml
bronsen has quit [Quit: WeeChat 2.7]
bronsen has joined #ocaml
cobax has quit [Read error: Connection reset by peer]
<companion_cube> too bad they didn't clean up BatIO/Enum :/
spew has joined #ocaml
<Leonidas> *too bat
<companion_cube> :p
<Leonidas> I am a bit confused by https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html There are all kinds of `alloc_*` functions that create OCaml `value` instances. But how are these freed?
<thizanne> by the gc ?
tane has joined #ocaml
<Leonidas> thizanne: yes, but if they are just stored in opaque structures, the GC can't know whether they are still used
<Leonidas> it does an alloc_small and stores some C value in that block and to free it it just zeroes the inner pointer?
<thizanne> yeah apart from the really simple stuff I don't know the details of the ocaml runtime
<Leonidas> ah, I think I understand it! The thing that is alloc_small'd is passed to the OCaml side, from where the ocaml GC knows when it can discard it.
<thizanne> that's how I understand it
<thizanne> and I guess hdl is supposed to be an ocaml value as well ?
<Leonidas> thizanne: still, thanks for rubber-ducking :-)
<Leonidas> thizanne: no, it should some pointer to some C reference.
<def`> Leonidas: no the GC is aware of it as soon as it is allocated.
<def`> that's why there are these CAMLparam, CAMLlocal and CAMLreturn macros.
<def`> their purpose is to track all OCaml values
Serpent7776 has quit [Quit: Leaving]
<Leonidas> def`: but I can stash `value`s away, and how does the GC know that this is used or not?
<Leonidas> hmm, guess it can't, so it just tries to deallocate it, which is why one needs to `caml_register_global_root` to prevent it from doing so, correct?
valtr has quit [Quit: Quit]
<def`> yes
<def`> stashing away is an incorrect use of the FFI
<companion_cube> you do need to make it a root, yes
<smondet> do tell the GC about stuff "somewhere else" (usually malloc) you need `alloc_custom` (which takes a structure that itself has a function pointer to a `free_my_stuff` procedure)
FreeBirdLjj has joined #ocaml
ygrek__ has joined #ocaml
smazga has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
ziyourenxiang has quit [Ping timeout: 258 seconds]
<companion_cube> dmbaturin: ♥ on lobsters :D
<dmbaturin> companion_cube: Which post? The theological monads? :)
vicfred has joined #ocaml
<companion_cube> nah, Go
<companion_cube> who doesn't love hating on Go?
<dmbaturin> I've caught a nasty cold, so I'm mostly spending time writing borderline nonsense and trivial truths on the internets as my brain is not good for anything else this week.
<companion_cube> :DDDDD
<companion_cube> oh well, I had to contribute to the bashing anyway
<dmbaturin> Boehm GC is actually quite nice as far as GC for C go. :)
<dmbaturin> On a side note, I'm actually going to stop for a time after soupault 1.9 and make a eztoml library with polymorphic variants.
<companion_cube> yessssss
<companion_cube> please make a basic, pragmatic API :)
<dmbaturin> There's little code I feel so bad for writing it like https://github.com/dmbaturin/soupault/blob/master/src/config.ml#L85-L95 :)
<companion_cube> waaaa :DD
<companion_cube> oh damn, flashbacks of writing toml config code
<companion_cube> thankfully on that particular project I now use S-expressions
<companion_cube> (with ocaml-decoders)
<dmbaturin> Half that file is fighting with to.ml's tacit assumption that the program is not extensible and will always know what value types it expected _and_ wants to punish the user for getting the the wrong.
<dmbaturin> Which project?
<companion_cube> https://github.com/sneeuwballen/benchpress just a small testing tool
<companion_cube> trying to imitate dune a bit
<dmbaturin> I find TOML the language much easier to use in anger than S-exps, but to.ml is doing its best to ruin the joy of it for this particular use case.
andreas303 has quit [Remote host closed the connection]
<companion_cube> oh really? S-exprs are really so simple
<companion_cube> (also, I managed to have a parser with locations, so I can report errors properly)
<dmbaturin> Then again, since TOML is dynamically typed, I do think there should be an easy way get a value and fo the type conversion if necessary, or produce a clear type mismatch error.
<dmbaturin> Pretending that a key doesn't even exist if its value is not of the type you expect is user-hostile.
andreas303 has joined #ocaml
<companion_cube> tbh I'd mostly like to get a good parser/printer with just the type def
<companion_cube> and if you want a fancy lens API, make another damn library
<dmbaturin> companion_cube: (unsat ":status unsat") How that status is obtained?
<dmbaturin> Well, what that line really does?
<companion_cube> where exactly?
_whitelogger has quit [Ping timeout: 248 seconds]
peddie has quit [Ping timeout: 240 seconds]
dl3br[m] has quit [Ping timeout: 256 seconds]
jimt[m] has quit [Ping timeout: 256 seconds]
sepp2k has quit [Ping timeout: 246 seconds]
bglm[m] has quit [Ping timeout: 256 seconds]
haesbaert has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
rpcope- has quit [Ping timeout: 240 seconds]
ygrek__ has quit [Ping timeout: 240 seconds]
ggole has quit [Quit: Leaving]
TC01 has quit [Ping timeout: 240 seconds]
lobo has quit [Quit: WeeChat 1.6]
narimiran has quit [Ping timeout: 240 seconds]
zmt00 has quit [Quit: Leaving]