<MarcWeber>
There are two unix.ml in otherlibs/{unix,threads}
<MarcWeber>
I'd like to install .cmt files, however I don't know how to prevent a name collision?
<MarcWeber>
Are those two unix.ml modules exclusive?
Drup has quit [Client Quit]
Drup has joined #ocaml
Drup has quit [Client Quit]
Drup has joined #ocaml
zpe has joined #ocaml
Drup has quit [Client Quit]
Drup has joined #ocaml
_andre has joined #ocaml
<gasche>
MarcWeber: I suppose the threads version is meant to be the one linked with programs that use threads
<gasche>
MarcWeber: the installer puts threads/unix.cma in $LIBDIR/ocaml/vmthreads (eg. /usr/lib/ocaml/vmthreads on my machine)
<gasche>
you could put the .cmt there as well
Neros has joined #ocaml
introom has joined #ocaml
csakatoku has quit [Remote host closed the connection]
<kaustuv>
Does RWO explain how to use oasis?
<MarcWeber>
Does ocaml-4.00.1 build with -jN ?
<gasche>
MarcWeber: no it doesn't
<MarcWeber>
me wonders why people don't care about such ..
<gasche>
Given the choice between "deciding not to care" and "submitting a patch to make -jN work", everybody so far has taken option (1).
<gasche>
feel free to make a different choice, MarcWeber
<adrien_oww>
because it builds in 3 minutes
<adrien_oww>
on my laptop
<gasche>
I would personally appreciate cutting build times by 2 during patch/build/test cycles, but that never got close enough for a priority for me to learn the details of OCaml's makefiles
<gasche>
I've been trying to bug Pierre Chambart to do this, though, as he previously worked a bit on the question
<adrien_oww>
good luck parallelizing the rebuild of .ml files
<adrien_oww>
as for the VM, I have ccache
<MarcWeber>
adrien_oww: Which problems do you see?
<MarcWeber>
I'm using nixos linux. Its great and pure. However if you change a small thing you trigger full rebuilds
<adrien_oww>
it's also fairly difficult to do
<adrien_oww>
but if you want to build ocaml in parallel, it's not very difficult
<adrien_oww>
make -j4 || make -j4 || make
breakds has joined #ocaml
<gasche>
wmeyer: I think I deleted one comment too much on gagallium, would you care to repost one?
<gasche>
(I can probably mail you the comment text if you lost it)
<ggole>
When I was first learning ocaml it took me a few goes to figure out that the annotation foo a : int = ... described the return type and not the type of a
<gasche>
I'm not sure which syntax you are talking about, but I do agree in a general sense that "Syntax is a bit annoying" :]
<gasche>
ggole: funny, I've often wished I could use fun x y : ty -> e for fun x y -> (e : ty)
<gasche>
(but this could be solved by adding an annotation function (: ty) )
<gasche>
hm
<gasche>
no it wouldn't, (: ty ) f x wouldn't parse right
<ggole>
Half the problem is that the (very straightforward) annotations in .mli files is nothing like the annotations on functions
<ggole>
Syntax is hard, let's go Lisp programming.
<gasche>
I'm afraid the issues around the difference between 'a, ('a . ... 'a ...), (type a) and (type a . ...) will never go away
<gasche>
hm I suspect lisp-style syntax wouldn't help for this particular problem
<ggole>
That was just a snarky comment: lisp has very ugly type ascription
<ggole>
Even though it is famous for "not having syntax"
zpe has joined #ocaml
<ggole>
(let ((x 1)) (declare (type x (unsigned-byte 32))) ...) or something like that
zpe has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
<ggole>
gasche: some interesting comments in that thread
<ggole>
One of the more annoying limitations of the ocaml way of doing things is duplicating large ADTs between .ml and .mli
<ggole>
Which is make-work, really
<gasche>
there are workarounds to avoid that
<ggole>
#include?
<gasche>
ok, there are less horrible workarounds to avoid that
<ggole>
Such as?
<gasche>
such as having separate type-definitions modules that have only a .ml or only a .mli
<ggole>
That works: but moving stuff out of files once it becomes a certain size is not a very nice way to work
<gasche>
(it's valid for a module to have only a .mli if it contain only static type information, and therefore does not need to be linked or anything after the type-checking phase)
<gasche>
ggole: there are various reasons for not liking this workaround, but I don't find this one particularly convincing; I regularly split modules if they grow too fat
<gasche>
besides
zpe has quit [Ping timeout: 248 seconds]
<ggole>
Yes, but the criterion for separating out a data type definition is how annoyed you get at typing/copying code, not cleanliness of design
<gasche>
I have identified the same pain, but I do not know of any good solution for it
<gasche>
hm
<gasche>
... maybe I do
<ggole>
Allow some kind of binding statement in a .mli to allow whatever .ml definition there is to "shine through"?
<ggole>
That would preserve the ability to, uh, "refine" types
<ggole>
(I can't put my finger on the right terminology for that.)
<ggole>
Seems pretty tough to design something with backwards compatibility
<gasche>
I'm also virtually interested in what would be the best solution(s), clean-slate style, but of course only backward-compatible ones are worth discussing in an "the ocaml language" context
<MarcWeber>
the .opt and the non .opt versions of the compiler should behave the same way?
<MarcWeber>
Getting Fatal error: exception End_of_file in the .opt case ?
<gasche>
MarcWeber: yes they should
<gasche>
(we're talking about ocamlc.opt vs. ocamlc, or ocamlopt.opt vs. ocamlopt; not ocamlc vs. ocamlopt)
<gasche>
MarcWeber: if you notice a difference between foo and foo.opt, it's likely to be a bug
<MarcWeber>
I had some btrfs csum errors in the log
<ggole>
Check hashes then, if you can
<MarcWeber>
But I retried 2 times - without .opt it works with .opt I get this error.
<MarcWeber>
I'll try on my server. not using btrfs there.
zpe has joined #ocaml
<pippijn>
I think it's not that bad to split types into its own module
<pippijn>
because types are often the reason for cyclic dependencies
<ggole>
You mention the "dynamic semantics" of let. Are there type annotations that would change the behaviour of code?
<ggole>
I've always thought that the answer to that was just "no". (Apart from, possibly, hacks like Obj.magic.)
<MarcWeber>
its unlikely to be a btrfs issue. I've recompiled it 3 times successfully without .opt
<ggole>
I was thinking that btrfs might have subtly corrupted your .opt binary.
<ggole>
...which is unlikely, now that I think about it.
<MarcWeber>
I get the error for both: ocamlc.opt and ocamlopt.opt
<ggole>
Hmm
<MarcWeber>
I've also tried with -j1 - so its very unlikely to be a timing issue. but again - wait till I've reproduced it on my server..
<ggole>
Perhaps they have a shared library in common?
<ggole>
pippijn: it's not that it is bad, per se
<ggole>
So much as it is unproductive work
<pippijn>
I tend to have large types in their own module to begin with
<pippijn>
no, wrong
<pippijn>
replace "large" with "widely used"
<ggole>
You don't place common operations on such types in the same module?
<gasche>
ggole: no, annotations don't change the dynamic semantics
<gasche>
but there is a question of how you interpret programs such as
<pippijn>
ggole: I don't know yet
<pippijn>
I don't have a good standard for that
<gasche>
val loop1 : unit -> unit val loop2 : unit -> unit let loop1() = loop2() let loop2() = loop1()
<pippijn>
but if I do, I still don't have an .mli
<ggole>
gasche: ah, I see
<ggole>
One "solution" is to require the val and the let to appear together
<gasche>
yeah
<ggole>
In fact you could just make the whole thing one bit of syntax
<ggole>
It's a bit artificial but it rules out some corner cases like that
<pippijn>
then you're at let foo : a -> b -> c = fun a b c ->
<ggole>
(It also appears to be how Haskell code is annoted in practical use: there may be a small advantage of familiarity there)
<gasche>
well forward-declaration is also desirable in some situations
<gasche>
(eg. literate programming)
<gasche>
but it seems preferrable to forbid introducing any form of dynamic recursion that way
<ggole>
Hmm, don't literate programming tools usually have some rewriting to allow more flexible ordering?
<gasche>
while programming in Haskell i've also come to wish being able to interleave the pattern-matching definition of two different functions
<gasche>
ggole: the idea is to allow that inside the language directly
<ggole>
Hmm
<gasche>
(C lets you do that with prototypes)
<ggole>
So that analogues cases go together?
<ggole>
*analogous
<ggole>
I can't say I've ever wanted that, although maybe it would be clearer for some code
<flux>
but it is annoying that while adding some code you need to move other functions around.
<ggole>
OO languages allow mutual recursion over an entire scope to get around that
ygrek has quit [Ping timeout: 256 seconds]
introom has joined #ocaml
<flux>
but on the other hand it is nice that if you read the file from the top to bottom, you don't see anything references that hasn't been defined
<ggole>
It's also nice that the rules for global scope mirror those for local scope
<flux>
but, something like val x : y could work for me. like val foo : _ could work if you want to use type inference. or would that be overloading the meaning?
<ggole>
You mean, val foo : _ in a .mli?
<flux>
oh right, and there's another downside: you wouldn't get the same effect by copy pasting the file into ocaml toplevel piece by piece
<flux>
no, I mean in .ml
osa1 has joined #ocaml
<ggole>
Er
<flux>
val forward_declaration : _
<ggole>
Oh, I see
<flux>
or val forward_declaration : int -> int
<ggole>
Using it for declaration effect and not type refinement
cago1 has quit [Ping timeout: 248 seconds]
<ggole>
Maybe just val name if you didn't want a type
<ggole>
While we're bikeshedding, I'd like to be able to ascribe multiple fields with one declaration
<ggole>
type foo = { x, y : huge_crazy_type_name }
travisbrady has joined #ocaml
<flux>
you do that often?
<flux>
consider saner type names as a workaround ;)
<flux>
but I'm off, off to summer vacation \o/ ->
<ggole>
o/
ousado has quit [Read error: Operation timed out]
<ggole>
Gone long?
pootler_ has joined #ocaml
ousado has joined #ocaml
csakatoku has joined #ocaml
pootler has quit [Ping timeout: 264 seconds]
csakatoku has quit [Remote host closed the connection]
<MarcWeber>
Detecting compiler arguments: FAILED (see the file ocargs.log for details)
<MarcWeber>
Detecting compiler arguments: FAILED (see the file ocargs.log for details)
<MarcWeber>
The external function `thread_wait_write' is not available
Drup has quit [Quit: Leaving.]
Drup has joined #ocaml
Kakadu has quit []
sgnb has quit [Ping timeout: 252 seconds]
<flux>
ggole, gone long off irc? no :)
bkpt has joined #ocaml
bkpt has quit [Client Quit]
introom has quit [Remote host closed the connection]
bkpt has joined #ocaml
<MarcWeber>
scheduler.o seems to contain it - why might this be happening when configuring findlib?
dezzy has quit [Remote host closed the connection]
<ggole>
(They way their docs delegate through four or five layers gets pretty old though.)
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 256 seconds]
eikke has quit [Ping timeout: 248 seconds]
eikke has joined #ocaml
Su-Shee has joined #ocaml
eikke has quit [Ping timeout: 264 seconds]
ggole has quit []
breakds has quit [Quit: Konversation terminated!]
Anarchos has joined #ocaml
<Anarchos>
how can i trigger a full major collection inside the Alloc_small macro ?
eikke has joined #ocaml
<gasche>
Anarchos:
<gasche>
Alloc_small can call a minor cycle that calls a slice of major cycle, that can trigger heap compaction that finishes the major cycle
Kakadu has quit [Remote host closed the connection]
ollehar has joined #ocaml
<Anarchos>
gasche i want to force a full major (i need to track a dangling pointer)
ttamttam has joined #ocaml
<wmeyer>
gasche: thank you. Reposted.
Snark has quit [Quit: leaving]
eikke has quit [Ping timeout: 260 seconds]
csakatoku has joined #ocaml
<wmeyer>
pippijn: that's not terribly bad, but not brilliant either.
<wmeyer>
pippijn: can you produce trace, maybe some of the results are not memoized.
csakatoku has quit [Ping timeout: 256 seconds]
ontologiae_ has joined #ocaml
<MarcWeber>
http://dpaste.com/1285050/ which section of the manual to read to understand what to open so that line 23's type t's file_name is known at line 5?
mlh has quit [Ping timeout: 256 seconds]
mlh has joined #ocaml
mort___ has joined #ocaml
ttamttam has quit [Remote host closed the connection]
hto has quit [Ping timeout: 248 seconds]
osnr has quit [Read error: Connection reset by peer]
pootler has joined #ocaml
gautamc has quit [Ping timeout: 260 seconds]
sgnb has joined #ocaml
kanibe has joined #ocaml
kanibe has quit [Client Quit]
yezariaely has joined #ocaml
hto has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<yezariaely>
when installing opam-full-1.0.0 from source it requires react?! is this normal?
csakatoku has joined #ocaml
<Anarchos>
yezariaely no idea
<yezariaely>
is there any way to install it on a 32 bit system but from source?
<travisbrady>
Anyone worked much with Jenga yet?
csakatoku has quit [Ping timeout: 256 seconds]
<Anarchos>
travisbrady no
raichoo has quit [Quit: leaving]
<nicoo>
travisbrady: I played with it a lot when I was young :3
Arsenik has quit [Remote host closed the connection]
willb1 has quit [Ping timeout: 252 seconds]
willb1 has joined #ocaml
<pippijn>
should the stubs library be linked against some ocaml runtime library so that caml_modify etc. are resolved?
<gasche>
pippijn: lasmrun?
<pippijn>
asmrun is non-PIC
<pippijn>
so the dll can't be linked against it
<pippijn>
there is an asmrunp, which also seems to be non-PIC
<pippijn>
/usr/bin/ld: /usr/lib/ocaml/libasmrunp.a(fail.p.o): relocation R_X86_64_32 against `caml_exn_Failure' can not be used when making a shared object; recompile with -fPIC
<gasche>
pippijn: you may need to build OCaml to produce a position-independent runtime
<gasche>
I'm not sure whether that's the default or not nowadays
<pippijn>
ok
<pippijn>
I won't, then
<pippijn>
I'll just link with missing symbols
<pippijn>
on linux, that works fine
<pippijn>
on windows, everything is PIC
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 246 seconds]
osa1 has quit [Quit: Konversation terminated!]
mort___ has quit [Quit: Leaving.]
eikke has joined #ocaml
Simn has quit [Quit: Leaving]
smondet has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
zpe_ has quit [Remote host closed the connection]
osnr has quit [Quit: Leaving.]
beckerb has quit [Ping timeout: 245 seconds]
csakatoku has joined #ocaml
pootler has quit [Quit: leaving]
csakatoku has quit [Ping timeout: 256 seconds]
travisbrady has quit [Quit: travisbrady]
zpe has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
pootler has joined #ocaml
pootler_ has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
eikke has quit [Ping timeout: 276 seconds]
<pippijn>
wmeyer: with 1791 directories, omake needs about 1 second to read the makefiles if they don't actually do anything
breakds has joined #ocaml
ontologiae_ has quit [Ping timeout: 246 seconds]
pootler_ has quit [Ping timeout: 246 seconds]
pootler has quit [Ping timeout: 264 seconds]
pootler has joined #ocaml
pootler_ has joined #ocaml
<wmeyer>
pippijn: have you generated the project to measure the performance? Or maybe it's all of your projects collated?
<pippijn>
it's all my projects
<pippijn>
not all, but the majority of them
zpe has joined #ocaml
<wmeyer>
that's a great deal of code!
<pippijn>
not really
<pippijn>
I have hundreds of tests, each in a directory
<wmeyer>
I remember cpapa frontend
<wmeyer>
i cherish it :-)
<pippijn>
heh
<pippijn>
yeah, cpapa
<wmeyer>
it was good.
* wmeyer
have to go to bed
<pippijn>
good night
<wmeyer>
night
emmanuelux has quit [Remote host closed the connection]
travisbrady has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
mfp has quit [Ping timeout: 252 seconds]
ollehar has quit [Read error: Operation timed out]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
mfp has joined #ocaml
cdidd has quit [Read error: Connection reset by peer]
cdidd has joined #ocaml
zpe has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
jonafan has quit [Read error: Operation timed out]
jonafan has joined #ocaml
dfarmer has joined #ocaml
Arthur_ has quit [Read error: Connection reset by peer]
Arthur_ has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
<pippijn>
wmeyer: I can't have autodetection of language used in a target
<pippijn>
wmeyer: because I need to know in advance which C libraries, which OCaml libraries, etc. are built in the project
<pippijn>
wmeyer: I need to scan the makefiles before everything, so I know what is built, so that packages are looked up correctly (for dependencies within the project)
<pippijn>
wmeyer: I need to do that before omake knows anything about targets, because then it's too late
<pippijn>
in fact, omake is a little stupid
<pippijn>
the problem is that after a makefile is completely parsed, all dependencies must have been resolved
<pippijn>
because the pattern rules need to know about them
<pippijn>
they need to depend on them
<pippijn>
I really need to write an email to the authors of omake..
<pippijn>
there is so much I need that omake can't do :(