dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
Chea_544 has quit []
Carillon has joined #ocaml
<Carillon> hi, has anyone here tried building a set of Qt bindings for Ocaml?
hikozaemon has joined #ocaml
ita|zzz is now known as ita
<ita> Carillon: no
<ita> dylan: ping
<Carillon> ita: ;) no?
<ita> Carillon: but if you have any news on this i am interested
<ita> by such bindings
<ita> later
ita has quit ["Konversation terminated!"]
fab__ has joined #ocaml
fab_ has quit [Read error: 110 (Connection timed out)]
mefalcon has joined #ocaml
<mefalcon> hi, I'm trying to define a type, in haskell it is given as "type Behavior a = [Time] -> [a]" in Ocaml I define it as "type 'a Behavior = [DateTime] -> ['a]" ... i get a syntax error at the first '[', did i miss something?
<mefalcon> instead of "[sometype]" do i need to do "sometype list" ?
<zmdkrbou> yep
<zmdkrbou> " type 'a behavior = time list -> 'a list " is the right syntax, actually
<zmdkrbou> (capitalized identifiers are for modules and type constructors)
<mefalcon> ok, thanks
jcreigh has joined #ocaml
Carillon has quit [" HydraIRC -> http://www.hydrairc.com <- The dawn of a new IRC era"]
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
d-bug has joined #ocaml
Smerdyakov has quit ["Leaving"]
shekmalhen has joined #ocaml
dibalout has joined #ocaml
dvekravy_ has joined #ocaml
fab__ has quit [leguin.freenode.net irc.freenode.net]
shawn has quit [leguin.freenode.net irc.freenode.net]
mefalcon has quit [leguin.freenode.net irc.freenode.net]
dvekravy has quit [leguin.freenode.net irc.freenode.net]
Shimei has quit [leguin.freenode.net irc.freenode.net]
shawn has joined #ocaml
falconair has joined #ocaml
dibalout is now known as tristram
Shimei has joined #ocaml
fab__ has joined #ocaml
smimou has joined #ocaml
Snark has joined #ocaml
shekmalhen has quit ["leaving"]
mnemonic has joined #ocaml
<mnemonic> hi
michael-i has joined #ocaml
michael-i has left #ocaml []
mnemonic has quit ["leaving"]
dvekravy_ is now known as dvekravy
hikozaemon has quit ["Leaving..."]
slipstream has joined #ocaml
ertai has joined #ocaml
slipstre1m-- has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
slipstream has quit [Read error: 110 (Connection timed out)]
fab__ has quit []
ramkrsna has joined #ocaml
dylan is now known as Dylan
shawn has quit ["This computer has gone to sleep"]
clconway has joined #ocaml
<clconway> I am on the verge of homocide... Can't make an "Unbound module" error go away even though I'm giving "-I dir"...
Smerdyakov has joined #ocaml
datrus has joined #ocaml
<clconway> I just know I've seen this before, but I've run out of ideas. Tried dozens permutations of command line args...
<datrus> (i'm a ocaml newbie) i try to compile a file using "ocaml -c test.ml" and i then get an error "Unbound value Manager.make" (i use the cudd.cma BDD library in test.ml). As I understant it, linking doesn't take place at this stage yet.
mwc has joined #ocaml
<clconway> datrus, you and I are in the same boat...
<clconway> You need to give "-I dir" arguments pointing to the directory with manager.cmo in it
<datrus> ok, trying...
<datrus> can't i use cudd.cma instead? i believe manager.cmo is included inside cudd.cma
<clconway> Should work...
<datrus> if i understant correctly .cma is like gcc's .a
<clconway> Yeah
<clconway> Any CIL users in here?
<datrus> thanks compiling the cmo worked now
<clconway> No prob
<mwc> .cma is basically the compiled bytecode and some higher level data
<mwc> .a is just object code
<mwc> the difference is that ocaml is a "smart linker", whereas ld is pretty stupid
<clconway> You probably need to do "ocamlc -I CUDD_DIR +cudd test.cmo" to link
<Smerdyakov> clconway, I've used CIL, and others in my research group developed it.
<Smerdyakov> clconway, are you in MSR?
<clconway> Yeah. How'd you guess?
<Smerdyakov> Hostname plus channel name.:)
<Smerdyakov> Intern?
<clconway> Yeah
<Smerdyakov> Who's your mentor?
<clconway> Sriram Rajamani
<datrus> clconway: i used ocamlc -custom -cclib -lcudd_caml -o $@ test.cmo
<Smerdyakov> Cool. Are you in India?
<clconway> Yeah. Bangalore
<clconway> I'm having the darnedest time linking against CIL. But I think it's cygwin's fault.
<mwc> I remember seeing some gotchyas on Cygwin
<datrus> i use cygwin too btw
<clconway> Works find as long as I put my code in CIL/src/ext... Compiling separately doesn't work at all.
<clconway> And cilly doesn't work either: Cannot open output file /cygdrive/c/DOCUME~1/t-chric/LOCALS~1/Temp/cil-PGIrCEyw.cil.c.
shekmalhen has joined #ocaml
lmbdwr has joined #ocaml
<lmbdwr> oi
<zmdkrbou> io
<clconway> Smerdyakov, do you know how to instantiate a user-defined type in CIL?
<clconway> I.e., given "typedef <blah> T", create a value of type "T" without a priori knowing the structure of <blah>
mwc has quit [Remote closed the connection]
<Smerdyakov> You can't just use TNamed?
<clconway> TNamed takes <blah> as an argument
<Smerdyakov> I don't know.
clconway has left #ocaml []
ookk has joined #ocaml
shawn has joined #ocaml
shekmalhen has quit ["bone journer"]
youknow365 has joined #ocaml
<youknow365> chwa chea
Smerdyakov has quit ["Leaving"]
Demitar_ has joined #ocaml
creichen has quit [Read error: 131 (Connection reset by peer)]
Demitar has quit [Nick collision from services.]
Demitar_ is now known as Demitar
finelemon has joined #ocaml
finelemo1 has quit [Read error: 110 (Connection timed out)]
lmbdwr has quit [Read error: 54 (Connection reset by peer)]
lmbdwr has joined #ocaml
<ookk> is the ocaml keyword "in" the same as the one in python
<ookk> could it be used to check if an element is in a list?
<ookk> "if a in list" for instance
<ookk> hmm apparently not
<buggs> no
<youknow365> ookk: wtf you gonna say python in herre for bitch
<buggs> _let_ this be (=) that _in_ there
<ookk> yeah i just thought that "in" had another use in ocaml
<ookk> :P
lmbdwr has quit [Read error: 104 (Connection reset by peer)]
lmbdwr has joined #ocaml
ita has joined #ocaml
<ita> Dylan: ping?
<Dylan> ita: pong
<ita> Dylan: have you seen the memo ?
<Dylan> Ah
<Dylan> I always do that via making the generated output require the .ml files.
<Dylan> [in answer to the memo]
<ita> Dylan: the problem is that the .mly and .mll generate .ml files
<ita> Dylan: the order of targets in the link matters, right ?
<Dylan> Not a problem, if deps.bk requires foo.ml, and bar.ml, and bar.ml is generated from bar.mly, it'll all work out
<Dylan> my current idea is to express dependency and build information in some non-language format, and then write tools to generate that. :)
<Dylan> sort of like ant, I suppose... except without XML and cruft.
<ita> Dylan: do you run ocamldep to find the right target order ?
shawn has quit [Connection reset by peer]
<Dylan> ita: no, the target order I specified statically
<ita> Dylan: waf is able to infer the right target order
<Dylan> ocamldsort can too
<Dylan> I just was lazy. :)
<ita> Dylan: ocamldsort ?
<Dylan> dependency sorter for OCaml source files
<ita> it is not distributed with ocaml, is it ?
<Dylan> no, it's a debian package though
<ita> Dylan: makefile-based projects use "make depend"
<Dylan> Not ones using gnu make
<ita> Dylan: btw, waf also has a daemon mode now (background recompilation upon file change using fam/gamin)
<Dylan> (they don't have to, any way)
<ita> Dylan: not the ones using gnu make, hmm ? :-)
<Dylan> gnu make will rebuild automatically generated included files.
<Dylan> though, that doesn't absolve it of its sins
<ita> gnu make does not infer the right order for the targets or the link command
<Dylan> it doesn't infer anything
<Dylan> but if make.deps depends on foo.c and bar.c, and those files change, it'll rebuild it
<ita> except with the depend target which is usually "depend: \n\t $(OCAMLDEP) $(INCLUDES) *.mli *.ml > $@ "
<ita> this is the behaviour i tried to replicate
<ita> oh well, if nobody needs it i can turn it off as well
<Dylan> if you write:
<Dylan> include depend
<Dylan> then it will rebuild depend if required
<ita> yes
lmbdwr has quit [Read error: 104 (Connection reset by peer)]
shawn has joined #ocaml
user_ has joined #ocaml
user_ has quit ["Quitte"]
ita has quit ["Konversation terminated!"]
mwc has joined #ocaml
mwc has quit [Remote closed the connection]
mwc has joined #ocaml
shawn has quit ["Leaving"]
<ookk> how do you use Map?
<ookk> the documentation isnt very clear
<Dylan> module StrMap = Map.Make(String)
<ookk> ok thx
mwc has quit ["Leaving"]
<ookk> module asd = Map.Make(int) gives syntax error
<Snark> ookk: module Asd = Map.Make(int)
<Snark> notice Asd vs asd
<ookk> okay so you got to use capital letters...
<Snark> yes, it's an enforced convention
<ookk> still produces syntax error
<ookk> module Asd = Map.Make(int);;
<ookk> hmm doesnt seem like you can use int to make a map because it is not a module
<Snark> yes, indeed
<Snark> for strings one uses the String module
<Snark> but for ints...
<ookk> complicated stuff
<ookk> cant i create my own int module then?
<ookk> its just a type and a comparing function or?
<Snark> ookk: there are Int32 and Int64, if that helps
<Snark> or Big_int
<ookk> okay ill look into that, thx
shawn has joined #ocaml
<Dylan> module Int = struct
<Dylan> let compare = ...
<Dylan> type t = int
<Dylan> end
<ookk> yeah i did that
<ookk> module Int =
<ookk> struct
<ookk> type t = int
<ookk> let compare x y = x-y
<ookk> end;;
<ookk> it worked
<Dylan> even easier.
Snark has quit ["Leaving"]
<Dylan> let compare = (Pervasives.compare : t -> t -> int)
<ookk> how do i use my own map-type in a record?
benoyst has left #ocaml []
EsotericMoniker has joined #ocaml
EsotericMoniker has left #ocaml []
mwc has joined #ocaml
EsotericMoniker has joined #ocaml
shawn has quit [Read error: 60 (Operation timed out)]
shawn has joined #ocaml
ookk has quit ["This computer has gone to sleep"]
mwc has quit [Remote closed the connection]
smimou has quit ["bli"]
tristram has quit [Read error: 110 (Connection timed out)]
d-bug has quit ["This computer has gone to sleep"]
joshcryer has joined #ocaml