flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
<amiller_> bah, except that it does not support any 'remove'
oriba has quit [Quit: oriba]
osnr2 has quit [Quit: Leaving.]
q66 has quit [Quit: Leaving]
thelema has quit [Read error: Connection reset by peer]
thelema has joined #ocaml
<pippijn> how does ocamlbuild name its executables on windows?
<pippijn> name.native.exe?
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
weie_ has joined #ocaml
weie has quit [Ping timeout: 256 seconds]
osnr has quit [Ping timeout: 246 seconds]
pkrnj has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
Arthur_ has joined #ocaml
alxbl has quit [Read error: Connection reset by peer]
lasts has quit [Ping timeout: 264 seconds]
emmanuel__ has joined #ocaml
emmanuelux has quit [Ping timeout: 268 seconds]
breakds has quit [Quit: Konversation terminated!]
csakatoku has joined #ocaml
breakds has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
Watcher7|off is now known as Watcher7
emmanuel__ has quit [Remote host closed the connection]
introom has joined #ocaml
structuralist has joined #ocaml
darkf has joined #ocaml
ygrek has joined #ocaml
breakds has quit [Quit: Konversation terminated!]
Neros has quit [Ping timeout: 252 seconds]
Drup has quit [Quit: Leaving.]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
talzeus has joined #ocaml
talzeus has quit [Remote host closed the connection]
structuralist has quit []
introom has quit [Remote host closed the connection]
introom has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
<bobry> Is it possible to make this work? http://paste.in.ua/8415 The problem is: type parameter 'a is unbound in 'with type elt = 'a'
snyp has joined #ocaml
<snyp> #load "mymodule.cmo" isn't working. It's saying - Unbound value load.
<MarcWeber> bobry: Try adding a type parameter to Categorical? Set and Map could be nice examples (I may be wrong)
<bobry> MarcWeber: you mean I should make Categorical a functor?
<bobry> I'll look at Set and Map, thanks for the pointer
walter|rtn has quit [Read error: Connection reset by peer]
walter has joined #ocaml
<snyp> ...
<bobry> snyp: which version of OCaml are you using?
<snyp> 4.00.1
<bobry> also, do you add ;; after "mymodule.cmo"?
<snyp> yes.
<snyp> the problem is that load function is unbound..
<bobry> hrm, maybe you have 'load' function in mymodule?
<snyp> er.. isn't load the standard function used to load modules?
<snyp> in the repl
<bobry> it is, I thought maybe the error is about your load function
<bobry> which you might've defined in 'mymodule.ml'
<snyp> there are 2 records in mymodule.ml
<snyp> record types declarations*. no functions
<snyp> i compile with -c
<bobry> ah, I think -c doesn't support toplevel directives
<bobry> you should just run 'ocaml mymodule.ml'
<bobry> without the -c
<snyp> bobry, i want to use the types and functions I define in a .ml file and play with them in the repl. how can i do that?
<MarcWeber> snyp: open is used to make things defined in "modules" accessible AFAIK.
<bobry> snyp: sorry, I misunderstood you, so you compile your module to byte code, but when you try to load it in the repl you get "load unbound" error?
<snyp> MarcWeber, i cannot actually *load* the modules in the first place..
<snyp> bobry, yes
<bobry> have you tried other toplevel commands? http://caml.inria.fr/pub/docs/manual-ocaml/manual023.html
<bobry> is #load the only one _not_ working?
<MarcWeber> snyp: file mymodule.cmo ?
<snyp> #open is possbly defined (bound) but it gives me a syntax error. MarcWeber f.cmo: OCaml object file (.cmo) (Version 007)
<MarcWeber> Should output something like "matcher.cmo: OCaml object file (.cmo) (Version 007)"
<snyp> the filename is f.ml
<snyp> yea
<MarcWeber> "open f" ?
<MarcWeber> That failes?
ygrek has quit [Remote host closed the connection]
<snyp> yea : syntax error
<bobry> open F
ygrek has joined #ocaml
<bobry> module names should be uppercased
<snyp> i see
* MarcWeber is still not experienced ..
<MarcWeber> and eventually should shut up :)
<snyp> k working
<snyp> :)
<snyp> open F;;
<snyp> thank you
<snyp> damn. open F;; F is undefined. :|
<snyp> Error: Reference to undefined global `F'
<snyp> this is the file
<snyp> i can't use the map function or any function
<MarcWeber> Either use F.map or open F; map
<snyp> MarcWeber, open F;; map (fun x -> x + 1) [1;2;3];; Error: Reference to undefined global `F'
<snyp> when was ocaml last updated?
<MarcWeber> snyp: I can offer you SSH acccess to my server so that we can try wether the problems are gone there
<snyp> um.. i can't ssh. can you compile the file and try using it yourself?
<MarcWeber> If you paste it, then yes.
<snyp> try using map on line 15
<MarcWeber> I can reproduce it
<snyp> You get the same error?
<snyp> load is unbound? >.>
<MarcWeber> Error: Reference to undefined global `F'
<snyp> you compiled it to F.cmo?
<MarcWeber> #load "f.cmo";; works (no errors)
<MarcWeber> but map is still not bound
<snyp> hmm i have found the prob i think. i probably need to name it F.cmo
<snyp> ha
<snyp> dammit my load is unbound still.
<snyp> this is a bug i think
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 260 seconds]
<snyp> MarcWeber, what version of ocaml are you on?
ggole has joined #ocaml
<MarcWeber> 4.00.1 - but I couldn't make your example work, neither by uppercasing .cmo, neither by #load
<snyp> i see
<MarcWeber> snyp: I recommend writing your own very simple makefile and making your editor run it.
<MarcWeber> That's very fast, too
<MarcWeber> Or wait till somebody replies who knows how to do it ..
<ggole> snyp: if you want to play with the definitions in a file in a toplevel, either start the toplevel and then #load "file.cmo", or start the toplevel with ocaml file.cmo
<snyp> ggole, that works!
<snyp> ggole, the latter one i mean. #load doesn't work. Is load part of some module Load.load? anyway I will just ocaml F.cmo
<ggole> #load is built in functionality of the toplevel afaik
<ggole> It's not ocaml code
<snyp> ggole, oh i see.
<ggole> It shouldn't be missing though... are you typing the #?
<snyp> no....
<snyp> it works with #.
<ggole> That would probably be the problem :)
<snyp> xD
<snyp> i thought the # is the prompt
<snyp> which is alredy there
<ggole> No, it indicates a toplevel directive
<ggole> There's some simple facilities for printing, etc
<snyp> ah.
<snyp> i see. thanks for the help. i will learn me some more ocaml now. bbl.
snyp has quit [Quit: Leaving]
<ggole> Hmm, maybe he is used the the # in some shells?
talzeus has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
<adrien> cthuluh: thankes! for bigarray, maybe it's not available on openbsd? (that should be visible in configure's output)
<adrien> morning
yacks has quit [Ping timeout: 252 seconds]
talzeus has quit [Remote host closed the connection]
yacks has joined #ocaml
<cthuluh> adrien: it is
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 256 seconds]
Watcher7 is now known as Watcher7|off
thomasga has joined #ocaml
thomasga has quit [Client Quit]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
ygrek has joined #ocaml
raichoo has joined #ocaml
sgnb has quit [Remote host closed the connection]
ocp has joined #ocaml
sgnb has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
cago has joined #ocaml
mika1 has joined #ocaml
mika1 has quit [Client Quit]
mika1 has joined #ocaml
mcclurmc has joined #ocaml
Simn has joined #ocaml
yacks has quit [Ping timeout: 276 seconds]
yacks has joined #ocaml
dezzy has quit [Quit: leaving]
ontologiae_ has joined #ocaml
osnr has quit [Quit: Leaving.]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ocp has quit [Quit: Leaving.]
dezzy has joined #ocaml
dezzy has quit [Changing host]
dezzy has joined #ocaml
ollehar has joined #ocaml
ocp has joined #ocaml
ttamttam has joined #ocaml
chrisdotcode has quit [Ping timeout: 248 seconds]
thelema has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
gasche_ has joined #ocaml
gasche has quit [Remote host closed the connection]
thelema has joined #ocaml
beckerb has joined #ocaml
introom has quit [Ping timeout: 256 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
osnr has quit [Quit: Leaving.]
testcocoon has joined #ocaml
Kakadu has joined #ocaml
ocp has quit [Ping timeout: 246 seconds]
chrisdotcode has joined #ocaml
ygrek has quit [Ping timeout: 276 seconds]
introom has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
chrisdotcode has quit [Ping timeout: 246 seconds]
ttamttam has quit [Quit: ttamttam]
gautamc has quit [Read error: Connection reset by peer]
gautamc has joined #ocaml
yroeht has quit [Ping timeout: 245 seconds]
malo has joined #ocaml
introom_ has joined #ocaml
introom has quit [Ping timeout: 256 seconds]
gasche has joined #ocaml
gasche_ has quit [Quit: leaving]
kanibe has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
skchrko has quit [Quit: Leaving]
osnr has quit [Ping timeout: 240 seconds]
zpe has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
zpe has joined #ocaml
ygrek has joined #ocaml
zpe has quit [Remote host closed the connection]
Neros has joined #ocaml
zpe has joined #ocaml
dsheets has joined #ocaml
zpe has quit [Remote host closed the connection]
osnr has joined #ocaml
osnr has quit [Ping timeout: 256 seconds]
Drup has joined #ocaml
introom_ has quit [Remote host closed the connection]
introom has joined #ocaml
zpe has joined #ocaml
skchrko has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
eikke has joined #ocaml
kanibe has quit [Quit: Leaving]
yroeht has joined #ocaml
<bobry> Why can't I substitute a polymorphic type into module signature? http://paste.in.ua/8419/
ollehar has quit [Ping timeout: 256 seconds]
ollehar has joined #ocaml
<gasche> bobry: what is (with type t := 'a) supposed to mean? where is ('a) defined?
_andre has joined #ocaml
<gasche> when one speak of the type ('a -> 'a), what this usually mean is that 'a is (implicitly) universally quantified: (forall 'a, 'a -> 'a)
<gasche> but here you probably do not mean (type t = forall 'a, 'a)
<gasche> so where is 'a bound?
<ggole> module Foo needs a type t, too
<gasche> (if you meant (forall 'a, 'a) you could encode that)
<bobry> hm, actually, what I need is forall 'a, 'a
<bobry> how can I encode that?
<gasche> type void = { absurd : 'a . 'a }
<gasche> (explicit first-class quantification is available in record fields and object methods)
<gasche> I find surprising that this is what you want, as it doesn't seem very useful
<bobry> Hm, probably that's not what I want. Here's a full story: I have a generic signature for discrete distributions, which has two types t -- for the distribution, elt -- for the type of the random variable. I want to encode a categorical distribution over some arbitrary type 'a, which is a discrete distribution. Here's the code: http://paste.in.ua/8421
<gasche> so that will not work
<gasche> that's an issue in OCaml which has two form of type abstraction, through parametrized types and through functors
<gasche> in DiscreteDistribution, "t" has arity 0, you cannot instantiate it with a type of arity 1
<gasche> you could make Categorical a functor over an arity-0 type named "a"
<gasche> module Categorical (A : sig type a end) = sig ... val create : (a * float) list -> a t end
<gasche> or you could plan in avance in DiscreteDistribution for the fact that you want your type to actually be parametrized
breakds has joined #ocaml
q66 has joined #ocaml
<bobry> I see, that's what I came up with, actually. But I thought there's an alternative solution, thank you, gasche :)
eikke has quit [Ping timeout: 264 seconds]
eikke has joined #ocaml
Drup has quit [Ping timeout: 256 seconds]
<ggole> gasche: btw, I found another solution to my subtyping-with-GADTs problem
<ggole> Although it is remarkably ugly
<ggole> It involves introducing one GADT parameter per subset
<adrien_oww> wmeyer, gasche : any news about the jenkins builds?
<gasche> adrien_oww: some went back to normal, other did not
<gasche> all Windows builds are now OK
<gasche> the OpenBSD build is still broken, I think
<gasche> note that I haven't followed what was or was not committed yesterday; maybe your openBSD Makefile patch didn't get in?
hyperboreean has quit [Quit: leaving]
hyperboreean has joined #ocaml
<adrien_oww> ok, good to hear
<adrien_oww> the openbsd patch didn't get in
<adrien_oww> it's on the BT if you want (http://caml.inria.fr/mantis/view.php?id=5737#c9658)
<gasche> ok
<gasche> adrien_oww: I'm committing
Simn is now known as Simn|gone
<gasche> I'll tell you when the dameon tries a build
<adrien_oww> thanks
Yoric has joined #ocaml
<gasche> Yoric: I'm working on a presentation for OUPS about Batteries
<Yoric> cool :)
<gasche> the idea being to focus on the interesting tidbits in the code or development process that people could reuse
Drup has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Ping timeout: 252 seconds]
Watcher7|off is now known as Watcher7
ttamttam has joined #ocaml
<gasche> adrien_oww: openbsd build fixed
<gasche> ( wmeyer : you're welcome )
<adrien_oww> thanks :-)
Simn|gone is now known as Simn
thizanne is now known as Xhtml_Boys
Xhtml_Boys is now known as thizanne
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
contempt has quit [Ping timeout: 248 seconds]
contempt has joined #ocaml
osnr has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 240 seconds]
introom has quit [Remote host closed the connection]
introom has joined #ocaml
introom has quit [Remote host closed the connection]
introom has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
ygrek has joined #ocaml
ollehar has joined #ocaml
osnr has quit [Ping timeout: 260 seconds]
ollehar has quit [Ping timeout: 268 seconds]
introom has quit [Remote host closed the connection]
amiller_ is now known as amiller
amiller has quit [Changing host]
amiller has joined #ocaml
zpe has quit [Remote host closed the connection]
breakds has quit [Quit: Konversation terminated!]
introom has joined #ocaml
zpe has joined #ocaml
diml has quit [Ping timeout: 241 seconds]
diml has joined #ocaml
kaustuv has joined #ocaml
raichoo has quit [Quit: leaving]
ollehar has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
zpe has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 264 seconds]
ollehar has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
osa1 has joined #ocaml
diml has quit [Ping timeout: 252 seconds]
<kaustuv> Why do I need to give access to all my public github repositories if I want to check out the RWO beta version?
<kaustuv> Is it just a quirk of github's "app" system?
kaustuv has left #ocaml []
cago has left #ocaml []
mika1 has quit [Quit: Leaving.]
ggole has quit [Ping timeout: 252 seconds]
Armael is now known as \_o[-
\_o[- is now known as Armael
hkBst has quit [Quit: Konversation terminated!]
thomasga has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<pippijn> why is ocamljava no longer being developed?
ggole has joined #ocaml
<adrien_oww> ?
zpe has quit [Remote host closed the connection]
eikke has quit [Ping timeout: 264 seconds]
<dsheets> pippijn, it is?
chrisdotcode has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
darkf has quit [Quit: Leaving]
zpe has joined #ocaml
introom has quit [Remote host closed the connection]
diml has joined #ocaml
thomasga has quit [Quit: Leaving.]
raichoo has joined #ocaml
zpe has quit [Remote host closed the connection]
chrisdotcode has quit [Quit: No Ping reply in 180 seconds.]
chrisdotcode has joined #ocaml
ttamttam has quit [Quit: ttamttam]
justdit has joined #ocaml
chrisdotcode has quit [Client Quit]
breakds has joined #ocaml
justdit has quit [Ping timeout: 240 seconds]
pango_ has joined #ocaml
ulfdoz has joined #ocaml
pango has quit [Ping timeout: 256 seconds]
tane has joined #ocaml
pango_ is now known as pango
ontologiae_ has quit [Ping timeout: 246 seconds]
mcclurmc has quit [Ping timeout: 256 seconds]
emmanuelux has joined #ocaml
justdit has joined #ocaml
Drup has quit [Ping timeout: 264 seconds]
UncleVasya has joined #ocaml
montik_ has joined #ocaml
montik has quit [Ping timeout: 241 seconds]
osa1 has quit [Read error: Operation timed out]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Read error: Connection reset by peer]
osa1 has joined #ocaml
raichoo has quit [Quit: leaving]
montik has joined #ocaml
montik_ has quit [Ping timeout: 248 seconds]
zpe has joined #ocaml
zpe has quit [Read error: Operation timed out]
Drup has joined #ocaml
<wmeyer> adrien: I sent an email yesterday concerning jenkins straight away, it looked good in short, I hope you got these emails. Now that I can spawn builds myself, we can have more streamlined flow.
<adrien> hmm, not sure I got it; going to check in a few minutes
<adrien> I'm going to upload a fixed version of the patch; I've made world.opt and ran the testsuite (everything passed) on both linux64 and mingw64 (32b)
<wmeyer> adrien: great
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
tane has quit [Read error: Connection reset by peer]
tane has joined #ocaml
Anarchos has joined #ocaml
Yoric has joined #ocaml
dsheets has quit [Read error: Operation timed out]
ollehar has joined #ocaml
<adrien> ready to make everything explode again :P
<Anarchos> adrien how ?
ggole has quit [Ping timeout: 248 seconds]
<adrien> Anarchos: patches to make ocaml a cross-compiler
<Anarchos> adrien oh ok.
<Anarchos> adrien could be nice indeed :)
<adrien> I managed to break 6 of the 7 jenkins build slave for ocaml this week-end
<avsm> adrien: really looking forward to using this though; i need to cross compile to MIPS64 soon
<adrien> after this batch there will only be 10 patches left out of 40 or so
<Anarchos> adrien oh you use jenkins ?
<adrien> but these are not as simple
<adrien> Anarchos: no, I don't
<adrien> I might look at what someone is going to do at work but so far I have 0 experience with it
<pippijn> oh
<pippijn> it is?
<adrien> ocamljava?
<pippijn> yes
<adrien> still being worked on; at a fairly slow pace but definitely not stalled
<pippijn> ok, that's nice
justdit has quit [Ping timeout: 246 seconds]
beckerb has quit [Ping timeout: 245 seconds]
dsheets has joined #ocaml
<adrien> I don't understand how building with -no-camlp4 gives me the same build times as building with camlp4
* Anarchos is still working on his interfacing BeOS<->OCaml :))
ttamttam has joined #ocaml
<pippijn> what does this error mean: https://paste.xinu.at/nOtK2/
<Anarchos> pippijn no implementation provided
<Anarchos> pippijn you may have linked a .mli file without the .ml
<pippijn> does that mean that the cmx is not in the cmxa?
<Anarchos> i would say the cmx but not the cmi
<pippijn> the cmi needs to be in the cmxa?
<pippijn> for instance:
<pippijn> $ ocamlobjinfo ../qtsmoke/qtsmoke.cmxa | grep 'Name: QFrame'
<pippijn> Name: QFrame
<MarcWeber> How to match record fields and the record at the same time such as f a@{a = avar; b = bvar} ?
<pippijn> doesn't that mean it's in there?
<pippijn> also, look
<orbitz> MarcWeber: 'with' i think
<pippijn> it says QtGui referenced from QCoreApplication
<pippijn> and then it says QCoreApplication referenced from QApplication
<pippijn> how is that possible?
<pippijn> QCoreApplication references something, but supposedly doesn't exist
<MarcWeber> orbitz: match x with .. ? looks like its closest
* orbitz was tempted today to make a little widget set in pure Ocaml (well, mostly pure Ocaml)
<orbitz> ohh it's as
<orbitz> MarcWeber: match x with | (x, y) as xy -> ...
ttamttam has left #ocaml []
UncleVasya has quit [Remote host closed the connection]
<MarcWeber> let add x d { cmp = cmp; map = map} as m =
<MarcWeber> syntax error.
<MarcWeber> So i'll stick to the let f m = match m with { record fields ... } syntax
mcclurmc has joined #ocaml
thomasga has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
<orbitz> MarcWeber: ()
<pippijn> mcclurmc: ({ .. } as m)
<pippijn> oh
<pippijn> MarcWeber: ^
<Simn> the precedence of "as" always gets me
ocp has joined #ocaml
<orbitz> yes it's very funny
<orbitz> i remember i had a really weird one where I was doing (x, y as xy) and coudln't understand whythe type of xy was not a tuple
<adrien> wmeyer: hmm
<wmeyer> hi adrien, just spawned testing, let's see
<adrien> openbsd is likely to fail
<adrien> remember when I said you had used a gnu-ism in the makefile? well, you did but it was commented out
<wmeyer> Ok, will fix it
<adrien> and I uncommented it
<adrien> it's +ifeq ($(OCAMLBUILD_NOBOOT),"yes")
* adrien needs some sleep
<wmeyer> the thing is, we should not make openbsd failing
<pippijn> is there anything wrong with ocamlopt dir1/foo.cmx dir2/bar.cmx -a -o foobar.cmxa?
<orbitz> can't you just change it to GNUMakefile and use gmake instead?
<adrien> wmeyer: this one is less trivial to fix unfortunately
<adrien> pippijn: I think the search path will be wrong
<pippijn> search path?
<adrien> orbitz: well, it's tempting but it's probably doable without breaking compat
<orbitz> symlink! :
<orbitz> :)
<pippijn> everything can be done with posix make
<wmeyer> adrien: did you see this: http://slexy.org/view/s2GEV3C5TO
<wmeyer> it's Linux
<wmeyer> ah all the builds fail
<adrien> sometimes I feel like packing and moving to a desert island without capricious computers
<wmeyer> we have to fix today I am afraid
<wmeyer> or revert the commits
<adrien> I hadn't seen that
<wmeyer> try a clean build out of fresh checkout
<adrien> how do you access the slaves? I can see the list but not the details
<pippijn> what search path?
<wmeyer> pippijn: -I switch
<adrien> pippijn: cmi/cmx search path
<adrien> pippijn: how do you do conditionals with posix make?
<adrien> conditional deps, conditional rules
speredenn has joined #ocaml
<wmeyer> adrien: are you able to reproduce this build failure?
<pippijn> adrien: what does it depend on?
<pippijn> an env-var?
<pippijn> then you use sed(1)
<pippijn> there are conditionals in various make flavours, but not in posix make
<pippijn> the standard is a minimal subset of all makes
<adrien> wmeyer: yes, I am
<adrien> pippijn: so you can't do it with posix make
<pippijn> you can make a makefile that makes other makefiles
<adrien> you run a script that edits your makefile
<wmeyer> adrien: are you able to figure out how to fix it?
<pippijn> that script is a makefile, yes
<wmeyer> the cross-compilation patches is hard work!
<adrien> looking into it
<wmeyer> thx
<wmeyer> let me know when you are done
<pippijn> I found that with a slightly more complex build process, writing maintainable as well as portable makefiles becomes an impossible task
<pippijn> cross compilation, compiler bootstrapping, etc. all add to complexity
<pippijn> at some point, I found the best way is to generate the makefiles
<pippijn> no make-time dependencies on env-vars
<pippijn> split it into generating makefiles and running them
<pippijn> the generated makefile can update itself if it notices that the relevant environment changed
<pippijn> so, you can't have subdir objects with ocaml?
<pippijn> how does oasis do that with subdirs? does it copy/link the cmxes?
<pippijn> to a flat directory
<adrien> grah, I borked one of the patch
<adrien> answer in 3 minutes
<wmeyer> adrien: no worry I think I need another cup of tea tonight :-)
<adrien> if it's what I believe, I left out half of the patch...
<avsm> wmeyer: any chance you could merge that short-paths in 4.01? need to update the book ibstructions
<wmeyer> avsm: yes! I meant to do it yesterday.
metasyntax has quit [Read error: Connection reset by peer]
<avsm> thanks!
metasyntax has joined #ocaml
_andre has quit [Quit: leaving]
<adrien> wmeyer: yeah, issue is that I fscked up my git rebase
<adrien> I'd quite likely rewrite the SVN history
osnr has quit [Quit: Leaving.]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<wmeyer> avsm: done. Also keep an eye on labeling PR# in the commit message
<wmeyer> adrien: please submit a patch against the trunk
snearch has joined #ocaml
<adrien> wmeyer: it's a revert of the revert
<adrien> I worked in a tree that didn't have the revert =/
<adrien> how do you prefer to do it?
<wmeyer> just submit a patch against the tip!
<wmeyer> that fixes it
<vext01> avsm: howdy
<adrien> building once more just to be sure
zpe has joined #ocaml
<ollehar> I'm confused
<ollehar> say we have a base module M with type t and a make function M.make : unit -> t
<ollehar> we include it in modules A and B, so each get its own make
<ollehar> let a = A.make ()
<ollehar> let b = B.make()
<ollehar> now, if a do
<ollehar> let l = [a;b], both types will have type A.t!
<ollehar> *now, if I do
skchrko has quit [Quit: Leaving]
HaikuUser has joined #ocaml
osnr has quit [Quit: Leaving.]
<wmeyer> adrien: how is the patch?
<ollehar> similary, this won't compile:
<ollehar> # module M = struct
<ollehar> type t = int
<ollehar> end
<ollehar>
<ollehar> module A = struct
<ollehar> include M
<HaikuUser> I made progress on my C++ multitasking library interfacing with haiku :)
<ollehar> type t' = private t
<ollehar> let compute (t : t') =
<ollehar> t + 1
<ollehar> end
<ollehar> Error: This expression has type t' but an expression was expected of type int
ocp has quit [Read error: Operation timed out]
<adrien> wmeyer I've added a note; is it enough?
<adrien> (there should be enough info)
<HaikuUser> ollehar my opinion is that because you declare t' private, you cant access the concret type which appears to be int
<ollehar> HaikuUser: but why? maybe this is worth a stackoverflow thread :|
HaikuUser is now known as Anarchos
<Anarchos> ollehar you should read the doc about private types i guess
willb1 has joined #ocaml
<ollehar> Anarchos: yeah
Yoric has quit [Ping timeout: 248 seconds]
breakds has quit [Quit: Konversation terminated!]
<wmeyer> adrien: please attach patch against the trunk, I don't want to rely on instructions, it's best to diff against the tip, and comment it "this fixes build problems introduced by previous commits"
<adrien> wmeyer: ok
<wmeyer> thanks!
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
weie_ has quit [Read error: Connection reset by peer]
weie has joined #ocaml
osnr has quit [Client Quit]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
gautamc has quit [Read error: Connection reset by peer]
gautamc has joined #ocaml
<adrien> wmeyer: I've edited my last comment on the bugtracker; building once more here
<adrien> I'm getting fairly tired so build on your machine too since I could have made a stupid mistake
thomasga has quit [Quit: Leaving.]
Netfeed has left #ocaml []
<adrien> built and installed
<adrien> good night
<wmeyer> night :-)
zpe has quit [Remote host closed the connection]
<wmeyer> adrien: I did build on my machine, but maybe not a fresh checkout
structuralist has joined #ocaml
tane has quit [Quit: Verlassend]
contempt has quit [Remote host closed the connection]
contempt has joined #ocaml
<pippijn> adrien: ocamlfind ocamlopt -a foo/dir1/Moo.cmx foo/dir2/Cow.cmx -o foo/testlib.cmxa
<pippijn> adrien: ocamlbuild does this, so I guess it works fine?
<gasche> ollehar: private type must be used in signatures, not in implementations
ontologiae_ has joined #ocaml
bkpt has joined #ocaml
<ollehar> gasche: thanks, I realized
<pippijn> does anybody have an idea why linking might fail here: https://paste.xinu.at/2039/
Yoric has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
ocp has joined #ocaml
<ollehar> I'm guessing I can't "coerce back" a value, like
<ollehar> (a :> int)
<ollehar> and then
<ollehar> (a <: M.t)
<ollehar> ?
<pippijn> no
<pippijn> that would be bad
<ollehar> not if the compiler know that a was from M.t in the beginning
<ollehar> ?
<pippijn> why not use the original, then?
<ollehar> I might want them in a list [a;b], where b : B.t
<pippijn> and?
osnr has quit [Quit: Leaving.]
<ollehar> I'm sorry, it's for my "from java to ocaml"-blog :)
<ollehar> it's an example from java originally, using oo polymorphism
<ollehar> I'm just investigating OCaml's module possibilities from a java point of view
<ollehar> in java they do like
<ollehar> foreach elem in list do elem.compute()
<ollehar> where the elems in list are different subtypes
<ollehar> I know this is possible in OCaml with objects
<ollehar> so...
<pippijn> ah
<pippijn> you can't downcast in ocaml
<Anarchos> ollehar List.iterate (fun o ->o#compute() ) list_of_objects ?
ocp has quit [Ping timeout: 256 seconds]
<ollehar> Anarchos: yeah, I know
<ollehar> but objects in ocaml are so different from objects in java
<ollehar> they say it's better to start learning the module system first
<ollehar> depending on what you want/need to do, of course
<pippijn> I rarely find myself using objects
<Anarchos> ollehar well i think that objects are not so hard , just class types are hard to understand
<ollehar> Anarchos: that's a good point, you can use objects without classes in ocaml, too.
<Anarchos> ollehar thanks for the good point !!!
<ollehar> or maybe I just think modules are cooler than objects ;)
<Anarchos> ollehar well both have their use :)
speredenn has quit [Ping timeout: 264 seconds]
snearch has quit [Quit: Verlassend]
malo has quit [Quit: Leaving]
zpe has joined #ocaml
dsheets has quit [Ping timeout: 256 seconds]
zpe has quit [Ping timeout: 256 seconds]
<pippijn> so, this is my whole build process for a simple library: https://paste.xinu.at/3Yx/
<pippijn> and program that uses the library
<pippijn> oh wait
<pippijn> there
<Anarchos> pippijn did you consider ocamlbuild?
<pippijn> Anarchos: I have used it both intensively and extensively
<pippijn> oh
<pippijn> now I see
<pippijn> link order
emmanuelux has quit [Quit: emmanuelux]
kaustuv has joined #ocaml
<Anarchos> pippijn so could you solve your pbms ?
<pippijn> yes, I will
<pippijn> I know the reason, now
<pippijn> now I just need to fix it :)
<Anarchos> pippijn so what was it ?
<pippijn> link order
companion_cube has quit [Ping timeout: 252 seconds]
<MarcWeber> Which tools do you use to install libraries automatically?
<MarcWeber> eg merlin depends on yojson, menhir
<pippijn> opam?
<MarcWeber> thank
<rgrinberg> `opam install merlin` should be enough
<pippijn> Anarchos: yep, fixed
<Anarchos> pippijn nice !!
<pippijn> well
<pippijn> for the small library, it works now
<pippijn> for the big one, still not
<Anarchos> pippijn nice !!
<pippijn> but maybe now it does
<pippijn> the dependencies had not been rebuilt yet
<pippijn> yay
<pippijn> *** omake: done (59.37 sec, 218/276 scans, 694/1455 rules, 1125/4031 digests)
ollehar has quit [Ping timeout: 240 seconds]
<pippijn> next up: ocaml packs
companion_cube has joined #ocaml
<Anarchos> pippijn what is packing for ocaml ??
<pippijn> putting several modules into one big module
<pippijn> for example, if you have a Map, Set, Array, List module
<pippijn> you can put them into a Data pack
<Anarchos> ok ok
<Anarchos> is it really yseful ?
<pippijn> and client code will use it as Data.Map, Data.Set, ...
<pippijn> yes, very
<pippijn> for me, it is very useful
<Anarchos> pippijn have you sampels of real uses ?
<pippijn> because I have several smaller libraries that all have a module called "Options"
<pippijn> in which they describe their command line arguments
<pippijn> within the library, the module is called Options
ontologiae_ has quit [Ping timeout: 248 seconds]
<pippijn> if you want to look at it from outside the library, you get Cc.Options, Glr.Options, Grammar.Options, etc.
<pippijn> it's an alternative to prefixing all your modules with the library name
<pippijn> and I think it's cleaner
<pippijn> and you can do open Glr and get all the modules from that pack in your namespace
<pippijn> but you have the choice, you don't need to see all those modules when linking against a library
<Anarchos> ok ok
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
troydm has quit [Ping timeout: 248 seconds]
troydm has joined #ocaml
ygrek has joined #ocaml
eikke has joined #ocaml
q66 has quit [Quit: Leaving]