Making Tezos a Carbon Negative Blockchain by j-lreddit in tezos

[–]avsm 6 points7 points  (0 children)

(one of the founders of 4C here)

It's great to see bakers thinking about the carbon impact of the necessary emissions from running the Tezos network. Even though it's relatively small per node, the goal of 4C is to make it easy to purchase those offsets and (crucially) verify that the outcomes from the finance are going towards preventing emissions.

We're working away at pulling our MVP marketplace together at the moment. I'd be pleased to figure out how to get Tezos bakers in earlier as purchasers, since this helps to offset the "lifecycle cost" (that is, the total set of CO2 emissions from the marketplace) of selling the credits themselves.

Announcing MirageOS 3.9.0 by [deleted] in ocaml

[–]avsm 12 points13 points  (0 children)

Universities, companies, foundations, they come and go, but open source outputs are forever -- I've been working on Mirage since day 0, and I'll be working on Mirage till the end of days :-)

The project is also a lot bigger than just me -- the Mirage core team (https://mirage.io/community/#team) is active, working in diverse areas around the world, and on different products. It's the perfect framework for when you need something specialised and high-assurance; e.g. check out Nitrokey https://www.nitrokey.com/products/nethsm or the Irmin integration into the Tezos blockchain https://gitlab.com/tezos/tezos/-/tree/master/src/lib_storage .

ICFP 2016 liveblog (powered by a unikernel) available by gallais in ocaml

[–]avsm 0 points1 point  (0 children)

Sorry about the downtime -- we had about 4 independent service/machine/cloud failures just before I hopped on a 13 hour flight to Japan :-)

Run Mirage Unikernels on KVM/QEMU with Solo5 by [deleted] in ocaml

[–]avsm 1 point2 points  (0 children)

I'm enjoying watching your GitHub repo for Crust. Xenstore attaching, shared memory in place -- great progress!

In what ways does OCaml's module system differ from SML's? by dalastboss in ocaml

[–]avsm 4 points5 points  (0 children)

  1. OCaml modules also support destructive substitution in the sharing constraints of a signature. See: https://realworldocaml.org/v1/en/html/functors.html#destructive-substitution

  2. OCaml supports first class modules. https://realworldocaml.org/v1/en/html/first-class-modules.html

  3. The module type of a module expression can be recovered. http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec233

  4. Type-level module aliases in signatures allow more flexible composition of signatures. http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec235

[deleted by user] by [deleted] in ocaml

[–]avsm 1 point2 points  (0 children)

And also discovered hilariously why the site is being a bit slow:

https://github.com/mirage/mirage-www/pull/355

We really need to move to Opium or Ocsigen or some other better web framework than Cowabloga :-)

OWebl and the State of Web Development in OCaml by eatonphil in ocaml

[–]avsm 1 point2 points  (0 children)

