<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>
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]