gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml Meeting 2011 http://bit.ly/eaZi1C | OCaml 3.12.0 http://bit.ly/aNZBUp
arubin has joined #ocaml
<everyonemines> Is there a way to do imperative "if" statement programming in ocaml? eg, if a=b then (let c = 1) else (let c=2)
<everyonemines> something like a python if statement?
mnabil has quit [Ping timeout: 246 seconds]
<everyonemines> I think what I want to do is create a function with side effects, and call that.
<everyonemines> er no, I want to filter the array I'm mapping to instead of using an if statement
<everyonemines> I wanted to map something with an if statement to an array, but I guess I need to loop over the array with a while loop and delete elements.
<everyonemines> ...or I could install Batteries
<everyonemines> and use the filter function
mnabil has joined #ocaml
<everyonemines> ...and batteries won't compile, so now I'm installing godi
<everyonemines> ...and failure
<everyonemines> ...now installing wget
mnabil has quit [Remote host closed the connection]
vivanov has joined #ocaml
Associat0r has quit [Quit: Associat0r]
lopex has quit []
<orbitz> can exceptions be polymorphic?
<orbitz> makes sense, no good way to typecheck that
EM03 has quit [Read error: Connection reset by peer]
eelte has joined #ocaml
sepp2k has quit [Quit: Leaving.]
coucou747 has quit [Ping timeout: 258 seconds]
joewilliams is now known as joewilliams_away
Associat0r has joined #ocaml
arubin has quit [Quit: arubin]
Transformer has joined #ocaml
tomprince has joined #ocaml
Transformer has left #ocaml []
wuj has joined #ocaml
wuj has quit [Ping timeout: 276 seconds]
<philtor> I'm trying to build the ocaml-zmq (ZeroMQ bindings)
<philtor> I get this:
<philtor> ocamlfind: Package `uint.uint64' not found
<philtor> Where does one find this package?
<philtor> (and how is it installed - I don't see it in godi)
ymasory has quit [Quit: Leaving]
dnolen has quit [Quit: dnolen]
philtor has quit [Read error: Operation timed out]
Associat0r has quit [Quit: Associat0r]
hto_ has joined #ocaml
hto has quit [Ping timeout: 276 seconds]
andreas has joined #ocaml
eye-scuzzy has quit [Ping timeout: 260 seconds]
mneedham has joined #ocaml
Yoric has joined #ocaml
f[x] has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
orbitz has quit [Read error: Operation timed out]
orbitz has joined #ocaml
andreas has quit [Quit: Leaving.]
eye-scuzzy has joined #ocaml
thomasga has joined #ocaml
eye-scuzzy has quit [Quit: leaving]
andreas has joined #ocaml
Yoric has quit [Quit: Yoric]
hto has joined #ocaml
jamii has joined #ocaml
eikke has joined #ocaml
ikaros has joined #ocaml
ftrvxmtrx has joined #ocaml
andreas has quit [Ping timeout: 252 seconds]
ftrvxmtrx has quit [Ping timeout: 276 seconds]
ftrvxmtrx has joined #ocaml
zubeen has joined #ocaml
Yoric has joined #ocaml
larhat has joined #ocaml
andreas has joined #ocaml
ocp has joined #ocaml
jamii has quit [Ping timeout: 276 seconds]
hto_ has quit [Quit: leaving]
hto has quit [Quit: leaving]
hto has joined #ocaml
andreas has quit [Ping timeout: 250 seconds]
eye-scuzzy has joined #ocaml
jamii has joined #ocaml
andreas has joined #ocaml
zubeen has quit [Ping timeout: 248 seconds]
<f[x]> thelema, /bin/true: not found
<sgnb> f[x]: what is you OS?
<f[x]> freebsd
<sgnb> f[x]: and do you have /usr/bin/true ?
waern_ has joined #ocaml
<f[x]> yes
jamii has quit [Ping timeout: 260 seconds]
edwin has joined #ocaml
jamii has joined #ocaml
<everyonemines> anyone know of a tutorial for compiling for windows from nix?
sku has joined #ocaml
Tobu has quit [Read error: Connection reset by peer]
Tobu_ has joined #ocaml
avsm has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 250 seconds]
andreas has quit [Ping timeout: 258 seconds]
andreas has joined #ocaml
lopex has joined #ocaml
jamii has quit [Ping timeout: 260 seconds]
<everyonemines> thanks
mneedham has quit [Quit: mneedham]
everyonemines has left #ocaml []
jamii has joined #ocaml
mneedham has joined #ocaml
vivanov has quit [Ping timeout: 260 seconds]
andreas has quit [Ping timeout: 264 seconds]
myu2 has joined #ocaml
myu2 has quit [Client Quit]
mcclurmc has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
thomasga1 is now known as thomasga
ftrvxmtrx has quit [Quit: Leaving]
pdhborges has joined #ocaml
dnolen has joined #ocaml
jamii has quit [Ping timeout: 260 seconds]
jamii has joined #ocaml
jamii has quit [Ping timeout: 246 seconds]
andreas has joined #ocaml
jamii has joined #ocaml
jamii has quit [Ping timeout: 260 seconds]
andreas has quit [Ping timeout: 260 seconds]
jamii has joined #ocaml
andreas has joined #ocaml
<thelema> f[x]: ah, I figured that'd break somewhere. I'll rewrite those makefile rules
sku has quit [Ping timeout: 246 seconds]
joewilliams_away has quit [Ping timeout: 246 seconds]
sepp2k has joined #ocaml
joewilliz has joined #ocaml
sku has joined #ocaml
sepp2k has quit [Quit: Leaving.]
myu2 has joined #ocaml
dnolen has quit [Quit: dnolen]
avsm has quit [Quit: Leaving.]
sku has quit [Quit: Leaving]
ymasory has joined #ocaml
kaustuv has joined #ocaml
<kaustuv> Yoric: are you still the moderator of batteries-devel?
smerz has joined #ocaml
lopex has quit []
drunK has joined #ocaml
drunK has quit [Remote host closed the connection]
thieusoai has joined #ocaml
andreas has quit [Ping timeout: 250 seconds]
andreas has joined #ocaml
garbo_r has joined #ocaml
<garbo_r> bonjour
garbo_r is now known as robinnn
<robinnn> comment modifier une valeur a l interieur d un module ??
<thelema> parlez vous anglais?
<robinnn> yes
<robinnn> how modify value in a module
<thelema> same as normal values, unless they're references or mutable record fields, they can't be modified
robinnn has quit [Client Quit]
robinnn has joined #ocaml
<robinnn> hi
<robinnn> how modify value in a module ??
<thelema> module M = struct let x = ref 0 end
<thelema> M.x := 5
<thelema> Does this help?
<robinnn> wait
lopex has joined #ocaml
<thelema> robinnn: ?
<robinnn> its not good but my programm don t compile
<robinnn> what is ref ??
<pdhborges> it's a mutable cell
andreas has quit [Ping timeout: 246 seconds]
andreas has joined #ocaml
<robinnn> ok thx
hto has quit [Ping timeout: 276 seconds]
<Yoric> kaustuv: I probably have the password somewhere.
<Yoric> I saw that you attempted to post something, I haven't had time to look at it.
<Yoric> Speaking of which, thelema, are you moderator of batteries-devel?
<thelema> Yoric: not that I know of.
<Yoric> If not, I should [find and] give you the passwords.
<thelema> ok
<Yoric> (unless you can arrange this directly with Stefano or gildor)
<thelema> I assume if I were moderator, I'd get notice of posts needing moderation?
<robinnn> how resolve this problem http://pastebin.com/KvGQB8y5 ?
<pdhborges> !var
<thelema> 9: ... print_int !var
<pdhborges> use ! to acess the contents of the cell
<robinnn> ok thx
<robinnn> pro
<Yoric> thelema: indeed
<thelema> Yoric: then I'm definitely not moderator.
<thelema> Yoric: but I will.
hto has joined #ocaml
philtor has joined #ocaml
<hcarty> thelema: It would be nice to have a functor-based BatMapSet/BatMultiMap in Batteries
<hcarty> I've found that the polymorphic Map and Set modules in Batteries have caused me more trouble than they have saved typing.
Yoric has quit [Read error: Connection reset by peer]
pdhborges has quit [Quit: Leaving.]
Yoric has joined #ocaml
Oejet has joined #ocaml
sku has joined #ocaml
<thelema> hcarty: oops, did I miss that what was posted wasn't polymorphic?
<thelema> yup, "written in functorized style and is not polymorphic at all"
<flux> I wonder if there could be generic interface for all linear containers and for all associative containers, and all containers should implement it/a superset of it
<flux> I mean, of course there could be, but if that interface could be expressed with a signature..
<thelema> flux: of course.
<flux> I guess there would need to be four variants: functional/imperative, linear/associative
<flux> ..but maybe there are more issues I'm not seeing
<flux> also would maps and multimaps have the same interface..
<thelema> no, they'd have different interfaces, as lookup on multimaps returns a set
<thelema> while insertion is a single value
<flux> should the creation/mutation be a separate interface from lookup perhaps?
<flux> perhaps that would be too fine separation
<flux> at least there should be a non-signature idea of what a data structure library should provide
<flux> or perhaps a basic interface, and then there could even be functors for the convenience functions
<flux> like iter can be expressed in terms of fold, fold and find could perhaps be expressed in terms of fold_until etc..
<thelema> don't get too magical in your interfaces
<flux> :)
<thelema> simple, performant implementations of iter don't have to be implemented through 2 levels of functors.
jderque has joined #ocaml
zubeen has joined #ocaml
<flux> but sometimes perhaps a functor-generated function is better than no function at all
<flux> it might be a good way to bootstrap your new data structure as well
eikke has quit [Read error: Operation timed out]
hto has quit [Ping timeout: 240 seconds]
el-out_y has joined #ocaml
<el-out_y> hi
<thelema> hi
<flux> thelema, btw, it'd be sooo nice if we had defunctorizer in working order :)
joewilliz is now known as joewilliams
joewilliams has quit [Changing host]
joewilliams has joined #ocaml
<thelema> flux: very. I could get behind using levels of functors if I could just have it generate code for me.
<el-out_y> I have some problems for compile my code... someone can help me?
<thelema> el-out_y: pastebin the code with the error
<el-out_y> I want to create a module in a other file, but i don't know how to link
<el-out_y> ok
<thelema> ocamlc otherfile.ml main.ml -o main
jamii has quit [Ping timeout: 252 seconds]
<thelema> remove lines 7-8 and 16 from s.ml
<thelema> these are auto added by the compiler
avsm has joined #ocaml
<el-out_y> yeah ! thank you very much
avsm has quit [Quit: Leaving.]
jamii has joined #ocaml
DimitryKakadu has joined #ocaml
eikke has joined #ocaml
<hcarty> thelema: The macro component of pa-do provides something of a defunctorizer, but I'm not sure if it would do much to help here.
<kaustuv> How can I fix this kind of error?
<kaustuv> Error: This expression has type [ `MARK ]
<kaustuv> but an expression was expected of type [ `ELIDE | `MARK ]
<kaustuv> The first variant type does not allow tag(s) `ELIDE
ocp has quit [Ping timeout: 252 seconds]
<thelema> kaustuv: ( `MARK :> [`ELIDE | `MARK] )
<thelema> if you have a name for [`Elide | `Mark], use that after the :>
<kaustuv> Right, just figured out that an explicit coercion was needed.
* kaustuv needs more coffee
<thelema> answer spring to mind quickly after asking IRC
<thelema> *answers
<thelema> Often removing type annotations helps with this, as the > and < usually work in the intended way, and once explicit types without them get mixed in, things get a lot more annoying
<kaustuv> Thanks though
<kaustuv> Did you merge bluestorm's splay code, by the way?
<kaustuv> I send a mail to the list saying that I was fine with it, but it's stuck in moderation
thelema_ has joined #ocaml
jamii has quit [Ping timeout: 240 seconds]
thelema has quit [Ping timeout: 240 seconds]
el-out_y has left #ocaml []
el-out_y has joined #ocaml
el-out_y has left #ocaml []
kaustuv is now known as kaustuv_afk
Eiael has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
andreas has quit [Ping timeout: 240 seconds]
enthymeme has joined #ocaml
<hcarty> thelema_: Out of curiosity - where did the name of the "tap" function come from?
jamii has joined #ocaml
larhat has quit [Quit: Leaving.]
<thelema_> should I have called it "kcombinator"?
<hcarty> thelema_: Cool, thanks. I hadn't seen it before, but I've found it very useful.
<hcarty> That's clearly a much more intuitive name :-)
<thelema_> :) If you have good things to say about [tap], you can put them here: https://github.com/ocaml-batteries-team/batteries-included/wiki/New-APIs
<hcarty> I don't have much to say beyond the comment in the documentation for now, but if I come up with something I will add it.
jamii has quit [Ping timeout: 260 seconds]
joelr has joined #ocaml
<joelr> good day
<joelr> gildor: is it possible to incorporate the output from pg_config --includedir-server into _oasis?
Yoric has quit [Quit: Yoric]
<joelr> I'm trying to use oasis to build a c shared library but, perhaps, this is better done outside of oasis
<adrien> joelr:
<adrien> bah
<joelr> yes?
<adrien> joelr: does it also have pkg-config support btw?
<joelr> what does?
<adrien> postgresql
<adrien> pg_config is pretty much like pkg-config it seems
<joelr> not sure
<joelr> why?
<joelr> how does it help?
<adrien> because it's more widespread and generic, but anyway, pkg-config support is oasis won't be available before 0.3.0
<joelr> ok
<adrien> but you can change some file after configure, I need to look it up
robinnn has quit [Quit: Lost terminal]
<adrien> "if you want to feed anything that should live inside oasis, just add it to setup.data (or setup.log depending if you do it at configure or build)
<adrien> e.g. echo 'pkg_pcre_cflags="-I/usr/include/pcre"' >> setup.data
<adrien> "
NaCl has quit [Ping timeout: 240 seconds]
NaCl has joined #ocaml
Yoric has joined #ocaml
redfire has joined #ocaml
<joelr> adrien: thanks
jamii has joined #ocaml
enthymeme has quit [Quit: brb, library]
<redfire> hi
<redfire> I have a question about something I don't understand
<thelema_> redfire: ok, ask
<redfire> why in this code http://pastebin.com/3f0JAT74 everything works fine
<redfire> and in this one http://pastebin.com/ck1hAKdU I get an error because it doesn't find D.cardinal...
<thelema_> well, aside from giving you a lecture about using Obj, I don't see any problem in your second paste
<redfire> and yet, I get this "Error: Unbound value D.cardinal"
<thelema_> oh, maps don't have a cardinal function, only sets
<thelema_> err, n/m, added in 3.12
<thelema_> different ocaml versions?
<redfire> when I look into the source code of stdlib map.ml, I can see it
<thelema_> ocaml -version?
<thelema_> are these both on the same computer?
<redfire> hum yeah, I compile with 3.11 but I use Ocaml 3.12 source bode...
<redfire> *code
<thelema_> umm, what?
<thelema_> you've patched 3.11's stdlib?
<thelema_> did you also patch the .mli file? and the module type Map.S?
<redfire> no, I'm looking the source code of the 3.12 version but I use an older compiler
<redfire> so, you were right
<redfire> it was added with 3.12
<redfire> thank you !
<thelema_> you're welcome
Eiael has quit [Quit: leaving]
jamii has quit [Ping timeout: 240 seconds]
zorun has quit [*.net *.split]
mal`` has quit [*.net *.split]
zorun has joined #ocaml
andreas has joined #ocaml
jamii has joined #ocaml
Yoric has quit [Quit: Yoric]
mal`` has joined #ocaml
jamii has quit [Ping timeout: 248 seconds]
ygrek has joined #ocaml
ulfdoz has joined #ocaml
<joelr> what ocaml type matches a 4-byte float?
<hcarty> joelr: None, but you can store them with bigarrays
<joelr> right, so i thought
<joelr> thanks
<hcarty> You're welcome
<hcarty> You only have direct access to 8-byte floating point values and (machine - 1) bit integers as numeric types.
boscop_ is now known as boscop
ocp has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 250 seconds]
boscop__ has joined #ocaml
boscop_ has quit [Ping timeout: 250 seconds]
boscop__ has quit [Client Quit]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
ulfdoz_ is now known as ulfdoz
jderque has quit [Quit: leaving]
sku has quit [Quit: Leaving]
ymasory has quit [Quit: Leaving]
DimitryKakadu has quit [Remote host closed the connection]
ocp has quit [Ping timeout: 240 seconds]
ulfdoz has quit [Ping timeout: 240 seconds]
lopexx has joined #ocaml
lopex has quit [Ping timeout: 240 seconds]
lopexx has quit [Client Quit]
lopex has joined #ocaml
Associat0r has joined #ocaml
redfire has quit [Quit: leaving]
edwin has quit [Remote host closed the connection]
hto has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
eye-scuzzy has quit [Read error: Operation timed out]
Yoric has joined #ocaml
thomasga has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 246 seconds]
Oejet has quit [Quit: Leaving.]
Yoric has quit [Quit: Yoric]
zubeen has quit [Ping timeout: 260 seconds]
Fullma has quit [Ping timeout: 260 seconds]
Fullma has joined #ocaml
mneedham has quit [Ping timeout: 264 seconds]
Associat0r has quit [Quit: Associat0r]
wuj has joined #ocaml
Amorphous has quit [Ping timeout: 250 seconds]
eikke has joined #ocaml
fraggle_ has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
wuj has quit [Read error: Connection reset by peer]
eikke has quit [Ping timeout: 260 seconds]
ymasory has joined #ocaml
joelr has quit [Quit: joelr]
ymasory has quit [Remote host closed the connection]
ikaros has quit [Quit: Leave the magic to Houdini]
Amorphous has joined #ocaml
ymasory has joined #ocaml
ymasory has quit [Remote host closed the connection]
thieusoai has quit [Remote host closed the connection]
ymasory has joined #ocaml
ymasory has quit [Remote host closed the connection]
ymasory has joined #ocaml