News for hackers. Stuff that matters.
Re:Why We Use OCaml by runT1ME on Wednesday July 16, 2014 @04:10PM (#8044245)
Neat reply, thanks.

In regards to #2, this sounds like the ST monad, are they comparable at all?

What makes OCaml easier to debug with GDB opposed to haskell specifically? I don't have experience doing either, but that's a curious statement, I would have assumed they were similar (both native code w/ some sort of GC...)

Re:Why We Use OCaml by tel on Wednesday July 16, 2014 @04:14PM (#8044270)
OCaml allows you to use mutation pervasively without marking your type. Haskell requires you mark your type with `IO`, `ST`, `State`. You can see Haskell as advantageous because it means that if you have a type without one of those markers you can be certain there is no observable mutation occurring. You can also see Haskell as disadvantageous because those markers are a little annoying.

The ST monad lets you transition from regions which allow mutation to pure regions and then back again.

Re:Why We Use OCaml by dllthomas on Wednesday July 16, 2014 @04:36PM (#8044399)
Basically, all OCaml code runs in IO. You can still only modify things that you've marked as modifiable (analogous to an IORef), but there is no constraint on where you can modify them from.

(In case it's unclear, I'm agreeing with tel and rephrasing.)

Re:Why We Use OCaml by orbifold on Wednesday July 16, 2014 @06:12PM (#8044907)
One advantage that gives you, is that you can easily define a monad on top of that and not worry about monad transformers. Jane Streets async library does that in its Deferred module https://ocaml.janestreet.com/ocaml-core/111.17.00/doc/async/...
Re:Why We Use OCaml by tel on Wednesday July 16, 2014 @06:28PM (#8044980)
But I like transformers... a lot!
Re:Why We Use OCaml by seliopou on Wednesday July 16, 2014 @07:24PM (#8045182)
Your Haskell program doesn't use the C stack, so using gdb may tell you something about the Haskell runtime you're using or some C library you called into, but it won't tell you much about the state of your actual program.