News for hackers. Stuff that matters.
Re:OCaml in Operations by seliopou on Tuesday April 12, 2016 @12:40AM (#11477305)
One clarification. As of a couple weeks ago, OCaml does have native support for many of the services AWS provides, via code generation:

https://github.com/inhabitedtype/ocaml-aws

I've been using these bindings internally for about a year, so the kinks have been worked out. A few more data types need to be supported by the code generator (in particular, the map type), and then it should have full service coverage.

Re:OCaml in Operations by alexatkeplar on Tuesday April 12, 2016 @06:59AM (#11478492)
This is awesome - thanks so much for putting this together Spiro. With enough library support I think OCaml can definitely hit a sweet spot for ops...
Re:OCaml in Operations by eatonphil on Tuesday April 12, 2016 @06:50AM (#11478454)
Why the GCC requirement on FreeBSD? And that definitely shouldn't require actually creating a static link.

Edit: whoops, replied to the wrong parent.

Re:OCaml in Operations by seliopou on Tuesday April 12, 2016 @11:23AM (#11480342)
The reason for each step is documented in the bash snippet. At the time of development, zarith (a transitive dependency) hard coded the GCC dependency in its build process. Perhaps it shouldn't, but it definitely did and continues to require the symlink on systems without GCC. I submitted a patch to fix this in zarith, but it has not made it to opam yet. See The patch here:

https://forge.ocamlcore.org/tracker/index.php?func=detail&ai...

Re:OCaml in Operations by sgrove on Tuesday April 12, 2016 @10:06AM (#11479673)
I've used this (thanks seliopou!) to convert my bash-based (Mirage) deployment scripts over to OCaml, and am significantly happier with the end result.
Re:OCaml in Operations by pnathan on Tuesday April 12, 2016 @02:03AM (#11477525)
My hat, it is taken off to you.

I will be experimenting with this!

Re:OCaml in Operations by StreamBright on Tuesday April 12, 2016 @04:08AM (#11477919)
I can see why people start to use OCaml more and more for things like CLI tools, metrics collection and other things like http proxying (most of the stuff came up HN in the last few weeks). I am hoping that OCaml finally gets its momentum and gets more widely accepted. It is a pretty sweet language with amazing features and type class.
Re:OCaml in Operations by LeonidasXIV on Tuesday April 12, 2016 @04:30AM (#11477985)
> It is a pretty sweet language with amazing features and type class

Type classes is the one thing that OCaml does not have. It might get a sort of similar to use mechanism called modular implicits, but we will see about that in the future.

Re:OCaml in Operations by mercurial on Tuesday April 12, 2016 @06:15AM (#11478321)
Yeah, that's the OCaml version of "the year of Linux on the desktop" :(
Re:OCaml in Operations by StreamBright on Tuesday April 12, 2016 @07:00AM (#11478499)
You can still be hopeful. :)
Re:OCaml in Operations by unhammer on Tuesday April 12, 2016 @08:34AM (#11478925)
One thing OCaml does have, however, that I often miss in other languages, is polymorphic variants. Sometimes you want a function to only work on a subset of a variant, without having to write silly handlers for things that the computer ought to be able to check never happen.
Re:OCaml in Operations by StreamBright on Tuesday April 12, 2016 @06:59AM (#11478498)
Sorry I meant type system, doing multi tasking did not help :)
Re:OCaml in Operations by eggy on Monday April 11, 2016 @11:50PM (#11477123)
I always wanted to learn OCaml because I thought ML was a very nice language. Great how a rewrite of the JS code cleared up a lot blurry implementations. I wonder if F# could be applied here as easily. Funscript and Websharper compile to JS from F#. F# is opensource, and always suffered in published benchmarks, because the slower Mono platform was used due to MS licensing restrictions on using the faster .NET platform. Now that MS is opensourcing so much, and recreating bash in Windows, F# is going to be more applicable I think in operations too.
Re:OCaml in Operations by mercurial on Tuesday April 12, 2016 @12:25AM (#11477257)
Last time I checked, js_of_ocaml looked a lot more mature than Funscript (whose repo doesn't seem to suffer from an excess of activity).

I think the big thing missing for OCaml right now is a solid persistence system (preferably something lightweight).

Re:OCaml in Operations by ZenoArrow on Tuesday April 12, 2016 @08:23AM (#11478873)
> "a lot more mature than Funscript (whose repo doesn't seem to suffer from an excess of activity)."

That's because development work has moved to Fable:

https://github.com/fsprojects/Fable

Re:OCaml in Operations by eggy on Tuesday April 12, 2016 @05:07AM (#11478127)
I hadn't noticed the lack of activity, but it works. There's also Websharper, but that's not really just an F# to JS compiler.
Re:OCaml in Operations by vog on Tuesday April 12, 2016 @04:41AM (#11478029)
> ... or the release by Bloomberg of an OCaml to JavaScript compiler

I have never heard of bloomberg/bucklescript.

How does it compare to js-of-ocaml? (which is what the author actually uses, according to the article)

Re:OCaml in Operations by FraaJad on Tuesday April 12, 2016 @08:19AM (#11478849)
Re:OCaml in Operations by vog on Tuesday April 12, 2016 @09:00AM (#11479112)
Okay, so Bucklescript is intended to become the next generation of js-of-ocaml, right?
Re:OCaml in Operations by hongboz on Tuesday April 12, 2016 @09:12AM (#11479209)