ayrnieu changed the topic of #ocaml to: OCaml 3.08.4 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
Revision17 has quit [Read error: 110 (Connection timed out)]
Revision17 has joined #ocaml
UziMonkey has joined #ocaml
cmeme has joined #ocaml
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
cmeme has quit [Client Quit]
cmeme has joined #ocaml
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
zigong has quit [Remote closed the connection]
vezenchio has quit [""The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and t]
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
skylan_ is now known as skylan
ulfdoz has quit [niven.freenode.net irc.freenode.net]
ulfdoz has joined #ocaml
pango has quit [niven.freenode.net irc.freenode.net]
pango has joined #ocaml
Revision17 has quit [niven.freenode.net irc.freenode.net]
_shawn has quit [niven.freenode.net irc.freenode.net]
juri has quit [niven.freenode.net irc.freenode.net]
slashvar[lri] has quit [niven.freenode.net irc.freenode.net]
pattern has quit [niven.freenode.net irc.freenode.net]
mflux has quit [niven.freenode.net irc.freenode.net]
_shawn has joined #ocaml
pattern has joined #ocaml
Revision17 has joined #ocaml
mlh_ has quit [niven.freenode.net irc.freenode.net]
noj has quit [niven.freenode.net irc.freenode.net]
noj has joined #ocaml
mlh_ has joined #ocaml
juri has joined #ocaml
starbuck has joined #ocaml
<starbuck> moo
<starbuck> anybody wanna chat
mflux has joined #ocaml
<starbuck> hi
mlh_ has quit [niven.freenode.net irc.freenode.net]
mlh_ has joined #ocaml
slashvar[lri] has joined #ocaml
mrsolo has quit ["Leaving"]
starbuck has left #ocaml []
__DL__ has quit ["Bye Bye"]
ulfdoz has quit [Read error: 60 (Operation timed out)]
booyaa has joined #ocaml
threeve has quit []
Korollary_ has joined #ocaml
<Korollary_> has anyone here ever played with F# ?
pango_ has joined #ocaml
batdog is now known as batdog|gone
pango has quit [Read error: 104 (Connection reset by peer)]
ulfdoz has joined #ocaml
ulfdoz has quit [niven.freenode.net irc.freenode.net]
noj has quit [niven.freenode.net irc.freenode.net]
juri has quit [niven.freenode.net irc.freenode.net]
pattern has quit [niven.freenode.net irc.freenode.net]
pango_ has quit [niven.freenode.net irc.freenode.net]
mflux has quit [niven.freenode.net irc.freenode.net]
booyaa has quit [niven.freenode.net irc.freenode.net]
slashvar[lri] has quit [niven.freenode.net irc.freenode.net]
Hadaka has quit [niven.freenode.net irc.freenode.net]
tom_p has quit [niven.freenode.net irc.freenode.net]
ptolomy has quit [niven.freenode.net irc.freenode.net]
oracle1 has quit [niven.freenode.net irc.freenode.net]
Mike_L has quit [niven.freenode.net irc.freenode.net]
descender has quit [niven.freenode.net irc.freenode.net]
pnou has quit [niven.freenode.net irc.freenode.net]
shrimpx has quit [niven.freenode.net irc.freenode.net]
TaXules has quit [niven.freenode.net irc.freenode.net]
calvin_ has quit [niven.freenode.net irc.freenode.net]
Hipo has quit [niven.freenode.net irc.freenode.net]
det has quit [niven.freenode.net irc.freenode.net]
joeytwiddle has quit [niven.freenode.net irc.freenode.net]
mw has quit [niven.freenode.net irc.freenode.net]
Demitar has quit [niven.freenode.net irc.freenode.net]
ax has quit [niven.freenode.net irc.freenode.net]
Korollary_ has quit [niven.freenode.net irc.freenode.net]
mlh_ has quit [niven.freenode.net irc.freenode.net]
Revision17 has quit [niven.freenode.net irc.freenode.net]
cmeme has quit [niven.freenode.net irc.freenode.net]
_fab has quit [niven.freenode.net irc.freenode.net]
vincenz has quit [niven.freenode.net irc.freenode.net]
_shawn has quit [niven.freenode.net irc.freenode.net]
Herrchen has quit [niven.freenode.net irc.freenode.net]
TeXitoi has quit [niven.freenode.net irc.freenode.net]
bzzbzz has quit [niven.freenode.net irc.freenode.net]
rossberg has quit [niven.freenode.net irc.freenode.net]
j_n has quit [niven.freenode.net irc.freenode.net]
haakonn has quit [niven.freenode.net irc.freenode.net]
mfurr has quit [niven.freenode.net irc.freenode.net]
batdog|gone has quit [niven.freenode.net irc.freenode.net]
gim has quit [niven.freenode.net irc.freenode.net]
jave has quit [niven.freenode.net irc.freenode.net]
mattam has quit [niven.freenode.net irc.freenode.net]
avlondono has quit [niven.freenode.net irc.freenode.net]
bzzbzz has joined #ocaml
mw has joined #ocaml
pnou has joined #ocaml
clog has joined #ocaml
ptolomy has joined #ocaml
_fab has joined #ocaml
gim has joined #ocaml
joeytwiddle has joined #ocaml
Morphous has joined #ocaml
rossberg has joined #ocaml
skylan_ has joined #ocaml
rossberg has quit [zelazny.freenode.net irc.freenode.net]
joeytwiddle has quit [zelazny.freenode.net irc.freenode.net]
Morphous has quit [zelazny.freenode.net irc.freenode.net]
ptolomy has quit [zelazny.freenode.net irc.freenode.net]
haakonn has quit [zelazny.freenode.net irc.freenode.net]
oracle1 has quit [zelazny.freenode.net irc.freenode.net]
booyaa has quit [zelazny.freenode.net irc.freenode.net]
ax has quit [zelazny.freenode.net irc.freenode.net]
UziMonkey has joined #ocaml
ax has joined #ocaml
rossberg has joined #ocaml
Morphous has joined #ocaml
ptolomy has joined #ocaml
joeytwiddle has joined #ocaml
Hipo has joined #ocaml
tom_p has joined #ocaml
cmeme has joined #ocaml
mattam has joined #ocaml
TeXitoi has joined #ocaml
mw has joined #ocaml
bzzbzz has joined #ocaml
pnou has joined #ocaml
booyaa has joined #ocaml
oracle1 has joined #ocaml
calvin_ has joined #ocaml
Naked has joined #ocaml
Naked is now known as Hadaka
TaXules has joined #ocaml
shrimpx has joined #ocaml
Mike_L has joined #ocaml
avlondono has joined #ocaml
haakonn has joined #ocaml
vincenz has joined #ocaml
mfurr has joined #ocaml
Smerdyakov has joined #ocaml
_shawn has joined #ocaml
vdrab has joined #ocaml
<vdrab> hello #ocamlers. I have a bit of a question: how similar are "core functional Haskell" and core functional Ocaml? The reason I ask is that I have an algorithm written in haskell and I am curious whether it can be translated rather painlessly to Ocaml... the program doesn't use any of haskell's exotic features, just a bunch of functions doing things to lists and algebraic data types...
<vdrab> If it would be straightforward to translate the haskell algorithm into an ocaml one, I would like to see what kind of speed-up I get from that...
<Korollary_> vdrab: does it use typeclasses ?
<vdrab> not any of the tricky ones.... it overloads Show for some pretty printing, but that's about it
<Korollary_> I dont know ocaml that well, but it should be straightforward. I am not sure if you would get any speedup, though.
<vdrab> it's not all that complicated I think, it's just that optimizing it for performance is going to be ugly ... so I'm checking what my options are first...
<vdrab> There wouldn't be some sort of "Ocaml for Haskell programmers" tutorial around, would there ...? :-)
<Korollary_> I dont think you need any
<vdrab> you think it's just getting used to the syntax then? that would be awesome, but I doubt it's going to be that simple.
<Korollary_> vdrab: there's something called the revised syntax, but I ended up sticking with the original anyway.
<vdrab> working around the lack of list comprehensions comes to mind, for one thing.
<vdrab> what's the revised syntax?
<Korollary_> it's accomplished by the caml preprocessor
<vdrab> the compiler supports two kinds of syntax?
<vdrab> oh, ok. thanks.
<Korollary_> for pure code, I (imho) don't expect ocaml to outperform haskell considerably. It's the imperative code that seems to make ocaml fast. (imho, again)
<vdrab> oh really? that would sort of defeat the purpose then. hmm
<vdrab> well, thanks for the input.
<Korollary_> can the algorithm work on arrays in a more efficient manner ?
<vdrab> maybe. it would mean a substantial rewrite though.
<Korollary_> in that case, haskell may be not as slow as you think
<Korollary_> I should write some toy benchmarks comparing STL lists in C++ to haskell
<vdrab> it's not slow by normal programming language standards... I just need it to be faster. hehe
<Korollary_> have you profiled it ?
<vdrab> yes
<Korollary_> maybe there's an existing benchmark at language shootout site
<vdrab> there are a couple of functions that do the heavy lifting, so that's where it takes the hit, as expected.
<Korollary_> hmm
<vdrab> It's a bit like graph algorithms, bad complexity
<vdrab> simple program, bad scaling with data
<vdrab> so, being able to shave some milliseconds of those few crucial functions may be worthwile if they get called millions of times
<Korollary_> maybe you could outsource those functions to the C domain
<vdrab> also, it feels as if this is one of those problem domains where haskell's laziness is not really helping you... not sure though
<vdrab> yes. that's another option I am considering... it's just that translating to ocaml seems way more fun than rewriting in C
<Korollary_> if you suspect laziness, then iirc there are some tricks to force strictness
<vdrab> the laziness is not the big culprit, really... I get decent performance as it is. I'm just curious as to how much better it may get
Cale has joined #ocaml
<Smerdyakov> Why OCaml and not SML?
<vdrab> Smerdyakov: no reason really... well, visibility maybe.
Cale has left #ocaml []
Korollary_ has quit [zelazny.freenode.net irc.freenode.net]
mlh_ has quit [zelazny.freenode.net irc.freenode.net]
<Smerdyakov> There are no optimzing OCaml compilers, while SML has MLton, which is a real powerhouse in that respect.
<vdrab> ocaml doesn't have an optimizing compiler?
<Hipo> It does, it's not just as good at optimizing. :P
<Smerdyakov> That's right. OCaml gets by by using smart default encodings at things.
<Smerdyakov> s/at/of
<Smerdyakov> From what I've heard, it doesn't do anything worth calling "program analysis."
<Smerdyakov> (Except for type inference, I guess)
<vdrab> I see
rasfar has joined #ocaml
<vdrab> it's just that I don't find many SML to be very visible, compared to the ocaml community.... maybe just an impression though...
<vdrab> how similar is it to ocaml? does knowledge of the one translate pretty much to the other?
<Smerdyakov> Ocaml minus OO and too many built-in hacks == SML, to a first approximation.
<vdrab> I could live without OO for this specific problem I guess
<vdrab> does it have good libraries for everyday stuff?
<Smerdyakov> Records, recursive types, and closures give you all the benefits of most OO uses.
<Smerdyakov> (At least OCaml OO uses, that is)
<Smerdyakov> Libraries aren't an issue, since all the major compilers have C FFIs.
<vdrab> as a side question: how does it manage GUI apps? I always wonder how non-OO languages do that
<vdrab> but maybe I don't want to write any C...
<Smerdyakov> You don't need to, but there are C libraries for most anything.
<vdrab> i see
<vdrab> I'm not too keen on FFIs though.... they tend to work well in theory more than in practise.
<vdrab> anyways, that's not an issue
<Smerdyakov> MLton, SML/NJ, and OCaml have good FFIs.
<vdrab> what books on SML can you recommend?
<Smerdyakov> I've never used any printed books. See http://www.cs.cmu.edu/~rwh/smlbook/
<vdrab> sweet. thanks a lot.
booyaa has quit ["leaving"]
Skal has joined #ocaml
Submarine has joined #ocaml
Korollary_ has joined #ocaml
mlh_ has joined #ocaml
Korollary_ has quit [Read error: 110 (Connection timed out)]
pango_ has quit [Remote closed the connection]
|SNap| has joined #ocaml
pango has joined #ocaml
jave has joined #ocaml
pango has quit [zelazny.freenode.net irc.freenode.net]
mlh_ has quit [zelazny.freenode.net irc.freenode.net]
pango has joined #ocaml
mlh_ has joined #ocaml
|SNap| is now known as jakaj
jakaj has quit ["Na svetu sta dve vrsti zensk, nekatere so zaljubljene vame, druge nimajo okusa."]
jakaj has joined #ocaml
mlh_ has quit ["who are you people and what are you doing in my computer!?"]
vdrab has left #ocaml []
__DL__ has joined #ocaml
Morphous is now known as Amorphous
Gueben has joined #ocaml
jakaj has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
ramkrsna has joined #ocaml
_fab has quit [Remote closed the connection]
descender has joined #ocaml
lupothegreen has joined #ocaml
vezenchio has joined #ocaml
<haakonn> i'm trying PMap.fold to form the union of two maps (all key->value mappings from both, in one map). what's wrong with: PMap.fold (fun k v a -> PMap.add k v a) map2 map1 ? (PMap is a Map variant from extlib btw, very similar)
UziMonkey has quit [Remote closed the connection]
<haakonn> (i can reduce that to PMap.fold PMap.add map2 map1 of course :) but i still get a type error i don't understand
<pango> from what I understand, the function is called with the pmap values only (and the accumulator, of course)
<haakonn> no keys? hm
<pango> I suspect the documentation is incorrect, and what you want is foldi
<haakonn> i suspected the same :) i'll check out foldi
<haakonn> ah, foldi sounds right
<haakonn> jesus, it compiles *shocked*
jakaj has joined #ocaml
Benooit has joined #ocaml
ramkrsna has left #ocaml []
vodka-goo has joined #ocaml
Gueben has quit [Read error: 110 (Connection timed out)]
m3ga has joined #ocaml
m3ga has quit [Client Quit]
lupothegreen has left #ocaml []
lupothegreen has joined #ocaml
descender has quit [Remote closed the connection]
vodka-goo has quit []
threeve has joined #ocaml
descender has joined #ocaml
Revision17 has quit [Read error: 104 (Connection reset by peer)]
pipegeek has joined #ocaml
<pipegeek> Hi, all. I'm rapidly trying to pick up ocaml (I'm about to TA an intro CS course that spends some considerable time with it), so please forgive me if I seem a little confused. I'm trying to use a couple of functions in the Str module (namely, Str.split and Str.regexp), but said module does not appear to be imported by default. I'd rather not use #use, so how do I go about making this module available?
<Submarine> you need to link with it
<Submarine> use ocamlmktop to produce a toplevel with said module linked in
<Smerdyakov> OCaml at Brown? I never would have guessed that.
<pipegeek> Yep. I'm TAing the alternate intro CS course-- CS17/18. We cover functional and object-oriented programming--starting in scheme, moving to ocaml (sml until two years ago), and then java.
<pipegeek> err...I use the word "cover" loosely
<Smerdyakov> The worst kind of course. You need a prof who know what he's doing, or it's an unqualified disaster.
<pipegeek> Luckily, we have just such a professor. s. Phil Klein and John Hughes. They cram a lot in, but it's well worth it.
<Smerdyakov> OK. A huge proportion of questions asked by students in functional language channels are in the context of courses that run rapidly through different programming paradigms.
<pipegeek> It's true. While we do spend the first semester in functional-land, most students don't return for at least a year and a half (CS173 -- programming languages -- is taught in Scheme). I'm afraid I don't think there's any course here which covers ocaml in depth, which is very unfortunate.
<Smerdyakov> Courses on programming languages are silly. You should be able to learn them on your own when you have the basic concepts down.
<Snark> but how do you get the basic concepts!?
<pipegeek> Course, I think the idea of 17/18 is to get said concepts down--the focus is less on the specific languages than on the underlying concepts. 173 is also not a *scheme* course, per se--they just use it as an example
<Smerdyakov> Snark, by learning a few paradigmatic languages.
<Smerdyakov> Snark, and probably only the important parts of those
<Snark> so courses on programming languages aren't that silly after all *g*
<Smerdyakov> I meant "courses that go into specific languages in depth."
<Snark> oh, yes... going in depth is indeed silly
<Submarine> John Hugues... the name rings a bell
<pipegeek> a.k.a. "Spike", for some reason
<Smerdyakov> I think this John Hughes is a famous Haskell person..?
<pipegeek> Well... I... don't think so. He was a math person, who slowly moved into CS over a course of years (or so he would have it). His primary interest is, oddly enough, computer graphics.
<pipegeek> In any case, I need to get back to work. Thanks for the help.
pipegeek has left #ocaml []
Korollary_ has joined #ocaml
Smerdyakov has quit [Read error: 104 (Connection reset by peer)]
batdog|gone is now known as batdog
Benooit is now known as Gueben
Korollary_ has quit [Read error: 110 (Connection timed out)]
meren is now known as meren[N\A]
booyaa has joined #ocaml
pango has quit ["Leaving"]
starbuck has joined #ocaml
<starbuck> mooooooooo
lupothegreen has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
meren[N\A] is now known as meren
znutar has joined #ocaml
monochrom has joined #ocaml
mattam has quit [Remote closed the connection]
mattam has joined #ocaml
pnou_ has joined #ocaml
starbuck has quit [Read error: 104 (Connection reset by peer)]
pnou_ has quit ["leaving"]
ulfdoz has quit ["Reconnecting"]
ulfdoz has joined #ocaml
natv has joined #ocaml
revision17 has joined #ocaml
znutar has quit [Read error: 110 (Connection timed out)]
jakaj has quit ["Na svetu sta dve vrsti zensk, nekatere so zaljubljene vame, druge nimajo okusa."]
Snark has left #ocaml []
__DL__ has quit ["Bye Bye"]
Purice has joined #ocaml
Purice has left #ocaml []
Submarine has quit ["Leaving"]
mrsolo has joined #ocaml
meren is now known as meren[N\A]
Skal has quit ["Client exiting"]
threeve has quit []
Banana has joined #ocaml
<ulfdoz> bye
twobitsprit1 has joined #ocaml
<twobitsprit1> hey... I don't see anything about this in the documentation, but I was wondering if Ocaml had a simpler pattern matching syntax... It just seems a but superfluous to explicitly use "match" just after the "=" of a function definition...
<twobitsprit1> i.e.: "let f x = first :: rest -> first | [] -> []"
<twobitsprit1> especially being as the "function" expression allows implied "match"... I know I can say "f = function first :: rest -> rest | [] -> []" but I can't rely on the same syntax for a "let f x = ..." expression...
zigong has joined #ocaml
<pnou> don't think there is anything shorter than function
mrsolo has quit ["Leaving"]
mrsolo has joined #ocaml
rasfar has left #ocaml []
zigong has quit [Remote closed the connection]
UziMonkey has joined #ocaml
Gueben has quit [Remote closed the connection]
skylan_ is now known as skylan
mlh_ has joined #ocaml
threeve has joined #ocaml