adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
luna_is_here has quit [Ping timeout: 240 seconds]
unyu has quit [Quit: unyu~]
unyu has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
nicoo has joined #ocaml
mononote has quit [Quit: ZNC 1.7.2+deb2ubuntu0.1 - https://znc.in]
mononote has joined #ocaml
<dogui> Hi all, is the following error expected? I don't see how `eq` is less polymorphic than its declaration, and small tweaks make the thing work. https://gist.github.com/mtzguido/67eca4830a4001289c8e58d122580681
<dogui> (this is from autogenerated code, hence the weird style)
silver has quit [Read error: Connection reset by peer]
kleisli has joined #ocaml
jao has quit [Ping timeout: 268 seconds]
kleisli has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
gravicappa has joined #ocaml
_whitelogger has joined #ocaml
ggole has joined #ocaml
mbuf has joined #ocaml
nullcone has joined #ocaml
brettgilio has quit [Read error: Connection reset by peer]
brettgilio has joined #ocaml
narimiran has joined #ocaml
stux|RC has quit [Ping timeout: 258 seconds]
Serpent7776 has joined #ocaml
bartholin has quit [Read error: Connection reset by peer]
stux|RC has joined #ocaml
andreas303 has quit [Remote host closed the connection]
dborisog has joined #ocaml
andreas303 has joined #ocaml
Serpent7776 has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
ggole has quit [Read error: Connection reset by peer]
ggole has joined #ocaml
Serpent7776 has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
brettgilio has quit [Ping timeout: 260 seconds]
narimiran has quit [Quit: leaving]
dhil has joined #ocaml
jao has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
Haudegen has joined #ocaml
ngws has quit [Quit: ZNC 1.7.5+deb1 - https://znc.in]
ngws has joined #ocaml
silver has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
wmacmil has joined #ocaml
ziyourenxiang has joined #ocaml
<wmacmil> Insatlled a new OS. am trying to install coq via opam. when I try to run opam init i get the following error:
<wmacmil> [WARNING] Recommended external solver aspcud not found.
<wmacmil> [ERROR] No OCaml compiler found in path. You should use:
<wmacmil> opam init --comp=VERSION
<wmacmil> any suggestions?
mbuf has quit [Quit: Leaving]
<Fardale> did you try with the --comp option ?
<Fardale> which version of opam do you use ?
<wmacmil> i got it to work by just installing ocaml first. but I was confused because it had said you can install ocaml.
<wmacmil> 1.2.2 tho
<Fardale> you should switch to opam 2.x. opan 1.x is not longer supported
dhil has quit [Ping timeout: 248 seconds]
<wmacmil> ok, thank you. I removed the 1.* version (which was the default installating via my package manager) and tried to install from the github repo
<wmacmil> but am not getting the follow error:
<wmacmil> wmacmil@wmacmil-ThinkPad-T480s:~/programming/ocaml/opam$ make install
<wmacmil> ./opam-installer --prefix "/usr/local" --mandir "/usr/local/share/man" processed-opam.install
<wmacmil> [ERROR] Failure during install
<wmacmil> _build/install/default/bin/opam => /usr/local/bin/opam
<wmacmil> "/usr/bin/install -m 0755 /home/wmacmil/programming/ocaml/opam/_build/install/default/bin/opam /usr/local/bin/opam" exited with code 1 "/usr/bin/install: cannot create regular file '/usr/local/bin/opam': Permission denied"
<wmacmil> Makefile:145: recipe for target 'install' failed
<wmacmil> make: *** [install] Error 1
<vsiles> wmacmil: there are binaries available for opam2, it's very handy to install on a new system
<vsiles> looks like you might need to sudo your make install so opam can install the binary at the right locatios
<vsiles> locations*
<wmacmil> wmacmil@wmacmil-ThinkPad-T480s:~/programming/ocaml/opam$ opam --version
<wmacmil> bash: /usr/bin/opam: No such file or directory
<wmacmil> 2.1.0~beta
<wmacmil> wmacmil@wmacmil-ThinkPad-T480s:~/programming/ocaml/opam$ sudo opam --version
<wmacmil> so how can I use opam now without calling sudo
<wmacmil> ?
<oni-on-ion> opam env ?
<vsiles> I meant `sudo make install`. Your error messages says it didn't succed to copy opam in the right dir because of permission issues
<vsiles> you should not need to invoque opam with sudo at all
<wmacmil> that
<wmacmil> s what happened after i ran sudo make install tho
<vsiles> Oo
<vsiles> that's peculiar
<vsiles> I would move /usr/bin/opam to /usr/local/bin/opam and remove the need for su, but I'm not sure how to do that on your system, sorry
<vsiles> https://github.com/ocaml/opam write about some issues with sudo during install and gives an exact command you should run. It's worth a try
<wmacmil> thank you
Haudegen has quit [Quit: Bin weg.]
wmacmil has quit [Quit: Leaving]
dhil has joined #ocaml
<Fardale> You can just compile it and put it in your path
<Fardale> or download the binary from the github instead of compiling it
nullcone has quit [Quit: Connection closed for inactivity]
<adrien> ocamlopt emits dwarf2 debugging information now, right?
jao has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
tane has joined #ocaml
flodin has quit [Quit: Konversation terminated!]
luna_is_here has joined #ocaml
bartholin has joined #ocaml
kleisli has joined #ocaml
<def`> adrien: I am afraid it still relies on the assembler to produce dwarf
<def`> ocamlopt upstream only emits .loc directives
jao has joined #ocaml
<adrien> ok :'(
<adrien> I think I should be able to use caml_print_exception_backtrace() actually (let's see)
smazga has joined #ocaml
Serpent7776 has quit [Quit: Leaving]
dborisog has quit [Ping timeout: 268 seconds]
brettgilio has joined #ocaml
ziyourenxiang has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jco has joined #ocaml
<jco> Hello!
<jco> I have the following function :
<jco> let manhattan_dist ~node:((x, y) : position) ~target:((x', y'):position) =
<jco> let dx = abs_float (x -. x') in let dy = abs_float (y -. y')
<jco> in dx +. dy
<jco> which has type node:position -> target:position -> float
<jco> but I wanted it to be of type position -> position -> float
<jco> I tried to label the arguments (x, y) and (x', y')
<jco> what is wrong with this?
<thizanne> why did you label them if you want them unlabelled ?
<thizanne> (I'm not sure I follow you)
<jco> oh yes when I call the above function I do not use the labels
<jco> is that the issue?
<thizanne> as you wrote it, you can use it as manhattan_dist ~node:(0., 0.) ~target:(1., 1.)
<thizanne> if you want to write manhattan_dist (0., 0.) (1., 1.), then you should define the function as let manhattan_dist (x, y) (x', y') = ...
<jco> okay I see
<jco> thanks!
<thizanne> or ((x, y) : position) ((x', y') : position) if you want to explicit the position type
<thizanne> as a matter of style, here (x, y) and (x', y') really play symmetrical roles, so I don't think labels are relevant
<jco> yes, the thing is I initially wrote the arguments with their name and pattern matched on them
<thizanne> you can also write this : let manhattan_dist (node as (x, y)) (target as (x', y')) = ...
<jco> but I wanted to combine the two in the above example, without having to label the arguments in function calls
<thizanne> which allows you to both name the full tuples and their components (with no label on the function itself)
<thizanne> sorry that's ((x, y) as node)
<jco> nice!
<jco> but you're right, the names have a meaning just for a specific application
dhil has quit [Ping timeout: 248 seconds]
Haudegen has quit [Quit: Bin weg.]
jnavila has joined #ocaml
tane has quit [Quit: Leaving]
Serpent7776 has joined #ocaml
domovoy has joined #ocaml
<domovoy> hi
gareppa has joined #ocaml
<jco> o/
<domovoy> question about types: i have this: http://paste.debian.net/1121910/ now, i want to be able to `match get_mapping () with Title v -> the_title_is v` get_mapping return a `mapping`, Title is one, of the form `("title", string)`. Is that even possible? how?
jnavila has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
<tsuyoshi_> get_mapping is unit -> mapping ?
<tsuyoshi_> not sure what you mean but maybe match get_mapping () with Mapping ("title", title) -> the_title_is title
Haudegen has joined #ocaml
<domovoy> tsuyoshi_> that what i was doing, but at this special case (top nodes in a yaml file) i should only accept mapping for some values ("title", "baseUri"...), so i prefer to have a `type root_node = | Title of ??? | BaseURI ...`. Knowing that root_node is really a "subset" of mapping.
<domovoy> what i did is a function `to_root_node` which match the values of a mapping and returns a root_node. It raise an error if the mapping is invalid as a root node
spew has joined #ocaml
gareppa has quit [Quit: Leaving]
ggole has quit [Quit: Leaving]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
luna_is_here has quit [Ping timeout: 240 seconds]
kakadu_ has joined #ocaml
sagax has quit [Ping timeout: 265 seconds]
sagax has joined #ocaml
gravicappa has quit [Ping timeout: 268 seconds]
jco has quit [Quit: WeeChat 2.6]
ohama has quit [Ping timeout: 250 seconds]
ohama has joined #ocaml
ohama has quit [Ping timeout: 258 seconds]
Haudegen has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
ohama has joined #ocaml
Serpent7776 has quit [Quit: leaving]
kakadu__ has joined #ocaml
kakadu_ has quit [Ping timeout: 258 seconds]
smazga has quit [Quit: leaving]
luna_is_here has joined #ocaml
luna_is_here has quit [Ping timeout: 260 seconds]
kakadu_ has joined #ocaml
kakadu__ has quit [Ping timeout: 268 seconds]
sagax has quit [Ping timeout: 268 seconds]
Nahra has joined #ocaml
philtor has quit [Remote host closed the connection]
Nahra has quit [Quit: leaving]
philt has joined #ocaml
philtor has joined #ocaml
philt has quit [Client Quit]
philt has joined #ocaml
philt has quit [Client Quit]
philtor has quit [Client Quit]
philtor has joined #ocaml
jnavila has quit [Ping timeout: 256 seconds]
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 256 seconds]
ziyourenxiang has joined #ocaml
domovoy_ has joined #ocaml
domovoy has quit [Ping timeout: 265 seconds]
brettgilio has quit [Quit: Quit]
brettgilio has joined #ocaml