<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
<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__>
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 ?