adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.0 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
thomas_scrace has joined #ocaml
thomas_scrace has quit [Ping timeout: 246 seconds]
erkin has quit [Remote host closed the connection]
erkin has joined #ocaml
tokomak has joined #ocaml
caltelt has quit [Ping timeout: 272 seconds]
jao has quit [Ping timeout: 268 seconds]
richi235 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
richi235 has joined #ocaml
clog has quit [Ping timeout: 265 seconds]
dtornabene has joined #ocaml
clog has joined #ocaml
mfp has quit [Ping timeout: 252 seconds]
reynir has quit [*.net *.split]
fredcy has quit [*.net *.split]
fredcy_ has joined #ocaml
reynir has joined #ocaml
reynir is now known as Guest67633
silver has quit [Read error: Connection reset by peer]
brettgilio has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
brettgilio has quit [Read error: Connection reset by peer]
brettgilio has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
flux[m] has quit [*.net *.split]
jun has quit [*.net *.split]
iZsh has quit [*.net *.split]
banjiewen has quit [*.net *.split]
mcspud has quit [*.net *.split]
jrslepak has quit [*.net *.split]
ianconnolly has quit [*.net *.split]
robmyers has quit [*.net *.split]
cschneid has quit [*.net *.split]
gonz_ has quit [*.net *.split]
jyc has quit [*.net *.split]
jun has joined #ocaml
cschneid has joined #ocaml
banjiewen has joined #ocaml
flux[m] has joined #ocaml
ianconnolly has joined #ocaml
iZsh has joined #ocaml
jyc has joined #ocaml
gonz_ has joined #ocaml
robmyers has joined #ocaml
gonz_ has quit [Changing host]
gonz_ has joined #ocaml
gonz_ has joined #ocaml
robmyers has quit [Changing host]
robmyers has joined #ocaml
jrslepak has joined #ocaml
brettgilio has quit [Excess Flood]
mcspud has joined #ocaml
brettgilio has joined #ocaml
pierpal has joined #ocaml
brettgilio has quit [Excess Flood]
brettgilio has joined #ocaml
Guest78852 has quit [Ping timeout: 245 seconds]
brettgilio has quit [Remote host closed the connection]
srenatus[m] has quit [Ping timeout: 264 seconds]
srenatus[m] has joined #ocaml
brettgilio has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
tokomak has quit [Ping timeout: 246 seconds]
thomas_scrace has joined #ocaml
thomas_scrace has quit [Ping timeout: 246 seconds]
brettgilio has quit [Max SendQ exceeded]
brettgilio has joined #ocaml
pierpa has joined #ocaml
ocabot_ has quit [*.net *.split]
igitoor has quit [*.net *.split]
madroach has quit [*.net *.split]
wickedshell has quit [*.net *.split]
terrorjack has quit [*.net *.split]
ec has quit [*.net *.split]
Niamkik has quit [*.net *.split]
rom1504 has quit [*.net *.split]
Robdor has quit [*.net *.split]
stephe has quit [*.net *.split]
Wojciech_K has quit [*.net *.split]
artart78 has quit [*.net *.split]
alphor has quit [*.net *.split]
profan has quit [*.net *.split]
zozozo has quit [*.net *.split]
riveter has quit [*.net *.split]
TallerGhostWalt has quit [*.net *.split]
profan_ has joined #ocaml
madroach has joined #ocaml
igitoor_ has joined #ocaml
Wojciech_K has joined #ocaml
zozozo has joined #ocaml
stephe has joined #ocaml
alphor has joined #ocaml
artart78 has joined #ocaml
wickedshell has joined #ocaml
rom1504 has joined #ocaml
ec has joined #ocaml
ocabot_ has joined #ocaml
Niamkik has joined #ocaml
terrorjack has joined #ocaml
ec is now known as Guest44294
Niamkik is now known as Guest19649
igitoor_ has quit [Changing host]
igitoor_ has joined #ocaml
igitoor_ is now known as igitoor
brettgilio has quit [Ping timeout: 250 seconds]
Robdor has joined #ocaml
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 272 seconds]
pierpa has quit [Quit: Page closed]
neatonk has quit [Quit: neatonk]
_whitelogger has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
erkin has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 244 seconds]
thomas_scrace has joined #ocaml
thomas_scrace has quit [Ping timeout: 252 seconds]
brettgilio has joined #ocaml
keep_learning has joined #ocaml
caltelt has joined #ocaml
Rosslaew has joined #ocaml
Guest67633 has quit [Quit: WeeChat 2.2]
reynir has joined #ocaml
thomas_scrace has joined #ocaml
<xvilka> Hi! If I want to use Lwt_io.printf in Hashtbl.iteri, what is the best way to do that? For now I use it like: Hashtbl.iteri (fun k v -> Lwt_io.printf "key %s value %s\n" k v; ()) someht
thomas_scrace has quit [Ping timeout: 252 seconds]
brettgilio has quit [Ping timeout: 250 seconds]
Rosslaew has quit [Ping timeout: 250 seconds]
caltelt has quit [Ping timeout: 252 seconds]
emily has joined #ocaml
<reynir> you can drop the »; ()« if you like
<reynir> wait
<reynir> Lwt_io.printf...
<xvilka> reynir: I have to use Lwt_io.printf to keep printing in sync with the rest parts
trochdewei has joined #ocaml
bartholin has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
dacid has joined #ocaml
<Leonidas> xvilka: you can't combine Hashtbl.iteri with Lwt_io.printf
<Leonidas> xvilka: you need to map and then use an Lwt combinator with a signature of 'a Lwt.t list -> 'a Lwt.t to reduce the list to a single "promise".
<Leonidas> that should work with Lwt.join apparently
Rosslaew has joined #ocaml
Orion3k has quit [Quit: Leaving]
cods has quit [Changing host]
cods has joined #ocaml
<KeyJoo> Hi! I use Linux Mint 18.3 Cinnamon. In Os installed Ocaml (system I system System compiler (4.02.3) + (4.05.0 C 4.05.0 Official 4.05.0 release) How set default 4.05.0?
<KeyJoo> wow: it's solved: eval `opam config env` ))
dacid has quit [Ping timeout: 245 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
Haudegen has joined #ocaml
freyr69 has joined #ocaml
Rosslaew has quit [Remote host closed the connection]
Rosslaew has joined #ocaml
Rosslaew has quit [Remote host closed the connection]
Rosslaew has joined #ocaml
Guest19649 has quit [Quit: WeeChat 2.0]
Niamkik has joined #ocaml
bartholin has quit [Remote host closed the connection]
rwmjones has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rwmjones has joined #ocaml
Bronsa has joined #ocaml
mfp has joined #ocaml
<sshine> can anyone point to some more examples of the use of the 'react' package? there's a 20 LOC clock and 450 LOC game.
<freyr69> There are obus and lambda-term which use it heavily
<freyr69> But it's quite simple and straightforward if you are into the topic
<freyr69> Are you have problems with it?
steenuil_ has joined #ocaml
steenuil_ has quit [Client Quit]
steenuil_ has joined #ocaml
steenuil has quit [Ping timeout: 252 seconds]
steenuil__ has joined #ocaml
steenuil_ has quit [Ping timeout: 252 seconds]
dtornabene has quit [Remote host closed the connection]
Rosslaew has quit [Remote host closed the connection]
Rosslaew has joined #ocaml
steenuil__ has quit [Quit: Leaving]
steenuil has joined #ocaml
CcxWrk has quit [Remote host closed the connection]
CcxWrk has joined #ocaml
thomas_scrace has joined #ocaml
jnavila has joined #ocaml
dacid has joined #ocaml
elfring has joined #ocaml
elfring has quit [Client Quit]
zlsyx has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
ziyourenxiang has joined #ocaml
jao has joined #ocaml
jnavila has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
Bronsa has quit [Ping timeout: 240 seconds]
Haudegen has quit [Remote host closed the connection]
jao has quit [Remote host closed the connection]
<_y> so, documentation in opam always bugged me
<_y> do i understand correctly that no one install HTML documentation in $(opam config var doc)/ , but rather README, LICENSE, and some ad hoc stuff like example code ?
<hannes> _y: yes, this seems to be the case. there is odig (https://github.com/dbuenzli/odig/), also available as an opam package, which produces html documentation from your local opam switch (by using ocamldoc or odoc)! :)
<_y> and that option --build-doc most likely builds the said HTML documentation, which remains in the build directory and is never installed, and thus lost when the build directory is removed?
<_y> hannes, yes, i heard of odig a few days ago, and it changed my life, really :-)
Bronsa has joined #ocaml
<_y> i am asking so that i can follow the community conventions for my own stuff
<_y> i find it really weird to have a doc/ directory and not fill it with the actual documentation
<_y> and to have a --build-doc which is virtually useless and not connected to the said doc/ directory
spew has joined #ocaml
<sshine> hello hannes :)
<_y> (plus, it seems really hard to trick dune into installing the generated HTML documentation, apparently i would have to list all individual files)
silver has joined #ocaml
<flux[m]> I really like how the docs generated by odig seem to cross reference to other packages just fine. Maybe it's accident, maybe by design?-)
<zozozo> _y: I think the solution that is appearing is to not install html doc, but instead leave everything in the .cmi files (which need to be installed anyway), so that documentation can be generated (and cross-reference done correctly as flux[m] said)
<_y> zozozo, oh does o(caml)doc uses the .cmi files? i thought they used .mli files
<discord> <bobby> flux[m]: it's definitely by design. cross references are one of odig + odoc initial focus points afaik
<flux[m]> I think it must use at least the .mli files, surely the comments never end up in the .cmis :)
<flux[m]> ..although it would be quite cool if they did?!
<flux[m]> it'd be cool if toplevel could tell us documentation as well.
<_y> that’s unconvenient, i came to the conclusion not to install the .cmi files of modules other than the toplevel one, so that internal modules are not exposed…
<_y> which btw is completely hackish, but i couldn’t find a better solution
sagotch has joined #ocaml
<flux[m]> I would certainly agree with that
<flux[m]> because with the internal .cmi:s in the search path you just bring back the name space problem
<flux[m]> but surely the toplevel .cmi exposes the information you need to expose?
<discord> <bobby> I think @rizo could shed some light here
<zozozo> _y: well, I forgot about specifics, but from a quick search, odoc seems to use .cmti (note the t) files which do contain the comments
<flux[m]> or is the problem going from a packed .cmi to individual .mli:s?
<flux[m]> btw, if the documentation was embedded in .cmis, that would Just Work(TM)..
<flux[m]> ah, nice. are they also packed? or how is the namespace issue solved with them?
<zozozo> (on the other hand, ocamldoc still uses .mli files, :p )
<_y> 29/08 14:29 <flux[m]> but surely the toplevel .cmi exposes the information you need to expose? → if you are speaking about the interface, yes it does; my concern was that it may lack the doc-comments, if that was the case that odoc used *.cmi
<zozozo> I think that packs generate the correct packed .cmti files containing all the info in the individual .cmti files
<_y> zozozo, oh fine, then i guess than i can provide the individual *.cmti
<sagotch> Hey.
<zozozo> _y: I'm not absolutely sure though, so it'd be better to try and check that eveything works as intended, ^^
<zozozo> sagotch: hi
<sagotch> I do not understand how to hide modules from a library using `dune`. I have multiple `lib` and `internal` directories. If I want to use modules from `internal` into lib, do I NEED to use a public name for `internal` (as the error msg says). If I use a public name, `dune build @install` will include and expose this `Internal` module, right?
<Leonidas> sagotch: you need to use a public name? I use internal libraries a lot without having to define them
<sagotch> Are they in separate folders?
<Leonidas> yes
dacid has quit [Quit: WeeChat 1.4]
<Leonidas> I never have multiple libraries in separate folders, because I don't feel like definint (modules …)
dacid has joined #ocaml
<sagotch> If I do not give a public name -> "Library "geneweb_internal" is private, it cannot be a dependency of a public library." while trying to build geneweb_lib
<Leonidas> sagotch: https://github.com/issuu/sure-deploy/tree/master/src/variable e.g. this library, it has no public_name and is used by the rest.
<Leonidas> ah, ok, my `lib` is not public either, that's probably the difference
<_y> zozozo, that’s what i was trying to do, but right now i have a problem with package seq
<_y> http://paste.awesom.eu/ldej i have no idea how i ended up in this situation
Haudegen has joined #ocaml
noplamodo has quit [Remote host closed the connection]
<discord> <rizo> Regarding the doc discussion: odoc does indeed work on both cmi and cmti files. Those contain docstrings in the Parsetree as annotations, ie, [@@doc {| ... |}. The same information is stored in odoc files.
<_y> and now it seems that zarith has vanished as well, WTF
<zozozo> _y: actually, I was thinking of swithcing to dune when I have the time because dune know what to install and where, so you don't have to worry about that, :p
zlsyx has quit [Read error: Connection reset by peer]
<_y> zozozo, i am using dune, but it exposes modules you would like to be hidden
zlsyx has joined #ocaml
<zozozo> ah... I don't have much of these in my projects usually
<sagotch> There should be a way to hide modules, this something used very often, isn't it ?
<sagotch> For now, the only solution I see is to define a module to write your interface by hand, and use copy_files to include files from another directory
<_y> zozozo, well, even in that case, you would like Mylib__{Foo,Bar,Lol} not to show up in autocompletion when using module Mylib
<sagotch> I would say it is not really praticle
KeyJoo has quit [Ping timeout: 252 seconds]
<_y> (which contains Mylib.{Foo,Bar,Lol})
<zozozo> _y: that's not a problem that can easily be solved without namespaces, so currently I'd say it's more the job of the auto-completion mechanism to hide the prefixed module names (but they must be available for everything to compile correctly)
<sagotch> (and copy_files does not seem to be meant to be used in a library stanza)
Rosslaew has quit [Ping timeout: 260 seconds]
<_y> zozozo, you are right, apparently both .cmi files and .cmti files of internal modules are required for “odig odoc” to build the documentation
<_y> the .cmi and .cmti files of the toplevel module is not enough
<_y> hmm sorry, rizo was right
zlsyx has quit [Read error: Connection reset by peer]
zlsyx_ has joined #ocaml
<sshine> what's the difference between writing 'open Core' and 'open Core.Std'?
<_y> zozozo, after your remark about autocompletion, i just tried it in merlin and saw that it hides the Mylib__* modules :-)
<sshine> oh, 'open Core.Std' is old?
<_y> utop is not as smart though
<Leonidas> sshine: yes, thats from the 1xx.yy.zz æra
<Leonidas> since v0.9 it is open Core
<Leonidas> Drup: you're in Germany? TIL
gtrak has joined #ocaml
<sshine> is there a Standard ML-equivalent of 'op'? e.g. op:: returns the :: operator as prefix.
<sshine> (and in Haskell it'd be (::))
<sshine> e.g. 'List.fold_right op:: []'
<sshine> err, 'List.fold_right ~f:op:: ~init:[]'
<zozozo> sshine: in ocaml (op) works the same (for instance (+) 1 2), however, as :: is not a function it doesn't work for it
<sshine> ah, but Core seems to have List.cons for this.
<companion_cube> even the stdlib has it, now, I think
<sshine> ok. I'll go with that.
<sshine> I coincidentally saw it earlier.
emias has quit [Ping timeout: 276 seconds]
emias has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
FreeBirdLjj has joined #ocaml
jbrown has joined #ocaml
FreeBird_ has joined #ocaml
KeyJoo has joined #ocaml
<sshine> hannes, is the 'react' package compatible with MirageOS? I mean, would you ever combine FRP with MirageOS?
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<_y> so what became the idea of turning (::) and [] into normal constructors ?
<reynir> they are
<_y> oh indeed
KeyJoo has quit [Ping timeout: 250 seconds]
<_y> is there any plan to remove the .() == Array.get hack ?
<_y> especially now that custom indexing operators are there
elfring has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<lyxia> what custom indexing operators
zlsyx_ has quit [Read error: Connection reset by peer]
zlsyx has joined #ocaml
<lyxia> _y: thanks, that is quite interesting.
jbrown has quit [Ping timeout: 240 seconds]
trochdewei has quit [Quit: Leaving]
al-damiri has joined #ocaml
freyr69 has quit [Remote host closed the connection]
sagotch has quit [Quit: Leaving.]
<octachron> _y, the plan is to maybe, eventually, possibly, implement https://github.com/ocaml/ocaml/pull/616
Haudegen has quit [Read error: Connection reset by peer]
<_y> octachron, thanks, i saw this PR but overlooked it as it contained many more things
sagotch has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
psteckler has joined #ocaml
<psteckler> hi
pierpal has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
pierpal has quit [Client Quit]
pierpal has joined #ocaml
bartholin has joined #ocaml
letoh has quit [Ping timeout: 244 seconds]
letoh has joined #ocaml
zlsyx has quit [Read error: Connection reset by peer]
zlsyx has joined #ocaml
dacid has quit [Ping timeout: 240 seconds]
thomas_scrace has quit [Ping timeout: 252 seconds]
roygbiv has joined #ocaml
Haudegen has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
jbrown has joined #ocaml
FreeBirdLjj has joined #ocaml
sagotch has quit [Quit: Leaving.]
Bronsa has quit [Ping timeout: 252 seconds]
Denommus has joined #ocaml
zlsyx has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
zlsyx has joined #ocaml
sagotch has joined #ocaml
johnelse_ has joined #ocaml
FreeBirdLjj has joined #ocaml
johnelse has quit [Ping timeout: 246 seconds]
Haudegen has quit [Remote host closed the connection]
al-damiri has quit [Remote host closed the connection]
al-damiri has joined #ocaml
Haudegen has joined #ocaml
psteckler has quit [Quit: Page closed]
FreeBirdLjj has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
jack5638 has quit [Ping timeout: 244 seconds]
letoh has left #ocaml [#ocaml]
KeyJoo has joined #ocaml
jack5638 has joined #ocaml
sagotch has quit [Quit: Leaving.]
jao has joined #ocaml
roygbiv has quit [Quit: ™]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
elfring has quit [Quit: Konversation terminated!]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
neatonk has joined #ocaml
brettgilio has joined #ocaml
sagotch has joined #ocaml
thomas_scrace has joined #ocaml
orbifx has joined #ocaml
orbifx has quit [Read error: Connection reset by peer]
orbifx has joined #ocaml
thomas_scrace has quit [Ping timeout: 246 seconds]
sagotch has quit [Quit: Leaving.]
thomas_scrace has joined #ocaml
tokomak has joined #ocaml
gre has left #ocaml [#ocaml]
jnavila has quit [Ping timeout: 252 seconds]
dacid has joined #ocaml
jnavila has joined #ocaml
zlsyx has quit [Read error: Connection reset by peer]
zlsyx has joined #ocaml
zlsyx has quit [Read error: Connection reset by peer]
zlsyx has joined #ocaml
zlsyx has quit [Read error: Connection reset by peer]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
zlsyx has joined #ocaml
zlsyx has quit [Read error: Connection reset by peer]
zlsyx has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
dacid has quit [Ping timeout: 240 seconds]
bartholin has quit [Remote host closed the connection]
cobax has joined #ocaml
gtrak has quit [Ping timeout: 250 seconds]
brettgilio has quit [Quit: Konversation terminated!]
zlsyx has quit [Read error: Connection reset by peer]
zlsyx has joined #ocaml
lostman has quit [Quit: Connection closed for inactivity]
pierpa has joined #ocaml
kini has joined #ocaml
pierpal has quit [Ping timeout: 240 seconds]
spew has quit [Quit: Connection closed for inactivity]
brettgilio has joined #ocaml
Eskatrem has joined #ocaml
ziyourenxiang has quit [Ping timeout: 246 seconds]
zlsyx has quit [Read error: Connection reset by peer]
zlsyx has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
<Eskatrem> Hello, I am trying to build a quick video game to learn ocaml. Can I animate objects with the Graphics library?
thomas_scrace has quit [Ping timeout: 252 seconds]
gtrak has joined #ocaml
erkin has joined #ocaml
thomas_scrace has joined #ocaml
<thizanne> Eskatrem: no you can't
<thizanne> Graphics is very minimal, you can't do much with it
<thizanne> however you can redraw your frame to update it
<Eskatrem> thizanne but I suppose that you cannot, for example, change the coordinates of a certain object of the frame, right?
<thizanne> well, when i said you can't do much, I meant that it won't do much for you
<thizanne> so you can't have an "object" on the frame and then change its coordinates and poof it gets visually updates
<thizanne> you don't even have objetcs on the frame, you draw on it like a whiteboard
<Eskatrem> yes, I get it, you have to modify the coordinates of the object you want to move and redraw the whole frame
<Eskatrem> yes, that was the impression I had - it works like a whiteboard
<Eskatrem> if Graphics is too minimal, are there other modules you're recommend?
thomas_scrace has quit [Ping timeout: 245 seconds]
<thizanne> well first, being minimal isnt necessarily bad for learning
<thizanne> then I don't know much about the state of ocaml libs for graphics and stuff
gtrak has quit [Quit: WeeChat 2.1]
<thizanne> we have bindings to sdl at least, which are minimal (no idea what that actually means, except it'll still be more than graphics), look up for tsdl
<Eskatrem> yeah, I had a look, but there wasn't much documentation, that's why I came here to ask about the current "best" library for a quick 2D video game
<thizanne> last time I checked (but I did not use it) there wasn't documentation because it was a transparent bindings of sdl
<thizanne> so the documentation is sdl's original documentation, and then you just use the ocaml names instead
<thizanne> probably not the best choice if you don't already know SDL though, unless you want to learn both
<thizanne> you can probably do well with Graphics, having an internal game_state type that you update, and a draw : game_state -> unit function to draw it on your cleaned window
<Eskatrem> I didn't know SDL existed until a few hours ago...
<Eskatrem> hmm ok maybe graphics is better to just play around
<Eskatrem> thank you for your opinion thizanne