
Jane Street releases open source alternative to OCaml's stdlib - _bbs
https://ocaml.janestreet.com/
======
Avshalom
Just a note, this is an announcement that they've but their corelib on
bitbucket, the library itself has been available from janestreet for years.

~~~
samdk
While this is mostly true, it's worth noting that this is part of a push to
make Core easier to build and use, which we hope will encourage more people to
use it. (And enable others to contribute.) There's still a ton of work to be
done in that regard, but this release, at least, includes a Linux build
script, and the libraries which are necessary for building Core.

Also, this release includes Async (our concurrency library), which is a much
more recent release (October 2011). If you'd like more information about
Async, there's Ron's blog post announcing the release [1], and also a previous
comment of mine with some very basic sample Async code [2].

[1] <https://ocaml.janestreet.com/?q=node/100>

[2] <http://news.ycombinator.com/item?id=3278532>

~~~
cpeterso
What was the initial motivation for writing an alternative "standard" library?
Is it self-sufficient or does it build new frameworks onto of OCaml's standard
library?

~~~
lins
The std-lib in OCaml's official release by INRIA is very basic and not enough
to be used in medium/large projects, and some people would rather call it
"base-lib" instead of "std-lib" . Two major libraries can be used as an
alternative, i) Jane Street's Core libraries. and ii) the comunity-driven
"Batteries included".

Related links:

Core: <https://bitbucket.org/yminsky/ocaml-core/wiki/Home> Batteries:
<https://github.com/ocaml-batteries-team/batteries-included>

~~~
dkersten
For someone just starting out with OCaml, what are the pros and cons of one
over the other? (or which would you recommend and why?)

I've been interested in OCaml for a good few years now and have tinkered with
it from time to time, but I think its time I gave it serious try.

~~~
lins
First, I think for beginners the std-lib is fairly enough for basic learning
tasks. Choosing a library is something one should consider only after he has
gained some insight of the language.

Second, As no better than someone "just starting out with OCaml" myself, I'd
like to redirect you to this page on StackOverflow for a comparison between
Batteries and Core:

[http://stackoverflow.com/questions/3889117/what-are-the-
pros...](http://stackoverflow.com/questions/3889117/what-are-the-pros-and-
cons-of-batteries-and-core).

~~~
dkersten
Great, thanks for the link!

 _Choosing a library is something one should consider only after he has gained
some insight of the language._

Well, like I said, I've tinkered with OCaml in the past and have a reasonable
idea what it has to offer. While I still have a lot to learn before I can
properly make use of OCaml idioms and such, I would prefer if I didn't have to
relearn the library as soon as I get to a level where I can write real
programs. From the link I see that Batteries is backwards compatible with the
standard library, so perhaps its the better one to start with for a beginner.

------
Peaker
I wish someone capable authored a Haskell standard library replacement. It
could have many improvements:

* Marking partial functions with some naming convention

* Polymorphic containers, with polymorphic "length" and other features people take for granted

* Removing monomorphic functions such as "map" and "empty" -- expose APIs almost always as part of generic classes

* type String = Text (Along with extra polymorphism it should not cause any trouble)

* Sane numeric hierarchy that matches the mathematical definition

* Fix the Monad/Applicative duplication mess (Also remove "fail" from Monad)

~~~
njs12345
I'd like this too - but I imagine part of the reason why this hasn't been done
is that the recommended libraries are still in flux. Text is a very recent
library, for instance.

Personally, I'd think Hackage getting some kind of support for popularity
metrics would go some way to solving this problem, by helping create a
consensus of what packages used the most by the Haskell community.

~~~
gtani
@njs There's a start on hackage 2, but it hasn't hit 0.1 yet

[http://www.reddit.com/r/haskell/comments/o5iov/modern_reallw...](http://www.reddit.com/r/haskell/comments/o5iov/modern_reallworld_haskell/)

@peaker I think each of your issues has prior art. The author of yesod has had
his gotcha/critical-list, and a response from a Simon!

[http://www.reddit.com/r/haskell/comments/k4lc4/yesod_the_lim...](http://www.reddit.com/r/haskell/comments/k4lc4/yesod_the_limitations_of_haskell/)

and partial functions in prelude

[http://www.reddit.com/r/haskell/comments/lf71l/deprecate_pre...](http://www.reddit.com/r/haskell/comments/lf71l/deprecate_preludehead_and_partial_functions/)

~~~
gtani
re: the Functor/App'tive/Monad hierarchy

[http://haskell.1045720.n5.nabble.com/Proposal-Move-the-
insta...](http://haskell.1045720.n5.nabble.com/Proposal-Move-the-instances-
from-Control-Monad-Instances-into-GHC-Base-td4987551.html)

re: redoing Num and numeric tower (prolly won't happen)

[http://www.reddit.com/r/haskell/comments/nt0op/i_wrote_a_mod...](http://www.reddit.com/r/haskell/comments/nt0op/i_wrote_a_module_to_do_arithmetic_on_continued/)

also: quality/popularity of packages, as more and more hit git/github, they
could post #s of forks, pulls etc, as a crude proxy for ... something

