adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
<pharpend> then after the prompt doesn't work. I uninstalled and purged all the opam files and apt packages. reinstalled, same effect
env__ has quit [Ping timeout: 252 seconds]
<jgkamat> that's quite odd :o
<jgkamat> does ocaml hang too or just utop
<pharpend> no ocaml shows me a prompt
<jgkamat> maybe it's a bug in utop then :/
ziyourenxiang has joined #ocaml
env__ has joined #ocaml
emily has quit [Ping timeout: 252 seconds]
emily has joined #ocaml
dsockwell5 has joined #ocaml
dsockwell5 has quit [Ping timeout: 246 seconds]
pharpend has quit [Read error: Connection reset by peer]
freusque has joined #ocaml
freusque has quit [Client Quit]
silver_ has quit [Read error: Connection reset by peer]
mfp has quit [Ping timeout: 246 seconds]
jbrown has quit [Ping timeout: 252 seconds]
jbrown has joined #ocaml
erkin has quit [Remote host closed the connection]
_whitelogger has joined #ocaml
karlguy has quit [Quit: Leaving]
ansiwen has quit [Quit: ZNC 1.7.1 - https://znc.in]
ansiwen has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
JimmyRcom has quit [Ping timeout: 245 seconds]
pierpal has joined #ocaml
JimmyRcom has joined #ocaml
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]
env__ has quit [Ping timeout: 264 seconds]
env__ has joined #ocaml
glass has quit [Quit: ZNC - http://znc.in]
theglass has joined #ocaml
theglass has joined #ocaml
theglass has quit [Changing host]
env__ has quit [Ping timeout: 252 seconds]
rand__ has quit [Ping timeout: 264 seconds]
env__ has joined #ocaml
<Ulrar> ah found it, ;%lwt
Haudegen has joined #ocaml
env__ has quit [Ping timeout: 240 seconds]
<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
env__ has joined #ocaml
<apostolis> Drup : There is a specification : http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual033.html#htoc264 for most things.
<Drup> oh yeah, for values it's pretty fixed. Just not for modules :p
<Drup> (mostly because people don't try to access modules from C :D)
<apostolis> it's ok. I'll write a function that translates modules to records and pass that into Agda.
<thizanne> famous last words
env__ has quit [Ping timeout: 252 seconds]
<Drup> apostolis: is your goal to implement a functor in Agda so that you can plug it in mirage ?
<apostolis> The opposite : it seems that Mirage passes Modules to unikernel, and I want to access them in Agda.
<apostolis> Well , yes.
<Drup> right
<Drup> How do you intend to type the modules in Agda ? Handwrite the signatures ?
<apostolis> It is just a record.
<Drup> Well, yes, but you still want to use the stuff inside, so you have to give it a type
<apostolis> Indeed, the type signatures of the functions will be written by hand.
<Drup> Ok, hand-typed FFI then
<apostolis> I made the choice of mimicking the internal represention of OCaml for Agda.
<Drup> I don't remember if the order of the fields is always in the same order of the signature though, so you might have some surprises
<Drup> (seg-faulting surprises, even :p)
<apostolis> You can look at the record section.
Haudegen has joined #ocaml
<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]
barcabuona has left #ocaml ["WeeChat 2.3"]
ygrek has quit [Ping timeout: 252 seconds]
ShalokShalom has joined #ocaml
ziyourenxiang has joined #ocaml
kvda has joined #ocaml
env__ has quit [Ping timeout: 245 seconds]
carlosdagos has joined #ocaml
env__ has joined #ocaml
karlguy has quit [Ping timeout: 264 seconds]