flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
guillem_ has quit [Remote closed the connection]
SanguineV has joined #ocaml
bohanlon has joined #ocaml
Ched- has quit [Read error: 110 (Connection timed out)]
Ched- has joined #ocaml
dibblego has quit ["Leaving"]
Philonous1 has joined #ocaml
Myoma has quit [Read error: 113 (No route to host)]
Philonous has quit [Connection reset by peer]
palomer has joined #ocaml
Kopophex has quit [Connection timed out]
Kopophex_ has joined #ocaml
jeddhaberstro has joined #ocaml
Associat0r has joined #ocaml
seafood has joined #ocaml
jeddhaberstro has quit []
Associat0r has quit [Read error: 104 (Connection reset by peer)]
Snark has joined #ocaml
ttamttam has joined #ocaml
jlouis has quit [Remote closed the connection]
seafood has quit []
bluestorm has joined #ocaml
seafood has joined #ocaml
Kopophex_ has quit ["Leaving"]
itouch has joined #ocaml
filp has joined #ocaml
Yoric[DT] has joined #ocaml
mfp has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> hi
mfp has joined #ocaml
seafood has quit []
SanguineV has quit []
seafood has joined #ocaml
seafood has quit []
Asmadeus has joined #ocaml
rwmjones_ has joined #ocaml
guillem_ has joined #ocaml
gdmfsob has joined #ocaml
<itouch> i have a question
<itouch> what is the real difference between fun et function ?
<flux> function is a fun with built-in match
<flux> fun can take multiple arguments, but function can take multiple patterns
<flux> both of them can be expressed in the terms of other
pango_ has quit [Remote closed the connection]
<itouch> Ah ! thanks
asmanur has joined #ocaml
hkBst has joined #ocaml
filp has quit [Remote closed the connection]
rwmjones_ has quit [Remote closed the connection]
rwmjones has quit ["Closed connection"]
rwmjones has joined #ocaml
Associat0r has joined #ocaml
filp has joined #ocaml
travis|away has quit ["Lost terminal"]
ttamttam has left #ocaml []
tomh_-_ has joined #ocaml
Asmadeus has quit ["Lost terminal"]
Asmadeus has joined #ocaml
gaja has quit ["Lost terminal"]
Jedai has joined #ocaml
ttamttam has joined #ocaml
netx has quit [Read error: 110 (Connection timed out)]
itouch has quit [Read error: 113 (No route to host)]
Asmadeus has quit ["off caturday"]
netx has joined #ocaml
itouch has joined #ocaml
sporkmonger has quit []
<Yoric[DT]> ertai: ping
sporkmonger has joined #ocaml
sporkmonger_ has joined #ocaml
coucou747 has quit ["bye ca veut dire tchao en anglais"]
sporkmonger has quit [Read error: 110 (Connection timed out)]
bluestorm has quit [Remote closed the connection]
Proteus has quit [Read error: 104 (Connection reset by peer)]
Proteus has joined #ocaml
Philonous1 has quit ["Leaving."]
Philonous has joined #ocaml
<ertai> Yoric[DT]: pong?
<Yoric[DT]> I have an issue with ocamlbuild.
<Yoric[DT]> Do you have time to answer my questions?
<ertai> Yoric[DT]: It depends on the question, but I think yes
<Yoric[DT]> I need to build a plug-in for ocamldoc when people attempt to build documentation.
<Yoric[DT]> For this purpose, I have added a dependency [ dep ["ocaml"; "doc"] & ["myplugin.cmo"]
<Yoric[DT]> ]
<Yoric[DT]> This seems to work only when "myplugin.ml" is in the root directory, not in a subdirectory included using _tags.
<Yoric[DT]> Any suggestion?
<ertai> have you tried dep to indicate the directory?
<ertai> dep ["ocaml"; "doc"] & ["dir/myplugin.cmo"]
<Yoric[DT]> No, I haven't.
* Yoric[DT] tries.
<Yoric[DT]> That seems to work.
<Yoric[DT]> It's a bit surprising, though.
<Yoric[DT]> Why doesn't ocamlbuild find the plug-in automatically?
<Yoric[DT]> Especially since [ocamlbuild myplugin.cmo] works.
<ertai> Yoric[DT]: if I welle remember there is a difference between paths like the one given in command line, and those inculde in dep declarations.
<ertai> That certainly could be improved by looking in the path when building these dependencies.
<ertai> But I don't remember why that's not the case.
<ertai> I often use qualified paths in the myocamlbuild.ml.
<Yoric[DT]> ok
<Yoric[DT]> Thanks.
* Yoric[DT] returns to Batteries Included:)
* ertai returns to <redacted> ;)
jeddhaberstro has joined #ocaml
* flux returns to home
jeddhaberstro has quit []
jeddhaberstro has joined #ocaml
guillem_ has quit [Remote closed the connection]
marmotine has joined #ocaml
maattd has joined #ocaml
munga_ has joined #ocaml
ppsmimou has quit ["Leaving"]
ppsmimou has joined #ocaml
maattd has quit [Remote closed the connection]
<Yoric[DT]> ertai: how do I remove an existing rule with myocamlbuild.ml?
pango_ has joined #ocaml
gdmfsob has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> ertai: other question: how exactly do I pass an argument to ocamldoc?
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
Camarade_Tux has joined #ocaml
Axioplase_ is now known as Axioplase
maattd has joined #ocaml
<Yoric[DT]> mph
<Yoric[DT]> I'm quite close to a release but I'm being blocked by ocamlbuild+ocamldoc.
<mfp> more code generation from the type definitions, this time RPC interfaces > http://www.reddit.com/r/programming/comments/6ymwv/orpc_turn_ocaml_signatures_into_rpc_interfaces/
<mfp> Yoric[DT]: Batteries release?
<Yoric[DT]> A pre-release, yes.
<ttamttam> Yoric[DT]: I never tried: maybe, you can try to create one failing rule with the same name?
<Yoric[DT]> Ok, for some reason it now seems to work.
<Yoric[DT]> I have no clue what I've changed, though.
<Yoric[DT]> I have weird error messages, though.
<Yoric[DT]> « unix.cmxa is not a compilation unit description »
<Yoric[DT]> mmhhhh....
<Yoric[DT]> ocamlbuild batlib.cmx works
<Yoric[DT]> ocamlbuild batlib.cmxa doesn't
<Yoric[DT]> Plus unix.cmxa is not even mentioned on the command-line!
itouch is now known as itewsh
<Yoric[DT]> I also don't have any use_unix anywhere in the directory.
<Yoric[DT]> mmmmhhhh....
<Yoric[DT]> It works when I remove ocamlfind.
filp has quit ["Bye"]
<Yoric[DT]> Or -linkpkg
<Yoric[DT]> Okay.
ttamttam has left #ocaml []
<Yoric[DT]> First release pushed.
Myoma has joined #ocaml
rby has quit [Read error: 104 (Connection reset by peer)]
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
tomh_-_ has joined #ocaml
jeddhaberstro has quit []
<rwmjones> hmmm
<rwmjones> hmmmmmmmmmmm
<rwmjones> recursive modules are sort of hobbled in OCaml
<rwmjones> because if you use them you can't put the signature and implementation into .mli / .ml files
* rwmjones wonders why that is
Jedai has quit [Read error: 110 (Connection timed out)]
<maattd> Hi
maattd is now known as Matthieu
munga_ has quit [Read error: 113 (No route to host)]
Myoma` has joined #ocaml
Myoma has quit [No route to host]
Myoma` is now known as Myoma
itewsh has quit ["KTHXBYE"]
maattd has joined #ocaml
Matthieu has quit [Read error: 110 (Connection timed out)]
jderque has joined #ocaml
itewsh has joined #ocaml
psnively has joined #ocaml
Myoma has quit [Read error: 104 (Connection reset by peer)]
Myoma has joined #ocaml
itewsh has quit [Read error: 60 (Operation timed out)]
rwmjones has quit ["Closed connection"]
itewsh has joined #ocaml
jlouis has joined #ocaml
rdakin has joined #ocaml
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
bluestorm has joined #ocaml
Linktim has joined #ocaml
Linktim_ has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Client Quit]
Associat0r has quit []
Camarade_Tux has joined #ocaml
Ched- has quit [Remote closed the connection]
Ched- has joined #ocaml
Ched- has quit [Read error: 104 (Connection reset by peer)]
Ched- has joined #ocaml
Snark has quit ["Ex-Chat"]
Camarade_Tux has left #ocaml []
Linktim has quit [Read error: 113 (No route to host)]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Client Quit]
Camarade_Tux has joined #ocaml
guillem_ has joined #ocaml
Linktim has joined #ocaml
asmanur has quit [Read error: 110 (Connection timed out)]
jderque has left #ocaml []
sporkmonger_ has quit []
Philonous has quit [Remote closed the connection]
Philonous has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
aoeu has joined #ocaml
aoeu has quit [Remote closed the connection]
Myoma has quit [Nick collision from services.]
Myoma has joined #ocaml
asmanur has joined #ocaml
Linktim_ has joined #ocaml
Associat0r has joined #ocaml
Linktim has quit [Read error: 113 (No route to host)]
<Camarade_Tux> I'd need mingw-compiled ocaml executables (especially libcamlrun.a in fact), could anyone send me one (I can provide the hosting if needed)
<Camarade_Tux> (I'm giving a try at cross-compilation, I'm sure it won't work but I'm wondering at what point it will fail)
<Camarade_Tux> In fact the ones from caml.inria.fr should be alright but I can't extract the needed files and have to stay on linux for a while
hkBst has quit [Read error: 104 (Connection reset by peer)]
<Camarade_Tux> hum, forget it, I'm leaving and should be able to find a windows computer to extract the inria's installer by the time I get back on this computer
maattd has quit [Remote closed the connection]
<Yoric[DT]> Good luck.
* Yoric[DT] completely gave up on OCaml under Windows.
svenl has quit [Remote closed the connection]
svenl has joined #ocaml
marmotine has quit ["mv marmotine Laurie"]
tomh_-_ has joined #ocaml
Amorphous has quit [Connection timed out]
Amorphous has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
itewsh has quit ["KTHXBYE"]
lorph has joined #ocaml
<lorph> I was just reading how ocaml was made for speed, so where is the explicit return
<bluestorm> lorph: where is the logical link between "made for speed" and "explicit return" ?
tomh_-_ has joined #ocaml
<bluestorm> there is no explicit return in OCaml (but you can use exceptions if you want to break the control flow), and that's not related to speed
<lorph> because in other langugaes, an explicit return translates to a jmp or ret asm code, while inplicit return probably forces you to run the rest of the function
<flux> rest of the function would in the case of place that requires 'return' be very little
<bluestorm> lorph: declarative style don't use explicit return
<bluestorm> and there is usually no need for it
<bluestorm> at some places it can make the style a bit lighter and you can use exceptions to achieve the same effect
<bluestorm> lorph: do you have an example of code using explicit return for a net win in clarity and efficiency ?
Linktim_ has quit [Read error: 113 (No route to host)]
<lorph> well say you want to run a long series of tests on an integer, if any of them fail, then you would like to short circuit the function right
Axioplase is now known as Axioplase_
<jlouis> that is not the best example
<lorph> it would be more succinct to use a return if any of them fail instead of wrapping the whole statement with try with and then doing a raise at the end of each test
<jlouis> as it will often be compiled to be efficient anyway
<jlouis> lorph, it is not as if you write a lot of that kind of code in ocaml anyway
<psnively> And even if you do, what's wrong with the existing conditionals?
<jlouis> note that common lisp of course added them ;)
<jlouis> (return and return-from)
<bluestorm> hm
<bluestorm> t1 n && t2 n && t3 n && ... ?
<mrvn> An explicit return seems only helpfull for the imperative features, like for/while loops.
<mrvn> In other cases you are just at the leaf of the code flow tree and end with the return value.
<mrvn> Does ocamlc/opt optimize out exceptions within a function?
<mrvn> e.g. let x = try if y then raise Foo else 1 with Foo -> 0?
<mrvn> It wouldn't have to install and invoke the exception handler there but could translate that into jumps.
<mrvn> lorph: A place where I sometimes miss explicit returns is with cascading if statements: if foo then do_foo (); else begin do_bar; if baz then do_baz (); else begin do_buzz (); if blurb then .... end end end end end
<mrvn> You can incurr a lot of indentation with those.
svenl has quit [Remote closed the connection]
svenl has joined #ocaml
<lorph> I'm just reading about ocaml. I know someone who likes ocaml because its functional and very fast
<mrvn> you have to get into the spirit of functional programming to like it.
<mrvn> For C programmers passing functions just like any other variable takes getting used to.
<tomh_-_> how they call that again, currying right?
<mrvn> no. currying has to do with partial application.
<mrvn> Giving a function needing two argument only one to get another function.
<tomh_-_> oh ye
<tomh_-_> have to refresh my memory again before school starts :P
<mrvn> "In computer science, currying, invented by Moses Schönfinkel and Gottlob Frege, is the technique of transforming a function that takes multiple arguments (or more accurately an n-tuple as argument) in such a way as it can be called as a chain of functions each with a single argument."
<mrvn> ocaml actualy does not quite do currying.
<tomh_-_> ok, never used ocaml
<tomh_-_> dunno what im actually doing here :P
<mrvn> Unless you call "fun x y z ->" equivalent to "function (x,y,z) ->" but curried.
<mrvn> I think in ocaml "fun x y z ->" already represents "function x -> (function y -> (function z -> ....))", i.e. that what currying would give you.
<tomh_-_> ok
<mrvn> http://en.wikipedia.org/wiki/Closure_(computer_science) is probably better to say what ocaml uses.
<tomh_-_> interesting
<lorph> is it possible to bind the 2nd argument without specifying the 1st
<mrvn> lorph: let bind_first fn y = fun x -> fn x y
<mrvn> You build a new function that takes one argument and then binds that to fn first and y second.
<bluestorm> ( (\ fn \1 x) :p )
<mrvn> \ meaning lambda?
<mrvn> Is there some good Guideline for creating a singleton?
<bluestorm> (a singleton ?)
<mrvn> A thing of which there can only be one.
<bluestorm> hm
<bluestorm> Extlib.Global ?
<bluestorm> (the (\ thing) was only a showcase of a syntax extension of mine, pa_holes)
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
<mrvn> I was thinking of something like module M = struct let level = ref 0 let tree = ref Tree.empty let insert key item = tree := Tree.insert !tree key item end
<mrvn> Siganture would be just insert : Key.t -> Item.t -> unti
<mrvn> Any better ideas?
seafood has joined #ocaml
bluestorm has quit [Remote closed the connection]
seafood has quit []
Associat0r has quit []