Banana changed the topic of #ocaml to: OCaml 3.08 "Bastille Day" Release available ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
Iter has joined #ocaml
cjohnson has joined #ocaml
zylyn has joined #ocaml
<zylyn> need a start to ocaml, any link??
<jdrake> www.ocaml.org has some tutorials linked on the top left as well, but don't take it as an official site, it is only useful for historical links right now
<Smerdyakov> zylyn, look at the topic.
GrassHoper has quit ["using sirc version 2.211+KSIRC/1.2.1"]
cjohnson has quit ["Leaving"]
cjohnson has joined #ocaml
debona|r has joined #ocaml
tautologico has joined #ocaml
smimou has quit ["?"]
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
_fab has quit [Read error: 110 (Connection timed out)]
tautologico has quit ["Leaving"]
Xolution has joined #ocaml
cjohnson has quit [Read error: 60 (Operation timed out)]
cjohnson has joined #ocaml
Xolution has quit [Read error: 60 (Operation timed out)]
vezenchio has joined #ocaml
jdrake has quit ["Leaving"]
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
Xolution has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
Herrchen has joined #ocaml
Herrchen_ has quit [Read error: 110 (Connection timed out)]
Iter has quit [Read error: 110 (Connection timed out)]
Iter has joined #ocaml
Xolution has quit [Read error: 110 (Connection timed out)]
Xolution has joined #ocaml
cjohnson has joined #ocaml
Xolution has quit [Read error: 110 (Connection timed out)]
<debona|r> plonk
Xolution has joined #ocaml
GreyLensman has quit ["Leaving"]
<debona|r> what does this mean?
<debona|r> string -> (string -> 'a) -> int = <fun>
<debona|r> what's the second argument really?
<debona|r> a function which takes a string and returns 'a?
<debona|r> yes, yes, good
cjohnson has quit [Read error: 110 (Connection timed out)]
Xolution has quit [Connection timed out]
Xolution has joined #ocaml
<debona|r> does anyone actually talk?
cjohnson has joined #ocaml
Xolution has quit [Connection timed out]
debona|r has left #ocaml []
<Maddas> Usually, yes
<Maddas> Oh, he left
Xolution has joined #ocaml
cjohnson has quit [Read error: 60 (Operation timed out)]
cjohnson has joined #ocaml
leolio has joined #ocaml
vezenchio has quit ["all that is necessary for the triumph of evil is for good men to do nothing"]
vezenchio has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Xolution has quit [Read error: 110 (Connection timed out)]
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
smimou has joined #ocaml
Xolution has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
Xolution has quit [Read error: 60 (Operation timed out)]
bk_ has joined #ocaml
kinners has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
Xolution has joined #ocaml
cjohnson has quit [Connection timed out]
kinners has quit [Read error: 104 (Connection reset by peer)]
cjohnson has joined #ocaml
Xolution has quit [Read error: 110 (Connection timed out)]
mflux has joined #ocaml
fluxx has quit [Remote closed the connection]
Xolution has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
Xolution has quit [Read error: 110 (Connection timed out)]
Xolution has joined #ocaml
cjohnson has joined #ocaml
Xolution has quit [Read error: 110 (Connection timed out)]
Xolution has joined #ocaml
cjohnson has quit [Read error: 60 (Operation timed out)]
<Maddas> argh.
<Maddas> Xolution: Can you please fix your connection? Your joining/timing out is flooding the channel :-)
Xolution has quit [Connection timed out]
<Maddas> I guess he didn't hear that.
Xolution has joined #ocaml
cjohnson has joined #ocaml
Xolution has quit [Read error: 110 (Connection timed out)]
Xolution has joined #ocaml
Xolution has quit ["Leaving"]
cjohnson has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
Iter has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
debona|r has joined #ocaml
not_me2_ has joined #ocaml
not_me2 has quit [Read error: 104 (Connection reset by peer)]
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
Xolution has joined #ocaml
cjohnson has quit [Read error: 60 (Operation timed out)]
cjohnson has joined #ocaml
Xolution has quit [Read error: 60 (Operation timed out)]
pac_away has joined #ocaml
Xolution has joined #ocaml
pac_away has left #ocaml []
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Xolution has quit [Connection timed out]
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
GreyLensman has joined #ocaml
<oracle1> when having netstrings installed in usr/local/lib/ocaml via ocamlfind..why can't i use it in the toplevel?
<oracle1> #load does work, but i cant access the functions
<Riastradh> You probably need to use the #load command.
<oracle1> yes of course
<oracle1> i loaded str,unix what it depends on and then the .cma itself
_fab has quit [Remote closed the connection]
<Riastradh> And are you either using qualified names or opening the Netstrings structure?
<oracle1> Mimestring.scan_header
Xolution has joined #ocaml
<oracle1> i put this in a file:
<oracle1> #load "unix.cma"
<oracle1> #load "str.cma"
<oracle1> #load "/usr/local/lib/ocaml/3.08/netstring/netstring.cma"
<oracle1> let x = Mimestring.scan_header
<oracle1> this should ..work. but it does not
<leolio> i might be mistaken, but you could try to do:
<leolio> open Mimestring;;
<leolio> let x= scan_header ...
<Riastradh> Is there a Netstring structure that contains the Mimestring et al. structures?
<leolio> i don't know if it would make a difference
<Smerdyakov> leolio, you are almost certainly mistaken
<leolio> ok ok :)
<oracle1> thats the same
<oracle1> Riastradh yes.
<oracle1> there is a separated file called mimestring.ml in the source..
<leolio> i know, but when i started caml, my installation was a bit dirty
<Riastradh> Try Netstring.Mimestring.scan_header
<oracle1> that would be nasty
<leolio> and some things were behaving strangely ... :)
<Riastradh> Or open Netstring;; Mimestring.scan_header
<oracle1> nope.
<oracle1> unbound module netstring
<oracle1> actually, when i'm in toplevel and type everything manually, then i have access to Mimestring.scan_header
<oracle1> but not via a file
<oracle1> and loose the access as soon as i #use something.
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
Xolution has quit [Connection timed out]
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
laurent_ has joined #ocaml
laurent_ has quit [Read error: 104 (Connection reset by peer)]
laurent_ has joined #ocaml
leolio has quit [Read error: 110 (Connection timed out)]
laurent_ is now known as leolio
cjohnson has quit ["Leaving"]
smkl_ has joined #ocaml
smkl has quit [Read error: 60 (Operation timed out)]
mrsolo_ has quit [No route to host]
mrsolo_ has joined #ocaml
leolio has quit [Read error: 110 (Connection timed out)]
leolio has joined #ocaml
leolio has quit [Client Quit]
leolio has joined #ocaml
vezenchio has quit ["all that is necessary for the triumph of evil is for good men to do nothing"]
smkl_ has quit [Read error: 110 (Connection timed out)]
GreyLensman has quit ["Leaving"]
cjohnson has joined #ocaml
Xolution has joined #ocaml
mattam_ has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
<debona|r> where are functions for opening sockets etc?
Xolution has quit [Read error: 110 (Connection timed out)]
<smimou> debona|r: Unix
<debona|r> yes, found, thank you
<debona|r> ThreadUnix
<debona|r> unless there's another unix
<debona|r> goddammit
<debona|r> put this in th etopic too: http://caml.inria.fr/ocaml/htmlman/libref/
<debona|r> there should be a direct link to that in the manual, but I don't see one
<debona|r> that's the most useful page I've seen so far
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
<debona|r> I have dir A which includes file.ml which contains a module M. File B needs to use module M. How do I open it from file A?
leolio has quit [Read error: 110 (Connection timed out)]
<Smerdyakov> Are you using the toplevel or compiling?
<debona|r> compiling, but I'd like to know for both
<debona|r> because the tutorials I've read so far havne't really covered loading modules
<Smerdyakov> If you're compiling, just use open File.M
<Smerdyakov> Every file is its own module when compiling.
<Smerdyakov> At the toplevel, the #use directives loads files.
<debona|r> but where does file.ml need to be in B?
<Smerdyakov> I don't understand.
<Smerdyakov> File is the name for the module defined by a file called file.ml.
<debona|r> ok, so, I'm compiling ocaml-rss
<debona|r> ocaml-rss needs xml-light to work
<debona|r> when I compile ocaml-rss, I get unbound module Xml
smkl has joined #ocaml
<debona|r> so I'm wondering where to put xml.ml and the other files
<Smerdyakov> You aren't passing xml.ml on the command line.
<Smerdyakov> It doesn't matter where it is; it just needs to be in the command line.
<debona|r> now I don't understand...
<Smerdyakov> (Where "in the command line" could include a library that defines that module, or it could include some xml.ml if you want to do it that way.)
<debona|r> oho
Iter has joined #ocaml
<debona|r> ok, let me ask this question two
<debona|r> I'm in my home directory, $HOME
<debona|r> xml is in $HOME/xml/xml.ml
<debona|r> if I run ocaml while in my home directory, what must I write to open Xml?
<debona|r> open $HOME/xml/Xml ?
<debona|r> s/two/too
<debona|r> does the module file need a certain capitalization too?
<Smerdyakov> #load "$HOME/xml/xml/ml";;
<debona|r> oh
<Smerdyakov> Filenames are meaningless in the toplevel.
<Smerdyakov> Filenames are very important when compiling.
<debona|r> what do you mean by 'toplevel' ?
<debona|r> doesn't ocaml have a search path or soemthing where to find libraries?
<Smerdyakov> The interactive environment, the repl, etc.
<debona|r> i'll let you answer that before my next question :P
<debona|r> since your answer may answer both
<Smerdyakov> Maybe. I never deal with it.
<Smerdyakov> (That was an answer to "is there a search path?")
<Smerdyakov> I had already answered "what is toplevel" above.
<debona|r> hm ok
<debona|r> I'm still stuck then
<debona|r> /usr/local/bin/ocamlc.opt -pp 'grep -v DEBUG' -c rss_io.ml
<debona|r> File "/tmp/camlpp2128a4", line 25, characters 0-8:
<debona|r> Unbound module Xml
<debona|r> rss_io.ml has: open Xml
<debona|r> I put xml.ml in the same directory as rss_io.ml
<debona|r> which doesn't seem to make a difference
<debona|r> oh
<debona|r> hm, nope
monochrom has joined #ocaml
<debona|r> hm, I had to compile xml.ml and move the cmx file over
<debona|r> then it worked
<debona|r> er, or not
<debona|r> cmi file, not cmx
cjohnson has quit [Read error: 110 (Connection timed out)]
<debona|r> ok, thanks
cjohnson has joined #ocaml
<debona|r> stuck on something else now
<debona|r> Unbound constructor Arg.Set_string but I see nothing in the reference to indicate that Arg has such a funciton... so,
<debona|r> I give up
<debona|r> I'll just write it myself, If I can :)
debona|r has quit []
debona|r has joined #ocaml
maihem has quit ["Read error: 54 (Connection reset by chocolate)"]
maihem has joined #ocaml
Iter has quit [Read error: 110 (Connection timed out)]
Xolution has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
mrsolo_ has quit [Connection timed out]
leolio has joined #ocaml
Xolution has quit [Read error: 110 (Connection timed out)]
paolino has joined #ocaml
<paolino> ciao
<paolino> is it high like haskell the first step to climb here?
<smimou> ?
<paolino> for me haskell is like quantum mechanics I defer it for when I'm old
<smimou> hehe
<leolio> i wouldn't say it's too hard
<smimou> since ocaml is not purely functionnal I would say that it is easier than haskell
<paolino> what quantum mechanics?
<leolio> see, even someone like me managed to understand something
<leolio> i was talking about caml, i forgot everything about quantum mechanics just after the exam :)
<paolino> lazyness is different in caml?
<smimou> caml is not lazy
<gl> lazyness sucks goat.
* gl &
<paolino> my goats are sleeping now ....
<paolino> they are not any lazy eventually they are a climbing trouble ;
<paolino> lazyness has nothing to do with functionality I guess
<leolio> the things i like with caml is that most things appear more natural in caml
<leolio> thus, it's easier to understand how functions in an unknown library work
<leolio> and that helps being lazy
cjohnson has quit [Read error: 110 (Connection timed out)]
<smimou> paolino: lazyness depends on the way you evaluate things
cjohnson has joined #ocaml
<smimou> you can be functional and not lazy
<paolino> I thought funcional -> no loops -> recursion -> laziness but this is prob fantasy..
<Riastradh> Laziness is completely irrelevant to recursion.
<leolio> i think that recursion is eliminated by the compiler when it's possible
<smimou> and you're not obliged to have recursion in a functional language (it would not be very powerful though I guess)
<paolino> so I can loop in caml
<smimou> of course :)
<smimou> but caml is not purely functional remember that
<smimou> else loopings would have to be simulated by recursion
<Riastradh> Pure functionalness has nothing to do with whether or not there are looping constructs built-in to the language other than recursion.
<Riastradh> Scheme is not purely functional and it has no looping constructs beyond recursion that are built-in to the language.
Xolution has joined #ocaml
<paolino> My trip to here is very standard basic on a Spectrum,C on Atari,C++ on Linux,python on freeBSD but I'm not arrived I hope
<paolino> python is OK for me to die,but I start dislike its world
flurble has joined #ocaml
<paolino> they are proud of their beast but they don't lend it
<paolino> too many dogs on one piece of meat ...
<paolino> I suppose caml world is more village
<paolino> where are some docs about its history?
<flurble> sox: Failed reading Heaven%20is%20a%20place%20on%20earth.mp3: The file is not an MP3 file or it is corrupted
<leolio> this would be a starting point
<paolino> Are libraries painful to compile on freeBSD?
<leolio> not at all
<leolio> i wrote a small irc bot
<leolio> when i ported it on the server which happens to run freebsd
<leolio> it took 5 mins to get it running
<leolio> most libraries are in the ports
<leolio> and caml uses a program named findlib to manage libraries
cjohnson has quit [Read error: 110 (Connection timed out)]
<paolino> thnx see next week
paolino has left #ocaml []
flurble has left #ocaml []
debona|r has quit [Read error: 110 (Connection timed out)]
Xolution has quit [Read error: 110 (Connection timed out)]
Xolution has joined #ocaml
debona|r has joined #ocaml
cjohnson has joined #ocaml
leolio has quit ["Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC."]
Xolution has quit [Connection timed out]
debona|r has quit [Read error: 110 (Connection timed out)]
smimou has quit ["?"]
shawn has quit [Read error: 54 (Connection reset by peer)]
shawn has joined #ocaml
GreyLensman has joined #ocaml