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