<mfp>
kaustuv: which OCaml code are you using, the one with the recursive function (uses unboxed floats), or the one with refs (2X faster on my box). Also, is it 3.11?
<kaustuv>
mfp: I didn't change the source code from the c.l.f post referenced in the reddit post. I did compile with -nodynlink and -fno-PIC. Yes, 3.11
<mfp>
I get 2.4s vs 1.25s with 3.11 x86-64, recursive function vs. imperative
<mfp>
3.11 is a bit better than 3.10 at float unboxing, but clearly not enough
<kaustuv>
Can you run MLton on the .sml file to compare? I suspect your processor is much faster than my laptop's.
<kaustuv>
Heh, I love this from that clf thread.
<kaustuv>
> The imperative features of OCaml and F# are there to be used.
<mfp>
kaustuv: I thought it was (amongst?) the best in absolute terms, not only for MLs?
<mfp>
or is GHC's better nowadays?
<hcarty>
munga: You're welcome - even after finding that, it frustrated the heck out of me because I didn't realize I had to change my myocamlbuild.ml to take proper advantage of it
<kaustuv>
mfp: I have no idea what amazing claims the GHC people make these days. It always seems to me that GHC is an exercise in compiler contortionism to support their lazy-by-default paradigm. But this is not a scientific statement.
Cheshire has quit [No route to host]
Cheshire has joined #ocaml
bluestorm has joined #ocaml
kaustuv has left #ocaml []
<mfp>
the GHC ppl often come up with impressive examples where GHC auto-vectorizes or turns complex stream processing into a tight N-instruction loop
<mfp>
but it remains to be seen whether you'd hit the honey pot in real programs --- it always feels very hit-or-miss
<bluestorm>
mfp: and sometimes you have (because of lazyness, not deficiencies in GHC) impressive examples where your innocent code turns out to leak quite a lot
<mfp>
yeah, I remember when somebody replied to my saying on reddit that fold (+) was laziness biting you in the ass w/ "no, it's an inappropriate use of laziness"
<mfp>
not worrying about when things are eval'ed is the point of being non-strict (the same way the GC frees you from knowing who's responsible for which mem),
<mfp>
oops foldl (+) above, of course
Asmadeus has quit [Read error: 54 (Connection reset by peer)]
<mfp>
so having to use foldl' instead of foldl _is_ a case of laziness getting in the way, from my POV
Asmadeus has joined #ocaml
vuln has joined #ocaml
theIdeaMen has quit [Remote closed the connection]
Alpounet has joined #ocaml
Ariens_Hyperion has quit []
<mfp>
WTH it's the 2nd time somebody posts to proggit dymically typed [some lisp] beats OCaml and then it turns out it's not actually faster & type annotations are being used
<mfp>
maybe because OCaml is the seen as the generic statically typed, fast thing
<mfp>
s/dymically/dynamically/
<mfp>
so they wouldn't say ... beats GHC as it would weaken the statement? (oh, you're not using -fbang-patterns/strict whatever ?)
<mfp>
-the
<mfp>
damn I cannot write today, that floated boxes thing was really shameful
<Camarade_Tux>
because they're jumping on the first thing that says ocaml is slower than X
Ched has quit [Read error: 104 (Connection reset by peer)]
<Cheshire>
if you program in python .. it turns you into a sales person
<Cheshire>
"The language is mature with comprehensive library support, pleasant to use and a much more likely language to inspire students to explore outside the school curriculum."
<Cheshire>
"Buy now! before this great deal runs out"
<bluestorm>
that wasn't constructive criticism :-'
<Alpounet>
so what would you say about Python ? :-p
_zack has quit ["Leaving."]
<bluestorm>
Alpounet: I haven't used Python in a while (and only a few weeks long), but I didn't like the default data structures
<bluestorm>
you've got hashtables or a list-array-blah thing
<Alpounet>
hehe, yep
<Alpounet>
and everything is variant
<bluestorm>
and people have no sense of algorithmic complexity
<bluestorm>
wich is not so good for beginners
<Alpounet>
indeed... or that becomes <troll>Windows</troll>
<bluestorm>
there are specialized datastructures with decent algorithmic behavior in the stdlib, but nobody advertize them
Narrenschiff has joined #ocaml
<Alpounet>
brb
kaustuv has joined #ocaml
mishok13 has quit ["Stopping IRC chat... [OK]"]
Camarade_Tux has quit ["Leaving"]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Client Quit]
Yoric[DT] has quit ["Ex-Chat"]
Narrenschiff has quit []
mlh has joined #ocaml
petchema has joined #ocaml
<vuln>
What means the keyword 'ref' and what matters if I put ! before a variable?
Ariens_Hyperion has joined #ocaml
<petchema>
type 'a ref = { mutable contents: 'a } let ref v = { contents = v } let ( ! ) r = r.contents let ( := ) r v = r.contents <- v
<petchema>
that's enough to redefine references
<Alpounet>
ref enables having mutable values in your OCaml code
<Alpounet>
! permit to access this value
<vuln>
thanks :)
Cheshire has quit [Read error: 113 (No route to host)]
Cheshire has joined #ocaml
Associ8or has joined #ocaml
thelema has quit [Read error: 60 (Operation timed out)]
prime2 has joined #ocaml
prime2 has quit ["leaving"]
_zack has joined #ocaml
<Alpounet>
where is the |> operator defined in Batteries ?
chupiq has joined #ocaml
Ariens_Hyperion has left #ocaml []
Associ8or has quit []
<mfp>
Alpounet: src/core/extlib/std.ml
sporkmonger_ has quit []
sporkmonger has joined #ocaml
prime2 has joined #ocaml
<Alpounet>
thanks :)
thelema has joined #ocaml
Associat0r has joined #ocaml
<Alpounet>
Does the toplevel give you the type of (**>) ?
<Alpounet>
(even if I know it, I'm still waiting the answer of the toplevel :-p)