<brion>
ocaml frightens me, but we've got that one program so i fiddle sometimes with it :)
<Connelly>
I guess it's nice for hardcore hackers
<Connelly>
Has anyone installed OCaml from source, and gotten a Bad Directory error?
<Smerdyakov>
No
GreyLensman has quit ["Leaving"]
vezenchio has quit ["--- reality is that which, when you stop believing in it, doesn't go away ---"]
Connelly has quit []
simon- has joined #ocaml
Herrchen has quit [calvino.freenode.net irc.freenode.net]
Tram has quit [calvino.freenode.net irc.freenode.net]
Herrchen has joined #ocaml
Tram has joined #ocaml
Herrchen has quit [Read error: 60 (Operation timed out)]
tvainika has left #ocaml []
Smerdy has joined #ocaml
Smerdyakov has quit [Read error: 110 (Connection timed out)]
Smerdy has quit [Remote closed the connection]
Smerdyakov has joined #ocaml
anyone has joined #ocaml
Vekza has joined #ocaml
Herrchen has joined #ocaml
Snark has joined #ocaml
<Snark>
slt
brion has left #ocaml []
anyone has quit ["To understand recursion, you must first understand recursion."]
bk__ has joined #ocaml
bk__ is now known as bk_
Snark has quit [Read error: 104 (Connection reset by peer)]
Snark has joined #ocaml
gim has joined #ocaml
noss has joined #ocaml
smimou has joined #ocaml
mrsolo has joined #ocaml
mrsolo_ has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
mrsolo_ has quit ["Leaving"]
nyah has joined #ocaml
tea has quit [Read error: 54 (Connection reset by peer)]
<nyah>
is anyone available to take some (probably very basic) questions related to compilation ?
<Snark>
nyah: on irc, you generally begin by saying "hi", then ask your question, then wait all day long for an answer :-)
<nyah>
i've read thru the manual, have skimmed jason hickey's book, etc. but am still a bit lost (this is my first effort at learning a compiled language since fortran77 back in uni)
<nyah>
good point snark
<nyah>
:)
<nyah>
what's the difference between ocamlc and ocamlopt?
<nyah>
why would i use ocamlopt?
<nyah>
the manual refers to ocamlc as "batch compilation" and ocamlopt as "native code compilation"
<nyah>
Ii'm on win32, btw)
<nyah>
i'm on on win32, rather
<Tram>
nyah: do you understand how java works with the virtual machine (compared to C)?
<nyah>
i'm not well-acquainted with java but i understand that u need to have a vm to run java progs
<nyah>
do you mean that the final products compiled w/ocamlc can only run on machines which have ocaml installed?
<Tram>
yes, with ocamlc, it will run on a virtual machine
<Tram>
whereas using ocamlopt, it will be optimised for your config (like is C/pascal/...)
<nyah>
could i distribute the product of ocamlopt compilation to another win32 person who does not have ocaml installed?
<nyah>
(and have it work)
<Tram>
nyah yes
<nyah>
ah, thanks guys ... getting quite a bit clearer
<nyah>
in hickey's book, the he shows an ocamlc compilation in 3 steps
<nyah>
ocamlc -c x.mli
<nyah>
for a module that he's using with his program
<nyah>
to produce x.cmi
<nyah>
then ocamlc -c x.ml
<nyah>
to produce .cmo files
<nyah>
then ocamlc -o test x.cmo test.cmo
<nyah>
are all compilations w/ocamlc going to be 3 steps like that?
<nyah>
(i omitted compilation on test.ml in the 2nd step above, sorry)
<_fab>
nyah: no, for small programs with only one module you can compile and link in one step like "ocamlopt -o test test.ml"
vezenchio has joined #ocaml
<nyah>
thanQ - that's what i thought ... i did a very simple 2 line prog in one step and it worked so i wondered
<_fab>
hhm, acutally you can do this with bigger programs too, but you should use a makefile then
<nyah>
another thing ... in some cases, it seems that explicitly specifying a library that ur using in the compilation is necessary but not in others
<nyah>
my simple 2 line prog used Printf but i didn't need to specify it in the compilation step
<nyah>
but when i tried to compile a short prog that used the Unix library, i got the undefined global error message when i tried to compile
<nyah>
and had to specify it in order to get it to go
<nyah>
why is that?
<_fab>
Printf is in the stdlib, which is always linked, while Unix and for example String is not
<nyah>
how can one know whether a lib is in the stdlib or no?t
<_fab>
nyah: you can use "ocamlc -i foo.ml > foo.mli" to generate a interface file, but you should edit it afterwards to only export the symbols you need
<nyah>
ah thanks fab !
nyah has quit ["ChatZilla 0.9.52B [Mozilla rv:1.6/20040113]"]
<async>
sundeep: emacs is quite condusive to ocaml development, because you can launch top-levels from within the editor
<async>
i'd definately give it a try
CiscoKid has joined #ocaml
<sundeep>
bk, thanks! i'll try that
<sundeep>
async, i know emacs has that (but i have to learn emacs first;)
<gl>
(autoload 'camldebug "camldebug" "Run the Caml debugger" t)
<gl>
paste this in your .emacs
<Snark>
gl: if meta-x tuareg-mode says "no match", then I guess that won't work?
<bk_>
probably not
* Snark
dives into emacs' doc
Axioplase has joined #ocaml
<Axioplase>
Chat Lu!
<Axioplase>
(hi)
<bk_>
hi
CiscoKid has quit ["Leaving"]
mattam_ has joined #ocaml
mattam has quit [Nick collision from services.]
mattam_ is now known as mattam
CiscoKid has joined #ocaml
CiscoKid has quit [Remote closed the connection]
CiscoKid has joined #ocaml
<bk_>
why would i deliberately want to use polymorphic variant types instead of fixed types ?
<Axioplase>
is there something *fast* to copy an array to screen ( else than Graphics.make_image (Graphics.create_image array) x y) ?)
maihem has joined #ocaml
reltuk has left #ocaml []
chimikal has joined #ocaml
<sundeep>
bk, i am not sure if i understood what you mean, but a list is an example of a data structure which doesn't need to know the type of its elements
<bk_>
have you read section 4.2 of the manual about polymorphic variants ?
<_fab>
bk_: for example if you want to define a function which only accepts a subset of variants
<sundeep>
i guess not, *time to shut up:)*
Demitar has joined #ocaml
<_fab>
bk_: or to map the gtk type system to ocaml ;)
<bk_>
yes, i wasn't explicitly thinking about gtk tho, but you're right, its used there, too
<Snark>
yes!
<Snark>
I should have begun by reading /usr/share/doc/tuareg-mode/README.Debian
<Snark>
oh, the wonderful colors!
<bk_>
tuaregs indentation is also very nice for readybility
<Demitar>
bk_, I tend to modify parts of it to avoid too much indentation.
<bk_>
oic
<Snark>
how do I ask it to indent the full buffer?
<Demitar>
The most annoying thing being indenting two spaces after "in".
<Snark>
Demitar: this one doesn't look bad
<bk_>
ESC C-\ indent-region
<Snark>
bk_: that didn't seem to do the trick...
<bk_>
oh
<bk_>
have you marked a region ?
<Snark>
C-space
<bk_>
ya
<Snark>
then go to end of the buffer
<Snark>
it seems it has little problems with empty lines
<Snark>
if I hit tab on an empty lines, it adds spaces there
<bk_>
it does
<Snark>
ah
<Snark>
I had a let something = whatever
<Snark>
without ";;"
<Snark>
(correct since the next line has begins with "let")
<Snark>
that was that that made tuareg try to add spaced
<Snark>
that was that that made tuareg try to add spaces
<bk_>
he ok
<_fab>
if i read less bytes from a Unix.file_descr than available, a Unix.select afterwards, won't put it into the "ready to read" list. is this a ocaml bug or does unix act the same way?
mads has joined #ocaml
<mads>
How do I close ocaml...?
<Axioplase>
(indenting: gg=G with vim :p)
<mads>
I can't.. =(
<Axioplase>
mads: exit 0 ?
<mads>
thanks :D
<Demitar>
mad ^D probably does what you want too.
<Axioplase>
is it possible to match a ^D as a char? or should i try for fun ?
<Demitar>
Well eof is a valid character in a file sometimes used to trick text viewers from ignoring non-text portions of binary files. But it might be caught by the shell though.
<Axioplase>
would i gain speed if i use double buffering with a simple Graphics.draw_image ?
<Axioplase>
Demitar: well, it complains little bit, but it works :)
<Demitar>
Axioplase, double buffering makes things slower, it avoids flickering nothing else.
<Axioplase>
does it?
<Demitar>
What happends it that you draw everything into an intermediary buffer and then write all that data to screen at once rather than doing everything directly on the screen.
<Demitar>
(There might be some corner cases where writing stuff to the hardware memory is slower.)
<Axioplase>
Since i don't know how to create and write in a new buffer, i'm using an array :/
teratorn has joined #ocaml
bk_ has quit ["I'll be back"]
bk_ has joined #ocaml
Phreaze has joined #ocaml
mads has quit [Read error: 110 (Connection timed out)]
noss has joined #ocaml
monotonom has joined #ocaml
Demitar has quit ["Bubbles..."]
Axioplase has quit [Read error: 110 (Connection timed out)]
Snark has quit [Read error: 60 (Operation timed out)]
Phreaze is now known as Axioplase
Snark has joined #ocaml
<Axioplase>
argh.. can think of a wave scroller with recursion :)
<Snark>
good night
Snark has left #ocaml []
maihem has quit ["Client exiting"]
Dybbuk has quit [Remote closed the connection]
Dybbuk has joined #ocaml
Dybbuk has quit [Remote closed the connection]
Dybbuk has joined #ocaml
Shammah has joined #ocaml
vezenchio has quit ["--- reality is that which, when you stop believing in it, doesn't go away ---"]
Dybbuk has quit [Remote closed the connection]
Dybbuk has joined #ocaml
chimikal has left #ocaml []
Dybbuk has quit [Remote closed the connection]
Dybbuk has joined #ocaml
Dybbuk has quit [Remote closed the connection]
noss has quit ["Leaving"]
Dybbuk has joined #ocaml
gim has quit []
buggs^z has joined #ocaml
buggs|afk has quit [Read error: 104 (Connection reset by peer)]
Dybbuk has quit [Remote closed the connection]
Dybbuk has joined #ocaml
<Axioplase>
++
Axioplase has quit [Remote closed the connection]
smimou has quit ["?"]
cmeme has quit [Read error: 104 (Connection reset by peer)]
skylan has quit [calvino.freenode.net irc.freenode.net]
Tram has quit [calvino.freenode.net irc.freenode.net]
CiscoKid has quit [calvino.freenode.net irc.freenode.net]
sundeep has quit [calvino.freenode.net irc.freenode.net]
tea has quit [calvino.freenode.net irc.freenode.net]
Herrchen has quit [calvino.freenode.net irc.freenode.net]
JPL-Justin-away has quit [calvino.freenode.net irc.freenode.net]
shrimpx has quit [calvino.freenode.net irc.freenode.net]
rox has quit [calvino.freenode.net irc.freenode.net]
Shammah has quit [calvino.freenode.net irc.freenode.net]
Banana has quit [calvino.freenode.net irc.freenode.net]
Hipo has quit [calvino.freenode.net irc.freenode.net]
mellum has quit [calvino.freenode.net irc.freenode.net]
Hipo has joined #ocaml
skylan has joined #ocaml
Tram has joined #ocaml
bk_ has quit ["I'll be back"]
shrimpx has joined #ocaml
mellum has joined #ocaml
Shammah has joined #ocaml
CiscoKid has joined #ocaml
sundeep has joined #ocaml
JPL-Justin-away has joined #ocaml
tea has joined #ocaml
rox has joined #ocaml
cmeme has joined #ocaml
Shammah has quit [Read error: 60 (Operation timed out)]