<ita>
is there a way to generate a quick and dirty .mli file from a .ml file ?
<Banana>
ocamlc -i toto.ml > toto.mli ?
<ita>
Banana: excellent, thanks ! :)
Snark has joined #ocaml
ionOSu has quit [orwell.freenode.net irc.freenode.net]
_fab has quit [orwell.freenode.net irc.freenode.net]
ionOSu has joined #ocaml
_fab has joined #ocaml
fariseo_ has joined #ocaml
kinners has quit [Read error: 110 (Connection timed out)]
kinners has joined #ocaml
froog has left #ocaml []
fariseo has quit [Read error: 110 (Connection timed out)]
ionOSu has quit [Remote closed the connection]
vezenchio has quit ["With little power comes little responsibility"]
vezenchio has joined #ocaml
dv has quit [Read error: 110 (Connection timed out)]
kinners has quit [Read error: 60 (Operation timed out)]
cjohnson has joined #ocaml
ionOSu has joined #ocaml
<ita>
how do you make big programs in objective caml ? you usually make a module for each big class ?
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
<mattam>
you usually make one module for each 'functionality', depending on the app
<slashvar[lri]>
Yop
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
<ita>
mattam: do you have an example of that ? :)
<ita>
mattam: in c++ .. i make usually one .cpp file by big class - does it sound reasonable to do a module for each big class in ocaml too ?
<mattam>
yes
<ita>
ok, thanks
<slashvar[lri]>
ita: the main idea is that when you build a data structure (more or less equivalent to a class) you create a module
<slashvar[lri]>
since the simplest is to a have a module per file ...
<ronwalf>
Can you have sub modules?
<ronwalf>
That's one thing that's been bothering me - it looks like the top level can get cluttered rather quickly
<slashvar[lri]>
ronwalf: since you can construct a module everywhere, yes
<slashvar[lri]>
take a look a the documentation
lambdawar has quit [Remote closed the connection]
<ronwalf>
But that doesn't really help in seperating the code, does it?
pac_away has joined #ocaml
<ita>
mmm it's a lot like includes in java or c++ finally
<ita>
signatures are just a lot harder to produce :)
<slashvar[lri]>
ronwalf: the main idea is to create functor (function from module to module, to do it short)
<slashvar[lri]>
module acts more like a kind of class/object definition than a kind of separate compilation units "a la" Pascal
<Smerdyakov>
Comparing to "class/object" is a bad idea.
<Smerdyakov>
Classes are tied to single type definitions.
<Smerdyakov>
Modules can contain 0 or many type definitions.
<ita>
more like class declaration/implementation then ?
<Smerdyakov>
No. Any analogy using OO terms will be flawed.
<Smerdyakov>
Most OCaml programmers never use its OO features.
<slashvar[lri]>
Smerdyakov: yes I agree, but module can be seen as a tool to construct "objects" (not in OO sense) acting like black box
<ita>
more like splitting declaration/implementation then ??
<Smerdyakov>
ita, that's better.
<ita>
(or am i wrong again ?)
<ita>
ok
<Smerdyakov>
ita, the key thing is that one specification can have multiple implementations.
<slashvar[lri]>
it is also the main goal of objects (or Abtract types "a la" Dyckstra (sorry for the spelling ... ;( )
<Smerdyakov>
ita, and you can write functors that take modules meeting particular specifications as input.
<ita>
my head hurts :)
<slashvar[lri]>
hehe ;)
<ita>
i have a compilation errror : binpack.o(.text+0x16cc): dans la fonction « Binpack__entry »: : undefined reference to `Printf__fprintf_131' - (compiling using : ocamlopt -c pic.mli ; ocamlopt -I . -thread -c pic.ml; ocamlopt -I . -thread threads.cmxa -c binpack.ml; ocamlopt -thread unix.cmxa threads.cmxa binpack.o pic.o -o prodcons), does anyone know how to solve this ... ?
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
<ita>
any idea even ?
<Smerdyakov>
That looks like non-English.
<Smerdyakov>
I only speak English. :)
srv has quit [Read error: 104 (Connection reset by peer)]
<mellum>
Smerdyakov: really? You speak only one language?
srv has joined #ocaml
<Smerdyakov>
That's right. It's the secret of my success.
<ita>
Smerdyakov: the offending words meant "in the function « Binpack__entry "
<ita>
looks like my compilation commands are not adequate
<Smerdyakov>
ita, sorry, I don't know what's wrong, but you might somehow be leaving out a request to link the Printf module.
<ita>
how ?
<Smerdyakov>
I don't know.
<ita>
i have also undefined `Thread__create_66' 'caml_thread_join' and 'Random__int_102'
<ita>
let's play "get the (compilation) flag" :-]
<ita>
it does work as a single line ("ocamlopt -thread unix.cmxa threads.cmxa binpack.ml pic.ml -o prodcons") .. odd, isn't it ?
gim has quit [Read error: 104 (Connection reset by peer)]
gim has joined #ocaml
<ita>
ok, i think i have it
<ita>
and it's the weekend now
<ita>
cu later all
ita has quit ["leaving"]
larsr has joined #ocaml
whee has joined #ocaml
ionOSu has quit ["Leaving"]
<dan|el>
ocamlerz
maihem has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
whee has quit []
jason_ has joined #ocaml
pac_away is now known as pac_
gim has quit [Read error: 110 (Connection timed out)]
async has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
gim has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
async_ has joined #ocaml
buggs^z has quit [Connection timed out]
ionOSu has joined #ocaml
vezenchio has quit ["With little power comes little responsibility"]
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
mattam_ has joined #ocaml
AshW8rk3 has joined #ocaml
async has quit [Read error: 110 (Connection timed out)]
mattam has quit [Read error: 110 (Connection timed out)]
larsr has quit [Read error: 54 (Connection reset by peer)]
pac_ is now known as pac_a
pac_a is now known as pac_aw
AshW8rk3 has quit [Remote closed the connection]
pac_aw has quit ["leaving"]
Snark has quit ["Parti"]
monotonom has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
ithkuil has joined #ocaml
<ithkuil>
i just want to convert an array to a list
<jason_>
Match one element at a time and append it to a list?
<mflux>
or just use Array.to_list?-)
<Riastradh>
Array.of_list
<Riastradh>
...oh, wiat.
<mflux>
whops
<Riastradh>
Wait, even.
<mflux>
oh yes, it is Array.to_list
* Riastradh
misread the request.
<dan|el>
are you guys sure now? :)
<Riastradh>
Quite.
<ithkuil>
Array.to_list why didnt that show up in the docs