companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
terence has quit [Ping timeout: 268 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
szkl has quit [Quit: Connection closed for inactivity]
kaph has quit [Ping timeout: 268 seconds]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #ocaml
bobo has joined #ocaml
spip has quit [Ping timeout: 272 seconds]
waleee has quit [Ping timeout: 260 seconds]
mbuf has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zebrag has quit [Quit: Konversation terminated!]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
Haudegen has joined #ocaml
mro has joined #ocaml
gravicappa has joined #ocaml
dextaa_54 has quit [Remote host closed the connection]
gahr has quit [Remote host closed the connection]
bartholin has joined #ocaml
gahr has joined #ocaml
Anarchos has joined #ocaml
olle has joined #ocaml
<d_bot> <Drup> @cemerick we .... actually considered that
<d_bot> <Drup> you could add it to the existing PPX, it's not much
azimut_ has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
jlrnick has joined #ocaml
mro has quit [Remote host closed the connection]
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
kaph has joined #ocaml
dmbaturin has quit [Quit: Lost terminal]
<d_bot> <Butanium (@me on reply)> @dinosaure hey I just saw your repositories facteur https://github.com/dinosaure/facteur and was wondering if I could use it to get a notification once my remote linux computer finishs a task. Do I need something else than just the library (like a domain or something) ? If not do you have an example where you use it to send a string by mail ?
<d_bot> <dinosaure> you will probably be more interesting by `blaze`: https://github.com/dinosaure/blaze 🙂
<d_bot> <dinosaure> `facteur` was an experimentation and I don't really maintain it, then it really depends on what you want. If you want a binary to send an email, `blaze` is the best. If you want a library in OCaml to send an emails, `letters` (or directly `sendmail`) is better
dmbaturin has joined #ocaml
<d_bot> <Butanium (@me on reply)> yes it's a binary
<d_bot> <undu> there's a thorough explanation here: https://mirage.io/blog/2022-04-01-Mr-MIME
terence has joined #ocaml
mro has joined #ocaml
<d_bot> <Butanium (@me on reply)> by binary do you mean compiled ocaml code ?
<d_bot> <dinosaure> yes 🙂
mro has quit [Remote host closed the connection]
<d_bot> <Patate> Hi everyone!
<d_bot> <Patate> Here's a question on Ctypes.
<d_bot> <Patate> I have a binding on a C function returning a function pointer, and I would like to cast it then call it.
<d_bot> <Patate> Here's a stupid example code for the C library:
<d_bot> <Patate> > typedef void (*void_function)(void);
<d_bot> <Patate> > typedef int (*adder)(int, int);
<d_bot> <Patate> > int add(int a, int b){ return a + b; }
<d_bot> <Patate> > void_function load(void){
<d_bot> <Patate> > return (void_function)add;
<d_bot> <Patate> > }
<d_bot> <Patate> and on the ocaml side, I have done the following:
<d_bot> <Patate> > module Functions (F : Ctypes.FOREIGN) = struct
<d_bot> <Patate> > open F
<d_bot> <Patate> > let load = foreign "load" (Ctypes.void @-> returning Types.void_function)
<d_bot> <Patate> > end
<d_bot> <Patate> How can I convert the result of load() to int -> int -> int and call it?
mro has joined #ocaml
<d_bot> <Patate> Sorry for writing C code on an Ocaml server x)
<d_bot> <KW78> Interesting blog! Any chance to get an RSS feed ? https://mirage.io/blog/
<d_bot> <dinosaure> I will ask internally 🙂
<d_bot> <dinosaure> https://mirage.io/feed.xml
<d_bot> <Patate> Would love to have a more complete documentation on Ctypes.
kaph_ has joined #ocaml
kaph has quit [Ping timeout: 248 seconds]
<d_bot> <KW78> Tks. Note that my RSS reader (feedly) did not find it, either on the `/blog` nor the main `/` site. Might be worth adding
kaph_ has quit [Ping timeout: 268 seconds]
<d_bot> <andreypopp> The mirage blog is missing `<link rel="alternate" type="application/rss+xml" ... />` that's why RSS readers do not discover it.
wingsorc has quit [Quit: Leaving]
<d_bot> <Patate> No experienced Ctypes users here?
mro has quit [Remote host closed the connection]
<d_bot> <darrenldl> @Patate my experience is it was more stable/easier adding a layer if glue code to avoid needing to handle function pointer on ocaml side
<d_bot> <Patate> so you were writing some C code that did the cast work instead of doing it directly in ocaml @BigOof ?
<d_bot> <darrenldl> well generating the glue code
<d_bot> <darrenldl> with code gen written in ocaml
<d_bot> <darrenldl> let me see if i can find the repo and location of the file...
<d_bot> <Patate> Ideally, i would like to not write (or generate) any C code, and rely only on Ctypes/dune's ctypes stanza
<d_bot> <darrenldl> ah i was using cinaps at the time, which was basically very rudimentary code gen via printf, and wrote a very thin layer if translation code
<d_bot> <darrenldl> yeah ill need to dig around...problem is you cant really coerce a function pointer into a ocaml function iirv
<d_bot> <darrenldl> iirc
<d_bot> <Patate> seems weird to me...
<d_bot> <darrenldl> oh huh you can it seems
<d_bot> <darrenldl> okay found the discuss thread, let me link rq
<d_bot> <Patate> I think when I get to know it better, I will write a more up-to-date tutorial for Ctypes, cause now it only covers simple uses
<d_bot> <darrenldl> yeah a full fledged tutorial would be very nice, last time i was using ctypes things were scattered around blogposts etc
<d_bot> <darrenldl> tho i was limited by wanting to do static linking
<d_bot> <Patate> Maybe I should get in touch with the maintainer, directly...
<d_bot> <darrenldl> which complicates the ffi story a fair bit
<d_bot> <darrenldl> yeah check the repo issues/pr/what have you
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
terence has quit [Ping timeout: 260 seconds]
mro has joined #ocaml
mro has quit [Ping timeout: 272 seconds]
mro has joined #ocaml
wyrd has quit [Remote host closed the connection]
wyrd has joined #ocaml
hornhack has joined #ocaml
hackinghorn has quit [Killed (NickServ (GHOST command used by hornhack!~hackingho@user/hackinghorn))]
hackinghorn has joined #ocaml
kaph_ has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
jlrnick has quit [Ping timeout: 248 seconds]
mro has quit [Ping timeout: 272 seconds]
mro has joined #ocaml
terence has joined #ocaml
terence has quit [Remote host closed the connection]
mro has quit [Ping timeout: 246 seconds]
mro has joined #ocaml
hornhack has quit [Remote host closed the connection]
hornhack has joined #ocaml
kaph_ has quit [Ping timeout: 256 seconds]
Soni has quit [Ping timeout: 260 seconds]
hornhack has quit [Remote host closed the connection]
hornhack has joined #ocaml
hornhack has quit [Remote host closed the connection]
hornhack has joined #ocaml
hornhack has quit [Remote host closed the connection]
hornhack has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<d_bot> <Drup> @companion_cube What's the right tool for quantifier elimination on linear arithmetic formulas ?
<d_bot> <Drup> z3 seems ... not good at it.
<companion_cube> I have no idea
<companion_cube> write your own version of Cooper?
<d_bot> <Drup> 😦
<d_bot> <Drup> you don't know of any implementation of it ?
<companion_cube> I don't know
<companion_cube> I don't use QE
mro has quit [Remote host closed the connection]
kaph has joined #ocaml
Soni has joined #ocaml
gravicappa has quit [Ping timeout: 260 seconds]
azimut_ has quit [Remote host closed the connection]
azimut has joined #ocaml
mro has joined #ocaml
jlrnick has joined #ocaml
<d_bot> <dinosaure> Someone knows when `[@untagged]` appeared?
<d_bot> <octachron> 4.03
Anarchos has joined #ocaml
<companion_cube> wait, what is untagged?
<d_bot> <dinosaure> thx @octachron
<d_bot> <dinosaure> an annotation for an `external`
<octachron> The int version of unboxed for externals: "external t : (int[@untagged]) -> (float[@unboxed]) -> unit [@@noalloc] = ..."
<d_bot> <dinosaure> https://ocaml.org/manual/intfc.html#s%3AC-cheaper-call
<companion_cube> oh that one
<companion_cube> I thought it was about the scheme Gasche is proposing for sum types with one immediate and one block case :D
<companion_cube> (like zarith)
<companion_cube> Z.t *
waleee has joined #ocaml
omegatron has quit [Quit: Power is a curious thing.It can be contained, hidden, locked away,and yet it always breaks free.]
horninghack has joined #ocaml
hornhack has quit [Read error: Connection reset by peer]
kaph has quit [Read error: Connection reset by peer]
horninghack has quit [Remote host closed the connection]
horninghack has joined #ocaml
kaph has joined #ocaml
spip has joined #ocaml
xgqt has quit [Ping timeout: 260 seconds]
bobo has quit [Ping timeout: 268 seconds]
xgqt has joined #ocaml
jlrnick has quit [Ping timeout: 248 seconds]
neilthereildeil has joined #ocaml
zebrag has joined #ocaml
jlrnick has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
horninghack has quit [Read error: Connection reset by peer]
horninghack has joined #ocaml
gdd has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
gdd has joined #ocaml
horninghack has quit [Read error: Connection reset by peer]
horninghack has joined #ocaml
gravicappa has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
olle has quit [Ping timeout: 256 seconds]
vicfred has joined #ocaml
horninghack has quit [Remote host closed the connection]
horninghack has joined #ocaml
jlrnick has quit [Read error: Connection reset by peer]
mro has quit [Remote host closed the connection]
mbuf has quit [Quit: Leaving]
neilthereildeil has quit [Quit: Client closed]
neilthereildeil has joined #ocaml
horninghack has quit [Ping timeout: 248 seconds]
mro has joined #ocaml
neilthereildeil has quit [Quit: Client closed]
mro has quit [Remote host closed the connection]
dextaa_54 has joined #ocaml
mro has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has quit [Ping timeout: 260 seconds]
vicfred has quit [Quit: Leaving]
mro has joined #ocaml
mro has quit [Client Quit]
olle has joined #ocaml
rgrinberg has joined #ocaml
Serpent7776 has quit [Quit: leaving]
vicfred has joined #ocaml
<d_bot> <Airbus5717> ocaml llvm-bindings are still maintained or discontinued?
<d_bot> <Airbus5717> .
gravicappa has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
wyrd has quit [Ping timeout: 240 seconds]
wyrd has joined #ocaml
wingsorc has joined #ocaml
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
bartholin has quit [Client Quit]
vicfred has quit [Quit: Leaving]
olle has quit [Ping timeout: 268 seconds]
<Corbin> On a tangent to that question, are there OCaml bindings for QBE?
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Haudegen has quit [Ping timeout: 268 seconds]