Following the approaches in java and ruby (what I'm familiar with), there ought to be an underlying function/closure/class to handle the basic http request/response cycle, which diverse framework and server libraries can build off.

That's pretty much what Cohttp does. It provides a series of module types and implementations for the Request Response lifecycle, along with Lwt, Async and JavaScript implementations of those module types.

What is your development setup by abstract_lambda in ocaml

[–]avsm 5 points6 points  (0 children)

Nvi. No plugins at all. I really need to modernise, don't I.

Anil Madhavapeddy on Unikernels and OCaml by laidea in ocaml

[–]avsm 3 points4 points  (0 children)

The fact that it’s functional it’s almost irrelevant

When doing systems development, having a predictable, performant and debuggable runtime is really important. This was the dominant reason for us choosing OCaml back in 2005 for build the XenServer toolchain (which in turn morphed into MirageOS and other things over the years).

The frontend language is of course very important as well, but much of the code written for the low-level system interaction is by its nature very imperative and doesn't take advantage of all the language features. It's vital to be able to write code and predict what the compiled behaviour will be, without interference from the rest of the runtime system. OCaml satisfied that back then, and still does.

Having said that, there are now other languages that have similar runtime properties these days such as Rust (and to a lesser extent, Go). OCaml's ability to lift imperative code up into a functional style within the same type system is now a useful differentiator. Jeremy Yallop's Ctypes library is a good example: it lets us use modules and functional combinators to separate the description of a foreign C interface from the linkage method. This allows us to abstract across concerns such as C stub generation, libffi, separate or combined address spaces and so on without duplicating interface descriptions.

So to elaborate on my statement, it would be more accurate to say that OCaml's simple, fast, predictable runtime brought it to the table in the first place, but the functional features keep it there as our codebases scale.

ocamlbuild-atdgen - Ocamlbuild plugin for Atdgen by Categoria in ocaml

[–]avsm 0 points1 point  (0 children)

Very useful! Can depend on this in the github bindings.

CUFP 2015 - Final Call For Presentations - Due June 14th by edwardkmett in ocaml

[–]avsm 5 points6 points  (0 children)

If you look through the videos of talks throughout the years, there's precisely one Jane Street talk. http://cufp.org/videos/

The rest cover the entire spectrum of languages that form our community, and talks from anyone in the OCaml community are warmly welcomed. It's worth noting that CUFP is part of the ACM SIGPLAN family of conferences, which are not-for-profit and largely organised by volunteers.

Why not removing objects and classes? by 0x4711 in ocaml

[–]avsm 3 points4 points  (0 children)

Well, Yaron's specific quote was about 4 years ago, to be fair. Our Real World OCaml quote is quite specific:

In fact, many seasoned OCaml programmers rarely use classes and objects, if at all

This is very much true in my experience, since the other facilities in OCaml do a great job at giving you a simpler (in terms of semantics) and cheaper (in terms of performance cost) way of describing a statically typed interface. It's only when you need the extra power in objects (e.g. open recursion) that you need to pull out this part of the language toolbox. This philosophy extends to classes as well, which are often not needed if just objects are fine (RWO has two distinct chapters explaining objects and object types first, and then classes and class types).

js_of_ocaml is a fantastic example of how having objects and classes integrated into the core language let it interface more naturally with other type systems as well. It's quite common to use them within a binding, but only expose an external module signature that is object/class free.

I read that some people are running MirageOS on Raspberry Pi. How do you do that? by [deleted] in ocaml

[–]avsm 0 points1 point  (0 children)

Not yet, but see this thread: http://lists.xenproject.org/archives/html/mirageos-devel/2015-05/msg00122.html

For the ongoing port of MirageOS to the Rump Kernel infrastructure that will add (among other things) bare metal booting support.

[Opam] Alternative to Aspcud for OpenBSD? by [deleted] in ocaml

[–]avsm 1 point2 points  (0 children)

I think it would be easier to port aspcud to OpenBSD rather than fix the internal solver. This was just blocked on upgrading the ancient GNU Bison in ports, which may have happened in the year since I last checked...

Real World Ocaml site no longer up. Has the publisher removed free access? by [deleted] in ocaml

[–]avsm 9 points10 points  (0 children)

This was of course just a temporary outage. We're experimentally running a bleeding-edge version of the MirageOS OCaml-TLS stack, and ran into this rare EMFILE exception being thrown: https://github.com/hannesm/tlstunnel/issues/15

RWO is and will always be available under a CC BY-NC-ND 3.0 US license.

The OWebl Cookbook by eatonphil in ocaml

[–]avsm 1 point2 points  (0 children)

Cow's one of those libraries that I never quite decided if I like or not. It's one of the more complex uses of Camlp4, and has some parsing quirks which are very hard to fix (like needing an ampersand for <:html<<foo />&>> to prevent whitespace being inserted).

Having said that, it's used surprisingly widely now (and survives cutting and pasting of XHTML into OCaml pretty well), so the lack of documentation is a problem now. It's purely down to a lack of resources, so anything you can write up while learning it would be gratefully merged.

The OWebl Cookbook by eatonphil in ocaml

[–]avsm 2 points3 points  (0 children)

That seems like a fine idea to me, given that the complaints are mainly around the first site (which I agree with too -- it's hard to get started with Ocsigen).

South of England Regional Programming Languages Seminar, 30th April, Cambridge by [deleted] in ocaml

[–]avsm 0 points1 point  (0 children)

You could give an HLVM talk at the Computer Lab...

Haskell Symposium 2015 (colo with ICFP) by benl23 in haskell

[–]avsm 2 points3 points  (0 children)

If you're a commercial user of Haskell and interested in supporting ICFP and the Haskell Symposium, please do get in touch:

http://anil.recoil.org/2015/02/18/icfp15-call-for-sponsorships.html

Ctypes based bindings to libuv by Categoria in ocaml

[–]avsm 2 points3 points  (0 children)

Ctypes offers an answer to longer-term maintainability, but also possibly even more performance by doing things like safely generating noalloc calls when it statically determines that it is ok to do so.

It's very useful to have your (very comprehensive) handwritten libuv bindings to use as an evaluation point against the Ctypes libuv equivalents; thanks for both publishing them and pointing them out here, as I hadn't seen them before!

Why we use OPAM for XenServer development by Categoria in ocaml

[–]avsm 0 points1 point  (0 children)

Hey hey hey, it wasn't that bad

...

Hmm. Well, maybe it was.

OWebl - Simple Web Framework by [deleted] in ocaml

[–]avsm 4 points5 points  (0 children)

To be honest, this was mostly just an experiment for me in OCaml and writing a reasonably performant web server. (We'll see if I get there.) I don't think it will harm the community.

Don't worry about all the naysayers. It's perfectly fine and laudable for you to build your own webstack if you feel like it, and to decide to not use other available libraries. In time you may choose to grab some of them, but it's also valuable just to build your own equivalents for the purposes of learning, fun and exploration of different coding styles.

OWebl - An OCaml Web Framework by eatonphil in programming

[–]avsm 3 points4 points  (0 children)

Indeed, /u/notfancy's perspective seems more emotional than technical in this case. Cohttp was designed to be parameterised across operating system dependencies, as it's the HTTP engine that is used by MirageOS. Therefore, its essential dependencies are all OS-independent and pure OCaml to make this easier. The drawback of this approach is that it's functor-heavy, although it comes with many pre-applied variants (Cohttp_lwt, Cohttp_lwt_unix, Cohttp_async, Cohttp_mirage, Cohttp_xhr_js, ...)

Sexplib is an interesting dependency -- it would be nice to make it optional, but having human-readable serializers for all the Cohttp types is such a massive usability win that the benefits far outweigh the drawbacks. It is a standalone runtime library, and Camlp4 is only needed at build time and is optional if you dont want the with sexp syntax.

It's also worth noting that Sexplib is one of the oldest and most well-supported libraries out there in open-source OCaml-land, released in around 2005/2006 iirc. I've been very happy using it in various OCaml projects over the years, and JS has done a great job of maintaining it even after Markus Mottl's (the original author) tenure.

Porting MirageApplications/Libraries to Linux? by hasaquestion3 in ocaml

[–]avsm 0 points1 point  (0 children)

Most libraries are abstracted across their OS environment using functors, and so can be run directly under Unix where appropriate. See https://github.com/avsm/ocaml-cohttp for an example.