<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..
<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?
<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?
<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 :))
<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