<travisbrady>
How do I handle type specific operators like +. when extending a functor via include Map.Make(Ord)?
travisbrady has quit [Quit: travisbrady]
ccasin has joined #ocaml
travisbrady has joined #ocaml
mjonsson has joined #ocaml
ccasin has quit [Quit: Leaving]
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
<travisbrady>
anyone have pointers on how arithmetic is handled in a functor? Do I have to use Num?
pad has quit [Remote host closed the connection]
segmond has joined #ocaml
<thelema>
travisbrady: you can use integers in a functor as normal
<thelema>
if you want to add two values of a type from your functor parameter, you should pass an addition function in your functor as well
<travisbrady>
thelema: ahh thank you. I'd have to define a new module sig for that including the addition function right?
<thelema>
yes, but you can include the old module type easily
<thelema>
why do you want to do math on arbitrary types?
jeddhaberstro has quit [Quit: jeddhaberstro]
<travisbrady>
thelema: well, they're not abitrary, for now only floats so I just did this "module type FloatOrdType = sig val compare: float -> float -> int end"
<thelema>
in that case, the module knows they're floats and can use +., etc
travisbrady has quit [Read error: Connection reset by peer]
travisbrady has joined #ocaml
oc13 has joined #ocaml
<mrvn>
Too bad you can't declare a poly-monomorphic type.
<mrvn>
val ( + ) : int -> int -> int | float -> float -> float would be nice.
<mrvn>
or 'a. 'a -> 'a -> 'a constraint 'a = int | float
<mrvn>
Nice. Sounds a bit though as if it will do runtime type checks.
<thelema>
I've been tempted to hack ocamlc to tag all values with their type, so many things become possible
<mrvn>
I just want it to compile let foo x y = x + y into let foo_int x y = x + y let foo_float x y = x +. y.
<thelema>
and have both [foo 2 3] and [foo 2. 3.] work, yes...
<thelema>
but the type of [bar x y = foo x y] becomes complicated
<mrvn>
yep. bar a b c d = foo (foo a b) (foo c d) even more so
<mrvn>
or bar (a,b) (c,d) = (foo a c, foo b d)
<mrvn>
That gives you bar_int_int, bar_int_float, bar_float_int, bar_float_float
Skolem has joined #ocaml
ttamttam has joined #ocaml
Skolem has quit [Quit: Skolem]
ttamttam has quit [Ping timeout: 276 seconds]
ttamttam has joined #ocaml
ulfdoz has joined #ocaml
segmond has quit [Ping timeout: 248 seconds]
Associat0r has joined #ocaml
bluestorm has joined #ocaml
fraggle_ has quit [*.net *.split]
ikaros has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
fraggle_ has joined #ocaml
ygrek has joined #ocaml
ttamttam has quit [Ping timeout: 276 seconds]
danicampa90 has joined #ocaml
ttamttam has joined #ocaml
Shoggoth has joined #ocaml
ttamttam has quit [Ping timeout: 276 seconds]
det has quit [Remote host closed the connection]
danicampa90 has quit [Remote host closed the connection]
ikaros_ has joined #ocaml
ikaros has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
ikaros_ has quit [Ping timeout: 258 seconds]
Yoric has joined #ocaml
ikaros has joined #ocaml
sepp2k has joined #ocaml
Shoggoth has quit [Remote host closed the connection]
krankkatze has quit [Ping timeout: 264 seconds]
krankkatze has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
sepp2k has quit [Ping timeout: 245 seconds]
sepp2k has joined #ocaml
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
haelix has quit [Ping timeout: 258 seconds]
sepp2k has quit [Ping timeout: 245 seconds]
haelix has joined #ocaml
Dawrk-Side has joined #ocaml
Dawrk-Side has left #ocaml []
ttamttam has quit [Ping timeout: 276 seconds]
ygrek has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
danicampa90 has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
danicampa90 has quit [Quit: Ciao a tutti!]
Yoric has quit [Quit: Yoric]
oc13 has quit [Ping timeout: 240 seconds]
oriba has joined #ocaml
_unK has joined #ocaml
Shoggoth has joined #ocaml
lxnay|lappie has joined #ocaml
Shoggoth has quit [Remote host closed the connection]
ulfdoz_ has joined #ocaml
boscop_ has joined #ocaml
Dawrk-Side has joined #ocaml
boscop has quit [Ping timeout: 258 seconds]
ulfdoz has quit [Ping timeout: 248 seconds]
Dawrk-Side has left #ocaml []
Yoric has joined #ocaml
segmond has joined #ocaml
ulfdoz_ has quit [Quit: Reconnecting]
ulfdoz has joined #ocaml
waterChip has joined #ocaml
lxnay|lappie has quit [Ping timeout: 260 seconds]
lxnay|lappie has joined #ocaml
ikaros has joined #ocaml
lxnay|lappie has quit [Ping timeout: 240 seconds]
<hcarty>
gildor: That is certainly a disappointing response. Is there any way to work around this now, or do we need to wait for a new Camomile release (or modify Camomile manually)?
ftrvxmtrx has quit [Read error: Connection reset by peer]
<thelema>
hcarty: batteries as currently written contributes to this fiasco, as it just uses the default config of camomile with no option to point to a different dir
<hcarty>
thelema: Ok thanks.
<hcarty>
It sounds like, in the short term at least, the only real option is to recompile the software stack on each system
<thelema>
it should be sufficient to put camomile's datafiles in the same place, no?
<adrien>
shouldn't they be in /usr/share?
<thelema>
on my computer, the defaultconfig is for /use/local/share/camlmile/*
ftrvxmtrx has joined #ocaml
<hcarty>
thelema: I don't have admin access on both systems and I'm using GODI
<thelema>
it does depend on how the camomileDefaultConfig.ml gets generated
<hcarty>
The directory structure is, sadly, not easily replicable across the two systems
<thelema>
ok, so you need a runtime parameter to say where the camlmile folders are?
<hcarty>
thelema: Yes
<thelema>
environment variable?
<thelema>
command line argument?
<hcarty>
adrien: Ideally :-) Or /opt/godi/share/ or similar. But I can't do that (yet)
<hcarty>
thelema: Either
<hcarty>
Environment variable would be preferable
ikaros has quit [Quit: Leave the magic to Houdini]
avsm has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
<thelema>
hcarty: I just pushed a change that should (untested) try $CAMOMILE_BASE/* to look for camomile files
<hcarty>
thelema: Thanks, I should be able to try it out either this evening or tomorrow
<hcarty>
thelema: According to the Camomile author it sounds like it may not work until some changes are made to Camomile itself, due to automatic checks of the default path(s)
<hcarty>
thelema: But either way, thank you and I will test it. And if it works then Batteries should be ready to go once the fixed version of Camomile is released
<thelema>
yes, I don't know how hard camomile fails when trying to load its defaults
segmond has quit [Ping timeout: 245 seconds]
maskd has quit [Ping timeout: 264 seconds]
neorab has joined #ocaml
ztfw` has joined #ocaml
ztfw has quit [Ping timeout: 248 seconds]
ztfw` has left #ocaml []
sepp2k has joined #ocaml
waterChip has quit [Quit: waterChip]
oriba has quit [Ping timeout: 265 seconds]
waterChip has joined #ocaml
ttamttam has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
oriba has joined #ocaml
ikaros has joined #ocaml
ikaros_ has joined #ocaml
waterChip has quit [Quit: waterChip]
bluestorm has quit [Ping timeout: 245 seconds]
ttamttam has quit [Quit: Leaving.]
lxnay|lappie has joined #ocaml
boscop_ has left #ocaml []
boscop has joined #ocaml
<gildor>
hcarty: upstream of camomile told me that thing you'll be able to create your custom defaultconfig with camomile in the next release
bluestorm has joined #ocaml
avsm has quit [Quit: Leaving.]
oc13 has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
sepp2k has quit [Ping timeout: 240 seconds]
sepp2k has joined #ocaml
lxnay|lappie has quit [Ping timeout: 240 seconds]
LionMadeOfLions has joined #ocaml
elehack has joined #ocaml
neorab has quit [Quit: WeeChat 0.3.2]
neorab has joined #ocaml
LionMade1fLions has quit [Quit: leaving]
travisbrady has joined #ocaml
sepp2k has quit [Ping timeout: 272 seconds]
bluestorm has quit [Ping timeout: 252 seconds]
ulfdoz has quit [Ping timeout: 276 seconds]
bluestorm has joined #ocaml
ulfdoz has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
boscop has quit [Read error: Connection reset by peer]