adrien 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/
yezariaely has quit [Ping timeout: 264 seconds]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ulfdoz_ is now known as ulfdoz
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
oriba has quit [Quit: oriba]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
emmanuelux has quit [Remote host closed the connection]
weie has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit [Quit: ttamttam]
yacks has joined #ocaml
ahokaomaeha has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 245 seconds]
ftrvxmtrx has joined #ocaml
groovy2shoes has joined #ocaml
ahokaomaeha has quit [Ping timeout: 240 seconds]
groovy2shoes has quit [Quit: It is now safe to turn off your groovebot.]
ulfdoz has quit [Ping timeout: 248 seconds]
yacks has quit [Ping timeout: 246 seconds]
myx has quit [Ping timeout: 245 seconds]
andreypopp has joined #ocaml
<flux> companion_cube, if you have many such aliases, stick them into a file you can 'open' from your modules
<flux> that way you use a consistent set of aliases in all modules
adotbrown has quit [Ping timeout: 240 seconds]
astertronistic has quit [Quit: Leaving]
andreypopp has quit [Quit: sleep]
myx has joined #ocaml
andreypopp has joined #ocaml
andreypopp has quit [Client Quit]
djcoin has joined #ocaml
Yoric has joined #ocaml
ahokaomaeha has joined #ocaml
yacks has joined #ocaml
adrien_oww has quit [Ping timeout: 245 seconds]
adrien_oww has joined #ocaml
ftrvxmtrx_ has joined #ocaml
mye has joined #ocaml
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
adotbrown has joined #ocaml
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
beginner42 has joined #ocaml
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
<beginner42> does someone here know how to receive multipart messages in the pdhborges binding for zmq?
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yacks has quit [Ping timeout: 264 seconds]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
<beginner42> found it
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
Snark_ has joined #ocaml
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yacks has joined #ocaml
chambart has joined #ocaml
ontologiae has joined #ocaml
Cyanure has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
adotbrown has quit [Ping timeout: 276 seconds]
mcclurmc has joined #ocaml
Kakadu has joined #ocaml
thomasga has joined #ocaml
myx has quit [Quit: ушёл]
beginner42 has quit [Quit: irc2go]
sw2wolf has quit [Remote host closed the connection]
Snark_ is now known as Snark
chambart has quit [Ping timeout: 246 seconds]
yacks has quit [Ping timeout: 248 seconds]
mcclurmc has quit [Ping timeout: 264 seconds]
ontologiae has joined #ocaml
yacks has joined #ocaml
werzer23 has quit [Quit: Leaving]
_andre has joined #ocaml
mye_ has joined #ocaml
mye has quit [Ping timeout: 264 seconds]
mye_ is now known as mye
anderse has joined #ocaml
hkBst has joined #ocaml
mye has quit [Quit: mye]
yacks has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mye has joined #ocaml
hkBst has quit [Ping timeout: 248 seconds]
hkBst_ has joined #ocaml
yacks has joined #ocaml
hkBst_ has quit [Excess Flood]
chambart has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
dwmw2_gone is now known as dwmw2
jbrown has quit [Ping timeout: 264 seconds]
hkBst_ has joined #ocaml
beginner42 has joined #ocaml
hkBst_ has quit [Remote host closed the connection]
<beginner42> why cant i write something like # type test = string let (a,b) : test * string list option = "test",Some ["test2"];;
hkBst_ has joined #ocaml
jbrown has joined #ocaml
hkBst_ has quit [Ping timeout: 264 seconds]
hkBst_ has joined #ocaml
<zorun> beginner42: you don't need to annotate the type
<Qrntz> beginner42, you can write «let a, b = ("test", Some ["test2"] : test * string list option)»
hkBst__ has joined #ocaml
hkBst_ has quit [Ping timeout: 248 seconds]
Yoric has joined #ocaml
hkBst__ has quit [Ping timeout: 248 seconds]
hkBst__ has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
hkBst__ has quit [Ping timeout: 248 seconds]
q66 has joined #ocaml
weie has quit [Read error: Connection reset by peer]
weie has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
hkBst_ has joined #ocaml
bholst_ has joined #ocaml
caligula__ has joined #ocaml
cdidd has quit [Quit: Leaving]
tlockney has quit [Ping timeout: 252 seconds]
bholst has quit [Quit: No Ping reply in 180 seconds.]
caligula_ has quit [Remote host closed the connection]
<orbitz> beginner42: what error are you getting?
tlockney_ has joined #ocaml
<beginner42> orbitz: i get syntax error at the colon
<orbitz> beginner42: did you really put your type test and the let on the same line?
<beginner42> no, i put them on two sperated lines
<Kakadu> puttin this on the same line works for me, btw, as expected
<orbitz> beginner42: do you have ;; after yourtype line?
<beginner42> orbitz: no, i didnt think would need those semicolons inside a module
<orbitz> is this inside a module or on repl?
<beginner42> inside a module
<beginner42> i redesigned my function, so i dont have to write it this way
sevenLout has joined #ocaml
sevenLout has left #ocaml []
hkBst_ has quit [Ping timeout: 264 seconds]
hkBst_ has joined #ocaml
dabd has joined #ocaml
yacks has quit [Quit: Leaving]
mcclurmc has quit [Ping timeout: 264 seconds]
yacks has joined #ocaml
<companion_cube> I can't understand how opam+ocamlfind is supposed to work... opam's ocamlfind knows where my packages are, but the system-wide ocamlfind does not
<companion_cube> so in practice I can't use the opam libraries
<flux> I think opam hides them into ~/.somewhere?
<flux> disclaimer: I haven't actually used opam for other than bootstrapping :)
<companion_cube> yes, ~/.opam/system/lib/
<flux> so your regular programs using 'ocamlfind' don't compile?
<companion_cube> exactly
<companion_cube> well, the programs that use libraries installed by opam
<avsm> companion_cube: there's a bug in 'ocamlbuild -use-ocamlfind' which always uses the system ocamlfind irrespective of your PATH
<thomasga> you want to use libraries installed by your system and libraries installed by opam ?
<avsm> it's fixed in trunk ocaml, but in 4.00.1 you'll need to uninstall your system findlib and run eval `opam config env`
<thomasga> you can also edit /usr/local/lib/findlib.conf
<thomasga> and and ":<your home>/.opam/system/lib" in path
<companion_cube> oh, so that's a bug in ocamlbuild too...
<thomasga> "so in practice I can't use the opam libraries" <- please can you clarify ?
mcsquiggedy_ has joined #ocaml
<companion_cube> thomasga: sorry :(. So, I want to use opam to install libraries (in my home), and use those libraries in some ocaml code.
<companion_cube> but ocamlbuid -use-ocamlfind does not find the libraries I installed
<thomasga> but do you want to mix system libraries and opam libraries ?
<companion_cube> wel,, yes
<companion_cube> at least the standard library and compiler, but with opam libraries too
<companion_cube> because the ocaml libs packaged on my distro are old
<companion_cube> I thought this was a common use-case for opam :/
<thomasga> standard lib + compilers works fine if you either uninstall system ocamlfind (as avsm pointed out) or if you add the right path in /usr/local/lib/ocaml/findlib.conf
<avsm> thomasga: i wonder if we should backport that ocamlbuild fix to the 4.00.1 compiler switch. could make things even more confusing though
<companion_cube> ok, guess I'll delete the system ocamlfind then
<avsm> companion_cube: why not just use all-opam libraries? there's very little overhead with doing that.
<thomasga> or you can try to set OCAMLFIND_CONF=~/.opam/system/lib/findlib.conf
<thomasga> avsm: yup, we can try to backport the fix
<avsm> would still break with the default system compiler though. hrm.
<companion_cube> and my ocaml doesn't use $OCAML_TOPLEVEL_PATH -_-
beginner42 has quit [Quit: irc2go]
hkBst_ has quit [Ping timeout: 248 seconds]
<thomasga> companion_cube: we're planning to fix that by distributing a default .ocamlinit file ...
<companion_cube> think I'll stick with subrepos currently... :/
<avsm> if that works for you, it's a good solution too...
hkBst_ has joined #ocaml
hkBst_ has quit [Changing host]
hkBst_ has joined #ocaml
<avsm> there's a bunch of patches to feed upstream to ocaml to make OPAM more natural to use, and it can't be done overnight unfortunately
<avsm> some are already in trunk, so the 4.01.0dev+trunk may be helpful, but others are still going in
<companion_cube> I'm a bit surprised that ocamlfind doesn't just use environment variables to know where to search for libraries
mcclurmc has joined #ocaml
<thomasga> companion_cube: the problem is not only the searching but also where the libraries are installed
<thomasga> you don't want OPAM to install your libraries system-wise
<companion_cube> sure, but if I define 'ocaml_root=~/.opam/system/lib/:$ocaml_root' or something like that, ocamlfind should search both?
<thomasga> and also, you want to know where the stubs are installed
<thomasga> and where to install them
darkf has quit [Quit: Leaving]
lenstr has quit [Ping timeout: 252 seconds]
<stephe-> how can i get the name of the current file im in?
LeNsTR has joined #ocaml
RagingDave has joined #ocaml
<Yoric> What's "current file"?
<Yoric> stephe-: ^
lusory has joined #ocaml
ontologiae has quit [Ping timeout: 276 seconds]
leoncamel has joined #ocaml
travisbrady has joined #ocaml
<stephe-> Yoric: i want to get the path that the current file is in
<stephe-> like __file__ in python
<stephe-> i have a file i want to open thats always going to be in the parent directory that this source file will be in
mcsquiggedy_ has quit [Quit: Leaving]
<Yoric> I seem to remember you can do this with camlp4 but not with vanilla OCaml.
<stephe-> hrmmm ok ill look into it
weie has quit [Quit: Leaving...]
ftrvxmtrx_ has quit [Quit: Leaving]
smondet has joined #ocaml
mcsquiggedy_ has joined #ocaml
ontologiae has joined #ocaml
ahokaomaeha has quit [Ping timeout: 260 seconds]
LeNsTR has quit [Changing host]
LeNsTR has joined #ocaml
troydm has quit [Read error: Operation timed out]
troydm has joined #ocaml
yacks has quit [Quit: Leaving]
ttamttam has joined #ocaml
ahokaomaeha has joined #ocaml
Simn has joined #ocaml
Itewsh has joined #ocaml
Itewsh has quit [Read error: Connection reset by peer]
Itewsh has joined #ocaml
<ousado> how is the state of ocaml 4 on windows?
Itewsh has quit [Read error: Connection reset by peer]
Itewsh has joined #ocaml
Itewsh has quit [Read error: Connection reset by peer]
<ousado> ok, sry, just reading the dedicated windows release notes
ttamttam has quit [Quit: ttamttam]
hkBst_ has quit [Quit: Konversation terminated!]
ttamttam has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Kakadu has quit []
cago has joined #ocaml
cago has quit [Quit: Leaving.]
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
thomasga has quit [Quit: Leaving.]
LeNsTR is now known as lenstr
ttamttam has quit [Quit: ttamttam]
tac has joined #ocaml
beginner42 has joined #ocaml
cago has joined #ocaml
Cyanure has joined #ocaml
cago has quit [Remote host closed the connection]
cago has joined #ocaml
LukeSun has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
beginner42 has quit [Quit: irc2go]
tane has joined #ocaml
Anarchos has joined #ocaml
cago has left #ocaml []
<_andre> hello
<_andre> has anyone used the "poor man's allocation profiler" trick described here https://sympa.inria.fr/sympa/arc/caml-list/2011-08/msg00050.html ?
<_andre> more specifically with ocaml 4
<_andre> i'm getting a "Function "caml_call_gc" not defined" error
<thelema> _andre: I've used it with 3.12 + the better symbols patches that made it into 4; I've not tried it on 4
<thelema> gdb gives you the "not defined" error?
<_andre> yeah
<thelema> try removing the first two -ex arguments to gdb
<thelema> this should give you backtraces at just wherever your code is
<thelema> as opposed to backtraces in call_gc
<_andre> that kinda worked, although it exited with "Backtrace stopped: previous frame inner to this frame (corrupt stack?)"
<thelema> I'm guessing that caml_call_gc is no longer the identifier name to use for this trick, you should be able to find a good identifier to use instead by looking in the traces
<thelema> hmm... I've not gotten that error before
<_andre> it was in libev.so
<thelema> maybe it does something weird with stack frames... I dunno.
<_andre> if i run that loop and remove the first 2 -ex and the filtering commands i after the loop all i get is "epoll_wait,??,ev_loop,??"
Kakadu has joined #ocaml
<_andre> i guess i need to do this while my program is actually doing something...
mcclurmc has quit [Ping timeout: 264 seconds]
anderse has quit [Quit: anderse]
bholst_ is now known as bholst
bholst has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
bholst has joined #ocaml
mcsquiggedy_ has quit [Quit: Leaving]
smango has quit [Ping timeout: 255 seconds]
smango has joined #ocaml
anderse has joined #ocaml
mcsquiggedy_ has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
chambart has quit [Ping timeout: 264 seconds]
_andre has quit [Quit: leaving]
travisbrady has left #ocaml []
travisbrady has joined #ocaml
dsheets has quit [Remote host closed the connection]
LukeSun has left #ocaml []
dsheets has joined #ocaml
lenstr has quit [Read error: Connection reset by peer]
LukeSun has joined #ocaml
LukeSun has left #ocaml []
<dsheets> no comparisons! platonic ideals for everyone!
LukeSun has joined #ocaml
travisbrady has quit [Quit: travisbrady]
<mcsquiggedy_> type solid = Tetrahedron | Cube | Octahedron | Dodecahedron | Icosahedron
<thelema> mcsquiggedy_: ideals, not solids
<mcsquiggedy_> thelema: it's a joke about platonism; nuance is kind of out of the question
<thelema> :)
travisbrady has joined #ocaml
travisbrady has quit [Quit: travisbrady]
<dsheets> type package_manager = [ `cabal | `opam ];; assert (`cabal=`opam);; KaBoom
Snark has quit [Quit: Quitte]
travisbrady has joined #ocaml
contempt has quit [Ping timeout: 246 seconds]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
contempt has joined #ocaml
travisbrady has quit [Quit: travisbrady]
anderse has quit [Quit: anderse]
LeNsTR has joined #ocaml
ontologiae has joined #ocaml
reynir has joined #ocaml
ttamttam has joined #ocaml
travisbrady has joined #ocaml
mcsquiggedy_ has quit [Quit: Leaving]
mcsquiggedy_ has joined #ocaml
<reynir> >.<
<reynir> I have been debugging my build system. Turns out that I didn't have the package installed after all
<thelema> oops
<reynir> I am working on a remote computer. Apparently I looked for the package on the *local* computer
tlockney_ is now known as tlockney
mcsquiggedy_ has quit [Quit: Leaving]
anderse has joined #ocaml
Kakadu has quit []
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
cdidd has joined #ocaml
darinmorrison has joined #ocaml
ttamttam has quit [Quit: ttamttam]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
mye_ has joined #ocaml
mye has quit [Ping timeout: 245 seconds]
mye_ is now known as mye
mcclurmc has joined #ocaml
ski has quit [Ping timeout: 240 seconds]
ski has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
Cyanure has quit [Remote host closed the connection]
chambart has joined #ocaml
andreypopp has joined #ocaml
emmanuelux has joined #ocaml
anderse has quit [Quit: anderse]
LukeSun has quit [Ping timeout: 264 seconds]
andreypopp has quit [Quit: sleep]
chambart has quit [Ping timeout: 246 seconds]
adotbrown has joined #ocaml
tane has quit [Quit: Verlassend]
svenl has quit [Remote host closed the connection]
djcoin has quit [Quit: WeeChat 0.3.9.2]
Nova_ has joined #ocaml
<Nova_> Hello, can somebody give me me with this example?
<Nova_> function1 : (float * float -> float) * (int -> int -> unit) * bool = ??????
<companion_cube> it's not a function
<companion_cube> it's just a tuple
<Nova_> yes, I would agree, but the tuple element is a function?
<zorun> it's a 3-tuple
<zorun> whose first and second element are functions
<zorun> *elements
<Nova_> it's the (float * float -> float) * (int -> int -> unit) element that is confusing to me. Can somebody give me an example?
mye has quit [Ping timeout: 248 seconds]
<tac> Nova_: (fun x y -> x * y, fun x y -> print x + y) is an example of that type
<zorun> ((fun x y -> x +. y), (fun x y -> x + y; ()))
<zorun> too slow :)
<zorun> oh, right, “print_int (x + y)” is a good idea for the second type
invariant has quit [Ping timeout: 246 seconds]
<tac> you could also have fun x y -> ()
<tac> which takes two arguments (throws them away) and returns a unit
invariant has joined #ocaml
mnero has joined #ocaml
<zorun> it would have type ('a -> 'a -> unit) then
<zorun> ('a -> 'b -> unit) even
<mnero> hi, simple question. If I have a type that can be One, Two, Three, and I want to pattern match both One and Two in single guard, how do I do it?
<pippijn> mnero: One | Two -> ...
<zorun> | One | Two ->
RagingDave has quit [Quit: Ex-Chat]
<mnero> alright, what if I'm also pattern matching a 2 tuple, and the snd is the thing that can be One, Two, Three. Same thing? | 0, One | Two -> bla?
tac has quit [Ping timeout: 245 seconds]
ontologiae has quit [Ping timeout: 240 seconds]
<pippijn> mnero: with () around it
<pippijn> | 0, (One | Two) -> bla
<mnero> awesome, thanks
<dsheets> uhhh? really?
<pippijn> yes, really
<dsheets> wow, that is quite cool *goes to read about | pattern subsyntax*
<pippijn> the only thing that I would like to have is this: | (a, a) ->
<pippijn> instead of | (a, b) when a = b ->
<dsheets> Interesting… "| One | Two -> …" is really "| (One | Two) ->" and not a special case of the clause syntax. That is very cool. Thanks pippijn.
<pippijn> yes
darkf has joined #ocaml
<pippijn> dsheets: use it as much as possible :)
<pippijn> it makes for most efficient matching code
<pippijn> also readable
<dsheets> pippijn: yes, I definitely will. It is much better than creating multiple clauses with deep deviations. i'm surprised i didn't already know about this *blushes*
adotbrown has quit [Ping timeout: 256 seconds]
<dsheets> hmm… it seems (_ : p t) doesn't polymorphize when type _ t is gadt and the match is annotated with explicit polymorphic type param :-/
<dsheets> also, the "Or" pattern with | causes the type variable to collapse so you have to create separate clauses for each gadt constructor :-/
<dsheets> let f : type a. a t -> int = function | One -> 5 | Two -> 5 | False -> 3;;
adotbrown has joined #ocaml
smondet has quit [Ping timeout: 248 seconds]
oriba has joined #ocaml
leoncamel has quit [Ping timeout: 245 seconds]
jamii has joined #ocaml
darinmorrison has quit []
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
travisbrady has quit [Quit: travisbrady]
dwmw2 is now known as dwmw2_gone
mcclurmc has quit [Ping timeout: 248 seconds]
oriba has quit [Quit: oriba]
dabd has quit [Quit: Leaving]
|jbrown| has joined #ocaml
jbrown has quit [Ping timeout: 245 seconds]
Simn has quit []
jamii has quit [Ping timeout: 276 seconds]
tomprince has joined #ocaml
travisbrady has joined #ocaml
tomprince has left #ocaml []
q66 has quit [Quit: Quit]