Live data from Hacker News

Real World Ocaml announced

realworldocaml.org

11–20 of 58 posts

Re: Real World Ocaml announced

#11
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.

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.

Re: Real World Ocaml announced

#12
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.

Re: Real World Ocaml announced

#13

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.

Re: Real World Ocaml announced

#14
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.

Not sure why this got downvoted. JoCaml is actually an implementation.

Re: Real World Ocaml announced

#15
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 worked on a Coverity-like static analysis tool product which used OCaml. It used EDG C/C++ parser with FFI.

Re: Real World Ocaml announced

#16
post #11
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.

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 soon no one will be all that concerned about how much happens on any one machine. It will be how much gets done per process, and how much gets done per 'cloud'. AppEngine already does this.

And it already is a design feature. The GC is not single threaded b/c they're too dumb to figure out how to fix it (not that you were saying that, but people tend to jump to that conclusion). It's because they want the fastest possible single threaded performance, which means not polluting the GC with the kinds of locking mechanisms necessary to support multi-threaded operation.

Re: Real World Ocaml announced

#17

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.

Both are great, both have their strengths and weaknesses. Start with whichever you feel comfortable with, and branch out to the other when you want to discover a new dimension. Ocaml has a lot of strong points and a statically typed module system, Haskell has a less restrictive type system and a different way of dealing with heterogeneous polymorphism, and has all the good / bad that come with laziness by default (mostly good, with a dash of gotchas)

Re: Real World Ocaml announced

#18

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.

Both are great, both have their strengths and weaknesses. Start with whichever you feel comfortable with, and branch out to the other when you want to discover a new dimension. Ocaml has a lot of strong points and a statically typed module system, Haskell has a less restrictive type system and a different way of dealing with heterogeneous polymorphism, and has all the good / bad that come with laziness by default (mostly good, with a dash of gotchas)

Re: Real World Ocaml announced

#19
post #11
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.

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.

[deleted]

Re: Real World Ocaml announced

#20
Perhaps OT: I've tried to like OCaml 2 or 3 times so far and have not succeeded. I've loved Haskell (until I hit the wall), enjoy Python, enjoyed Ruby, am very happy with JS, had a love/hate relationship with C/C++ (really, header files?!), loved Java compared to C/C++ (until I learned to hate Java). And I'm generally really excited by what's going on in languages right now.

I just wish there was an SML for the JVM. But until then Ocaml is probably the gear and I look forward to reading this book.

And, oh my golly, have you seen OCaml's Eliom for Ocsigen? Absurdly interesting. http://ocsigen.org/eliom/ One language for the browser and server, with client/server transparency and best-in-class server performance.

Post reply on HN