At issuu, we use OCaml to process reader-behavior events from web browsers and mobile apps, digesting these into high-level reports for business analysts. We process around 5,000 events per second on average. On a daily basis, this amounts to roughly 200 GB of uncompressed JSON data.
Showing posts with label gadt. Show all posts
Showing posts with label gadt. Show all posts
Monday, February 26, 2018
Practicalities and trade-offs in programming with GADTs
At issuu, we use OCaml to process reader-behavior events from web browsers and mobile apps, digesting these into high-level reports for business analysts. We process around 5,000 events per second on average. On a daily basis, this amounts to roughly 200 GB of uncompressed JSON data.
Saturday, February 24, 2018
OCaml: Algebraic Data Types
In previous post, we showed several simple usages of pattern matching. Pattern matching is actually even more useful with algebraic data types. In functional programming, an algebraic data type is a kind of composite type, i.e. a type formed by combining other types.
Detecting use-cases for GADTs in OCaml
Before we dive into the GADT implementation lets do a quick review of how to define GADTs in OCaml. Remember that we previously defined the value type like this To define a GADT we need to use a slightly different syntax. The following syntax definition is taken from the OCaml Users Guide.
Subscribe to:
Posts (Atom)
bundlephobia
JavaScript bloat is a more real problem today than it ever was. Bundlephobia lets you understand the performance cost of adding a npm pack...
-
Programmers almost always need the ability to find and replace certain text across multiple files in their projects. Most IDEs provide find ...
-
This is yet another rails stack installation how to. It is useful for installing a production rails hosting environment using Nginx as the ...
-
Git is a Version Control System , it is used to keep a history of all the changes you made into your code, manage releases, makes it easier...