pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
ggole has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 252 seconds]
JimmyRcom has quit [Ping timeout: 246 seconds]
pierpal has joined #ocaml
fraxamo has joined #ocaml
bartholin has joined #ocaml
ansiwen has quit [Ping timeout: 244 seconds]
ansiwen has joined #ocaml
clog has quit [Ping timeout: 244 seconds]
jimt has quit [Ping timeout: 244 seconds]
jimt has joined #ocaml
rks` has quit [Ping timeout: 244 seconds]
kakekongen has quit [Ping timeout: 244 seconds]
troydm has quit [Ping timeout: 272 seconds]
niceplace has quit [Ping timeout: 244 seconds]
bacam has quit [Ping timeout: 244 seconds]
rks` has joined #ocaml
bacam has joined #ocaml
troydm has joined #ocaml
Cypi has quit [Ping timeout: 244 seconds]
niceplace has joined #ocaml
Cypi has joined #ocaml
kakekongen has joined #ocaml
kakadu has joined #ocaml
inr has quit [Read error: Connection reset by peer]
inr has joined #ocaml
remix2000 has quit [Quit: WeeChat 2.2-dev]
remix2000 has joined #ocaml
jnavila has joined #ocaml
ygrek has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
mfp has joined #ocaml
rand__ has joined #ocaml
<Armael>
I had the same problem once or twice
<Armael>
IIRC check if you don't have a zombie utop process running
<Armael>
Or try removing the utop history file (~/.utopsomething)
<Armael>
I don't remember exactly what worked in the end for me
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
clog has joined #ocaml
kotrcka has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
jbrown has quit [Ping timeout: 252 seconds]
env__ has quit [Ping timeout: 246 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
<Ulrar>
Is there some equivalent to ; with Lwt ? I'm doing "firstFun arg >>= fun () -> secondFun arg >>= fun () -> ..." which isn't very nice on the eyes
env__ has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
env__ has quit [Ping timeout: 264 seconds]
env__ has joined #ocaml
ygrek has quit [Remote host closed the connection]
<Armael>
if you're using the ppx extension you can also do "let%lwt () = ... in ..."
kakadu has quit [Remote host closed the connection]
<Armael>
which is not too bad imo
jnavila has joined #ocaml
<Ulrar>
Yeah but that's even more stuff to write
<Armael>
yea, I just like that it aligns nicely if i'm already writing a bunch of let%lwt
<Ulrar>
This is all fairly annoying to use, actually, I can't figure out a good way to switch between Lwt_result.Infix's >>= and Lwt.Infix's >>=
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
env__ has joined #ocaml
sammie1 has quit [Ping timeout: 246 seconds]
env__ has quit [Ping timeout: 245 seconds]
jnavila has quit [Ping timeout: 246 seconds]
silver has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
<Fardale>
Ulrar: there exist Lwt_result.Infix also
env__ has joined #ocaml
<ggole>
Yeah, OCaml isn't good at overloading like that
<ggole>
If you only have one, it's fine, but anything else is a mess.
<Ulrar>
Fardale: Yes that's the problem
env__ has quit [Ping timeout: 244 seconds]
<ggole>
You could introduce your own operator
<Ulrar>
Yeah renaming one of them to something else would be nice
<Ulrar>
'cause having to `let open Lwt_result.Infix in` and `let open Lwt.Infix in` everywhere doesn't make very readable files
orbifx1 has joined #ocaml
jnavila has joined #ocaml
env__ has joined #ocaml
ygrek has joined #ocaml
env__ has quit [Ping timeout: 250 seconds]
env__ has joined #ocaml
<Ulrar>
let (>>>=) x y = let open Lwt_result.Infix in x >>= y
<Ulrar>
That's better
<ggole>
let (>>>=) = Lwt_result.Infix.(>>=) should be ok
env__ has quit [Ping timeout: 244 seconds]
djellemah has quit [Ping timeout: 246 seconds]
<Ulrar>
Mh, that does work. Usually when I try Lwt_result.Infix.(>>=) I get a syntax error
<ggole>
Were you using it in infix position?
env__ has joined #ocaml
<ggole>
()s around an operator more or less make it into a regular name
<ggole>
eg, (+) 1 2
<Ulrar>
That must be it
<Ulrar>
Thanks, that's good to know
env__ has quit [Ping timeout: 276 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 240 seconds]
silver has quit [Quit: rakede]
env__ has joined #ocaml
env__ has quit [Ping timeout: 250 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 244 seconds]
jbrown has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 244 seconds]
orbifx1 has quit [Ping timeout: 244 seconds]
orbifx1 has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 244 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
env__ has joined #ocaml
aydio has joined #ocaml
orbifx1 has quit [Ping timeout: 246 seconds]
env__ has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
pierpal has quit [Ping timeout: 244 seconds]
env__ has quit [Ping timeout: 246 seconds]
orbifx1 has joined #ocaml
env__ has joined #ocaml
orbifx1 has quit [Ping timeout: 252 seconds]
env__ has quit [Ping timeout: 240 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 264 seconds]
env__ has joined #ocaml
erkin has joined #ocaml
env__ has quit [Ping timeout: 244 seconds]
<Leonidas>
Async has an operator >>=? which is >>= on Deferred.Result.t
env__ has joined #ocaml
env__ has quit [Ping timeout: 272 seconds]
env__ has joined #ocaml
cobax has quit [Ping timeout: 264 seconds]
env__ has quit [Ping timeout: 240 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 244 seconds]
JimmyRcom has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 244 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 245 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
barcabuona has joined #ocaml
pierpal has joined #ocaml
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
env__ has joined #ocaml
ziyourenxiang has quit [Ping timeout: 246 seconds]
env__ has quit [Ping timeout: 240 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
apostolis has joined #ocaml
env__ has joined #ocaml
<apostolis>
Hello, does anyone know the internal representation of a Module? Is it is Box with arity the number of functions it implements, placed in the order of their definition in the module?
<flux[m]>
ah, four-character operators, maybe infix functions would be nice to have ;-)
<apostolis>
That would be the most sensible way to represent it.
<Armael>
at runtime it is more or less the same as a record iirc
env__ has quit [Ping timeout: 252 seconds]
<apostolis>
Armael : That's awesome.
<Armael>
:D why?
<apostolis>
I could pass it to Agda without any problems. It would be an Agda record.
<Armael>
ah hum, I guess so
env__ has joined #ocaml
env__ has quit [Ping timeout: 246 seconds]
<Drup>
apostolis: huh, be careful with that, the order is probably not easy to predict
<Drup>
(because, unlike records, there is some type abstraction/subtyping in the middle)
env__ has joined #ocaml
env__ has quit [Ping timeout: 244 seconds]
env__ has joined #ocaml
pierpal has quit [Ping timeout: 244 seconds]
dhil has joined #ocaml
env__ has quit [Ping timeout: 272 seconds]
<apostolis>
Drup : Can you give an example? or documentation? I could pass individual functions to Agda, but that would be time consuming.
dhil has quit [Quit: Leaving]
Haudegen has quit [Ping timeout: 272 seconds]
pierpal has joined #ocaml
<apostolis>
Ok, I found out what you mean.
pierpal has quit [Ping timeout: 240 seconds]
karlguy has joined #ocaml
<Drup>
apostolis: in general, the order and the precise fields that are in the memory representation of modules is *highly* implementation dependent and might change between versions
<apostolis>
Indeed , this is risky of segfaulting, but you only have to write the definition once.
<Drup>
apostolis: While Armael's remark "they are represented like records" is a good approximation, it doesn't give the full story. :)
<Armael>
:)
env__ has joined #ocaml
<apostolis>
I could write a function that takes all functions of a module and puts them inside a record.
<apostolis>
This way, the order would be fixed.
<Drup>
It's very manual, but you could
aydio has quit [Quit: WeeChat 2.2]
<apostolis>
I ll write it one, and I will use it many.
<Drup>
(Well, you just have to write a new one for each module, and write some OCaml code, and apply it for each functor, and it doesn't work with abstraction ...)
<Drup>
anyway, just pointing you to the issue so that you are not surprised ;)
<apostolis>
Yea, it will take some time. But I only care about mirage modules at the moment.
aydio has joined #ocaml
env__ has quit [Ping timeout: 252 seconds]
pierpal has joined #ocaml
<Drup>
the mirage signatures are fairly well specified, I'm sure you could automate that quite a bit.
<apostolis>
Drup : Stedolan , the creator of Malfunction, the one I use to interact with OCaml, must know the internal representation of Modules, because otherwise, I wouldn't be able to export any agda functions to be used by OCaml.
<Armael>
do you have modules in malfunction?
<apostolis>
No, but the Agda code is used by OCaml as if it was an OCaml module.
pierpal has quit [Read error: Connection reset by peer]
<Drup>
Well, malfunction doesn't provide any types for the module it emits :)
<apostolis>
Drup : I have to do it : "nputs compiled with malfunction cmx (that is, modules that are later linked with other modules) may specify any number of values in the export sexp, which must be in the same order as they are listed in the corresponding .mli file."
env__ has joined #ocaml
<apostolis>
In order to export Agda functions, I provide the signatures of their type in the order I am returning them.
metreo has joined #ocaml
metreo has left #ocaml [#ocaml]
<Drup>
Yeah, but there are some subtleties regarding module coercions. In particular if a module is of type S and is used with a type S', you have to account for the fact that the fields might not be in the same orders. That's not an issue for exporting functions in malfunction, but it might be if you want to write a functor, because the modules you will take as argument will probably be richer than the expected type.
kakadu has joined #ocaml
<apostolis>
Yea
env__ has quit [Ping timeout: 244 seconds]
<apostolis>
I am not proficient with OCaml that well, but I understand what you mean.
env__ has joined #ocaml
aydio has quit [Ping timeout: 252 seconds]
aydio has joined #ocaml
env__ has quit [Ping timeout: 244 seconds]
Haudegen has quit [Ping timeout: 244 seconds]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
Haudegen has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
env__ has joined #ocaml
ggole has quit [Quit: ggole]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
steenuil has joined #ocaml
rand__ has joined #ocaml
jbrown has quit [Ping timeout: 246 seconds]
fraxamo has quit [Quit: Leaving]
env__ has quit [Ping timeout: 240 seconds]
env__ has joined #ocaml
aydio has quit [Quit: WeeChat 2.2]
jnavila has quit [Remote host closed the connection]
rand__ has quit [Ping timeout: 246 seconds]
env__ has quit [Ping timeout: 252 seconds]
env__ has joined #ocaml
jnavila has joined #ocaml
zv has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
bartholin has quit [Remote host closed the connection]
kvda has joined #ocaml
kvda has quit [Client Quit]
cbcoutinho has joined #ocaml
kakadu has quit [Remote host closed the connection]
kvda has joined #ocaml
cbcoutinho has quit [Quit: WeeChat 2.2]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Haudegen has quit [Remote host closed the connection]