adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb1 has joined #ocaml
nojb has quit [Ping timeout: 240 seconds]
nojb1 is now known as nojb
jonludlam has quit [Ping timeout: 250 seconds]
jeffmo has quit [Quit: jeffmo]
nojb1 has joined #ocaml
mcmillhj_ has quit [Ping timeout: 250 seconds]
Simn has quit [Quit: Leaving]
nojb has quit [Ping timeout: 250 seconds]
nojb1 is now known as nojb
ontologiae_ has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
JacobEdelman has quit [Remote host closed the connection]
l1x has quit [Remote host closed the connection]
dch has quit [Remote host closed the connection]
strmpnk has quit [Read error: Connection reset by peer]
madroach has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
nojb has quit [Client Quit]
lopex has quit [Ping timeout: 260 seconds]
nojb has joined #ocaml
yminsky has quit [Ping timeout: 245 seconds]
nojb has quit [Client Quit]
yminsky has joined #ocaml
yminsky has quit [Changing host]
yminsky has joined #ocaml
dch has joined #ocaml
lopex has joined #ocaml
l1x has joined #ocaml
nojb has joined #ocaml
strmpnk has joined #ocaml
nojb has quit [Client Quit]
linse has quit [Quit: linse]
nojb has joined #ocaml
JacobEdelman has joined #ocaml
nojb1 has joined #ocaml
jeffmo has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
nojb has quit [Ping timeout: 250 seconds]
nojb1 has quit [Client Quit]
Tekilla has joined #ocaml
nojb has joined #ocaml
mcmillhj_ has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Ping timeout: 240 seconds]
nojb has joined #ocaml
antkong has quit [Quit: antkong]
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb1 has joined #ocaml
nojb has quit [Ping timeout: 240 seconds]
nojb1 is now known as nojb
govg has quit [Ping timeout: 272 seconds]
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb1 has joined #ocaml
nojb has quit [Ping timeout: 240 seconds]
nojb1 is now known as nojb
nojb has quit [Client Quit]
nojb has joined #ocaml
ldopa has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb1 has joined #ocaml
nojb has quit [Ping timeout: 250 seconds]
nojb1 is now known as nojb
nojb has quit [Client Quit]
nojb has joined #ocaml
FreeBirdLjj has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
ontologiae_ has quit [Ping timeout: 272 seconds]
nojb has joined #ocaml
ldopa has quit [Read error: Connection reset by peer]
nojb has quit [Client Quit]
nojb has joined #ocaml
Pepe__ is now known as Pepe_
antkong has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
kolko has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
nojb has quit [Client Quit]
nojb has joined #ocaml
FreeBirdLjj has joined #ocaml
nojb has quit [Client Quit]
lolisa has joined #ocaml
badon has quit [Quit: Leaving]
ygrek_ has quit [Ping timeout: 256 seconds]
jeffmo has quit [Quit: jeffmo]
tennix has joined #ocaml
badon has joined #ocaml
Tekilla has quit [Quit: Quitte]
yegods has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
ncthom91 has joined #ocaml
jimt has joined #ocaml
mac10688 has quit [Ping timeout: 250 seconds]
cody` has quit [Quit: Connection closed for inactivity]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pierpa has quit [Ping timeout: 250 seconds]
ggole has joined #ocaml
ianhedoesit has joined #ocaml
darkf has joined #ocaml
ianhedoesit has quit [Quit: leaving]
Mercuria1Alchemi has joined #ocaml
manizzle has joined #ocaml
raphaelss has quit [Ping timeout: 272 seconds]
Mercuria1Alchemi has quit [Ping timeout: 272 seconds]
JacobEdelman has quit [Quit: Connection closed for inactivity]
nullcatxxx_ has quit [Read error: Connection reset by peer]
AlexRussia has quit [Ping timeout: 260 seconds]
nullcatxxx_ has joined #ocaml
ygrek_ has quit [Ping timeout: 272 seconds]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
malc_ has quit [Quit: leaving]
sigjuice has quit [Quit: ZNC - http://znc.in]
sigjuice has joined #ocaml
contempt has joined #ocaml
damason has quit [Ping timeout: 272 seconds]
mort___ has quit [Quit: Leaving.]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antkong has quit [Quit: antkong]
BitPuffin|osx has quit [Ping timeout: 256 seconds]
Simn has joined #ocaml
nojb has joined #ocaml
zpe has joined #ocaml
ely-se has joined #ocaml
rand has joined #ocaml
ontologiae_ has joined #ocaml
Guest3094 has quit [Ping timeout: 250 seconds]
emias has joined #ocaml
cody` has joined #ocaml
trix has joined #ocaml
trix is now known as Guest72510
fedjo has quit [Ping timeout: 246 seconds]
sh0t has joined #ocaml
madroach has quit [Ping timeout: 246 seconds]
fedjo has joined #ocaml
madroach has joined #ocaml
supercircle4 has joined #ocaml
Kakadu has quit [Ping timeout: 252 seconds]
ggole has quit [Ping timeout: 256 seconds]
ely-se has quit [Quit: leaving]
ggole has joined #ocaml
ontologiae_ has quit [Quit: WeeChat 1.2]
lolisa has quit [Ping timeout: 250 seconds]
ely-se has joined #ocaml
sh0t has quit [Ping timeout: 272 seconds]
madroach has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
ely-se has quit [Quit: leaving]
AlexRussia has joined #ocaml
_andre has joined #ocaml
ely-se has joined #ocaml
dsheets has joined #ocaml
bitbckt has joined #ocaml
zpe has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 246 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
madroach has joined #ocaml
Anarchos has joined #ocaml
<Anarchos> I am looking for a tool to parse the output of objdump, to read assembly code into an ocaml structure.
larhat1 has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
<Anarchos> hi Haudegen
Anarchos has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
agumonkey has quit [Ping timeout: 256 seconds]
ggVGc has quit [Ping timeout: 245 seconds]
agumonkey has joined #ocaml
lewis1711 has joined #ocaml
freehck has joined #ocaml
<lewis1711> do I have to explicitly include other modules? I am trying to compile with ocamlbuild
<lewis1711> I have a file called ir.ml with a module IR. but when running ocamlbuild, it claims it doesn't know about the IR module when I use it in another file
rand has quit [Ping timeout: 240 seconds]
<freehck> Because the module is Ir, not IR?
<freehck> lewis1711: simply speaking, you could import all the functions from another module using "open Module" or u can just call a function from that module using "Module.function".
<freehck> And it supposes that you have a file module.ml or Module.ml in the directory described in tags file (or just in the same directory).
<lewis1711> freehck, the file is ir.ml. but inside is a module called explicitly "module IR = struct ..."
<lewis1711> but that maybe makes me think that I just nested a module
<freehck> lewis1711: So u need to "open Ir" and then "open IR"
<freehck> lewis1711: why do u use a module declaration in ir.ml?
<freehck> The good example is cmdliner for example. There're three modules defined in cmdliner.ml. You can just use "open Cmdliner" and then use the modules Arg, Term and Manpage via Arg.<func>, Term.<func> and Manpage.<func>.
<freehck> But you also could open them explicitly importing their interfaces into the current module namespace.
lewis1711 has quit [Ping timeout: 250 seconds]
lewis1711 has joined #ocaml
<freehck> lewis1711: sup?
ely-se has quit [Quit: leaving]
Kakadu has joined #ocaml
ggole has quit [Ping timeout: 256 seconds]
whirm has joined #ocaml
<whirm> Hi everybody
<whirm> is it possible to debug an ocaml program directly from emacs? The best option I found was to first compile manually and then do `M-x ocamldebug` and load it from there. But that seems a bit cumbersome.
<edwin> there is camldebug.el, but I never used it (I was mostly a Vim user and started using Emacs only a bit ago)
caml has joined #ocaml
<whirm> edwin: yeah, that's what I'm using right now, I was hoping a shortcut to debug small programs already existed. I guess I'll program my own stuff then. Thanks!
JacobEdelman has joined #ocaml
<edwin> there is also some additional integration with camldebug here, not sure if it'd do what you wanted: https://chriskohlhepp.wordpress.com/emacs-ocaml-ide/
rand has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
<whirm> edwin: I was reading this post right now :)
ggole has joined #ocaml
nojb has quit [Ping timeout: 240 seconds]
nojb has joined #ocaml
ely-se has joined #ocaml
<freehck> whirm: and how good is it in comparision with merlin-mode?
<whirm> freehck: I had a quick glance at the code, and it's mostly icons and contextual menus + the IDE-like gui with the side panel and such.
<freehck> whirm: but I suppose it has good debugger facilities? Have you tried to use them with merlin simultaneously?
troydm has joined #ocaml
troydm has quit [Ping timeout: 246 seconds]
troydm has joined #ocaml
d0nn1e has quit [Ping timeout: 260 seconds]
<c-c> If one thinks of "types" like "units" in physics, is that a good or bad approach with OCaml?
d0nn1e has joined #ocaml
ely-se has quit [Quit: leaving]
<zozozo> c-c: I'd say types are more of a grandeur than a unit: for instance, a distance rather than meters, miles or inches
<edwin> with units it doesn't matter if you multiply a meter with a second, or a second with a meter, but in OCaml it does matter if your tuple is (meter * second) or (second * meter)
<c-c> ah
<whirm> freehck: It uses camldebug + gud so it's mostly the same I'm using now. I was more interested in a shortcut to build and debug single file programs (ocaml newbie here, so writing really small stuff ATM :))
<whirm> freehck: I guess I'll set something up once I'm up to speed with the MOOC
<edwin> do you know ELISP? you could bind a key to a function that invokes both (I'm somewhat of a beginner in elisp)
<freehck> edwin: +1
<freehck> and iirc there was such stuff in merlin-mode
pierpa has joined #ocaml
<freehck> Yes, there's a command!
<freehck> whirm: Why don't you try C-c C-c? )
<whirm> edwin: yes, I know a bit of elisp, I'll code a little function for that
<whirm> freehck: I don't have a Makefile, it's just a dir with a bunch of .ml
<freehck> whirm: you could specify any build command you want.
<freehck> whirm: all you need is to `setq compile-command' to what you want.
<whirm> yes, but I would need to do that for every small file I have, so it saves no time, I'll automate it.
<freehck> f.e. (setq compile-command "ocamlfind ocamlc")
<freehck> whirm: so why don't you create a makefile? )
<freehck> and well, I think what you really need is to use ocamlbuild for your files. It's like GNU Make, but for ocaml.
<freehck> Specify _tags file in the root of your project and it will decide what to recompile and when.
<whirm> freehck: yes, I'll have to learn that too :)
orbifx has joined #ocaml
tennix has quit [Ping timeout: 240 seconds]
ceryo has joined #ocaml
ceryo has quit [Client Quit]
ceryo has joined #ocaml
<MercurialAlchemi> "like GNU Make, but for ocaml"
<MercurialAlchemi> I wish it was less true
ceryo has quit [Quit: Textual IRC Client: www.textualapp.com]
yegods has joined #ocaml
<rom1504> isn't it supposed to be like autotools but for ocaml ?
<edwin> that seems to be oasis's goal
<rom1504> ah
agumonkey has quit [Ping timeout: 256 seconds]
supercircle4 has quit [Quit: Sleep]
supercircle4 has joined #ocaml
tennix has joined #ocaml
whirm has quit [Remote host closed the connection]
<freehck> Hey! The electricity has been turned off but the Internet is still working! Holy UPS! :)
jeffmo has joined #ocaml
freehck has quit [Remote host closed the connection]
octachron has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
agumonkey has joined #ocaml
linse has joined #ocaml
jonludlam has joined #ocaml
ely-se has joined #ocaml
freehck has joined #ocaml
<freehck> Okay, UPS were not for a long time. Damn it. :)
lostman has joined #ocaml
<freehck> I've already thought that my shift is finished. :)
tane has joined #ocaml
fedjo1 has joined #ocaml
fedjo has quit [Read error: Connection reset by peer]
jeffmo has quit [Quit: jeffmo]
ncthom91 has joined #ocaml
fedjo1 has quit [Ping timeout: 246 seconds]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeffmo has joined #ocaml
fedjo has joined #ocaml
zpe has quit [Read error: No route to host]
zpe has joined #ocaml
fedjo has quit [Client Quit]
slash^ has joined #ocaml
ncthom91 has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
psy_ has joined #ocaml
groovy2shoes has quit [Ping timeout: 260 seconds]
<theblatte> how can I know if a package is installed using opam? "opam show $name" has a bunch of fields but none of them seems to say whether the package is installed for the current switch
<freehck> opam list
<theblatte> except "pinned" but it's a bit of a stretch
<theblatte> freehck: thanks!
tennix has quit [Ping timeout: 240 seconds]
<theblatte> freehck: however I still have to do a bit of manipulations to get the installed version, hopefully that's not too brittle...
<zozozo> theblatte: opam info package
<zozozo> in the installed-versions field
groovy2shoes has joined #ocaml
<theblatte> ah, I can ask "opam list $name.$version"
<freehck> theblatte: opam list | awk '/somepkg/ {print $1, $2}'
<theblatte> zozozo: yes but that lists also versions installed for other switches...
<zozozo> yes indeed
<zozozo> but it's easy to deduce what version is currently used if you know what switch you're using
<theblatte> that's a lot of processing for a simple question ^^
<zozozo> well, there are many answers
<theblatte> looking at the exit code of `opam list $name.$version` does what I want, thanks
<theblatte> `opam list --installed $name.$version`*
ely-se has quit [Quit: leaving]
psy_ has quit [Ping timeout: 250 seconds]
Mercuria1Alchemi has joined #ocaml
orbifx has quit [Ping timeout: 272 seconds]
<reynir> opam info -f version mypackage
<reynir> or if you prefer long options: opam info --field version mypackage
<reynir> err
<reynir> s/version/installed-version/
<theblatte> reynir: then you need to look at the stuff in [] to see if you find the current switch in there
<reynir> Oh
BitPuffin|osx has joined #ocaml
zpe has quit [Remote host closed the connection]
lolisa has joined #ocaml
ncthom91 has joined #ocaml
psy_ has joined #ocaml
supercircle4 has quit [Quit: Sleep]
contempt has quit [Read error: Connection reset by peer]
contempt has joined #ocaml
rand has quit [Quit: Lost terminal]
teiresias has quit [Ping timeout: 245 seconds]
teiresias has joined #ocaml
jwatzman|work has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbifx has joined #ocaml
ncthom91 has joined #ocaml
tane has quit [Quit: Verlassend]
lolisa has quit [Quit: meow]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
^elyse^ has joined #ocaml
^elyse^ has quit [Client Quit]
teiresias has quit [Ping timeout: 256 seconds]
teiresias has joined #ocaml
nojb has quit [Ping timeout: 256 seconds]
linse has quit [Quit: linse]
teiresias has quit [Ping timeout: 240 seconds]
struk|desk has quit [Ping timeout: 246 seconds]
linse has joined #ocaml
NingaLeaf has joined #ocaml
teiresias has joined #ocaml
struk|desk has joined #ocaml
teiresias has quit [Ping timeout: 240 seconds]
antkong has joined #ocaml
Elhaelion has joined #ocaml
ggole has quit []
ygrek_ has joined #ocaml
hcarty has joined #ocaml
Elhaelion has left #ocaml ["@pluche"]
govg has joined #ocaml
Kakadu has quit [Quit: Page closed]
orbifx has quit [Ping timeout: 250 seconds]
rand has joined #ocaml
hcarty has quit [Quit: WeeChat 1.3]
ncthom91 has joined #ocaml
sh0t has joined #ocaml
larhat1 has joined #ocaml
_andre has quit [Quit: leaving]
<lostman> hey folks. what do I put in _tags to use lwt ppx extensions?
<Drup> lostman: are you using _oasis ?
<Drup> well, either way: exactly like other packages
<lostman> I'm not exactly sure if I'm doing everything correctly but I'm doing ocamlbuild -use-ocamlfind and that seems to look at _tags
<lostman> so there should be let%lwt with ppx instead of lwt, right?
<Drup> yes
<lostman> so I've added package(lwt.ppx), but let%lwt fails as syntax error
<Algebr> if you're using oasis then wouldn't it just be easier to do in builddepends:lwt.ppx
Sim_n has joined #ocaml
<lostman> Algebr: where would I pass that option?
<Drup> Algebr: he doesn't seem to be using oasis
<def`> lostman: it shouldn't fail as a syntax error
<lostman> maybe I didn't build lwt properly? I just installed it through opam. other ppx extensions work (ppx_deriving for instance)
<def`> can you paste the exact error message?
<Algebr> lostman: probably easier to just use oasis and add the BuildDepends. http://hyegar.com/blog/2015/10/19/so-you're-learning-ocaml/
Simn has quit [Ping timeout: 264 seconds]
<lostman> It just says:
<lostman> File "test.ml", line 57, characters 8-11:
<lostman> Error: Syntax error
<def`> so the problem is something else
<def`> maybe paste your line of code
<reynir> lostman: are you using camlp4?
<lostman> let%lwt () = Lwt_unix.sleep 300.
<lostman> 57, 8 is where let begins
<lostman> no camlp4
Kakadu has joined #ocaml
<def`> lostman: ocaml version ?
<lostman> 4.02.3
<octachron> lostman, do you have a syntax error without the "%lwt" part?
<def`> something else is wrong in your code, maybe a semicolon above
<lostman> you're right. the syntax wasn't correct. I was using let%lwt wrong
<lostman> what is the proper way to sequence things? Lwt_io.printf "foo"; Lwt_unix.sleep 300. compiles too, but is it ok to do that?
<def`> it should compile with a warning
<def`> let%lwt will do sequencing fine
<Drup> let%lwt () = Lwt_io.printf "foo" in Lwt_unix.sleep 300.
<lostman> yeah. it's a bit heavy on the syntax though when let%lwt start piling up line after line. I also looked at ppx_monadic which has a haskell-like do notation
troydm has quit [Ping timeout: 246 seconds]
<Algebr> Whats wrong with >>=
<companion_cube> the extension is more useful for the try%lwt, while%lwt...
<Algebr> +1 that's what I end up using it mostly for
troydm has joined #ocaml
rand has quit [Ping timeout: 256 seconds]
linse has quit [Quit: linse]
Haudegen has quit [Ping timeout: 244 seconds]
lobo has joined #ocaml
troydm has quit [Ping timeout: 246 seconds]
<Drup> ppx_monadic is also ugly and abuses the ocaml syntax for no good reasons
troydm has joined #ocaml
<Drup> (and it looks completely alien in the middle of an OCaml file)
slash^ has quit [Read error: Connection reset by peer]
troydm has quit [Ping timeout: 246 seconds]
antkong has quit [Quit: antkong]
Haudegen has joined #ocaml
<lostman> nothing wrong with >>=. I wish >> was standard too. let (>>) ma mb = ma >>= fun () -> mb. having () on RHS is quite common after all and fun () -> ... is just clutter
<flux> lostman, I think a lot of time people might prefer to use a lazy version of >> instead of that, though. which is what the syntax extensions bring to the table.
darkf has quit [Quit: Leaving]
sh0t has quit [Ping timeout: 272 seconds]
<lostman> re ppx_monadic, abusing the syntax or not, I think it is still more readable than alternatives. I've been toying with a small script that uses Lwt and trying to make it as readable as possible
troydm has joined #ocaml
teiresias has joined #ocaml
<Algebr> lostman: well, you don't exactly have to have >>= fun (), could just have the function that you have that expects () just be on the right side
<Algebr> readability is an odd argument, everyone has different opinions on it depending on the day of the week
ianhedoesit has joined #ocaml
freehck has quit [Remote host closed the connection]
lewis1711 has quit [Ping timeout: 272 seconds]
Mercuria1Alchemi has quit [Ping timeout: 256 seconds]
linse has joined #ocaml
Anarchos has joined #ocaml
octachron has quit [Quit: Leaving]
yegods has quit [Remote host closed the connection]
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
nullcatxxx_ has joined #ocaml
rand has joined #ocaml
teiresias has quit [Quit: leaving]
dexterph has quit [Quit: WeeChat 1.3]
dexterph has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
malc_ has joined #ocaml
troydm has quit [Ping timeout: 266 seconds]
badon has quit [Ping timeout: 272 seconds]
ygrek_ has quit [Ping timeout: 250 seconds]
badon has joined #ocaml
raxello has joined #ocaml
tkr has joined #ocaml
<raxello> Hello friends, in the ocaml-cohttp README there is an example of the simple client code to download reddit page. We use "open" to load environment of modules. Is it possible now, in the REPL, to find out original Module of the identifier ?
<raxello> I mentioned this code snippet https://github.com/mirage/ocaml-cohttp/#client-tutorial
<nullcatxxx_> which identifier?
<raxello> For instance, I cannot understand where ">>=" comes from
<raxello> or why it fails unbound value for "Header.to_string"
<nullcatxxx_> can you run this code in REPL?
<nullcatxxx_> did you enter "#require "cohttp";;" in REPL?
<raxello> nullcatxxx_: yes I used "require" for both lwt and cohttp as it fails with "unbound module" then
<raxello> now when I try to evaluate expression for "body" identifier it fails with `Error: Unbound value Header.to_string`
<raxello> as I understand, it means - "Header" module is found but function is missing so I assume we deal with the module different from expected
<raxello> probably it is from `Cohttp_lwt_unix`
<nullcatxxx_> it works fine for me. I did "#require "lwt";;" "#require "cohttp";;" "#require "cohttp.lwt";;
<nullcatxxx_> three requires
<nullcatxxx_> and then copy the code in my REPL.
^elyse^ has joined #ocaml
<raxello> oh, wait "#require "cohttp.lwt"" is not listed in the tutorial
<raxello> they different module there
<raxello> they listed different module there
<nullcatxxx_> you mean "Cohttp_lwt_unix" ?
<raxello> yes
<nullcatxxx_> lol
<nullcatxxx_> the package name is "cohttp.lwt"
<nullcatxxx_> Cohttp_lwt_unix is a module inside that package "cohttp.lwt", I believe
<raxello> oh, sorry
<raxello> right
<nullcatxxx_> I am sorry this tutorial is not very clear if one wants to try in REPL
<nullcatxxx_> it is indeed not very clear...
<raxello> now I fail with "Error: Unbound value >>=" but loading of "cohttp.lwt" failed before so I have to fix that first
<nullcatxxx_> it is because I looked into the implementation before so I know this... for beginners, it is indeed not bothering..
<nullcatxxx_> #require "cohttp.lwt" fails?
<raxello> my fault, missed loading of opam environment I guess
<nullcatxxx_> ok
yegods has joined #ocaml
<edwin> did you open all 3 modules?
yegods has quit [Remote host closed the connection]
<raxello> edwin: here is my full session http://pastebin.com/htaypE4t
yegods has joined #ocaml
<raxello> loaded all 3 modules
supercircle4 has joined #ocaml
<edwin> raxello: do you have this in your ~/.ocamlinit? (opam adds it):
<edwin> (* Added by OPAM. *)
<edwin> let () =
<edwin> try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
<edwin> with Not_found -> ()
<edwin> ;;
ianhedoesit has quit [Quit: leaving]
linse has quit [Quit: linse]
<raxello> yes I do
linse has joined #ocaml
<raxello> I even tried to load it in the beginning of my REPL session manually and have the same issue with "Header.to_string"
groovy2shoes has quit [Quit: Leaving]
<edwin> that same sequence of commands works here
<edwin> Header.to_string is part of Cohttp
<raxello> ok, understood.
Sorella has joined #ocaml
<raxello> I have this also as a IPython notebook http://531f08ea.ngrok.com/notebooks/bt_connect.ml.ipynb where I started to play with this example from the tutorial
<raxello> but unfortunately I reproduce it in the pure OCaml REPL
<raxello> will try on another system
<edwin> what does opam info cohttp say?
<edwin> is it successfully installed in the system switch?
<edwin> ok well you don't have the latest version
<edwin> can you try opam upgrade?
<raxello> edwin: running it
<raxello> ` - upgrade cohttp 0.15.1 to 0.18.3`
<edwin> I think 0.15 didn't have Header.to_string
<edwin> hmm why not 0.19.3?
<raxello> something obvious to check from my side ...
<edwin> run opam update first
<raxello> is it possible that some dependency on it specify upper bound ?
<edwin> you can: opam install cohttp.0.19.3
<edwin> should tell you why it can't
<raxello> yes! it works, even in the Jupyter notebook, let me check with explicit version update
<raxello> no objections from opam
<edwin> eh? did you install aspcud?
<edwin> the internal solver doesn't always find the best answer...
linse has quit [Quit: linse]
<raxello> I'll check for `aspcud`, I don't know whether I have it
mac10688 has joined #ocaml
<edwin> apt-get install aspcud
<edwin> then opam upgrade should really bring everything to latest version
<edwin> the internal solver has this tendency to install some old / minimum version instead of latest
<edwin> also check that your opam is at least 1.2.0
<raxello> `aspcud` is installed, opam is of version `1.2.2`.
<raxello> @edwin thank you very much, your session was very helpful for me!
<raxello> @nullcatxxx_ thank you too!
<nullcatxxx_> np
<edwin> ok then I don't know why upgrade didn't really upgrade, did opam install cohttp.0.19.3 say anything about downgrades?
<edwin> maybe some package was not compatible
ygrek_ has joined #ocaml
<edwin> and opam preferred to keep old version rather than downgrade something else
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<edwin> anyway g2g now, bye
<raxello> edwin: no downgrades even lwt upgraded
antkong has joined #ocaml
nullcatxxx_ has joined #ocaml
groovy2shoes has joined #ocaml
linse has joined #ocaml
^elyse^ has quit [Quit: Leaving]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
M-Illandan has quit [Write error: Connection reset by peer]
Sim_n has quit [Quit: Leaving]
rand has quit [Quit: leaving]
groovy2shoes has quit [Quit: Leaving]
linse has quit [Quit: linse]
jwatzman|work has quit [Quit: jwatzman|work]
ceryo has joined #ocaml
Kakadu has quit [Remote host closed the connection]
ceryo has quit [Client Quit]
M-Illandan has joined #ocaml
lobo has quit [Quit: zleep]
nullcatx_ has joined #ocaml
nullcatxxx_ has quit [Ping timeout: 272 seconds]
nullcatx_ has quit [Ping timeout: 272 seconds]