benwbooth has quit [Remote host closed the connection]
pierpa has quit [Ping timeout: 260 seconds]
hongbo has quit [Ping timeout: 276 seconds]
mattrepl has joined #ocaml
chindy has joined #ocaml
<chindy>
hi, creating the mli file in the beginning for this pastbin leads to Unbound Constructor errors in the parser can anyone help me out ? http://pastebin.com/C13Ynx9b
darkf has joined #ocaml
<chindy>
thanks fixed it!
chindy has quit [Quit: Leaving]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mattrepl has quit [Quit: mattrepl]
johnelse has quit [Ping timeout: 272 seconds]
johnelse has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
tmtwd has joined #ocaml
govg has joined #ocaml
AlexDenisov has joined #ocaml
f- has quit [Ping timeout: 250 seconds]
rgrinberg has quit [Ping timeout: 258 seconds]
rgrinberg has joined #ocaml
f- has joined #ocaml
ggole has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
unbalancedparen has quit [Quit: WeeChat 1.5]
BitPuffin|osx has quit [Ping timeout: 276 seconds]
rgrinberg has quit [Ping timeout: 240 seconds]
tmtwd has quit [Ping timeout: 250 seconds]
luzie has quit [Quit: WeeChat 1.5-rc1]
luzie has joined #ocaml
yegods has joined #ocaml
jonasen has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ggole_ has joined #ocaml
_y has quit [Ping timeout: 250 seconds]
tobiasBora has quit [Ping timeout: 260 seconds]
ggole has quit [Ping timeout: 258 seconds]
_y has joined #ocaml
tobiasBora has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
tmtwd has joined #ocaml
AlexDenisov has joined #ocaml
A1977494 has joined #ocaml
_y has quit [Ping timeout: 240 seconds]
tobiasBora has quit [Ping timeout: 246 seconds]
tmtwd has quit [Ping timeout: 260 seconds]
mcc has quit [Quit: Connection closed for inactivity]
tobiasBora has joined #ocaml
Dragon535 has joined #ocaml
_y has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ygrek_ has joined #ocaml
AlexDenisov has joined #ocaml
AltGr has joined #ocaml
ggole__ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ggole_ has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
zpe has joined #ocaml
Simn has joined #ocaml
_y has quit [Ping timeout: 246 seconds]
tobiasBora has quit [Ping timeout: 246 seconds]
_y has joined #ocaml
tobiasBora has joined #ocaml
Dragon535 has left #ocaml [#ocaml]
jonasen_ has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonasen has quit [Ping timeout: 246 seconds]
AlexDenisov has joined #ocaml
NJBS has joined #ocaml
NJBS has quit [Client Quit]
ygrek_ has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
silver has joined #ocaml
dexterph has joined #ocaml
ia0 has quit [Quit: reboot]
ia0 has joined #ocaml
AlexDenisov has joined #ocaml
jwatzman|work has joined #ocaml
orbifx has joined #ocaml
<Kakadu2[m]>
Folks, do you know if ocamlbuild supports C/C++ projects. I mean using ocamldep-like `g++ -MM` call we can detect which source files are need to be recompiled after updated header
sdothum has joined #ocaml
TheLemonMan has joined #ocaml
<flux>
no, it doesn't support c++
<flux>
the best workaround I've read is call your c++ files with extension .c and then add the gcc flag -X c++ (maybe)
<flux>
proper C++ support would be nice, though
copy` has quit [Quit: Connection closed for inactivity]
<mrvn>
flux: but still no dependencies
<flux>
correct, actally I was thinking of the mere ocaml part of the problem
<flux>
I suppose you could add real c++ support to ocamlbuild
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
kdas__ has joined #ocaml
emias has quit [Quit: Reboot.]
rand__ has joined #ocaml
kdas__ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
yomimono has joined #ocaml
AlexDenisov has joined #ocaml
emias has joined #ocaml
emias has quit [Client Quit]
emias has joined #ocaml
emias has quit [Client Quit]
emias has joined #ocaml
emias has quit [Client Quit]
emias has joined #ocaml
emias has quit [Client Quit]
agarwal1975 has quit [Quit: agarwal1975]
thizanne has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
emias has joined #ocaml
M-Illandan has quit [Remote host closed the connection]
Kakadu2[m] has quit [Remote host closed the connection]
M-jimt has quit [Remote host closed the connection]
Bluddy[m] has quit [Remote host closed the connection]
regnat[m] has quit [Remote host closed the connection]
barkmadley[m] has quit [Read error: Connection reset by peer]
M-pesterhazy has quit [Remote host closed the connection]
M-ErkkiSeppl has quit [Write error: Broken pipe]
M-martinklepsch has quit [Write error: Connection reset by peer]
orbifx has quit [Ping timeout: 250 seconds]
agarwal1975 has joined #ocaml
rgrinberg has joined #ocaml
kushal has quit [Ping timeout: 240 seconds]
Kakadu2[m] has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 272 seconds]
<tormen>
hmm. I can't think today... I have a list of pairs: (predicate,result). I want to check the predicates on a list and return the corresponding result... how can I stop at the first predicate that matches ? ... List.fold traverses the whole list ?
<companion_cube>
you can use a flavor of `find`
<companion_cube>
I have `find_map : ('a -> 'b option) -> 'a list -> 'b option`
<tormen>
companion_cube: :) ... and you implemented this ? with a while loop ?
<companion_cube>
there are other implementations available ofc
<ggole__>
let rec find_map f = function | [] -> None | x::xs -> match f x with | Some _ as s -> s | None -> find_map f xs
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* ggole__
nihs again
<companion_cube>
heh
ggole__ is now known as ggole
<tormen>
ggole: :)
rgrinberg has quit [Quit: WeeChat 1.5]
<tormen>
nihs ?
rgrinberg has joined #ocaml
<ggole>
Not Invented Here
<ggole>
When something already exists and is more or less OK but you wanna do it yourself anyway
kdas__ has joined #ocaml
<tormen>
:)) thanks
kdas__ has quit [Read error: Connection reset by peer]
kdas__ has joined #ocaml
regnat[m] has joined #ocaml
M-jimt has joined #ocaml
Bluddy[m] has joined #ocaml
AlexDenisov has joined #ocaml
thizanne has quit [Quit: WeeChat 1.5]
M-pesterhazy has joined #ocaml
M-Illandan has joined #ocaml
kdas__ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
sh0t has joined #ocaml
AlexRussia has quit [Ping timeout: 240 seconds]
M-ErkkiSeppl has joined #ocaml
M-martinklepsch has joined #ocaml
barkmadley[m] has joined #ocaml
mattrepl has joined #ocaml
dario1 has quit [Quit: Konversation terminated!]
zpe has quit [Remote host closed the connection]
hcarty has joined #ocaml
AlexRussia has joined #ocaml
NingaLeaf_ has quit [Read error: Connection reset by peer]
pyon has quit [Quit: fix config]
unbalancedparen has joined #ocaml
bobry has quit [Quit: Connection closed for inactivity]
pyon has joined #ocaml
al-damiri has joined #ocaml
A1977494 has joined #ocaml
cat5e has quit [Ping timeout: 240 seconds]
cat5e has joined #ocaml
dhil has quit [Quit: Quit]
btbytes has joined #ocaml
hongbo` has joined #ocaml
<hongbo`>
a question about deriving -- now I have code like this `type u = int and v = u [@@deriving show]`, do I have to put the deriving in both u and v?
orbifx has joined #ocaml
<hongbo`>
like this `type u = int [@@deriving show] and v = u [@@deriving show]`?
aaronelkins has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<infinity0>
are there any benefits to using (lazy expr) rather than just (fun () -> expr)
<ggole>
infinity0: the lazy expression is only evaluated once
<infinity0>
ah, ok
aaronelkins has left #ocaml [#ocaml]
rgrinberg has quit [Ping timeout: 252 seconds]
silver has quit [Quit: rakede]
<mrvn>
the later can be polymorphic though
dhil has joined #ocaml
AlexDenisov has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
<ggole>
Lazy expressions can be polymorphic
octachron has joined #ocaml
rgrinberg has joined #ocaml
dexterph has quit [Ping timeout: 240 seconds]
beginner has left #ocaml ["Leaving"]
kushal has quit [Quit: Leaving]
kushal has joined #ocaml
<hcarty>
hongbo`: From a quick test in utop it looks like you do not
slash^ has joined #ocaml
kushal has quit [Ping timeout: 240 seconds]
<hongbo`>
what you mean? I only need deriving once, is that correct?
<hongbo`>
sorry I don't have utop installed in working machine
kushal has joined #ocaml
kushal has quit [Ping timeout: 260 seconds]
A1977494 has quit [Remote host closed the connection]
shinnya has joined #ocaml
<flux>
/1
<mrvn>
/2
kushal has joined #ocaml
kushal has quit [Changing host]
kushal has joined #ocaml
kushal has quit [Remote host closed the connection]
phasip has joined #ocaml
<flux>
mrvn wins :(
<hcarty>
hongbo`: Yes, you only need it once, as you wrote the example
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
phasip has quit [Ping timeout: 250 seconds]
pierpa has joined #ocaml
btbytes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hongbo`>
hcarty: thanks
<hcarty>
hongbo`: That should give you show_u, show_v, pp_u, pp_v
kushal has joined #ocaml
sh0t has quit [Quit: Leaving]
seangrove has joined #ocaml
loocash has joined #ocaml
johnelse is now known as johnel_away
johnel_away is now known as johnelse
johnelse has quit [Quit: leaving]
AlexDenisov has joined #ocaml
yegods has quit [Remote host closed the connection]
<seangrove>
Algebr: Might need to stop by for office hours to get some OpenGL stuff working :P
<seangrove>
Could just use another pair of eyes
yegods has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
yegods has quit [Remote host closed the connection]
TheVoid- has joined #ocaml
wagle has quit [Read error: Connection reset by peer]
TheVoid has quit [Ping timeout: 272 seconds]
yomimono has quit [Ping timeout: 260 seconds]
hongbo` has quit [K-Lined]
ygrek_ has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
copy` has joined #ocaml
AltGr has left #ocaml [#ocaml]
octachron has quit [Quit: Page closed]
thizanne has joined #ocaml
darkf has quit [Quit: Leaving]
btbytes has joined #ocaml
orbifx has quit [Ping timeout: 250 seconds]
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]
seangrove has joined #ocaml
yegods has joined #ocaml
loocash has quit [Quit: Leaving]
hcarty has quit [Quit: WeeChat 1.5]
shinnya has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 258 seconds]
dhil has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
btbytes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
octachron has joined #ocaml
dhil has joined #ocaml
btbytes has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
KV has joined #ocaml
btbytes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
btbytes has joined #ocaml
Denommus has joined #ocaml
<tormen>
hmm. let f ?(x=1) ~y = x + y ;; let f2 ?x ~y = f ?x ~y ;; f2 ~y:4 ;; why does ~x when calling f2 not get set to the default value of ~x in f ?
<tormen>
(so I would like f2 ~y:4 to evaluate to 5)
<tormen>
I thought when calling f ?x ~y I hand through the optional parameter for f to decide what to do with it... because I would like to avoid defining 2-times the default value for x...
<tormen>
... but why does ?x not get erased when calling f2 ~y:4 ... aargh ;)
<tormen>
ah is that maybe because I have NO positional argument ??
adelbertc has quit [Quit: Connection closed for inactivity]
Kakadu has joined #ocaml
<KV>
Hello camels! I've a question about the ffi if someone has experience with that. I've played around with it but doesn't really get how I should do this. I have a library in ocaml where I handle a custom binary. I'm now trying to integrate that in a gui written in C. So I call ocaml and get back an ast, and it would be nice to keep that ast as ocaml value, I see no point in redefining it in C structs as well.
<KV>
I think I've figured out by testing that CAMLreturn(ast); will cause the gc not to take it from me. Am I right? But as far as I can tell, it is never freed, at least not during my 30 min long test run. How do I free it in that case? Here is some context in form of C-code: http://pastebin.com/kMtZCLCS
<Kakadu>
When you save value from OCaml into C code and store in (for example) global variable you need to prevent GC from moving it using function caml_register_global_root
<Kakadu>
WHen you want to free the value, you unregister this root
<KV>
Okay, so I basically have to store it in a global value? I can't just pass it around like that?
<Kakadu>
and GC will collect it eventually
<Kakadu>
you need same safe storage for your value
<Kakadu>
well,
<Kakadu>
I think that you can safely pass it if it is registered as global root
<Kakadu>
I think
<Kakadu>
KV: mrvn knows everything about it
<KV>
Okay, I'll read a little more about that register_global_root, thank you very much! =)
A1977494 has joined #ocaml
wagle has joined #ocaml
<tormen>
... adding () to f and f2 makes x erasable... will not forget this anymore ;)
<ggole>
You can call f2 positionally, too: that is, f2 1 instead of f2 ~y:1
jonasen_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
orbifx has joined #ocaml
Orion3k has quit [Quit: Leaving]
btbytes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wagle has quit [Remote host closed the connection]
ggole has quit [Ping timeout: 252 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Orion3k has joined #ocaml
wagle has joined #ocaml
AlexRussia has quit [Ping timeout: 276 seconds]
Muzer has quit [Ping timeout: 258 seconds]
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
btbytes has joined #ocaml
btbytes has quit [Client Quit]
Muzer has joined #ocaml
f[x] has joined #ocaml
ygrek_ has quit [Ping timeout: 246 seconds]
btbytes has joined #ocaml
KV has quit [Quit: Page closed]
agarwal1975 has quit [Quit: agarwal1975]
Nahra has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
rand__ has quit [Quit: leaving]
Algebr` has joined #ocaml
Nahra has joined #ocaml
Simn has quit [Quit: Leaving]
groovy2shoes has quit [Remote host closed the connection]
unbalancedparen has quit [Quit: WeeChat 1.5]
nalgeneus has quit [Ping timeout: 264 seconds]
octachron has quit [Quit: Leaving]
nalgeneus has joined #ocaml
nalgeneus has quit [Ping timeout: 250 seconds]
yegods has quit [Remote host closed the connection]
sillyotter has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
sillyotter has quit [Client Quit]
madroach has quit [Ping timeout: 244 seconds]
yegods has joined #ocaml
madroach has joined #ocaml
orbifx has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
sh0t has joined #ocaml
Kakadu has quit [Remote host closed the connection]