adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
seangrove has joined #ocaml
zv has joined #ocaml
etc2 has quit [Ping timeout: 265 seconds]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has quit [Killed (verne.freenode.net (Nickname regained by services))]
infinity0 has joined #ocaml
hdon has quit [Ping timeout: 248 seconds]
etc2 has joined #ocaml
hdon has joined #ocaml
shinnya has joined #ocaml
Jesin has joined #ocaml
atheris has quit [Quit: leaving]
vgrocha has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
vgrocha has quit [Client Quit]
vgrocha has joined #ocaml
dogui has quit [Ping timeout: 260 seconds]
dogui has joined #ocaml
hdon has quit [Changing host]
hdon has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
seangrove has quit [Ping timeout: 268 seconds]
al-damiri has joined #ocaml
etc2 has quit [Ping timeout: 265 seconds]
pierpa has quit [Quit: Page closed]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
hdon has quit [Ping timeout: 264 seconds]
Jesin has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
moolc has joined #ocaml
pierpal has joined #ocaml
shinnya has quit [Ping timeout: 256 seconds]
pierpal has quit [Quit: Poof]
hdon has joined #ocaml
pierpal has joined #ocaml
govg has joined #ocaml
_xvilka_ has quit [Quit: Lost terminal]
hdon has quit [Ping timeout: 268 seconds]
pierpal has quit [Read error: Connection reset by peer]
<vgrocha> quit
vgrocha has quit [Quit: WeeChat 1.6]
etc2 has joined #ocaml
etc2 has quit [Client Quit]
zv has quit [Ping timeout: 256 seconds]
hdon has joined #ocaml
jimmyrcom_ has joined #ocaml
keep_learning has joined #ocaml
GreyFaceNoSpace has quit [Quit: Ex-Chat]
hdon has quit [Ping timeout: 256 seconds]
hdon has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
nullifidian has quit [Ping timeout: 240 seconds]
trochdewei has joined #ocaml
nullifidian has joined #ocaml
trochdewei has quit [Quit: Leaving]
hdon has quit [Changing host]
hdon has joined #ocaml
Guest70385 has joined #ocaml
cbot has quit [Ping timeout: 260 seconds]
hdon has quit [Ping timeout: 260 seconds]
hdon has joined #ocaml
zolk3ri has joined #ocaml
gareppa has joined #ocaml
mk9 has joined #ocaml
_xvilka_ has joined #ocaml
<_xvilka_> hi! Is something changed with "jbuilder" and "ppx_deriving" together?
<_xvilka_> after a month of vacation I ran "opam update" and found out that (preprocess (ppx (ppx_deriving.std)) stopped to work
gareppa has quit [Quit: Leaving]
Guest70385 is now known as Haudegen
hdon has quit [Ping timeout: 276 seconds]
<rgr[m]> Nothing changed recently.
zv has joined #ocaml
<rgr[m]> do you mean s/ppx/pps/ ?
<_xvilka_> rgr[m]: yes, ofc
<_xvilka_> rgr[m]: strange, it was working before flawlessly
<_xvilka_> particularily it stopped to produce [@@deriving enum]
<rgr[m]> which versions of ppx_type_conv and ppx_deriving do you have?
<_xvilka_> rgr[m]: ppx_deriving is 4.1.5 and ppx_type_conv is v0.9.1
<rgr[m]> Yeah, I think your type_conv is too old
<rgr[m]> Also, I would also use 4.2 for ppx_deriving
<_xvilka_> oh, I probably know why
<_xvilka_> because I also use 'bap' opam-repository, they seem not to upgrade often
<Leonidas> how do I implement my_type Fmt.t with dbunzli's Fmt? I can't really figure out the docs.
mk9 has quit [Quit: mk9]
<Leonidas> hmm, Fmt.of_to_string sounds like the easiest way
RalfJ has quit [Remote host closed the connection]
mfp has joined #ocaml
RalfJ has joined #ocaml
malina has joined #ocaml
tarptaeya has joined #ocaml
gareppa has joined #ocaml
mk9 has joined #ocaml
gareppa has quit [Quit: Leaving]
mk9 has quit [Quit: mk9]
moei has quit [Quit: Leaving...]
BitPuffin has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 256 seconds]
kakadu has joined #ocaml
kakadu has quit [Client Quit]
Haudegen has quit [Remote host closed the connection]
letoh has quit [Ping timeout: 256 seconds]
pierpal has joined #ocaml
argent_smith has joined #ocaml
tarptaeya has quit [Read error: Connection reset by peer]
moei has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
<Leonidas> is there any feasible way to have a private opam repository using private github repos? Do I need to rewrite all URLs into private internal locations or can I somehow let opam know about github credentials?
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 260 seconds]
tarptaeya has joined #ocaml
pierpal has joined #ocaml
sh0t has joined #ocaml
tarptaeya has quit [Quit: Konversation terminated!]
tarptaeya has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
cbot has joined #ocaml
nullifidian has quit [Remote host closed the connection]
gtrak has joined #ocaml
nullifidian has joined #ocaml
cbot has quit [Quit: Leaving]
jbrown has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
argent_smith has quit [Quit: Leaving.]
argent_smith has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
letoh has joined #ocaml
moolc has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
muelleme has joined #ocaml
dogui has quit [Ping timeout: 264 seconds]
muelleme has quit [Ping timeout: 276 seconds]
pmetzger has joined #ocaml
shinnya has joined #ocaml
sh0t has joined #ocaml
dogui has joined #ocaml
artart78 has quit [Read error: Connection reset by peer]
silver has joined #ocaml
artart78 has joined #ocaml
pierpal has joined #ocaml
picolino has quit [Ping timeout: 264 seconds]
pierpal has quit [Ping timeout: 248 seconds]
picolino has joined #ocaml
al-damiri has joined #ocaml
muelleme has joined #ocaml
barcabuona has quit [Quit: WeeChat 2.1]
<companion_cube> pmetzger: ocaml bugs are to be reported on mantis -_-
<pmetzger> companion_cube: Apparently. But I couldn't manage to get a Mantis account the last time I tried. :(
<Armael> I think account creation got stuck at some point; now it should be working again
<pmetzger> I will try that. This said, it might be nice to take bug reports in both places, because it adds a step for someone who wants to bring in a bug report, and who doesn't necessarily want to have a Mantis account etc. :(
<pmetzger> But I understand that the Mantis system is what people are used to.
<companion_cube> I think the maintainers didn't want to have half the issues on mantis, half on github
Gurkenglas has joined #ocaml
FreeBirdLjj has joined #ocaml
<pmetzger> Yah. But it does make it more surprising (and awkward.)
<companion_cube> agreed…
exarkun has joined #ocaml
<exarkun> can anyone help me break down this syntax? https://gitlab.com/tezos/tezos/blob/master/src/lib_rpc/RPC_directory.ml#L23-26
<exarkun> `[< _ RPC_answer.t ]` is particularly confusing me but I probably don't have a grasp on `:` or `:>` either
<steenuil> the :> means it's a type cast
<octachron> exarkun, (a:>b) is an explicit coercion from subtype a to type b
<steenuil> yeah, I meant coercion
<octachron> this code is performing a conversion on one of the arguments of the function and only one which explain all the _
<octachron> and it converts from _ RPC_answer.t aka exactly the polymorphic variant described in the definition of _ RPC_answer.t
<octachron> to [< _ RPC_answer.t], aka at most the polymorphics variants described in _ RPC_answer.t
<octachron> beyond those syntactic points, you may wish to read up on polymorphic variants
<exarkun> seems like a good idea. taking a look at https://realworldocaml.org/v1/en/html/variants.html now - thanks.
<pmetzger> I found the [> and similar syntax (for things like covariant and contravariant types) confusing at first but it is straightforward once you understand it. Understanding it the first time takes a little work.
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
btbytes has joined #ocaml
domanic has joined #ocaml
domanic has quit [Client Quit]
dominic__ has joined #ocaml
jimmyrcom_ has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
dominic__ has quit [Ping timeout: 265 seconds]
dominic__ has joined #ocaml
pierpal has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
moolc has joined #ocaml
<hcarty[m]> @leo
<hcarty[m]> Leonidas: It's possible. One (relatively) simple approach is to use SSH keys for access to the private repositories.
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
FreeBirdLjj has joined #ocaml
Haudegen has joined #ocaml
hdon has joined #ocaml
BitPuffin has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
tg has quit [Ping timeout: 240 seconds]
steenuil_ has joined #ocaml
steenuil has quit [Ping timeout: 264 seconds]
Haudegen has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
<hdon> hi all :) i'm writing a telnet game as an exercise in ML. the state the game maintains for the client must be modal, nested, recursive. for example, i may choose to select an option from a list of options. keys i send must be sent to a process that knows how to accept input for option selection and display options to the terminal: hence modal. from that option screen i may choose an option like "add a new
<hdon> option to the list," which should push a new state onto the stack representing a new mode of interaction, let's say entering a new text label for the new option. i can push a new mode, but i cannot enter the old mode until i have completly dismissed the current mode: hence nested. finally, while entering a new option, i may wish to select an existing option as the basis for my new option, pushing a second
<hdon> option selection onto the stack: hence recursive. does anyone have any advice for good ways of representing this kind of state in ML?
<hdon> keys = keystrokes
theglass has quit [Ping timeout: 245 seconds]
btbytes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
btbytes has joined #ocaml
theglass has joined #ocaml
theglass has quit [Changing host]
theglass has joined #ocaml
dedgrant has joined #ocaml
Bronsa has joined #ocaml
theglass has quit [Ping timeout: 255 seconds]
<moolc> hdon: have you considered looking into text editors for inspiration?
<hdon> moolc: not yet. are there editors written in ML?
<moolc> hdon: there was EFuns
<hdon> moolc: i can imagine ways of how to represent this, but i don't know what would be idiomatic in ML, nor do i have an intuition for what might be good or bad in ML. so that's kind of the purpose of the exercise :)
<hdon> moolc: cool i will check that out :)
<moolc> hdon: but i was thinking along the lines of emacs or whatever
<moolc> hdon: you can also look at ledit (readline like thing in ocaml)
<hdon> cool thanks :)
<moolc> nie wspominając o tym
aegray_ has joined #ocaml
<Drup> the library lambda-term (and its dependency zed) might be of interest
aegray has quit [Ping timeout: 240 seconds]
muelleme has quit [Ping timeout: 240 seconds]
theglass has joined #ocaml
theglass has quit [Changing host]
theglass has joined #ocaml
Haudegen has quit [Remote host closed the connection]
moolc` has joined #ocaml
moolc has quit [Ping timeout: 256 seconds]
Guest15642 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
moolc` is now known as moolc
Guest15642 is now known as Haudegen
FreeBirdLjj has quit [Ping timeout: 248 seconds]
pierpa has joined #ocaml
pierpal has quit [Ping timeout: 255 seconds]
dominic__ has quit [Ping timeout: 268 seconds]
theglass has quit [Ping timeout: 255 seconds]
xutux has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
kakadu has joined #ocaml
mk9 has joined #ocaml
malina has quit [Remote host closed the connection]
sgnb has joined #ocaml
malina has joined #ocaml
malina has quit [Remote host closed the connection]
malina has joined #ocaml
theglass has joined #ocaml
theglass is now known as Guest78639
kakadu_ has joined #ocaml
BitPuffin has quit [Remote host closed the connection]
kakadu has quit [Ping timeout: 256 seconds]
dominic__ has joined #ocaml
tg has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
tarptaeya has quit [Quit: Konversation terminated!]
silenc3r has joined #ocaml
<silenc3r> how do I test internal module functions? Are inline tests the only option?
sgnb has quit [Remote host closed the connection]
<silenc3r> there doesn't seem to be any way to simply ignore mli files and access all module contents from other file
bairui has quit [Read error: Connection reset by peer]
bairui has joined #ocaml
<exarkun> If you have private functions inside a module, move them into another module that has a public interface instead and make the original module use it.
<silenc3r> exarkun: that's actually nice idea, thanks!
<pmetzger> Another option is to test that file in isolation without its .mli
Haudegen has quit [Read error: Connection reset by peer]
<silenc3r> pmetzger: How do I do that? Copy to other folder?
<pmetzger> That's one way. Or symlink. There's all sorts of ways to skin a cat.
exarkun has quit [Read error: Connection reset by peer]
moolc has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
<pmetzger> Anyway, your build and test process can do anything, so one thing you can do is have more than one .mli for a .ml file. I've tried this out and it worked, but I was hackily symlinking from one dir to another.
<pmetzger> Or just build without a .mli in the test harness and expose everything.
<pmetzger> I'd be interested in learning what "real" OCaml hackers do. I'm pretty new at all of this myself.
<silenc3r> Yeah, now I can think of many ways to achieve what I want, but none of them seem very elegant unfortunately.
pierpal has joined #ocaml
<steenuil_> I'm guessing the fact that inline tests are so easy to configure in jbuilder means that it's the suggested way to do it
<Drup> pmetzger: I tend to only test through the mli in a "full stack" manner
<pmetzger> I like unit testing individual functions. But it depends.
<Drup> well, it might be due to the stack that I mostly design APIs, not applications
<Drup> and even when I design applications, I first design the internals as a library with a concrete API, then the application is a composition of the blocks
<Drup> so, you always have a concrete API to test, and that works better, I think
<Drup> some people prefer to do lot's of inline tests ( containers is probably a good example of that)
exarkun has joined #ocaml
<Drup> but if you have to break abstraction in order to write actual tests, I take it as a sign that maybe your API is bad.
Haudegen has joined #ocaml
xutux_ has joined #ocaml
<companion_cube> (note that inline tests don't break abstraction)
<companion_cube> I
<companion_cube> I'm puzzled by OCaml's floats
<companion_cube> it's supposed to be 64 bits, but it doesn't go lower than 2.…e-308
xutux has quit [Ping timeout: 260 seconds]
btbytes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Drup> companion_cube: yeah, inline tests are slightly misleading on that. The code is syntactically inside the module, but not semantically
<Drup> companion_cube: isn't that normal ?
<Drup> eXXX is power of 10
xutux has joined #ocaml
<companion_cube> -_-
<companion_cube> damn
<Drup> companion_cube: Pervasives.frexp ;)
<companion_cube> I'm struggling to extract subnormal values from Z3, and priunt them as OCaml values, actaully ^^'
Haudegen has quit [Ping timeout: 240 seconds]
<companion_cube> but thanks for the hint
<zv> the SMT solver?
<Drup> companion_cube: I remember something about that
xutux_ has quit [Ping timeout: 256 seconds]
<silenc3r> I have very specific use case where my module implements database-like interface (with plaintext file as backend) that exposes only 2 functions: add and read_all. The problem is that 'add' does all sort of different things (using private helper functions) including modifying *all* entries. Testing these helper functions one by one seems like better idea here. I could do without mli file anyway, since in the end I'm building a single binary, but I use it
<silenc3r> for learning purposes.
Haudegen has joined #ocaml
<companion_cube> Drup: right, e-300 is in base 10, thank you very much
<Drup> I remember having to go through strings to extract stuff from the model in a reliable way
<Drup> rationals, in particular
<companion_cube> :DDD
<Drup> companion_cube: see z3overlay
<Drup> silenc3r: no offense, but that doesn't sound like a good API :)
<pmetzger> Even if it isn't, it's often the case that an API is pretty narrow but there's a lot of stuff behind it that needs internal testing. Think of an SQL database, where the query interface is pretty narrow compared to the massive set of internals. That said, one reasonable thing to do there is to break up the internals into well defined modules and test/depend on those.
<silenc3r> Drup: I know, but that's exactly what I need.
malina has quit [Remote host closed the connection]
<silenc3r> Maybe I used a wrong word, it's more like cache than database and it has limit on its size so it needs to purge some old entries when adding new element would cross the threshold.
<companion_cube> Drup: I don't see anything related to extracging float modules in z3overlay :/
<Drup> companion_cube: ah you mean actual z3 floats, not rationals ?
<companion_cube> yes
<Drup> yeah, I didn't played with that
<companion_cube> ok ^^
<companion_cube> thanks for help anyway, that was very helpful
<Drup> silenc3r: but should that be the internal API you work with ?
<silenc3r> Drup: It doesn't have to be. I'm just learning OCaml and experimenting with things. My program could as well be just one file, it's not that big.
argent_smith has quit [Quit: Leaving.]
sh0t has quit [Remote host closed the connection]
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
mk9 has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 260 seconds]
mk9 has joined #ocaml
silenc3r has quit [Quit: Leaving]
btbytes has joined #ocaml
pmetzger has quit []
Haudegen has quit [Read error: Connection reset by peer]
orbifx has joined #ocaml
Bronsa has quit [Ping timeout: 255 seconds]
gtrak has joined #ocaml
kakadu_ has quit [Remote host closed the connection]
sh0t has joined #ocaml
mk9 has quit [Quit: mk9]
jonh has left #ocaml ["WeeChat 1.4"]
mk9 has joined #ocaml
gtrak has quit [Ping timeout: 260 seconds]
btbytes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mk9 has quit [Quit: mk9]
gtrak has joined #ocaml
dominic__ has quit [Quit: Konversation terminated!]
cbot has joined #ocaml