Live data from Hacker News

Real World Ocaml announced

realworldocaml.org

21–30 of 58 posts

Re: Real World Ocaml announced

#21
post #16
post #11

Earlier quoted context omitted.

As annoying as that is, it could be turned into a design feature of your programs - only doing message passing. Hoare's CSP pretty much takes this approach, and for my money, I think that sort of approach makes the common case of parallel programming easier.

I'm doing a project using Python on AppEngine. AppEngine forces you to use a bunch of single threads doing what is really message passing, but implemented in Python so it's slower than Ocaml. I think this is going to turn out to be a killer feature of Ocaml once people get used to the fact that using 8 cores at once isn't that great of a goal when on-demand computing platforms let you scale much much larger. Pretty s…

I think this is going to turn out to be a killer feature of Ocaml once people get used to the fact that using 8 cores at once isn't that great of a goal when on-demand computing platforms let you scale much much larger.

I think this point isn't made often enough. There certainly are times when scaling within a single machine is useful but, as is more often the case, if you have to scale beyond a single physical instance you might as well plan for process-oriented parallelism up front.

Re: Real World Ocaml announced

#22

As a primarily imperative programmer who is just becoming more familiar with Haskell, I'd love to see a compare/contrast between Haskell and Ocaml from someone with expertise in this area.

The biggest differences are that Haskell defaults to lazy evaluation and OCaml defaults to strict and that OCaml allows you to mix in imperative code without explicitly using constructs like monads.

The monad in question: http://en.wikipedia.org/wiki/Haskell_features#ST_monad

Re: Real World Ocaml announced

#23
post #10

Discussions of whether OCaml is "practical" or useful or good aside, this book really, really needed to be written. It may be the case that there are truly excellent resources for learning OCaml, but I know the language, and I've never heard of them. There's Jason Hickey's tutorial, an introduction or two scattered around the internet, and some book that was fan-translated from French, sure, but OCaml lacks the hacke…

Are OCaml or Haskell taught in CS51 these days? That would be wonderful. Neither language was used on the general (non-PL theory, except a bit in the compilers/languages area) CS track in the 90s.

Also, OCaml is spelled "F#" in English.

Re: Real World Ocaml announced

#24
post #6

Earlier quoted context omitted.

> So what's impractical about Ocaml? The biggest issue Ocaml has is that its GC is single-threaded which basically removes the ability to do parallel programming inside a single executable. You have to resort to message passing between multiple processes. For what it's worth, I think I heard rumors there's work on an improved GC.

JoCaml, my friend.

Does JoCaml rewrite the GC? Or how else does it get around the GC issue?

Re: Real World Ocaml announced

#25
Really overdue. Not sure if it closely follows Hickey's PDF draft from a couple years ago, but thought it was well done.

Of the 8 most frequently encountered FP languages (clojure, scheme, CL) (haskell, ocaml, F#, erlang, scala) all have at least a handful of good intro texts, plus a few intermediate +.

Except Ocaml

Re: Real World Ocaml announced

#26

As a primarily imperative programmer who is just becoming more familiar with Haskell, I'd love to see a compare/contrast between Haskell and Ocaml from someone with expertise in this area.

I'm not well versed on Ocaml, but my impression is that the biggest conceptual difference is that Ocaml is more lenient with side effects. Haskell restricts any code with side effects like IO to Monads, whereas Ocaml allows IO, mutable data, etc. It may be possible to write Ocaml like Haskell, and manually restrict side effects to Monads, I'm not sure, but in Haskell you have no choice.

There are other differences as well, but imho that one sets Haskell apart moreso than any of the others, and not just from Ocaml but from every other language (that I know of at least).

Re: Real World Ocaml announced

#27
post #16

Earlier quoted context omitted.

I'm doing a project using Python on AppEngine. AppEngine forces you to use a bunch of single threads doing what is really message passing, but implemented in Python so it's slower than Ocaml. I think this is going to turn out to be a killer feature of Ocaml once people get used to the fact that using 8 cores at once isn't that great of a goal when on-demand computing platforms let you scale much much larger. Pretty s…

I think this is going to turn out to be a killer feature of Ocaml once people get used to the fact that using 8 cores at once isn't that great of a goal when on-demand computing platforms let you scale much much larger. I think this point isn't made often enough. There certainly are times when scaling within a single machine is useful but, as is more often the case, if you have to scale beyond a single physical insta…

Certainly, but there are circumstances - say high-performance math & data heavy stuff - that benefits greatly from a shared memory implementation.

And the ease of use of multi-process architectures needs to be improved as well.

Re: Real World Ocaml announced

#28

As a primarily imperative programmer who is just becoming more familiar with Haskell, I'd love to see a compare/contrast between Haskell and Ocaml from someone with expertise in this area.

Besides laziness/immutability, the HN modules vs type class debates (there's also Lambda-ultimate debates, but they take that stuff so seriously

http://news.ycombinator.com/item?id=2725100

http://www.quora.com/What-are-the-key-differences-between-Ha...

http://stackoverflow.com/questions/5600246/sml-conversions-t...

http://www.cs.washington.edu/education/courses/cse505/98au/s...

(yes, from 1998, but worth the PS conversion if youre on windows)

http://news.ycombinator.com/item?id=3481700

Re: Real World Ocaml announced

#29
post #3

I'm curious. How many folks here have used OCaml for production work? I'd just like to get an idea of the numbers. Edit: By 'production work' I meant built things that are being used by other people.

I haven't, but the large company I work for has a product partially written in OCaml. I came across it in source control once. I'd guess it's tens of thousands of lines of code, but that's a complete guess.

There's also a list of companies using it here: http://ffconsultancy.com/products/ocaml_journal/free/introdu...

Re: Real World Ocaml announced

#30
post #6
post #4

Earlier quoted context omitted.

So what's impractical about Ocaml? I just looked at it and it looks cool, but I haven't tried it for anything. If they actually have event driven programming that seems like a big step over most functional languages, where I/O is kind of an afterthought. Steve Yegge wrote some points about Ocaml quite awhile ago. http://sites.google.com/site/steveyegge2/ocaml He says it is quite fast and I've seen that in other place…

> So what's impractical about Ocaml? The biggest issue Ocaml has is that its GC is single-threaded which basically removes the ability to do parallel programming inside a single executable. You have to resort to message passing between multiple processes. For what it's worth, I think I heard rumors there's work on an improved GC.

http://www.reddit.com/r/ocaml/comments/gkjq2/ocamlpro_and_th...
Post reply on HN