gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
oriba has quit [Quit: oriba]
<_habnabit> aaaaa the new tuareg-mode has changed how indenting after `(function` does
<_habnabit> guess I've gotta figure out how to customize it
Submarine has joined #ocaml
Submarine has quit [Ping timeout: 246 seconds]
fantasticsid has joined #ocaml
lamawithonel has quit [Ping timeout: 245 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<Drakken> If you pass a polymorphic function to a HOF, can you use the PF with different types in the same call to the HOF?
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
datkin has quit [Read error: Connection reset by peer]
twittard_ has joined #ocaml
<Drakken> Specifically, I want to flatten a triple-nested list by applying List.flatten three times, so I thought it would be neat to write a HOF that takes a PF, an integer, and an initial value, and applies the function multiple times.
<Drakken> But the type checker doesn't seem to like that.
<_habnabit> you can't do that for the same reason you can't write a general Tuple3.nth
<Drakken> drata!
twittard has quit [Ping timeout: 240 seconds]
twittard_ is now known as twittard
<Drakken> I mean drat!
datkin has joined #ocaml
twittard has quit [Quit: twittard]
fantasti` has joined #ocaml
fantasti` has quit [Remote host closed the connection]
fantasticsid has quit [Ping timeout: 260 seconds]
lamawithonel has joined #ocaml
<pippijn> how can I communicate semantic information from the parser to the lexer (using menhir and ocamllex)?
mehitabel has joined #ocaml
<companion_cube> I'm not sure you can send info from the parser back to the lexer
<pippijn> companion_cube: how am I supposed to parse C, then?
<pippijn> the lexer needs to know which tokens are typedefs
<pippijn> hm
<pippijn> ok, I have an idea
<companion_cube> I have no clue
<companion_cube> especially since types can be composite (const struct foo)
NihilistDandy has joined #ocaml
<NihilistDandy> Anyone able to interpret this error? This expression has type int tree/10004
<NihilistDandy> but an expression was expected of type int tree/9494
<_habnabit> sounds like you have two different types called 'tree'
<NihilistDandy> Hmm. That shouldn't be.
<pippijn> companion_cube: I got it
<NihilistDandy> _habnabit: type 'a tree = Leaf | Node of 'a tree * 'a * 'a tree;;
<_habnabit> NihilistDandy, pastebin the whole module
<NihilistDandy> Shall do
<NihilistDandy> Just a homework assignment. Have to define a tree lookup, lookup : (’a * ’a -> bool) -> ’a -> ’a tree -> bool
<NihilistDandy> And trees are assumed to be BSTs
<NihilistDandy> Added a version with the specification
<NihilistDandy> Oh, wait
<NihilistDandy> I'm an idiot
<NihilistDandy> Forgot to put the lt in the recursive calls
twittard has joined #ocaml
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
twittard has quit [Quit: twittard]
emmanuelux has quit [Ping timeout: 245 seconds]
ankit9 has joined #ocaml
ulfdoz has joined #ocaml
yin has joined #ocaml
lamawithonel has quit [Ping timeout: 246 seconds]
<yin> hello~
<yin> Do I have to turn on some switches in order to relax value restriction?
EmmanuelOga has quit [Ping timeout: 244 seconds]
lamawithonel has joined #ocaml
lamawithonel has quit [Ping timeout: 276 seconds]
lamawithonel has joined #ocaml
NihilistDandy has quit []
yin has quit [Quit: Leaving]
ulfdoz has quit [Ping timeout: 244 seconds]
pango is now known as pangoafk
ftrvxmtrx has quit [Read error: Operation timed out]
twittard has joined #ocaml
silver has joined #ocaml
ftrvxmtrx has joined #ocaml
edwin has joined #ocaml
zorun has quit [Read error: Connection reset by peer]
djcoin has joined #ocaml
cago has joined #ocaml
zorun has joined #ocaml
thomasga has joined #ocaml
eikke has joined #ocaml
Snark has joined #ocaml
Submarine has quit [Quit: Leaving]
Submarine has joined #ocaml
avsm has joined #ocaml
thomasga has quit [Quit: Leaving.]
Kakadu has joined #ocaml
thomasga has joined #ocaml
czro has joined #ocaml
_andre has joined #ocaml
czro has quit [Quit: Lost terminal]
emmanuelux has joined #ocaml
letrec has joined #ocaml
<Kakadu> Hello!
<Kakadu> Does anybody tried grep in typerex? Does it turns on 12309 on your machine?
<adrien> turns on? what do you mean?
<Kakadu> systems hangs
<Kakadu> system*
<flux> probably eats a lot of memory?
<Kakadu> 12309 is being reproduced
<Kakadu> flux: I don't know. I hangs very fast :-)
<adrien> the "12309" string all the time?
<Kakadu> adrien: 12309
<Kakadu> what string?
<adrien> ah
<adrien> grpping on typerex? what was the command-line call?
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
<thomasga> Kakadu: this is not expected at all. you should report the error on the bugtracker with steps to reproduce the issue
<thomasga> how large is the codebase you are working on?
cago has quit [Ping timeout: 272 seconds]
cago has joined #ocaml
EmmanuelOga has joined #ocaml
eikke has quit [Ping timeout: 272 seconds]
eikke has joined #ocaml
Kakadu has quit [Quit: Page closed]
Sed has joined #ocaml
Sed is now known as Sedrikov
Sedrikov is now known as awa
awa is now known as Zel
Zel is now known as Zedrikov
Submarine has quit [Ping timeout: 276 seconds]
Zedrikov has quit [Quit: Bye all, see you next time!]
Submarine has joined #ocaml
Zedrikov has joined #ocaml
<hcarty> This is an odd type constraint error: type 'a t = 'a String_map.t is not included in type 'a t = 'a String_map.t
_andre has quit [Quit: Lost terminal]
_andre has joined #ocaml
<thelema> hcarty: that is odd.
<thelema> two different String_map.t's?
jamii has joined #ocaml
NaCl has quit [Quit: Changing server]
NaCl_ has joined #ocaml
NaCl_ has quit [Client Quit]
NaCl has joined #ocaml
NaCl has quit [Changing host]
NaCl has joined #ocaml
asdfhjkl has joined #ocaml
<hcarty> thelema: Not intentionally, but I think that may be what is happening
<hcarty> It comes from some combination of using 'module type of' and a .mli
<hcarty> I'll try to come up with an minimal example
<hcarty> thelema: On a different front - Do you have any ideas on how to best allow odb to work with ocamlbrew so that packages are installed in the default site-lib and programs/documentation/etc are install under ocamlbrew's root?
Kakadu has joined #ocaml
<Kakadu> Qrntz: hi!
<Qrntz> Kakadu: hello
<Kakadu> Qrntz: I've found a man who is interested in labqt in jabber
<Qrntz> yes, I remember
<Qrntz> that's certainly nice
<Kakadu> Qrntz: we should incite him to write some code :-)
<Qrntz> I decided I'll finish this thing I had to code until the end of february (postponed now, yet still critical) in c++
<Qrntz> but I will still take part in lablqt's development
<Qrntz> or at least try to
<Kakadu> ok
<thomasga> Kakadu: do you still have your problem with typerex?
<Qrntz> Kakadu: true, does he feel enthusiastic about this? :-p
cdidd has quit [Ping timeout: 260 seconds]
<Kakadu> we should release some binding generator until Qt5 release :D
<Kakadu> Qrntz: ^^
<Qrntz> heh, understood
<Kakadu> thomasga: I'll try to reproduce it now
<Kakadu> thomasga: mmm. System hangs after clicking `Alternate definitions`
<Kakadu> thomasga: it eats 1 core of 4 in my i3
<Kakadu> and some seconds after that Xserver becomes very slow
<Kakadu> maybe I should switch to kernel with version >2.6.32
<adrien> how much memory is used?
<adrien> "top -d .3" and then press ">" to sort by memory
<adrien> also, yes a newer kernel would help
<hcarty> thelema: I don't have a minimal example, but the fix appears to be a generous helping of "with type t = Foo.t" in the .mli
<hcarty> thelema: The issue came up in a local Batteries-based stdlib; Trying to create the equivalent of a batterie.mli has caused quite a bit of trouble
<hcarty> batteries.mli that is
Kakadu has quit [Ping timeout: 245 seconds]
ulfdoz has joined #ocaml
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
<Kakadu> adrien: system goes to swap. no I understand a problem
pangoafk has quit [Ping timeout: 265 seconds]
<thomasga> how large is the codebase you are using ?
<thomasga> (ie. how many files)
<thomasga> (ie, 1, 10, 100, 1000 ?)
<thelema> hcarty: just use ocamlc -i to produce batteries.mli, no?
<Kakadu> thomasga: 10
<Kakadu> thelema: https://github.com/Kakadu/lablqt/tree/master/xml to say correctly
<Kakadu> .typerex paste.in.ua/3935/raw/
<thelema> hcarty: binary install in a specific dir will require support from package installers - with oasis, --prefix does this, which is supported in odb. with others - it varies by package
<thelema> Kakadu: I assume that last message wasn't for me
<Kakadu> thelema: Oh, sorry )
<adrien> ah, huge files
<adrien> Kakadu: does it grep over the generated files?
<hcarty> thelema: I was trying to minimize the size of the .mli to minimize the number of places I need to make changes when code is updated
<adrien> (the ones which are tens of thousands of lines of code and all object code)
<hcarty> thelema: Binary installation to a specific location works with (many?) packages in oasis-db
<Kakadu> adrien: no any huge files. This is another file, not that C++ files which take long time to compile
<Kakadu> adrien: I don't know what this `search` do
<adrien> when I last built lablqt, some .ml files took a very long time to build
<hcarty> thelema: But I don't think odb has the means to say "pass --prefix to configure but don't set any ocamlfind paths during installation"
<adrien> Kakadu: heh, true, you probably have never seen the results :P
<Kakadu> adrien: this is not this .ml files.
<Kakadu> adrien: these*
<adrien> I'm pretty sure I had one .ml file that took a long time
<adrien> (note that my machine isn't very fast, so "long time" can be different for you)
<Kakadu> adrien: what about memory?
<Kakadu> adrien: or you dont talk about typerex now?
<thelema> hcarty: okay, we can add that if it's what you need for ocamlbrew
<thomasga> and if you remove core from .typerex, does it improve the speed ?
Cyanure has joined #ocaml
<hcarty> thelema: It's needed in order to install modules to ocamlfind's default site-lib. Otherwise packages end up in another location.
<thelema> hcarty: don't you want the prefix and the ocamlfind dest to be the same for ocamlbrew - both in the brew dir?
<hcarty> thelema: Yes
<hcarty> thelema: But if OCAMLFIND_DESTDIR is set then the packages install to that location rather than site-lib
<adrien> Kakadu: no, i meant: when building lablqt and was only talking about that
pangoafk has joined #ocaml
<Kakadu> thelema: without line about core it is OK!
<thelema> hcarty: Maybe a `brew` flag that works similarly to the godi flag to just disable DESTDIR
<thomasga> well, I'm not thelema but I'm happy you found your problem :-)
<Kakadu> thomasga: fail :-)
<Kakadu> thelema: epic fail :-)
<Kakadu> but why grepping 15 Mb of binary files needs 3Gb of RAM?
silver has quit [Remote host closed the connection]
<Drakken> Why doesn't Set.S have an of_list function?
<hcarty> Drakken: Because it's spelled 'List.fold_left' :-) Or you can use BatSet.S.of_enum
cago has quit [Ping timeout: 252 seconds]
<thelema> Drakken: I think there's been one added recently for testing purposes (as list literals are easy, but set/enum literals aren't)
<thomasga> Kakadu: is core size only 15Mb ?
<thelema> Drakken: ah, only the polymorphic sets have of_list. patches welcome (test required)
<hcarty> thelema: A brew flag could work. Or a change to the --have-perms flag so that --prefix is still used, pointing to the parent of bin/ocamlc
<hcarty> thelema: Or a --prefix flag for odb that does not affect the library installation step.
<thelema> --bin-prefix
<Kakadu> thelema: du -sh in /usr/local/lib/ocaml/3.12.1/core says 15Mb
<thelema> although how to do that with oasis...
<Kakadu> epic-epic fail
<Kakadu> thomasga: yes, 15 Mb
<Kakadu> thomasga: core.a core.cma core.cmi core.cmxa libcore.a META
<Kakadu> maybe I should put core source directory to typerex?
iago has joined #ocaml
<thomasga> putting sources won't help, typerex is looking for cmi
<thomasga> but I agree 3Go is a bit too much :-)
ftrvxmtrx has quit [Quit: Leaving]
eikke has quit [Ping timeout: 260 seconds]
letrec has quit [Ping timeout: 246 seconds]
Xizor has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ulfdoz_ is now known as ulfdoz
Cyanure has quit [Remote host closed the connection]
iago has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
twittard_ has joined #ocaml
twittard has quit [Ping timeout: 244 seconds]
twittard_ is now known as twittard
EmmanuelOga has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<csmrfx> So do OCaml modules have other functions than namespacing and library functions?
<csmrfx> function here as in "uses"
<bitbckt> functors.
<csmrfx> ok, actually yes I know about functors
<Zedrikov> abstract types
<Zedrikov> when you want to hide the implementation
<csmrfx> hm, that I am not sure what it would be
<ousado> it means defining + exposing a "public interface" for a type
<Zedrikov> In C programming language, you have .h files which you can use to be more modular (that is you can do many different implementations, and choose the one you want, and can modify the implementation without needing to recompile everything, or readapt your code)
<Zedrikov> In Ocaml module types are used for that
<csmrfx> struct with signature?
<Zedrikov> it is "sig" and not "struct", but well, yes
<Zedrikov> something like: "module type Set = sig type 'a t val elem: 'a t -> 'a ... end
<Zedrikov> You have no clue on the internal representation of Set
<csmrfx> Is there a synonym for 'abstract types' or is that literally what that is called?
<Zedrikov> In fact, here it is rather "abstract module", but if S is a Set, then "S.t" will be an abstract type.
<Zedrikov> But it is common to consider it an abstract type.
<csmrfx> Ok, I should speak of the 'package' as abstract module and it's part as abstract types?
<Zedrikov> "package" is not in the Ocaml terminology AFAIK
<csmrfx> yeah, used here as spoken english to refer to struct ... end
<csmrfx> uh, abstracted structure, struct .. end
<csmrfx> spoken/written 8P
iago has joined #ocaml
ikaros has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
<csmrfx> u3 mentions classes can be built from objects?
<csmrfx> I dont understand what kind of "moves" does that refer to?
pangoafk is now known as pango
<csmrfx> hm, I must have misread
<csmrfx> it would be pretty bizarre to make classes from instances!
<thelema> Zedrikov: package isn't in standard ocaml, but the community has package support in some of its programs, including findlib and odb
<csmrfx> heh, I was confusing things by calling struct/sig 'package'
<thelema> module type
<Zedrikov> struct/sig are modules (types)
twittard has quit [Quit: twittard]
<Zedrikov> "packages" as thelema said refers to some 'meta' stuff; like Godi, or the findlib system; it doesn't belong to the programming language
otters has joined #ocaml
<otters> IS this a good place for a godi question
<thelema> otters: as good as any
<thelema> I probably can't help you myself, but maybe someone else can
<otters> Trying to compile it from source on OSX 10.7.3 gives me this: https://gist.github.com/1943845
<thelema> what's on /opt/godi/build/godi/godi-tools/./makefile, line 91
<otters> oh shit
<otters> I'll let you know in a few minutes
twittard has joined #ocaml
<otters> heh, never mind
<otters> it built fine
_andre has quit [Quit: leaving]
testcocoon has quit [Read error: Operation timed out]
ftrvxmtrx has joined #ocaml
testcocoon has joined #ocaml
thomasga has quit [Quit: Leaving.]
Kakadu has quit [Remote host closed the connection]
Snark has quit [Quit: Quitte]
avsm has joined #ocaml
jamii has quit [Quit: Leaving]
alxbl has quit [Read error: Operation timed out]
alxbl has joined #ocaml
alxbl has quit [Changing host]
alxbl has joined #ocaml
cdidd has joined #ocaml
Zedrikov has quit [Ping timeout: 245 seconds]
eikke has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ulfdoz has quit [Ping timeout: 252 seconds]
asdfhjkl has quit [Quit: Leaving]
cyphase has quit [Ping timeout: 276 seconds]
edwin has quit [Remote host closed the connection]
Tobu has joined #ocaml
cyphase has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
otk_ has joined #ocaml
otk has quit [Ping timeout: 245 seconds]
Xizor has quit []
eikke has quit [Ping timeout: 248 seconds]
eikke has joined #ocaml
letrec has joined #ocaml
eikke has quit [Ping timeout: 252 seconds]
<_habnabit> is a Bigarray guaranteed to be initialized to all zeroes?
<_habnabit> that's what seems to happen with Bigarray.Array2.create, anyway
oriba has joined #ocaml
avsm has quit [Quit: Leaving.]
Submarine has quit [Ping timeout: 246 seconds]
<pippijn> are parameterless type constructors singletons?
<pippijn> so, is Const == Const?
datkin has quit [Read error: Connection reset by peer]
letrec has quit [Ping timeout: 252 seconds]
patronus has quit [Read error: Connection reset by peer]
patronus has joined #ocaml
EmmanuelOga has joined #ocaml
yroeht has quit [Read error: Operation timed out]
yroeht has joined #ocaml
bacam has quit [Ping timeout: 245 seconds]
mehdid_ has quit [Ping timeout: 240 seconds]
bnwr has quit [Ping timeout: 276 seconds]
Asmadeus has quit [Ping timeout: 265 seconds]
bacam has joined #ocaml
bnwr has joined #ocaml
deavid has quit [Quit: No Ping reply in 180 seconds.]
deavid has joined #ocaml
iago has quit [Ping timeout: 265 seconds]
patronus has quit [Read error: Connection reset by peer]
patronus has joined #ocaml
Asmadeus has joined #ocaml
yroeht has quit [Ping timeout: 244 seconds]
diml has quit [Ping timeout: 244 seconds]
mehdid has joined #ocaml
diml has joined #ocaml