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!)
seafoodX has joined #ocaml
ygrek_ has joined #ocaml
joshcryer has quit [Read error: 104 (Connection reset by peer)]
joshcryer has joined #ocaml
ygrek has quit [Remote closed the connection]
pants1 has quit [Read error: 110 (Connection timed out)]
chs_ has joined #ocaml
yminsky has joined #ocaml
joshuaecook has joined #ocaml
<joshuaecook> I'm having a little trouble grasping the stream/parser [<>] syntax and Stream module
<joshuaecook> Say, if I wanted to build a stream and parser to solve Problem 1 of Project Euler <http://projecteuler.net/index.php?section=view&id=1>
<joshuaecook> How would a stream be built to represent natural multiples of 3 or 5 under 1000?
pants1 has joined #ocaml
ygrek_ has quit [Remote closed the connection]
pants1 has quit [Client Quit]
Smerdyakov has joined #ocaml
joshuaecook has quit ["CGI:IRC (Ping timeout)"]
yminsky has quit []
pants1 has joined #ocaml
Jessehk has quit ["Leaving"]
_blackdog__ has quit ["Ex-Chat"]
<tsuyoshi> oh, I haven't used java at all
<tsuyoshi> my experience is mostly in lisp, c, and assembly
pants1 has quit [Read error: 110 (Connection timed out)]
pants1 has joined #ocaml
Submarine has joined #ocaml
delamarche has joined #ocaml
love-pingoo has joined #ocaml
delamarche has quit []
love-pingoo has quit ["Connection reset by pear"]
smimou has joined #ocaml
Submarine has quit [Remote closed the connection]
vital304 has quit ["Leaving."]
pants1 has quit ["Leaving."]
smimou has quit ["bli"]
LeCamarade has joined #ocaml
ppsmimou has quit ["Leaving"]
Mr_Awesome has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
ppsmimou has joined #ocaml
rwmjones has joined #ocaml
love-pingoo has joined #ocaml
chs_ has quit []
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
seafoodX has quit [Remote closed the connection]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
bzzbzz has quit [Read error: 54 (Connection reset by peer)]
DirkT has joined #ocaml
ygrek has joined #ocaml
love-pingoo has quit ["go-go-gadgeto-teaching"]
leo037 has joined #ocaml
<kelaouchi> mbishop this IDE has plugins for C/C++, XML
<kelaouchi> so i was wondering if there were an OCaml plugin
<kelaouchi> as Eclpise has...
m3ga has joined #ocaml
ppsmimou has quit [Read error: 110 (Connection timed out)]
<rwmjones> kelaouchi, maybe you mean ODT? http://ocamldt.free.fr/
ppsmimou has joined #ocaml
<kelaouchi> rwmjones yes this is for eclipse
<kelaouchi> is there something similar for netbeans ?
<rwmjones> I have no idea about IDEs (except emacs) ...
<kelaouchi> ok np
vincenz has quit [Read error: 104 (Connection reset by peer)]
vincenz has joined #ocaml
<ygrek> hello. Smth strange happens in my code - the function is executed though I dont call it... and it is not let _ = ... How that can be?
<ygrek> let t6 =
<ygrek> let rec aloop n =
<ygrek> print_endline (string_of_int n);
<ygrek> if n > 0 then aloop (n - 1)
<ygrek> in
<ygrek> aloop 10
<flux> ygrek, that's not a function, it's a value
<flux> ygrek, let t6 () = .. is what you're after
<flux> and you call it with t6 ()
<m3ga> thats not a function, that an assignment to a value
<m3ga> err, what flux said
<ygrek> ah
<ygrek> got it
<ygrek> thanks!
visage has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
tomppa has joined #ocaml
tomppa has quit ["Ex-Chat"]
Demitar has joined #ocaml
<LeCamarade> rwmjones: PING
<rwmjones> LeCamarade, pong
<LeCamarade> rwmjones: I actually have the source of a bot that works (complete with a few silly modules), but I abandoned it back then. It is what I'm modifying to make the evaluator.
<LeCamarade> So, if you want a bot for the RH channels ...
<LeCamarade> :o)
<rwmjones> go on, send it to me if you want - rjones at redhat.com
<LeCamarade> rwmjones: Sure.
<rwmjones> LeCamarade, got it, thanks :-)
<LeCamarade> rwmjones: :o)
Demitar has quit [Read error: 60 (Operation timed out)]
yangsx has joined #ocaml
mnemonic has quit [Read error: 104 (Connection reset by peer)]
mnemonic has joined #ocaml
piggybox has joined #ocaml
piggybox has left #ocaml []
bluestorm_ has joined #ocaml
Demitar has joined #ocaml
gunark has quit ["Konversation terminated!"]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
yangsx has quit ["Leaving"]
visage has quit []
LeCamarade has quit [Read error: 60 (Operation timed out)]
leo037 has quit [Remote closed the connection]
leo037 has joined #ocaml
chs_ has joined #ocaml
lde has quit [Read error: 60 (Operation timed out)]
kelaouchi has quit ["leaving"]
_blackdog has joined #ocaml
_blackdog has left #ocaml []
Mr_Awesome has joined #ocaml
kelaouchi has joined #ocaml
lde has joined #ocaml
DirkT has left #ocaml []
noteventime has joined #ocaml
love-pingoo has joined #ocaml
ygrek has quit []
clog has joined #ocaml
levi_home has joined #ocaml
bluestorm_ has quit [No route to host]
schme has joined #ocaml
Demitar has joined #ocaml
noteventime has joined #ocaml
Mr_Awesome has joined #ocaml
Mr_Awesome has quit [Read error: 54 (Connection reset by peer)]
tty56 has quit [Killed by sterling.freenode.net (Nick collision)]
tty56 has joined #ocaml
tty56 has quit [Connection reset by peer]
tty56 has joined #ocaml
Mr_Awesome has joined #ocaml
martin_ is now known as mbishop_
pants1 has joined #ocaml
vital303 has joined #ocaml
smimou has joined #ocaml
visage has joined #ocaml
<tsuyoshi> gah.. I got this out of ocaml:
<tsuyoshi> cmpl $1, %eax
<tsuyoshi> je .L219
<tsuyoshi> movl %eax, 8(%esp)
<tsuyoshi> cmpl $1, %eax
<tsuyoshi> je .L221
<tsuyoshi> the ml btw is
<tsuyoshi> while !ready != [] do let fd :: rest = !ready in
<pango_> sure, and you must get a warning too
<pango_> because "let fd :: rest = !ready pattern matching is not exhaustive"
<tsuyoshi> yeah
<tsuyoshi> I was trying to rewrite the loop to eliminate any garbage generation
<tsuyoshi> but I don't think it's really possible
<tsuyoshi> might as well just use List.iter like I was doing originally
<tsuyoshi> not completely sure but it doesn't seem like ocaml does any common subexpression elimination at all
<pango_> I don't think it does
visage has quit []
<tsuyoshi> hmm.. it is allocating memory a lot when it doesn't need to
<pango_> ML programs allocate a lot of memory in general
<pango_> but if it's only in the minor heap, gc is very cheap
<tsuyoshi> how big is the minor heap?
<tsuyoshi> oh I guess you can probably adjust that
<pango_> you can set it dynamically, see Gc module
<tsuyoshi> 32k words by default.. that's pretty big
<pango_> it's rather conservative
<tsuyoshi> it is?
<pango_> even values larger than L2 are not really a problem with modern CPUs cache algorithms
<pango_> increasing it will increase minor collection efficiency (less words will be promoted), at the expense of a larger gc latency (minor collection will take longer when it fires)
<jlouis> IIRC, there is no CSE in ocaml
<jlouis> Which is interesting, I would have thought it to be a pretty good optimization to have. Especially in the more general PRE-variant
smimram has joined #ocaml
bluestorm__ has quit [Remote closed the connection]
bluestorm__ has joined #ocaml
slacker403 has joined #ocaml
<slacker403> any kind of GCC front end planned for ocaml or something ? to make it a tad faster mro on the level of C ?
<rwmjones> slacker403, what do you mean?
<slacker403> im just wondering if they have any plans of making either the compiler for ocaml better or integrate a gcc front end
<bluestorm__> are you sure a gcc front end would make it better ?
<rwmjones> ocaml doesn't use the C compiler ... do you have a specific piece of code which is a problem?
<bluestorm__> it's pretty good already
<mbishop_> I'd like to see mlton techniques used in ocamlopt perhaps
<mattam> It think that would not make sense, as the gcc backend is tailored for imperative language
<slacker403> i know it deosnt use the c compiler
<slacker403> well i dunno
<slacker403> it just needs to step its game up ;)
mbishop has quit [Nick collision from services.]
mbishop_ is now known as mbishop
<mattam> And the what would you do with the GC of ocaml ?
<mbishop> Why is that?
smimou has quit [Read error: 110 (Connection timed out)]
<rwmjones> it's usually within 20% of the comparable C, but you need to know how to optimise it. Can you post some actual code?
<mattam> Damn I write badly.
<slacker403> i was just looking at the debian shootout to be honest rwmjones
<slacker403> and i thouhgnt ocaml is about half the speed of C
<mbishop> If we are to believe the debian shootout, then Pascal would be the fastest language ever :P
* rwmjones back in a bit
<slacker403> ocaml is getitng down there ;)
<mbishop> Funny to see how it's above mlton
<mbishop> mlton typically makes binaries with faster execution times
<mbishop> I guess that's just a side effect of these microbenchmarks
<slacker403> mlton ?
<slacker403> i just wish C and ocaml were on the same level :)
<mbishop> mlton is a "whole program" optimizing compiler for SML
<jlouis> mltons power is that it can do optimizations across module boundaries (among other things) and that is not used in those microbenchmarks at all
<mbishop> And I'm not sure Ocaml will ever be as fast as C on average, with all of Ocaml's advantages
<mbishop> Heh, it's fun looking at each of the benchmarks individually
<bluestorm__> read this
<bluestorm__> and then stop asking for performances
<pango_> yes... how they managed to sabotage recursive calls benchmark, using floats ;)
<bluestorm__> everybody aroud is using Java/Python/Ruby/whatever
Submarine_ has joined #ocaml
<tsuyoshi> ocaml is pretty fast
<bluestorm__> why should we get sad because we're 50% slower than C ?
<mbishop> Yeah really, if people cared about speed, they wouldn't be using Ruby
<slacker403> lol
<slacker403> yea i know
<slacker403> but
<slacker403> still
<slacker403> its good practice to make the language fast as you can
<slacker403> compiler sorry
<mbishop> You can kind of tell how sketchy the shootout is, by looking at each benchmark, when you see random compilers showing up first for some of them
<mbishop> n-body has Oberon as the fastest...that's just weird heh
<tsuyoshi> it could be faster.. the compiler doesn't really optimize much at all
<mbishop> one of them had Mozart
<tsuyoshi> ocaml mostly beats everyone else by just having a native compiler
<mbishop> And SML/NJ number 1 for partial sums? haha
<tsuyoshi> the type system helps a bit too
<pango_> it's surprizing that lua5 interpreter can get much faster than ocaml bytecode however, specially since lua is dynamically typed
<pango_> it's impressive
smimram is now known as smimou
chs_ has quit []
<rwmjones> it's not my experience that OCaml is half the speed of C anyway ... last year I was doing some neural network stuff and the OCaml code was about the same as the C code (both heavily optimised)
<rwmjones> it actually made a lot more difference what machine we ran the tests on, apparently because of microprocessors scheduling instructions differently
<tsuyoshi> rwmjones: how did you optimise the ocaml code
* rwmjones goes to look ...
<rwmjones> arrays, for loops, references, in-place modification of arrays, compiled with ocamlopt -unsafe
<tsuyoshi> ah
<rwmjones> there was a posting on caml-list, let me see if I can find it
Submarine_ has quit ["in Soviet Russia, Céline Dion owns you"]
benny has joined #ocaml
noteventime has quit ["Leaving"]
bluestorm__ has quit ["Konversation terminated!"]
benny_ has quit [Read error: 110 (Connection timed out)]
leo037 has quit ["Leaving"]
<slacker403> welll
<slacker403> rwmjones: why do people say ocaml is half the speed of C then ?
<pango_> slacker403: http://home.gna.org/mlmm/
<slacker403> doesnt it say it on the ocaml website :P
<slacker403> pango_: what exactly does this do ?
<slacker403> also have you used it ?
<pango_> just found the site
<slacker403> looks kinda iffy
chs_ has joined #ocaml
<slacker403> is thier anyways to compile ocaml code to get a good result close to C ?
<pango_> ocamlopt ;)
<tsuyoshi> slacker403: why are you so worried about the speed, anyway?
<slacker403> i mean the code in genral
<slacker403> its more of just principle
<slacker403> cause people who say speed doesnt matter is bullshit ......... i used to program in Ruby ;)
<slacker403> i jus would like to see it get up with the big boys as any modern language tries to accomplish one like thi anyways
<tsuyoshi> ocaml is already faster than perl, java, python, ruby, etc.
<slacker403> but again
<slacker403> ocaml strives to be in the c c++ bracket
<slacker403> to perl php etc doesnt really matter
<tsuyoshi> I think the more important thing at this point is better libraries
<pango_> slacker403: so why did you mention Ruby?
<pango_> that was a very bad argument
<slacker403> its a slow pos
<slacker403> the developer should be ashmamed
<tsuyoshi> there are a lot of nice things in java and ruby especially that could be brought over to ocaml
<slacker403> sure
<pango_> tsuyoshi: like?
<slacker403> i was specifically talking about speeds
<slacker403> i would like to see ocaml right next to c and c++
<slacker403> and not perl etc
<slacker403> or even java
<pango_> nice troll
<tsuyoshi> pango: well, I'm working on a ruby-style string interpolation preprocessor
<slacker403> pango_: huh ?
<pango_> slacker403: it's not in the realm of Perl, and nobody said that
<tsuyoshi> in ruby you can do like "foo #{bar} quux" and it's just like "foo " + bar.to_s + " quux"
<slacker403> pango_: sure ..........i re said with java
<tsuyoshi> nice little things like that aren't really hard to do in ocaml, but they just haven't been done yet
<pango_> tsuyoshi: I don't think it conflicts with any OCaml principes, so why not
<Smerdyakov> slacker403, MLton-compiled SML is a better choice, if you want speed.
<Smerdyakov> slacker403, and in the current Shootout results, both MLton and OCaml are much closer to C/C++ performance than almost anything else. http://shootout.alioth.debian.org/debian/benchmark.php?test=all&lang=all
<slacker403> it says ocaml has better speeds
<Smerdyakov> Eh, some knobs are being set from cookies.
<Smerdyakov> Take the defaults, but set it to 1 weighting for speed and 0 for the other two.
vital304 has joined #ocaml
<mbishop> Is citeseer down for anyone else?
<mbishop> the site itself is up, as are the mirrors, but searching always says service unavailable
<slacker403> maybe ocaml is a little faster then i thought
Modius has joined #ocaml
vital303 has quit [Read error: 110 (Connection timed out)]
godel has joined #ocaml
joshcryer has quit [Nick collision from services.]
joshcryer has joined #ocaml
love-pingoo has quit ["<:"]
cflag has quit [Read error: 110 (Connection timed out)]