6 ms·
A look back on OCaml since 2011
- Yoric 7y agoGreat to see OCaml picking back steam after a few slow years \o/
- xvilka 7y agoThree things left for the full glory: better Windows support (without MinGW/Cygwin hacks, or WSL), better debugging and profiling (see DWARF PRs in GitHub repository), and, of course, multicore. Looking forward to more OCaml and faster OCaml.
- zerr 7y ago> multicore what's the state of this nowadays? > better Windows support couldn't agree more - they can learn on Go's lessons (the language didn't get much traction until they added Windows support).
- TheSmoke 7y agomulticore is still getting developed. you can watch the repo at https://github.com/ocaml-multicore/ocaml-multicore https://github.com/ocaml-multicore/ocaml-multicore
- masklinn 7y agoIt's been in development for more than 5 years and looks a bit like a boondoggle though, as the goal is not just to remove the GIL and provide "native threads" but > use algebraic effects to compose concurrency and supports parallelism through domains and incremental GC. Rather than adding a specific multicore scheduler into the runtime system, we’re providing the minimum required toolset in the form of pluggable schedulers.
- ernst_klim 7y ago> boondoggle Care to elaborate?
- bjz_ 7y agoThey're doing lots of great heavy lifting to get effects and handlers into a production language, and I don't think it's fair to write them off like this. Yes, it's hard, but they seem to be making positive progress.
- masklinn 7y ago> They're doing lots of great heavy lifting to get effects and handlers into a production language Sure, but at the end of the day what it means is 5 years into the effort OCaml still as limited threading-wise as it was at the start of the effort. And that is what most users (and non-users) care about in a world where 2/4 is your mobile baseline and where AMD's R3-3300G is expected to be 6/12 for $99.
- sadiq 7y ago4.09 (which has just been released) includes a number of changes that are being introduced soley to ease the merging of multicore. 4.10 will also include a recently merged, large change for multicore support: https://github.com/ocaml/ocaml/pull/8713 https://github.com/ocaml/ocaml/pull/8713 The plan is to land multicore in trunk through a series of smaller chunks such as #8713
- jhoechtl 7y ago> 4.09 (which has just been released) includes a number of changes that are being introduced to ease the introduction of multicore. Ocaml multicore has been on the tablet since ... pretty much the dawn of time. It's save to call it vaporware or the duke nukem forever of Ocaml.
- logicchains 7y agoThe perfect is the enemy of the good.
- weberc2 7y agoGo didn’t get much traction until they added Windows support? I could believe that Go began to take off around the time that Windows support was added, but that seems more of a coincidence than a cause. How many deployments are running on Windows, anyway?
- idbehold 7y agoI'd be happy with a regex engine with negative look-aheads.
- amelius 7y agoMulticore and a modern GUI library will win me over.
- GrayTextIsTruth 7y agoi would say an update to the std lib to bring LWT into the language. something as simple as reading a file without an external lib is verbose
- frou_dh 7y agoLove a good cheatsheet that actually respects the concept of being a SINGLE, fixed-layout page: http://www.ocamlpro.com/wp-content/uploads/2019/09/ocaml-lang.pdf http://www.ocamlpro.com/wp-content/uploads/2019/09/ocaml-lan... It's something of a lost art in the paperless and HTML era of documentation.
- apaprocki 7y agoMy own retrospective... been using OCaml in a production compiler on obscure UNICES since 3.08 (> 15 years!). Pretty seamless, simple updates, everything kept working, lights are still on. I think source changes were required ~3 times, so amazingly stable from my POV :)
- sjakobi 7y agoWhat kind of compiler is it? What does it compile? Are you the only person who has worked on it?
- apaprocki 7y agoIt compiles a “C# class”-looking DSL to GNOME GObjects, pushing all the ugly boilerplate (I’m aware there are newer ways to do it that have appeared in the last 15 years :)) into the generated code. And nowadays I’d call it a transpiler, but... It was written by a teammate in 2004 (Frenchman, obviously!) and I’ve owned it since. A number of people have submitted features, etc. It’s fairly straightforward and OCaml wasn’t really a barrier to entry for any of the contributors. edit: I should have said “source changes due to OCaml upgrades” above to be more clear.
- Miltnoid 7y agoI use OCaml for my everyday development. The main thing OCaml really needs is modular implicits.
- sjakobi 7y agoWhat are modular implicits?
- tutanchamun 7y agoAs a layman I would describe them as implicits like in current Scala [0] but better (easier to reason about). One thing which they allow is ad-hoc polymorphism like typeclasses. https://arxiv.org/pdf/1512.01895.pdf https://arxiv.org/pdf/1512.01895.pdf https://old.reddit.com/r/ocaml/comments/4qan0w/modular_type_classes_vs_modular_implicits/ https://old.reddit.com/r/ocaml/comments/4qan0w/modular_type_... [0] https://scala-lang.org https://scala-lang.org
- TheAsprngHacker 7y agoThe ML programming language is known for its advanced module system. First, you have structured, which are your traditional idea of a module. Structures define types and data. Signatures describe the interface of a module and are like the module's "type." By making types abstract or not mentioning members, signatures achieve encapsulation of modules. Finally, you have functors, which are functions from modules to modules. The parameter is constrained by a signature, and the client can pass any module that conforms to the signature to get an output module that uses the passed module in its implementation. The module system is used when a type must support certain operations. For example, the Set module (https://caml.inria.fr/pub/docs/manual-ocaml/libref/Set.html https://caml.inria.fr/pub/docs/manual-ocaml/libref/Set.html) defines a signature called OrderedType for types equipped with a comparison function, and any module that implements OrderedType can be used to make a set. Notably, ML modules differ from Haskell typeclasses because more than one module can exist for the same combination of types. However, you must pass ML modules explicitly, whereas typeclass instances are passed implicitly. So, ML modules have more power than typeclasses, but at the cost of convenience. Here is an example where modules are used to make a set: module LtInt = struct type t = int (* Use built-in polymorphic comparison *) let compare = compare end module GtInt = struct type t = int let compare lhs rhs = compare rhs lhs end module LtIntSet = Set.Make(LtInt) module GtIntSet = Set.Make(GtInt) However, modules can quickly get inconvenient: module type Monoid = sig type t val op : t -> t -> t val e : t end module Addition = struct type t = int let op = (+) let e = 0 end module Multiplication = struct type t = int let op = ( * ) let e = 1 end module FoldLeft (M : Monoid) = struct let fold_left = List.fold_left M.op M.e end Here, it's probably less verbose to just pass the operation and starting value directly to List.fold_left than to use modules! Debatably, this is as equally inconvenient as Haskell's newtype solution to multiple instances, but if there is only one instance, typeclasses are much cleaner to use. Modular implicits are a long-awaited feature that will allow ML modules to be passed implicitly. https://www.cl.cam.ac.uk/~jdy22/papers/modular-implicits.pdf https://www.cl.cam.ac.uk/~jdy22/papers/modular-implicits.pdf
- mhd 7y agoThey did a pretty good job shepherding it, although I'm still not too fond that the current trend is fueled by the Javascriptification of all the things. Sadly, meanwhile "Standard" ML is languishing in academia...
- logicchains 7y agoAt least Standard ML has multicore: https://www.polyml.org/ https://www.polyml.org/.
- Yoric 7y agoI don't follow. How do you feel is OCaml javascriptified?
- nepeckman 7y agoNot GP, but they probably were referring to ReasonML, a JavaScript style syntax for OCaml that primarily targets the web.
- TurboHaskal 7y agoI think he’s referring to ReasonML. Which plenty of OCaml developers dislike, but managed to build a healthy ecosystem in a short amount of time.