flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
zRecursive has joined #ocaml
ecstatic has joined #ocaml
ecstatic has left #ocaml []
ben_zen has joined #ocaml
n06rin has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
darkf has joined #ocaml
mfp has quit [Ping timeout: 248 seconds]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
structuralist has quit []
dnm has quit [Ping timeout: 256 seconds]
<n06rin> use utop tomorrow, but now i can execute him. bash can't find this command
<n06rin> what's wrong?
<Drup> n06rin: are you using opam ?
<n06rin> yes
<n06rin> now i trying reinstall
<n06rin> nothink. Bash still can't find
<Drup> did you add "eval `opam config env`" to your .profile or your bashrc ?
Neros has joined #ocaml
<Drup> (at least, you can execute it directly, it will work for now)
<zRecursive> why utop if using ocaml-mode in emacs ?
<n06rin> lol, drup, I make env and it's ok. But I exec this command tomorrow
<n06rin> it's strange
<vpm> n06rin: you mean yesterday, right? :-)
<n06rin> yes. Sorry, I have a very bad english
<n06rin> and can't remember what is tomorrow and what is yesterday
<Drup> n06rin: you should read opam's manual
introom has joined #ocaml
<n06rin> ok, i'm will read
<n06rin> and last question. I'm want compile http://pastebin.com/3xg0i0rg this code. And use ocamlbuild sum.native command. But ocamlbuild can't find Core. Why?
<n06rin> oh, i see my mistake
<n06rin> need cobrebuild, not ocamlbuild
ygrek has joined #ocaml
q66 has quit [Quit: Leaving]
introom has quit [Remote host closed the connection]
zRecursive has left #ocaml []
Neros has quit [Ping timeout: 256 seconds]
<Harzilein> !unready
<Harzilein> oops
n06rin has quit [Quit: Leaving.]
ggole has joined #ocaml
ben_zen has quit [Ping timeout: 276 seconds]
Drup has quit [Quit: Leaving.]
gnuvince has quit [Remote host closed the connection]
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
Snark has joined #ocaml
cdidd has quit [Read error: Connection reset by peer]
TDJACR has quit [Quit: Quit]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
cdidd has joined #ocaml
cdidd has quit [Ping timeout: 260 seconds]
cdidd has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
ollehar has joined #ocaml
ulfdoz has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
structuralist has joined #ocaml
<gasche> kerneis: if you have any opinion on the (relatively minor) issue I reported on the "modular plugins" PR, I'm interested
Yoric has joined #ocaml
mfp has joined #ocaml
osa1 has joined #ocaml
bholst_ has quit [Read error: Operation timed out]
structuralist has quit []
Anarchos has joined #ocaml
<Anarchos> where can i find a good description of an efficient unification algorithm (aka robinson linear)
<whitequark> google?
carleastlund has quit [Quit: carleastlund]
<Anarchos> gasche yes i found this one, but is there refinements which exploits the functional nature of ocaml to store the substitution , which is a function ?
<adrien> 23:18 chris2 : does ocamlfind ocamlc run ocamlc.opt?
<adrien> depends on your ocamlfind.conf
<adrien> whitequark: cross-compilation isn't available yet but it's almost there (in trunk)
<gasche> Anarchos: I don't think storing data as functions add anything to a program, even in a functional language
<gasche> chances are it will only make it run slower because of O(n) composition of substitutions
<Anarchos> gasche ok
<gasche> adrien: is there a portable way to check whether an executable exists from an OCaml toplevel?
<gasche> currently I'm looking at the return code of "which %s > /dev/null"
<adrien> gasche: findutils?
<gasche> bonus points for not depending on any external library; it's for use in the ocamlbuild testsuite
<adrien> FileUtil.which
<adrien> gasche: look at the implementation =)
<gasche> I'll ask gildor if I can import the code
<adrien> well, my point was that it would have told you whether it were simple or not
<adrien> my (maybe-naïve) implementation would be: split $PATH on either : or ; (for windows) and check that $dir/$file is +x
<adrien> (through stat, not lstat)
<gasche> hm
<Anarchos> the which solution seems fine to me
<gasche> fileutils' implementation is several layers of abstraction deep
<gasche> I may take the easy way out and use "bash" as the rest of ocamlbuild does
<gasche> hm
<gasche> that said, having bash on Windows doesn't mean "which" is available, I suppose
<gasche> hm
<Anarchos> gasche i have no idea how to find an executable on windows, beside a global search
<gasche> I think I'll work around that by never testing whether an executable exists, and instead relying on findlib packages only
<gasche> (my use case was "menhir" but it is more or less safe to assume that when menhir is installed, there is a menhirLib package with it)
<adrien> gasche: yeah, you can have bash without which
<adrien> but the fileutils implementation isn't very complicated
<adrien> instead of looking at FileUtils, look at FileUtilsCygwin or something similar
<adrien> actually, none of that
<adrien> you'd have to check that both "foo" and "foo.exe" exist
<adrien> it's very common on windows
<adrien> afk again
<whitequark> adrien: awesome, thanks
<whitequark> it's really nice to see how quickly ocaml gains various important features
<gasche> in the meantime you can probably compile from Wie
<gasche> Wine
<rixed> When using type t = private foo, why does some of the casts (t :> foo) triggers this "ground coercion is not principal" warning?
<rixed> is it because I cast into a type that's less general that the one that was infered until then?
<gasche> I found a workaround for my executable_exists problem
q66 has joined #ocaml
<gasche> Unix.(close_process_full (open_process_full foo [| |]))
<gasche> hm
<gasche> that only works for executables that behave nicely when given no input at all
<gasche> but it's ok for my (new) use-case
<rixed> Seams rather dangerous to actually execute a file to know if it's executable :)
<whitequark> gasche: right, that'd be easier than a windows vm, which I was going to use. thanks.
<rixed> If you know it's an elf executable there probably exist a way to load it without actually executing anything... something in the binutils like ldd?
<whitequark> Str.match (Str.regexp "^\x7fELF") file_content
<whitequark> based on that message try to guess which language I've used most
ygrek has quit [Ping timeout: 264 seconds]
<whitequark> can you recommend me a good code coverage library?
<whitequark> there are a few on the hump but I'm not sure which ones are any good
<whitequark> I like mlcov/zamcov, but they're for 3.12.0 only...
<Anarchos> whitequark just port them ;)
<whitequark> Anarchos: yeah I'll consider that
<whitequark> bisect is pretty good, though the interfaces are awkward
<whitequark> probably will use this for a while
Neros has joined #ocaml
ollehar has quit [Quit: ollehar]
tobiasBora has joined #ocaml
n06rin has joined #ocaml
<gasche> whitequark: the only code coverage tool I've experience with is Bisect
<gasche> I'm happy with it
<gasche> what do you call "the interfaces"?
<whitequark> for example it spews out bisect*.out files all over my test tree
<whitequark> and it doesn't seem like there is a way to direct them to a directory, or heck, even disable this with an env var
<whitequark> then, it behaves awkwardly with ocamlbuild's _build directory and generated files, and -I can only be specified once
<whitequark> well, it doesn't check it, just rewrites the old path.
<whitequark> so it's a great tool but needs polishing
<gasche> if you have time to come up with patches, I'm sure Xavier Clerc would be glad to access them
<gasche> otherwise, I'd be interested in you writing do a precise list of the problems you ahve
<gasche> I have developed for Bisect a very slight bit, and I made a beginning of attempt to use it on the compiler testsuite itself, and I think I ran into some of those issues you mention
Fullma has joined #ocaml
<gasche> (I never finished the work of having something polished to use on the compiler's testsuite, but having .out files all over the place was one of the issues I'd have to look at)
<gasche> *down
<Anarchos> whitequark you can also just code with coq extraction mechanism :)
<tobiasBora> Hello !
<tobiasBora> I'd like to know how to print colored text in console with Printf ? I tried to use the ANSI system with something like Printf.printf "\033[35;1m Shocking \033[0m";; but it doesn't work...
Yoric has quit [Ping timeout: 246 seconds]
<Anarchos> If i have a module M with a type "terme" and a "compare" function, how to apply Set.Make to M ? I lack the syntax to instruct Set.Make that the expected t type is in fact M.terme ?
<ggole> Anarchos: you can't apply Set.Make to any module that doesn't have the expected signature.
<ggole> So you'll either have to change it, or write a wrapper.
<Anarchos> ggole ok.
<gasche> tobiasBora: if you get the escape code correct, it works
<gasche> I know nothing about that but I just tweaked a piece of code doing just that, so I know it works
<gasche> tobiasBora: http://ocaml.nopaste.dk/p58621
<ggole> 033 is the *octal* number of ESC. OCaml lexical conventions use decimal there iirc.
<ggole> So... \027
<tobiasBora> gasche: Thanks it works great ! But what is \x1b ?
<gasche> I don't know
<gasche> I didn't write the escape part
<ggole> It's hex 27.
<ggole> man ascii might be illuminating.
<gasche> it's code wmeyer wrote for the ocamlbuild testsuite
<gasche> (I abstracted away the color code to get print_colored)
<tobiasBora> Ok thank you !
<ggole> Octal confusion claims another victim.
<tobiasBora> And just a little question : in the code I can see `Red : what is it ?
<gasche> you can complete the color table to get Black, White, etc
<gasche> it's a polymorphic variant
<whitequark> gasche: will do. I'll look into the source and write either patches or wishlist. thank you very much.
<gasche> an advanced feature of OCaml
<gasche> feel free to replace them by a variant that you would declare explicitly
<gasche> type color = Red | Blue | ... , then drop the `
<tobiasBora> gasche: And the behaviour of this variable is the same ?
<gasche> (polymorphic variants allow to have sum types that are structural, and therefore not declared upfront, at the cost of much harder to read type error messages)
<gasche> yes
<gasche> (`Foo 2) is like (Foo 2) for a constructor Foo that hasn't been declared in advance
<gasche> here I use zero-ary variants (with no parameters) as "symbols" in other languages
<tobiasBora> It's nice to know !
<tobiasBora> zero-ary ?
<ggole> Terminology for number of arguments.
<gasche> there is a good introduction to polymorphic variants in the OCaml manual
<gasche> have a look there if you want to know more
<gasche> (I'm going for a hike)
<ggole> nullary or 0-adic are also sometimes used.
<tobiasBora> Ok great, I'll have a look, thank you !
<tobiasBora> And have a nice hike gasche ;-)
Yoric has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
breakds has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
Xom has quit [Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212]]
Xom has joined #ocaml
Simn has joined #ocaml
cdidd has quit [Ping timeout: 276 seconds]
ollehar has joined #ocaml
TDJACR has joined #ocaml
breakds has quit [Quit: Konversation terminated!]
travisbrady has joined #ocaml
cdidd has joined #ocaml
cdidd has quit [Ping timeout: 264 seconds]
ygrek has joined #ocaml
shinnya has joined #ocaml
cdidd has joined #ocaml
travisbrady has quit [Quit: travisbrady]
mort___ has joined #ocaml
ocp has quit [Ping timeout: 260 seconds]
ben_zen has joined #ocaml
Drup has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
breakds has joined #ocaml
darkf has quit [Quit: Leaving]
ben_zen has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
<kerneis> gasche: I'm not sure I understand the problem in fact
<kerneis> probably because I don't have a clear idea of how parametrized tags work
<kerneis> re-reading your note for the second time
<kerneis> ok, I think I understand
breakds has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
ski has joined #ocaml
breakds has joined #ocaml
breakds has quit [Remote host closed the connection]
breakds has joined #ocaml
n06rin has quit [Quit: Leaving.]
breakds has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
breakds has joined #ocaml
breakds has quit [Client Quit]
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 248 seconds]
carleastlund has joined #ocaml
mcclurmc has quit [Ping timeout: 246 seconds]
<gasche> kerneis: I uploaded a patch for the feature
<gasche> despite a hackish description, it's actually more or less easy to do
<gasche> I haven't tested it for correctness fully yet, but I'm satisfied that it doesn't feel too wrong
pkrnj has joined #ocaml
tane has joined #ocaml
ocp has joined #ocaml
breakds has joined #ocaml
pkrnj has quit [Ping timeout: 264 seconds]
ocp has quit [Ping timeout: 264 seconds]
ben_zen has joined #ocaml
ggole has quit []
ygrek has quit [Ping timeout: 245 seconds]
osa1 has quit [Read error: No route to host]
osa1 has joined #ocaml
Anarchos has joined #ocaml
<Anarchos> ls
<companion_cube> pwd
<Anarchos> Is it possible to declare a module like that : module A(S:S_TYPE) = struct...end : sig val S.t end ?
<companion_cube> I think it's more module A(S:S_type) : sig val S.t end end = struct ... end
<Anarchos> companion_cube it worked thanks
tani has joined #ocaml
tane has quit [Ping timeout: 256 seconds]
<gasche> Anarchos: note that your syntax also work if you use (struct end : sig end)
<gasche> (with parentheses, I mean)
osa1 has quit [Read error: Connection reset by peer]
mort___ has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
<Anarchos> gasche oh ok i just tried without parentheses
Snark has quit [Quit: leaving]
Simn has quit [Read error: Connection reset by peer]
yacks has quit [Quit: Leaving]
supki_ is now known as supki
mort___ has joined #ocaml
osa1 has joined #ocaml
beginnner42 has joined #ocaml
mort___ has quit [Ping timeout: 276 seconds]
<beginnner42> i get this warning, what should i do to fix that? ocamlfind: [WARNING] You have installed DLLs but the directory /home/unix/.opam/4.00.1/lib/stublibs is not mentioned in ld.conf
<beginnner42> in my opam ld.conf the first line is precisly /home/unix/.opam/4.00.1/lib/ocaml/stublibs
eikke has joined #ocaml
<gasche> beginnner42: did you install packages manually, or only through opam?
<gasche> in the second case, it may be a case of a package metadata being wrong on the packagers' side
<beginnner42> gasche: no i am trying to write a package and i am installing that manually
tani has quit [Quit: Verlassend]
manud has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
ulfdoz has quit [Read error: Operation timed out]
<gasche> beginnner42: so you appear not to install it in the right place
<gasche> as you have .../lib/stublibs instead of ../lib/ocaml/stublibs
<gasche> note that you should probably have to do that yourself
<gasche> you can just write a META file for ocamlfind, and then use "ocamlfind install <package-name> META <the files you want to install>"
<gasche> s/you should probably have to/you should probably not/
Yoric has quit [Ping timeout: 264 seconds]
<beginnner42> gasche: thank you for your advices, i will try them tomorrow
beginnner42 has quit [Quit: Leaving]
Myk267 has quit [Quit: Myk267]
Neros has quit [Ping timeout: 264 seconds]
cdidd has quit [Ping timeout: 246 seconds]
eikke has quit [Ping timeout: 246 seconds]
jbrown has joined #ocaml
pkrnj has joined #ocaml
zRecursive has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
walter has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
manud has quit [Quit: manud]
walter has quit [Quit: This computer has gone to sleep]