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
themsay has quit [Remote host closed the connection]
themsay has joined #ocaml
orbifx has quit [Ping timeout: 246 seconds]
<keep_learning_M> Hi everyone, a stupid question. I am looking for a function which reads file and produces string.
<companion_cube> open_in and some function from Stdio or Containers
<companion_cube> (in Containers: IO.read_all)
sz0 has quit [Quit: Connection closed for inactivity]
silver_ has joined #ocaml
silver has quit [Ping timeout: 246 seconds]
mfp has quit [Ping timeout: 252 seconds]
silver_ has quit [Read error: Connection reset by peer]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
<keep_learning_M> Hi everyone, I am trying to parse a json file using atdgen. The field looks like this in json file ("overall_proof": null) and in atd file it overall_proof : string option
<keep_learning_M> Fatal error: exception Yojson.Json_error("Line 1, bytes 29273-29306:\nExpected '<', '\"' or '[' but found 'null}], \"election_hash\": \"Q2gj8sq'")
<keep_learning_M> Any idea or hint would be great.
unyu has joined #ocaml
ygrek has joined #ocaml
<keep_learning_M> I have a file name voter.adt with all the required data types, and when I am running adtgen - j voter.adt
<keep_learning_M> it's generating two file voter_j.ml and voter_j.mli. Upto this point everything is fine, but when I see the data types
<keep_learning_M> it's prefixed with type commitment = Voter_t.commitment = { a: string; b: string }
jao has quit [Ping timeout: 252 seconds]
<Enjolras> keep_learning_M: option and nullable are differnt
<keep_learning_M> which is very strange to me because of prefixing Voter_t in voter_j.ml file
<Enjolras> you want to define the field as string nullable and not string option
<keep_learning_M> disregard my previous message, because I saw voter_t.ml and voter_t.mli files right now. Sorry for noise.
<keep_learning_M> Enjolras, Thank you very much
tormen has joined #ocaml
jao has joined #ocaml
tormen_ has quit [Ping timeout: 272 seconds]
elts has joined #ocaml
elts has quit [Quit: .]
elts has joined #ocaml
AnAverageHuman has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
gravicappa has joined #ocaml
<keep_learning_M> companion_cube, Thank you
<keep_learning_M> I have a data type in adt file type choice = {alpha : string, beta : string}, but these strings are basically big integers, so I am wondering if I can write it type choice = {alpha : big_int; beta : big_int} ?
AnAverageHuman has quit [Ping timeout: 256 seconds]
jao has quit [Ping timeout: 250 seconds]
sonologico has quit [Remote host closed the connection]
zmt00 has joined #ocaml
zmt01 has quit [Ping timeout: 252 seconds]
Jesin has quit [Ping timeout: 252 seconds]
Jesin has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
freyr69 has joined #ocaml
CcxWrk has quit [Remote host closed the connection]
ggole has joined #ocaml
ggole- has joined #ocaml
ggole has quit [Ping timeout: 240 seconds]
ggole_ has joined #ocaml
ggole- has quit [Ping timeout: 240 seconds]
CcxWrk has joined #ocaml
amiloradovsky has quit [Ping timeout: 246 seconds]
barockobamo has joined #ocaml
mildtaste has joined #ocaml
ggole_ has quit [Ping timeout: 240 seconds]
ggole has joined #ocaml
ggole has quit [Read error: Connection reset by peer]
ggole has joined #ocaml
FreeBirdLjj has joined #ocaml
ggole has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
orbifx has joined #ocaml
mfp has joined #ocaml
Haudegen has joined #ocaml
orbifx has quit [Ping timeout: 250 seconds]
gareppa has joined #ocaml
AxiomaticEspress has quit [Quit: WeeChat 2.4]
AxiomaticEspress has joined #ocaml
AxiomaticEspress has quit [Client Quit]
gareppa has quit [Quit: Leaving]
asymptotically has joined #ocaml
gareppa has joined #ocaml
steenuil has joined #ocaml
gareppa has quit [Quit: Leaving]
gareppa has joined #ocaml
themsay has quit [Ping timeout: 245 seconds]
themsay has joined #ocaml
octachron has quit [Ping timeout: 245 seconds]
octachron has joined #ocaml
cemerick has left #ocaml [#ocaml]
cemerick has joined #ocaml
gareppa has quit [Quit: Leaving]
gareppa has joined #ocaml
gravicappa has quit [Ping timeout: 272 seconds]
silver has joined #ocaml
<Leonidas> I am super confused because you mean ATD and not ADT
gareppa has quit [Quit: Leaving]
nikivi has quit [Remote host closed the connection]
nikivi has joined #ocaml
nikivi has quit [Remote host closed the connection]
nikivi has joined #ocaml
Haudegen has quit [Remote host closed the connection]
ziyourenxiang has quit [Ping timeout: 252 seconds]
amiloradovsky has joined #ocaml
ziyourenxiang has joined #ocaml
ziyourenxiang has quit [Remote host closed the connection]
gravicappa has joined #ocaml
ziyourenxiang has joined #ocaml
gareppa has joined #ocaml
gravicappa has quit [Ping timeout: 246 seconds]
gravicappa has joined #ocaml
AxiomaticEspress has joined #ocaml
<AxiomaticEspress> is it possible to generate and install an ocaml library as package with Dune, but from *.cmx / *.cmi files as opposed to *.ml/*mli files?
<Drup> you don't really need dune if you already have the cm* files ...
<AxiomaticEspress> Drup: then maybe I should just do it by calling `ocamlfind` by hand?
<Drup> or just write/generate the file <opampkg>.install yourself
jao has joined #ocaml
Haudegen has joined #ocaml
<AxiomaticEspress> Drup: sorry, is <opampkg>.install an opam file? Do I need an associated <opampkg>.opam?
<Drup> yes
<AxiomaticEspress> Drup: thanks
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
spew has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 245 seconds]
zolk3ri has joined #ocaml
kakadu has joined #ocaml
kakadu_ has quit [Ping timeout: 245 seconds]
<Leonidas> so if I want to generate a signature item I can do [%sigi: val i : unit] but how do I escape from there? [%stri val [%i: foo] : unit] doesn't seem to do the trick.
<Leonidas> Also I see a lot of construction functions for patterns and expressions but nothing really for signatures: https://github.com/ocaml-ppx/ppxlib/blob/master/src/ast_builder_intf.ml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
<octachron> The problem is that extension nodes cannot be used in place of identifiers. You need to use a short helper function for that.
amiloradovsky has quit [Ping timeout: 268 seconds]
<Drup> Leonidas: Ast_helper.Sig contains lot's of functions
gareppa has quit [Quit: Leaving]
amiloradovsky has joined #ocaml
nikivi has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
<Leonidas> hmm. These helpers (as those in Ast_helper.Val which I also need) don't really seem to do much besides constructing the records. I did it now without metaquoting but ehh.
<Drup> they don't do much more, no
nikivi has joined #ocaml
AxiomaticEspress has quit [Quit: WeeChat 2.4]
asymptotically has quit [Quit: Leaving]
jao has quit [Ping timeout: 250 seconds]
<Leonidas> octachron: where does Location come from? I need to construct this `str` type but can't figure out how to make an 'a loc
<Leonidas> or `string loc`
<Leonidas> ah, nevermind, I just built the record directly
<octachron> Leonidas, there is also Location.mkloc which is a fine wrapper for building term with locations
<Leonidas> octachron: hmm, looks like Pplib.Location does not have that
Jesin has quit [Quit: Leaving]
gareppa has joined #ocaml
Jesin has joined #ocaml
ygrek has joined #ocaml
gareppa has quit [Quit: Leaving]
AnAverageHuman has joined #ocaml
AnAverageHuman has quit [Ping timeout: 256 seconds]
zolk3ri has quit [Remote host closed the connection]
barockobamo has quit [Remote host closed the connection]
sagax has quit [Remote host closed the connection]
<rks`> Ppxlib.Loc.make
freyr69 has quit [Remote host closed the connection]
sagax has joined #ocaml
Haudegen has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
AtumT has joined #ocaml
steenuil has quit [Quit: steenuil]
jao has joined #ocaml
artart78 has quit [Changing host]
artart78 has joined #ocaml
Jesin has quit [Quit: Leaving]
kjak has quit [Ping timeout: 272 seconds]
Jesin has joined #ocaml
zolk3ri has joined #ocaml
ziyourenxiang has quit [Ping timeout: 252 seconds]
jnavila has joined #ocaml
Serpent7776 has joined #ocaml
Haudegen has joined #ocaml
kjak has joined #ocaml
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
dimitarvp has joined #ocaml
<Leonidas> rks`: thanks, adapted my code. Will scout the rest of Ppxlib to find helpers for the remaining things I'm building by hand
gravicappa has quit [Ping timeout: 252 seconds]
sapristi has joined #ocaml
<sapristi> hello
<sapristi> I'm trying to use a module for central configuration, initialised at startup
shakalaka has quit [Ping timeout: 240 seconds]
<sapristi> except the modules depending on the configuration load it before it is rightly initialised
<sapristi> I guess I could bypass the problem using ref's, or a functor, but that would not be so convenient
<sapristi> do you guys have any idea how to do that ?
<Leonidas> Some of our old code use a functor that takes a Unit module, but I'm not particularly fond of that solution
<sapristi> hmm yes, although it's still a bit less work than a functor that takes the config
<Leonidas> I think the whole "global state" just makes it feel rather unclean to me :-/
<Leonidas> s/state/configuration
<sapristi> well how else would you easily handle something like log level ?
nikivi has quit [Read error: Connection reset by peer]
maarhart has quit [Quit: Mutter: www.mutterirc.com]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
maarhart has joined #ocaml
maarhart has quit [Excess Flood]
kakadu_ has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
themsay has quit [Ping timeout: 252 seconds]
assemblyman has joined #ocaml
sonologico has joined #ocaml
themsay has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
spew has quit [Quit: going home]
pierpal has joined #ocaml
sonologico has quit [Ping timeout: 272 seconds]
silver has quit [Ping timeout: 272 seconds]
Serpent7776 has quit [Quit: leaving]
assemblyman has quit [Quit: ™]
silver has joined #ocaml
sonologico has joined #ocaml
AnAverageHuman has joined #ocaml
jnavila has quit [Remote host closed the connection]
Haudegen has joined #ocaml
bartholin has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 252 seconds]
sonologico has quit [Ping timeout: 272 seconds]
dimitarvp has quit [Quit: Bye]
dimitarvp has joined #ocaml
dimitarvp has quit [Client Quit]
AnAverageHuman has quit [Ping timeout: 256 seconds]
orbifx has joined #ocaml
AnAverageHuman has joined #ocaml
<Leonidas> with an explicit configuration that is passed through
<companion_cube> now I'm tempted to plug my test tool into slack 8-)
kakadu_ has quit [Remote host closed the connection]
<Leonidas> I sense a lot of bug reports coming in in the near future
<companion_cube> I don't need much, I think
c4rc4s has quit [Remote host closed the connection]
c4rc4s has joined #ocaml
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
Haudegen has quit [Remote host closed the connection]
orbifx has quit [Ping timeout: 246 seconds]
sapristi_ has joined #ocaml
sapristi has quit [Ping timeout: 252 seconds]