<_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
<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?
<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