gl changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | happy new year, dudes.
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
bohanlon has quit [Read error: 110 (Connection timed out)]
jlouis_ has quit ["Leaving"]
Plazma has joined #ocaml
Plazma has left #ocaml []
Smergo has quit [Read error: 60 (Operation timed out)]
bohanlon has joined #ocaml
batdog has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit ["Leaving"]
slipstream has joined #ocaml
batdog|gone has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has quit ["...and the Awesome level drops"]
shawn has quit [Read error: 110 (Connection timed out)]
johnnowak has joined #ocaml
apanda has joined #ocaml
shawn has joined #ocaml
johnnowak has quit []
brainly-green has quit [Read error: 110 (Connection timed out)]
bohanlon has quit [Remote closed the connection]
bohanlon has joined #ocaml
gunark has quit [Remote closed the connection]
gunark has joined #ocaml
chi11 has joined #ocaml
pango is now known as pangoafk
joshcryer has joined #ocaml
apanda has left #ocaml []
smimou has joined #ocaml
pmatos has joined #ocaml
velco has joined #ocaml
fremo has joined #ocaml
<fremo> hello
ramky has joined #ocaml
ramky is now known as ramkrsna
ikaros has quit [Read error: 54 (Connection reset by peer)]
ikaros has joined #ocaml
ikaros has quit [Read error: 54 (Connection reset by peer)]
ikaros has joined #ocaml
Smergo has joined #ocaml
joshcryer has quit [Nick collision from services.]
joshcryer has joined #ocaml
velco has quit ["<boris``> reduction ad absurdum is a fallacious method of proof"]
velco has joined #ocaml
Smerdyakov has joined #ocaml
a-priori|work has joined #ocaml
ikaros has quit ["KVIrc 3.2.6 Anomalies http://www.kvirc.net/"]
ikaros has joined #ocaml
a-priori|work has quit ["Leaving"]
a-priori|work has joined #ocaml
<pmatos> Does anyone know how to access ocaml objects from C? After reading 18.7 of the manual, that doesn't seem very clear.
<pmatos> Although the fib example is nice it seems somewhat straightforward since it deals which integers but what happens with more complex types, strings, structures, etc?
Aradorn has joined #ocaml
pmatos has quit [Remote closed the connection]
jlouis has joined #ocaml
<flux-> I don't know about that, but I'm thinking it should be the same as the usual interfacing with ocaml with C (with just plain records)
<flux-> but, he left already..
<flux-> (doesn't teach me to not ignore joinspartsquits, though)
Smergo has quit [Remote closed the connection]
Smergo has joined #ocaml
bohanlon has quit [Read error: 145 (Connection timed out)]
mak1 has joined #ocaml
brainly-green has joined #ocaml
<lmbdwr> it seems like I have a small problem with functors syntax in ocaml : http://nopaste.tshw.de/1170870491c94bc/
velco has quit ["<boris``> reduction ad absurdum is a fallacious method of proof"]
<lmbdwr> if anyone has 30 sec to tell me where is my mistake ..
<flux-> you're not defining module Indices to be the struct .. end -stuff
<flux-> that ends up as a parameter to Map.Make
<lmbdwr> well, I do module Indices = Map.Make(...)
<flux-> you could write something like..
<flux-> module IndexMap = Map.Make( ..stuff without size or incsz.. )
<lmbdwr> I want size and incsz
<lmbdwr> :)
<flux-> and then module Indices = struct include IndexMap let size = .. let incsz = .. end
<lmbdwr> ah ok.
<lmbdwr> I have to do that
<flux-> then you have module Indices which is like your old Indices but with some extra functions
<lmbdwr> that was my next try but you saved my time
<lmbdwr> somehow
<flux-> for that code I would propably use that module IndexMap and then write module Indices without including module IndexMap
<flux-> that is, in terms of IndexMap
<flux-> forwarding something like find could simply be written as let find = IndexMap.find
<flux-> actually, not quite
<flux-> because if you want to have multiple Indices-instantiations, you want to keep separate data structures for them too - in your case you are always sharing the size-variable
<flux-> which I doubt is what you want
<flux-> infact it seems you should have indices.mli (with the public interface) and indices.ml (with the private implementation).. again being implemented in the terms of IndexMap, which can be privately defined
Submarine has joined #ocaml
Harzilein has left #ocaml []
_shawn_ has joined #ocaml
<lmbdwr> flux-, actually I dont want to share this object with anyone, so yes, I want a single variable for this submodule.
<lmbdwr> there is only one submodule Indices in the whole program
brainly-green has quit [Success]
pangoafk is now known as pango
bohanlon has joined #ocaml
<pango> lmbdwr: functors are like functions... properties of a function's domain do not magically propagate to its codomain...
bluestorm has joined #ocaml
mrpingoo has joined #ocaml
<fremo> I have four modules with inter-dependences, who to pack it into one lib ?
<fremo> I use OCamlMakefile and ocamlfind and I am totaly lost with all that
<fremo> I found no example nor easy documentation on this
bohanlon has quit [Read error: 60 (Operation timed out)]
<fremo> I tried to pack modules A B C D in lib to do lib.cma but it asked for lib.mli and then fall in cross-dep for lib.cmi cause it wanted to build lib.cmo
<fremo> but I have no lib.ml, I just fill lib.mli with modules signatures of A B C and D
<mrpingoo> fremo: if there are inter-dependencies, whether your building a lib or not, it's a problem you won't be able to work around
<mrpingoo> the typical solution to mutual dependencies is to break down one module into several
<fremo> ho, right
<fremo> not interdep
<fremo> but A depends on B and B on C for example
<fremo> I can build the lib by hand
<mrpingoo> ok
<mrpingoo> you just want to know how to explain that to the OCamlMakefile ?
<fremo> you see, It's more just a build problem :)
<mrpingoo> I'm not good at OCamlMakefile, but let's see...
<fremo> exactly
<mrpingoo> what SOURCES did you define ?
<mrpingoo> there should be all your .ml and .mli in dependency order
<fremo> SOURCES is A.ml B.ml C.ml D.ml
<fremo> that's write
bohanlon has joined #ocaml
<mrpingoo> what's the exact error you get ?
<fremo> I can build it and when I build another program depending on this lib with -I ../lib/, its ok
<fremo> I had a lot of different errors,
<fremo> I had a good one
<fremo> 2 sec
<mrpingoo> -I ../lib works, good. when does it stop working? you just miss the install, it seems
<mrpingoo> you should install all .mli .cmi and cm[x]a
<fremo> ok, but, I should build one library per module ? (cma, but I just got cmo's)
<fremo> I tried to build one lib with the four modules in, is it wrong way ?
pango_ has joined #ocaml
<mrpingoo> no, there should be only one .cma
<mrpingoo> and one cmxa
<mrpingoo> (I'm actually taking the example of ocaml-vorbis, of which I'm not the author)
<mrpingoo> it's useful to know where to find examples
<fremo> cool :)
<fremo> Savonet team :)
<fremo> do you make soap ?
chi11 is now known as velco
<mrpingoo> I do, indeed :)
<mrpingoo> "I make soap, liquid soap"... almost as sexy as "my name is bond, james bond"...
<fremo> hehe :)
pango has quit [Remote closed the connection]
rillig has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
bohanlon has quit [Read error: 60 (Operation timed out)]
benny has joined #ocaml
benny_ has quit [Read error: 110 (Connection timed out)]
Submarine has quit ["Leaving"]
<fremo> mrpingoo: ok, I now have a mli for each module, I removed LIB_PACK_NAME and -for-pack (undocumented?) and that's just ok, thank you :)
benny99 has joined #ocaml
<benny99> hi
<benny99> a probably simple question: let rec mem x z = match z with [] -> false | y :: z -> x = y || mem x z;; <-- how does it work ?
<benny99> The only problem is ||
<benny99> oh, it's a simple or right ?
<benny99> but why the x = y then ?
<mrpingoo> that "|| mem x z" seems stupid...
<benny99> I guess it's a mistake in the book and should be ==, but it works with that version also
<mrpingoo> oops sorry, I wasn't reading well
<mrpingoo> benny: no, it's not wrong
<benny99> mrpingoo, not wrong
<benny99> mrpingoo, but stranger than with == ?
<mrpingoo> no
<benny99> ?
<mrpingoo> x=y is an equality test
<benny99> ??
<mrpingoo> that's the normal equality in OCaml
<benny99> oh, sorry :)
<mrpingoo> you're probably thinking of x:=y which is the assignation
<benny99> why is let then used with = ?
<mrpingoo> let..=..in should be read as a single block
<benny99> ._. whow, sounds rude, didn't indent that
<mrpingoo> i'ts not the same = as in "if 1=2 then oops"
<benny99> mrpingoo, understood ;)
<benny99> mrpingoo, thank you, but since := is the assignment operator, why doesn't let it use ?
<mrpingoo> let=in isn't as assigment
<mrpingoo> it's a definition
<mrpingoo> sorry, no time to develop the difference now ;)
<benny99> mrpingoo, hm, definition rather reminds me of assignment than of equality :/
<benny99> wow, a benny :)
<benny99> thanks :), gone again
benny99 has quit ["Leaving"]
velco is now known as cluebringer
haelix has quit [Read error: 110 (Connection timed out)]
trurl has quit [Read error: 110 (Connection timed out)]
haelix has joined #ocaml
Oatmeat|umn has quit ["Leaving"]
Oatmeat|umn has joined #ocaml
brainly-green has joined #ocaml
Aradorn has quit ["This computer has gone to sleep"]
Oatmeat|umn has quit [zelazny.freenode.net irc.freenode.net]
mak1 has quit [zelazny.freenode.net irc.freenode.net]
descender has quit [zelazny.freenode.net irc.freenode.net]
eradman has quit [zelazny.freenode.net irc.freenode.net]
Oatmeat|umn has joined #ocaml
mak1 has joined #ocaml
descender has joined #ocaml
eradman has joined #ocaml
mrpingoo has quit ["Connection reset by pear"]
bohanlon has joined #ocaml
ikaros has quit [Read error: 60 (Operation timed out)]
ikaros has joined #ocaml
brainly-green has quit [Connection timed out]
mak1 has left #ocaml []
Submarine has joined #ocaml
cluebringer has quit ["I'm outta here ..."]
levi_home has quit [Read error: 110 (Connection timed out)]
Aradorn has joined #ocaml
Aradorn has quit [Client Quit]