mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
jlouis has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
buluca has joined #ocaml
seafood_ has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
camgirl29 has joined #ocaml
camgirl29 has quit [Client Quit]
seafood_ has quit []
mordaunt has quit [Read error: 104 (Connection reset by peer)]
jlouis_ has joined #ocaml
david_koontz_ has joined #ocaml
david_koontz_ has quit [Remote closed the connection]
david_koontz_ has joined #ocaml
david_koontz has quit [Read error: 104 (Connection reset by peer)]
Jedai has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
hkBst has quit ["Konversation terminated!"]
Torment has quit [Read error: 110 (Connection timed out)]
mordaunt has joined #ocaml
seafood_ has joined #ocaml
seafood_ has quit [Client Quit]
seafood_ has joined #ocaml
seafood_ has left #ocaml []
smimou has quit ["bli"]
jeremiah has joined #ocaml
jeremiah has quit [Remote closed the connection]
jeremiah has joined #ocaml
Abo-Marwan has joined #ocaml
jlouis has joined #ocaml
mrsolo has joined #ocaml
david_koontz_ has quit []
jlouis_ has quit [Connection timed out]
bhall has quit [Read error: 110 (Connection timed out)]
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
buluca has quit [Read error: 113 (No route to host)]
jlouis has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
seafood_ has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
ikaros has joined #ocaml
kazzmir_ has quit [Read error: 104 (Connection reset by peer)]
kazzmir_ has joined #ocaml
sergez has quit [Read error: 104 (Connection reset by peer)]
mrsolo has quit ["Leaving"]
l_a_m has quit ["leaving"]
l_a_m has joined #ocaml
ygrek has joined #ocaml
seafood_ has quit []
gaja has joined #ocaml
apastinen has joined #ocaml
<apastinen> hi, i am studying ocaml, how can i compile the snippets in end of the page in tutorial: http://www.ocaml-tutorial.org/the_structure_of_ocaml_programs
Yoric[DT] has joined #ocaml
<ulfdoz> apastinen: If you're on *nix, you should have a quite detailed manpage for ocamlc.
<ulfdoz> On windows, the same documentation probably resides somewhere, too, but I don't know where.
<tsuyoshi> it would be a little easier with ocamlfind, since it uses lablgtk
<ulfdoz> huh, a monstrous package.
seafood_ has joined #ocaml
<ulfdoz> However, the tutorial talks about lablgtk 1.2. I just installed 2.6, so I'm not really wondering about unbound symbols.
<apastinen> ulfdoz: ah ok.. i will check manpage. thanks
filp has joined #ocaml
ttamttam has joined #ocaml
bhall has joined #ocaml
Len1 has quit [Read error: 110 (Connection timed out)]
mrsolo has joined #ocaml
<Yoric[DT]> hi
<ttamttam> hi
seafood__ has joined #ocaml
sergez has joined #ocaml
sergez has quit [Read error: 104 (Connection reset by peer)]
seafood_ has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has quit [Read error: 110 (Connection timed out)]
bhall has quit [Read error: 110 (Connection timed out)]
seafood__ has quit []
seafood_ has joined #ocaml
Yoric[DT] has joined #ocaml
mrsolo has quit ["Leaving"]
Mr_Awesome has quit ["aunt jemima is the devil!"]
ygrek has quit [Remote closed the connection]
hkBst has joined #ocaml
Abo-Marwan has quit [Read error: 104 (Connection reset by peer)]
screwt8 has quit [Read error: 104 (Connection reset by peer)]
screwt8 has joined #ocaml
smimou has joined #ocaml
Abo-Marwan has joined #ocaml
ahuxley has quit []
seafood__ has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
Abo-Marwan has quit [Remote closed the connection]
screwt8 has quit [Remote closed the connection]
Smerdyakov has quit ["Leaving"]
Smerdyakov has joined #ocaml
Abo-Marwan has joined #ocaml
screwt8 has joined #ocaml
pango has quit [Remote closed the connection]
seafood__ has quit []
pango has joined #ocaml
seafood_ has joined #ocaml
seafood_ has quit [Client Quit]
netx has joined #ocaml
mordaunt has quit [Read error: 104 (Connection reset by peer)]
zvrba has quit [Read error: 104 (Connection reset by peer)]
zvrba has joined #ocaml
buluca has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Remote closed the connection]
<unfo-> is there a "The Book" for OCaml?
<rwmjones> unfo-, no, but there are some online books & tutorials
<unfo-> rwmjones, oki
<rwmjones> unfo-, start at http://ocaml-tutorial.org or google
<unfo-> reading http://eigenclass.org/hiki/wide-finder-conclusions <- and that perked my interest once again towards OCaml
<unfo-> rwmjones, thank you :)
apastinen has quit [Read error: 104 (Connection reset by peer)]
<hcarty> What is the equivalent of the Perl $output = `some_program` in OCaml? The Unix module seems to have functions which run some_program in parallel, but I just want to wait for the output
<rwmjones> hcarty, Unix.open_process_in
<rwmjones> hcarty, but also try this ...
<rwmjones> let rec input_all_lines chan =
<rwmjones> try
<rwmjones> let line = input_line chan in
<rwmjones> line :: input_all_lines chan
<rwmjones> with
<rwmjones> End_of_file -> []
<rwmjones> let pget cmd =
<rwmjones> let chan = Unix.open_process_in cmd in
<rwmjones> let lines = input_all_lines chan in
<rwmjones> let stat = Unix.close_process_in chan in
<rwmjones> (match stat with
<rwmjones> Unix.WEXITED 0 -> ()
<rwmjones> | Unix.WEXITED i ->
<rwmjones> failwith ("command failed with code " ^ string_of_int i)
<rwmjones> | Unix.WSIGNALED i ->
<rwmjones> failwith ("command killed by signal " ^ string_of_int i)
<rwmjones> | Unix.WSTOPPED i ->
<rwmjones> failwith ("command stopped by signal " ^ string_of_int i));
<rwmjones> lines
<hcarty> rwmjones: Excellent, thanks!
<rwmjones> obviously, output = pget "my command"
<rwmjones> I mean
<rwmjones> let output = pget "my command"
<flux> it's a bit more complicated to have a tail-recursive input_all_lines, though, but I suppose that serves as an example..
<rwmjones> unlike perl, output will be a list of lines (string list)
<rwmjones> yeah, that input_all_lines isn't the best
<hcarty> That should work for what I need now though, so thank you very much
<hcarty> I just want to catch output from cpp at the moment
<hcarty> Some slightly-automated camlidl binding generation. The code is currently in quickly-hacked Perl.
<rwmjones> hcarty, that input_all_lines function will probably blow the stack if you call it on a large file
<rwmjones> hcarty, also did you know about perl4caml?
diakopter has joined #ocaml
<hcarty> rwmjones: Yes, I've seen perl4caml. I may end up using that if something is too hairy in OCaml.
<hcarty> The header file I'm working with at the moment is 812 lines, so I think non-tailrecursive is ok for the time being
ikaros_ has joined #ocaml
<hcarty> rwmjones: I just gave it a quick test, and it works beautifully for what I currently need
<hcarty> Thank you again
ikaros has quit [Read error: 110 (Connection timed out)]
RobertFischer has joined #ocaml
asmanur has joined #ocaml
Tetsuo has joined #ocaml
tobill has joined #ocaml
RobertFischer has quit ["If you can't get enough of me, check out http://smokejumperit.com and http://enfranchisedmind.com/blog"]
tobill has left #ocaml []
pango has quit [Remote closed the connection]
Mr_Awesome has joined #ocaml
pango has joined #ocaml
RobertFischer has joined #ocaml
apastinen has joined #ocaml
<apastinen> hi, i am studing ocaml language, and i have started to thing where do you ever need to use this language? is there some commercial support or any other reasons? the grammar is also very exotic compared to other languages so i can think that legacy code is also very hard to maintain..
<RobertFischer> 1) You should use Ocaml whenever you need safety in your code, and C++-equivalent speeds.
<RobertFischer> 2) There is no business that backs Ocaml (like 37Signals backing Rails or Sun backing Java), but there is a fair amount of freelance support.
<RobertFischer> 3) The grammar is not that exotic compared to "other languages". It is exotic compared to Algol-derivative languages (like C++/Java). And, even that, it's not *that* exotic once you get past the few semicolons, brackets, and parenthesis.
<RobertFischer> 4) The powerful type system and functional style of development makes legacy code a lot easier to maintain than other languages. This is coming from a long-term Perl and Java hack.
<RobertFischer> Any other questions?
<apastinen> ah ok, thanks.
<apastinen> this is good for now. thanks :)
<RobertFischer> There's a pretty strong learning curve to Ocaml (although not as bad as, say, Haskell). Thankfully, it has imperative and OO training wheels while you're learning.
<apastinen> yeah, i just compare is languages, which is familiar for me, like Java, C, ruby, lisp etc. but i think this is quite different.. but i will continue studying so maby it will open one day..
<RobertFischer> It's not exceedingly different from Lisp once you get past superficialities.
<RobertFischer> Don't think programming when you're coding Ocaml.
<RobertFischer> Think Maths.
<apastinen> cool, well actually i am not even Lisp master, i just did some emacs stuff with it years ago..
<apastinen> i like to use ocaml to do native code, for windows and linux, and i think it should work for that?
<RobertFischer> What do you mean "native code"?
<apastinen> elf & exe..
<apastinen> :)
<RobertFischer> Sure, it will do that. Ocaml will compile to native, at which point it has C++-levels of performance.
<apastinen> very well.
<RobertFischer> Have at and enjoy. :D
Abo-Marwan has quit [Read error: 104 (Connection reset by peer)]
screwt8 has quit [Read error: 104 (Connection reset by peer)]
bluestorm_ has joined #ocaml
bluestorm_ has quit [Remote closed the connection]
<apastinen> yeah, thanks. :)
RobertFischer has quit ["If you can't get enough of me, check out http://smokejumperit.com and http://enfranchisedmind.com/blog"]
screwt8 has joined #ocaml
screwt8 has quit [Remote closed the connection]
Yoric[DT] has quit ["Ex-Chat"]
<jonafan> exotic grammar? are you kidding?
screwt8 has joined #ocaml
<jonafan> compared to c++, java, or even c, ocaml's grammar is ludicrously simple
<apastinen> not for newbies =P Java has tons of code and tutorial and they teach it everywhere all the time and everyone knows it so it is easier get famialiar with it.. :) I don't know anyone in real world who has ever even hear about OCAML..
<jonafan> maybe so, but popularity is a poor indicator of quality
Abo-Marwan has joined #ocaml
<jonafan> another way to look at it is that almost everyone knows java, and since most people are poor programmers, most java code sucks and therefore most java examples suck
<apastinen> you are absolute right.
<jonafan> those who seek out something like ocaml are wise enough to see that programming could be better, so most ocaml code is higher quality
<jonafan> (once you get the hang of it!)
<jonafan> anyway, i find ocaml's compiler infinitely more helpful in identifying problems with my code than java's
<apastinen> sounds very good. but still i can see domains for all other languages, ruby has web, java has commercial support, C/C++ for native, lisp has emacs, but which is for OCAML? but maby it is because i dont know nothing about its history..
<jonafan> the errors are weird, but java's compiler really doesn't do much more than bitch about missing semicolons
<jonafan> ocaml's compiler seems better at showing logical problems
<apastinen> ok..
<ttamttam> As a bad programmer, I can't use anything else than OCaml
<jonafan> true, it isn't used for much
<apastinen> :D
<jonafan> the achilles' heel is that it's practically useless!
<apastinen> is the compiler still maintained and developed?
<jonafan> nah, i think there's a web dev framework, and you can make command line apps definitely, and i think there are gtk bindings?
<jonafan> i think the most popular ocaml app is mldonkey
<jonafan> yeah, the compiler is still maintained
<jonafan> the latest version came out semi-recently i think
<ttamttam> And I use it at work: libraries wrapped in C DLL. Users do not notice this is OCaml.
<jonafan> may i guess
<jonafan> haha
<jonafan> i think too many people get scared off by the + +. +/ thing
<ttamttam> OCaml is not just maintained: this is the work of one INRIA laboratory. It evolves.
<apastinen> yes that is where i like to use ocaml. to write native code. C is too slow and there is portability issues on linux & windows etc. stuff
<apastinen> sounds great. maby this is good time to study it, when it is famous, i can find a job as OCAML programmer :)
<jonafan> haha
<jonafan> yes
<ttamttam> Depends.
<ttamttam> If you choose one very big company, it may be difficult.
<ttamttam> But in small ones, like mine... That is really a good tool.
<apastinen> well.. i do program as a freelancer.. but i am so full of that Java and can't get any kicks from it so i like to start something new..
<ttamttam> Another point before leaving: studying OCaml greatly improved how I used other language as well.
ttamttam has quit ["Leaving."]
<apastinen> yeps, but now i will go jogging. c ya later.
apastinen has quit ["leaving"]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
jeremiah has joined #ocaml
ikaros_ has quit ["segfault"]
ygrek has joined #ocaml
RobertFischer has joined #ocaml
loufoque has joined #ocaml
<loufoque> is there a way to debug exceptions with lablgtk? Since exceptions musn't propagate from GTK+ signals it catches them, but gives no useful info.
filp has quit ["Bye"]
ikaros has joined #ocaml
Yoric[DT] has joined #ocaml
bluestorm_ has joined #ocaml
Yoric[DT] has quit [Remote closed the connection]
RobertFischer has quit ["If you can't get enough of me, check out http://smokejumperit.com and http://enfranchisedmind.com/blog"]
screwt8 has quit [Read error: 104 (Connection reset by peer)]
Abo-Marwan has quit [Read error: 104 (Connection reset by peer)]
loufoque has quit [Remote closed the connection]
kelaouchi has quit ["leaving"]
buluca has quit [Read error: 113 (No route to host)]
Yoric[DT] has joined #ocaml
mulander has joined #ocaml
bluestorm_ has quit [Remote closed the connection]
david_koontz has joined #ocaml
Abo-Marwan has joined #ocaml
mav has joined #ocaml
pango has quit ["I shouldn't really be here - dircproxy 1.0.5"]
pango has joined #ocaml
asmanur has quit [Read error: 110 (Connection timed out)]
ygrek has quit [Remote closed the connection]
ttamttam has joined #ocaml
ttamttam has quit ["Leaving."]
ikaros has quit [Remote closed the connection]
ikaros has joined #ocaml
Tetsuo has quit ["Leaving"]
seafood_ has joined #ocaml
seafood_ has quit []
seafood_ has joined #ocaml
seafood_ has quit [Client Quit]
Torment has joined #ocaml
chris2 has joined #ocaml
<chris2> hi, which metaocaml do i need with ocaml 3.10.0?
mav_ has joined #ocaml
filp has joined #ocaml
buluca has joined #ocaml
mulander has quit [Connection reset by peer]
mav has quit [Read error: 110 (Connection timed out)]
Jedai has quit [Read error: 110 (Connection timed out)]
netx has quit [Remote closed the connection]
seafood_ has joined #ocaml
filp has quit ["Bye"]
screwt8 has joined #ocaml
<hcarty> chris2: I think there is some 3.10.0 metaocaml stuff in the Debian subversion repository
<hcarty> There may be something in there indicating where it comes from
<chris2> cool, thanks
mav_ has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has quit ["Ex-Chat"]