flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
struktured has quit [Read error: 104 (Connection reset by peer)]
struktured has joined #ocaml
munga_ has quit [Read error: 113 (No route to host)]
peck has quit [Read error: 60 (Operation timed out)]
jlouis has quit ["Leaving"]
tylere has joined #ocaml
<tylere> Is there any way to get Ocaml to print the line a syntax error occured on, maybe with a little arrow pointing to where it all went sideways?
<tylere> I seem to remember at one point hearing about some way to get better parse errors...something with caml4p maybe?
<Smerdyakov> If you use caml-mode in Emacs, you just press a key to move to the location of the next error.
Morphous has joined #ocaml
redocdam has quit []
seafood has joined #ocaml
struktured_ has joined #ocaml
Morphous_ has quit [Read error: 110 (Connection timed out)]
<mbishop> ocaml always prints the syntax error for me...
<mbishop> the location that is
<mbishop> usually as a tuple of (line,column)
struktured has quit [Read error: 110 (Connection timed out)]
paganini123 has joined #ocaml
paganini123 has quit [Client Quit]
CosmicRay has joined #ocaml
Associat0r has joined #ocaml
struktured_ has quit [Read error: 110 (Connection timed out)]
sponge45 has quit ["see you at http://ocamlhackers.ning.com/"]
struktured has joined #ocaml
CosmicRay has quit [Read error: 110 (Connection timed out)]
marmotine has quit ["mv marmotine Laurie"]
Philonous1 has joined #ocaml
Philonous has quit [Read error: 110 (Connection timed out)]
tylere has quit ["leaving"]
CosmicRay has joined #ocaml
xevz has quit [Remote closed the connection]
xevz has joined #ocaml
travisbemann has joined #ocaml
CosmicRay has quit ["Client exiting"]
seafood has quit []
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
netx has joined #ocaml
bluestorm has joined #ocaml
bluestorm has quit [Remote closed the connection]
bluestorm has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
Proteus_ has quit [Read error: 104 (Connection reset by peer)]
Proteus_ has joined #ocaml
arquebus has joined #ocaml
fy_ has joined #ocaml
Associat0r has quit []
seafood has quit []
arquebus has quit []
GustNG has joined #ocaml
filp has joined #ocaml
shortc|desk has quit [Connection timed out]
mishok13 has joined #ocaml
Jeff_123 has quit [Read error: 110 (Connection timed out)]
det has quit [Remote closed the connection]
Mr_Awesome_ is now known as Mr_Awesome
asmanur has joined #ocaml
det has joined #ocaml
seafood has joined #ocaml
shortc|desk has joined #ocaml
Jeff_123 has joined #ocaml
Yoric[DT] has joined #ocaml
OChameau has joined #ocaml
guillem has joined #ocaml
rwmjones has joined #ocaml
Jedai has joined #ocaml
tomh has joined #ocaml
fy_ has quit ["http://www.mibbit.com ajax IRC Client"]
Associat0r has joined #ocaml
travisbemann has quit ["leaving"]
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
jlouis has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
redocdam has joined #ocaml
<letrec> Hello. Is there a way to remove a function or operator from the pervasive module? I'd like to make I don't use (==) in my code.
<bluestorm> letrec: you could compile with a different Pervasive module
<bluestorm> (there is a -nopervasives switch)
<letrec> Ok, so I can create my own module with the functions a want. Sounds good. Thx.
<bluestorm> simpler, but uglier, would be a let (==) : 'a -> 'a -> bool = fun _ -> assert false at the beginning of your code
<letrec> That's a good idea. I'm now using: let (==) = fun a b-> ("rien", a,b,"djw", [],[[]]) to make sure my code won't compile :) Thanks.
<bluestorm> hm
<bluestorm> if you don't want it to compile, let (==) = () is probably even better
<bluestorm> but then, add a commant to explain your doing
struktured has joined #ocaml
m3ga has joined #ocaml
m3ga has quit [Read error: 104 (Connection reset by peer)]
struktured has quit [Read error: 110 (Connection timed out)]
sponge45 has joined #ocaml
Snark has joined #ocaml
kig has quit [Remote closed the connection]
GustNG1 has joined #ocaml
GustNG has quit [Read error: 60 (Operation timed out)]
xevz has quit [Remote closed the connection]
struktured has joined #ocaml
asmanur` has joined #ocaml
xevz has joined #ocaml
asmanur has quit [Read error: 110 (Connection timed out)]
struktured has quit [Read error: 110 (Connection timed out)]
seafood has quit []
Philonous1 is now known as Philonous
xevz has quit [Remote closed the connection]
sporkmonger has joined #ocaml
marmotine has joined #ocaml
<flux> letrec, you might want to handle operator != also
<flux> I woudln't mind if those operators were in their own module altogether :)
xevz has joined #ocaml
<letrec> Neither would I :)
<liquidcopy> What's the main difference between OCaml and Haskell?
<Philonous> OCaml is impure
<Philonous> i.e. you can write imperative code in OCaml
<GustNG1> Haskell has a massive type system.
<liquidcopy> impure?
<liquidcopy> heh
<liquidcopy> but that's not necessarily a drawback
<Smerdyakov> Did anyone say it was?
<Philonous> Au contraire
<GustNG1> Well, Haskell is way more popular as a functional language.
<liquidcopy> is it?
<liquidcopy> yes... but from what I've seen, OCaml out-performs Haskell...
<liquidcopy> is this true?
<GustNG1> Yes but it's about the comfort of a purely functional language.
<Philonous> Yes, but C outperforms Ocaml and Assambler outperforms C ;)
<Smerdyakov> liquidcopy, ill-formed question.
<Smerdyakov> liquidcopy, "OCaml" can refer to both a language and an implementation, but "Haskell" doesn't.
<liquidcopy> performance is important... IMHO
<GustNG1> The Haskell channel has 500 people.
<Smerdyakov> liquidcopy, and only implementations can have "performance."
<Philonous> If you are seeking a fast language that is yet functional : welcome to Ocaml
<liquidcopy> Wow... i'm in an OCaml Channel and sounds like you are all pro-haskell
<liquidcopy> hehe
olgen has joined #ocaml
<liquidcopy> I take it Haskell has a more active community?
<GustNG1> Never heard anyone encountering problems because Haskell laziness and pureness is slow.
<flux> :-)
<Smerdyakov> Even Simon Peyton-Jones says the future is in pure, strict languages, and I agree.
<Smerdyakov> I go even further and hope that the future is in total languages, where strict vs. lazy has no effect on semantics.
<jynxzero> Haskell isn't really so slow these days though is it... ISTR GHC is beating O'Caml in the language shootout.
<Philonous> liquidcopy: Most of the time code isn't optimized for speed anyway. So it doesn't really matter which language (implementation) is "fast", but which one get's the job done
<Smerdyakov> jynxzero, I hear that the Haskell entries are very non-idiomatic.
<Smerdyakov> jynxzero, lots of erosions of elegance in the name of performance.
<jynxzero> I heard the same about the O'Caml entries... it's hard to be functional in O'Caml without sacrificing performance.
<jynxzero> High order functions, functors etc are all out if you want the most optimised performance.
<Smerdyakov> Yup. SML is muuuuch nicer in that respect.
<Smerdyakov> (And I do prefer SML over OCaml overall, for that and other reasons.)
Smerdyakov has quit ["BRB"]
Smerdyakov has joined #ocaml
<jlouis> You can get great performance with GHC for Haskell and the Ocaml system. But i'll hypothesize that the performance model of the Ocaml system is easier to understand than GHCs
<mfp> jynxzero: The OCaml entries are fairly idiomatic IMO. They're not purely functional, but that doesn't make them any less idiomatic. OTOH the GHC entries do what amounts to pointer arithmetics and manual memory management in some cases...
RobertFischer has joined #ocaml
<mfp> It seems to me that the #haskell people care a lot more about the shootout that those from #ocaml. I've found several discussions about the submitted entries, collective incremental refinements, etc. in MLs and the haskell wiki. Also, some stdlib things seem to have been motivated directly by the shootout.
<RobertFischer> mfp: Nice. Political optimization. :)
<mfp> And you find countless links to the benchmarks where GHC performs particularly well in places like reddit :P (e.g., sum-file and thread-ring)
<mfp> pretty effective PR clearly
guillem has quit [Remote closed the connection]
<bluestorm> actually
<bluestorm> anybody who has tried to compile both OCaml and GHC will know that sometimes Haskell can be a pain
<RobertFischer> Luckily, the judges (at least on Reddit) just like to read cool benchmark statements, not actually using the language.
* RobertFischer is a middleweight contender for Reddit Vote Down Champion.
seafood has joined #ocaml
<RobertFischer> Brian Hurt's post on "Why OCaml Sucks" was the only one that was remotely popular. http://www.reddit.com/search?q=enfranchisedmind.com&x=0&y=0
<mfp> RobertFischer: you're fighting the >400 #haskell inhabitants; dons announces his submissions there to gather upvotes :-PP
<Philonous> Just wondering: Does SML come with a function composition operator? And why doesn't Ocaml have one?
<bluestorm> i have the feeling that for a beginner in functional programming (coming from the C++/Java land), Ocaml is a much better choice than Haskell
<bluestorm> Philonous: OCaml doesn't have one in the standard lib, but you can define one of course
<Philonous> Well, I tried, but it meddles with my types
<bluestorm> hmm
<Philonous> type variables I meant
<bluestorm> let compose f g = fun x -> f (g x) ?
<bluestorm> (or an infix notation if you want to)
<Smerdyakov> Philonous, the SML Basis includes function composition.
<bluestorm> and i guess there is no composition operator in the stdlib because 1) the stdlib is small 2) the point-free style is not so common in OCaml
<Philonous> Yeah, assume f: 'b -> 'c and g: 'a -> 'b then x will be 'a -> 'c. But apply x once to an int, and it will become int -> int and you can never use it for something else
<bluestorm> hm, nope
<Smerdyakov> Philonous, I think you're confused if you think any other behavior is possible.
<bluestorm> i suppose you have a monomorphsm restriction problem
<bluestorm> try an eta-expansion
<Smerdyakov> Philonous, and by "possible" I don't just mean "you can trick OCaml into doing the right thing"; I mean that any other behavior is nonsensical, with respect to basic properties of ML type systems.
<bluestorm> Philonous: you must see '_a weak types, right ?
<Philonous> Smerdyakov: Would you mind to elaborate? A link or keyword to search for would suffice.
<Smerdyakov> Philonous, instead, can you describe what you wish would happen instead?
<Smerdyakov> Philonous, if, in your earlier line, you meant [x] to refer to the variable from bluestorm's proposed definition, then the statement isn't even right, which is probably the beginning of my confusion with what you mean.
<Smerdyakov> Philonous, your statement was sensible if you take [x] to be a name for the composed function, though.
<Philonous> Well, obviously I don't have much of a clue of the ocaml type system. But It confuses me that I can apply a "normal" function to any type of variable and it still stays polymorphic, where as the type of the composite gets fixed on application
<bluestorm> Philonous: it doesn't
<Smerdyakov> Philonous, that's wrong. Every variable becomes non-polymorphic at every use.
<bluestorm> if you declare it correctly
<Philonous> Thx
pango_ has quit [Remote closed the connection]
olgen has quit []
<Philonous> btw. bluestorm you're right, I see the weak types
<bluestorm> those are not polymorphic types
<Philonous> Yeah, I missed that
RobertFischer has left #ocaml []
pango_ has joined #ocaml
liquidcopy is now known as hardcopy
<Philonous> Ok, sadly, that's not really point-free anymore. But it will do.
<Philonous> Smerdyakov: I just got what you meant. x was indeed supposed to be the composite, i just adopted bluestorms notation
<Smerdyakov> Philonous, bluestorm's notation did not make [x] the composition.
<Philonous> Oh, yeah, sorry.
<Philonous> -.-
pec1 has joined #ocaml
hardcopy has quit []
hardcopy has joined #ocaml
Philonous has quit [Remote closed the connection]
seafood has quit []
GustNG has joined #ocaml
GustNG1 has quit [Read error: 110 (Connection timed out)]
Philonous has joined #ocaml
hardcopy has left #ocaml []
guillem has joined #ocaml
letrec has quit [Read error: 104 (Connection reset by peer)]
Kopophex has joined #ocaml
netx303 has joined #ocaml
filp has quit ["Bye"]
mishok13 has quit [Read error: 104 (Connection reset by peer)]
ygrek has joined #ocaml
OChameau has quit [Read error: 113 (No route to host)]
hoopy has quit [Read error: 110 (Connection timed out)]
asmanur` has quit [Read error: 110 (Connection timed out)]
MichaelGG__ has joined #ocaml
jlouis has quit ["Leaving"]
jlouis has joined #ocaml
netx303 has left #ocaml []
MichaelGG__ has quit []
tomh has joined #ocaml
ygrek has quit [Remote closed the connection]
dublpaws has joined #ocaml
GustNG has quit [Read error: 104 (Connection reset by peer)]
Snark has quit ["Ex-Chat"]
Snark has joined #ocaml
jonafan_ is now known as jonafan
landonf has joined #ocaml
<landonf> Afternoon
guillem has quit [Read error: 104 (Connection reset by peer)]
Snark has quit [Read error: 113 (No route to host)]
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
hml has joined #ocaml
<hml> what's the K&R of ocaml books?
<hcarty> hml: Probably the manual
<hml> err; that's like 800 pages
<hcarty> The introduction is nice start
<hcarty> Jason Hickey's book is also very well written
<hml> reading jason hickedy's book right now
<hml> anyone here bought ocaml for scientists?
<hml> is it worth the 85 pounds?
<hcarty> The reviews I've read have been very positive
<hcarty> It's quite expensive, but apparently very well written
<hml> gotcha
<hml> lastly; does vim or emacs have beter ocaml support?
<landonf> Wow, Jason Hickey's book looks remarkably complete. Couldn't find if it had been published yet.
<hcarty> emacs + tuareg
<hcarty> landonf: I don't think it has. I imagine the PDF will be taken down when it is.
<hcarty> hml: vim has decent support
<landonf> Nice of him to have the PDF up
<hml> he's a professor right?
<hcarty> But the tuareg mode for emacs is by far more complete
<hml> so publicity probably serves him better than financial gain
<hml> what's the differnce between left and rightr operator associativity
<Yoric[DT]> hml: it's quite good, but quite expensive, as you've noticed.
<hml> ?
<Yoric[DT]> The book.
<Yoric[DT]> I have it.
<Yoric[DT]> I don't regret getting my university to buy it.
* Yoric[DT] goes afk, though.
Yoric[DT] has quit ["Ex-Chat"]
<hml> can anyone explain to me the motivation beh8ind the requirement of the 'rec' keyword?
<hml> why can't the compiler inver this
<hml> *infer*
<mfp> hml: not having rec allows to do incremental (re)definitions like let something x = check_args x; something x
<mfp> *"rec inferred"
<bluestorm> type are recursive, and it's a bit of a pain sometimes
bluestorm has quit [Remote closed the connection]
<Associat0r> I like let rec, it makes it clear that something is recursive
Axioplase is now known as Axioplase_
seafood has joined #ocaml
Associat0r has quit []
jlouis has quit [clarke.freenode.net irc.freenode.net]
sporkmonger has quit [clarke.freenode.net irc.freenode.net]
Proteus_ has quit [clarke.freenode.net irc.freenode.net]
Mr_Awesome has quit [clarke.freenode.net irc.freenode.net]
jynxzero has quit [clarke.freenode.net irc.freenode.net]
authentic has quit [clarke.freenode.net irc.freenode.net]
r0bby has quit [clarke.freenode.net irc.freenode.net]
pango_ has quit [clarke.freenode.net irc.freenode.net]
gildor has quit [clarke.freenode.net irc.freenode.net]
Axioplase_ has quit [clarke.freenode.net irc.freenode.net]
Sparkles has quit [clarke.freenode.net irc.freenode.net]
Philonous has quit [clarke.freenode.net irc.freenode.net]
wlmttobks has quit [clarke.freenode.net irc.freenode.net]
sbok has quit [clarke.freenode.net irc.freenode.net]
svenl has quit [clarke.freenode.net irc.freenode.net]
pantsd has quit [clarke.freenode.net irc.freenode.net]
jlouis has joined #ocaml
Philonous has joined #ocaml
pango_ has joined #ocaml
sporkmonger has joined #ocaml
Proteus_ has joined #ocaml
Mr_Awesome has joined #ocaml
jynxzero has joined #ocaml
pantsd has joined #ocaml
sbok has joined #ocaml
authentic has joined #ocaml
r0bby has joined #ocaml
wlmttobks has joined #ocaml
gildor has joined #ocaml
svenl has joined #ocaml
Sparkles has joined #ocaml
Axioplase_ has joined #ocaml
seafood has quit []
marmotine has quit ["mv marmotine Laurie"]
pec1 has left #ocaml []
redocdam has quit []