dylan changed the topic of #ocaml to: OCaml 3.09.1 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/
lispy has quit [Connection timed out]
shawn has quit ["This computer has gone to sleep"]
illya23b has quit ["leaving"]
CosmicRay has joined #ocaml
bzzbzz has joined #ocaml
JosephRivers has joined #ocaml
CosmicRay has quit ["Client exiting"]
JosephRivers has quit [Remote closed the connection]
Submarine has joined #ocaml
Revision17 has joined #ocaml
shawn has joined #ocaml
julbouln has joined #ocaml
Smerdyakov has quit ["Leaving"]
pauldia has joined #ocaml
Skal has joined #ocaml
pauldia has quit [Read error: 110 (Connection timed out)]
Submarine has quit [Remote closed the connection]
Skal has quit [Read error: 110 (Connection timed out)]
Skal has joined #ocaml
pango is now known as pangoafk
pangoafk is now known as pango
visq has joined #ocaml
love-pingoo has joined #ocaml
ski has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
mrsolo_ has quit [Connection reset by peer]
mrsolo_ has joined #ocaml
mrsolo_ has quit [Read error: 104 (Connection reset by peer)]
mrsolo_ has joined #ocaml
Skal has quit [Read error: 110 (Connection timed out)]
Skal has joined #ocaml
mikeX has joined #ocaml
pauldia has joined #ocaml
MisterC has joined #ocaml
Skal has quit [Read error: 110 (Connection timed out)]
slipstream-- has joined #ocaml
love-pingoo has quit [Read error: 110 (Connection timed out)]
slipstream has quit [Read error: 110 (Connection timed out)]
MisterC has quit [Remote closed the connection]
Skal has joined #ocaml
love-pingoo has joined #ocaml
bzzbzz has quit ["leaving"]
Revision17 has joined #ocaml
Schmurtz has joined #ocaml
Amorphous has quit ["arg... must... shutdown... computer burnin..."]
Amorphous has joined #ocaml
love-pingoo has quit ["Leaving"]
Bigb[a]ng has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
smimou has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
pango is now known as pangoafk
pangoafk is now known as pango
shawn has quit ["This computer has gone to sleep"]
Bigb[a]ng has joined #ocaml
piggy_ has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
shawn has joined #ocaml
piggy_ has left #ocaml []
dylan has quit ["brb"]
dylan has joined #ocaml
Revision17 has quit [Remote closed the connection]
Revision17 has joined #ocaml
danly has joined #ocaml
ertai has quit ["leaving"]
ertai has joined #ocaml
ertai has quit [Client Quit]
ertai has joined #ocaml
pauldia has quit [Read error: 110 (Connection timed out)]
asabil has joined #ocaml
<asabil> hi all
<asabil> i need some help understanding ocaml file management for execution/compilation
<asabil> how can i split my code into multiple files ?
<zmdkrbou> each .ml file is a module, and the corresponding .mli is its interface
<zmdkrbou> if you write table.ml to hande some kind of table that you use un pouet.ml, then you use Table.myfunction in the pouet.ml file
<zmdkrbou> (or you write "open Table" at the beginning of the pouet.ml file but its ugly)
<asabil> and how can i write interfaces if i don't use modules ?
<asabil> (sorry i am very new to ocaml)
<zmdkrbou> in fact, you do use modules when you write an ocaml source file, implicitely
<asabil> but i don't have the .mli file
<zmdkrbou> its not mandatory (its just much cleaner)
<zmdkrbou> if you write a file thing.ml, then ocaml automatically defines the Thing module
<asabil> i have an object in a file
<asabil> i don't know how to define it's interface
<asabil> okey i see, thank you very much :)
<zmdkrbou> its ok ?
<zmdkrbou> the compiler computed it
<asabil> but still i would like to know how to write interfaces
<zmdkrbou> you have to write a .mli file
<asabil> for objects
<asabil> and what shoul i put into it ?
<zmdkrbou> what do you mean by object ?
<asabil> if i have a .ml file with
<asabil> class BaseSearchModule config =
<asabil> object(this)
<asabil> ...
<asabil> end;;
<zmdkrbou> ok
<zmdkrbou> then the interface is the one given by the toplevel if you enter this
* zmdkrbou 's not used to the objects in ocaml
* asabil is comming from an objet world
<asabil> any way thank you very much
<asabil> i understand better now
<asabil> :)
iorek has joined #ocaml
<iorek> hi there
<asabil> hi
<zmdkrbou> lo
smimou has quit ["bli"]
visq has left #ocaml []
<asabil> is it possible to define local functions ?
<mikeX> local as in?
<asabil> yes
<mikeX> I meant, what do you mean by 'local'?
<asabil> let test param = .... in ?
<asabil> local to another function
<zmdkrbou> yes
<mikeX> you mean nested functions?
<zmdkrbou> functions are values in ocaml
<asabil> yes
<asabil> okey, so
<asabil> let test param = .... in ?
<asabil> will work ?
<zmdkrbou> yes
<mikeX> yeap, it's not only possible, but actually quite common
<zmdkrbou> let add5 x = x + 5 in add7 y = y + (add5 2)
<asabil> okey thank you very much
<sieni> asabil: lol
<asabil> ???
<sieni> asabil: asking that in a functional programming language channel ("03:07 <asabil> is it possible to define local functions ?" is like asking that "is there an object system in java" on a java channel ;-)
<zmdkrbou> :)
<sieni> asabil:
<asabil> sieni, sorry i am kinda new to ocaml
<sieni> asabil: (I'm not trying to insult you, I just found that funny)
<asabil> :)
asabil has quit ["Leaving"]
iorek has quit ["Leaving"]
mikeX has quit ["zzzz"]
yondalf has joined #ocaml