
Comprehending Ringads (2016) [pdf] - mpweiher
http://www.cs.ox.ac.uk/jeremy.gibbons/publications/ringads.pdf
======
burakemir
The author is developing a theory of expressions (generalizations of list
comprehensions) operating on 'ringads', which are monads with a few additional
operations and laws.

The academic style probably blurs the fact that this has very deep practical
applications, as it provides a framework that permits to write down database
joins and OLAP multidimensional queries (including aggregation) in multiple
ways that can be considered equivalent through application of monad and ringad
laws. This in turn can enable us to interpret such expressions efficiently, by
picking the one that corresponds to a desirable execution plan.

Another paper that I would consider related is the one that points out how
comprehension expressions can express SQL features like 'order by' and 'group
by', namely 'Comprehensive comprehensions' by Wadler and Peyton-Jones.

~~~
chriswarbo
> The academic style probably blurs the fact that this has very deep practical
> applications

Whilst this is certainly true, and worth pointing out, it's also rather a
shame. The paper's abstract says exactly this, in quite a clear way, but I
think many people wouldn't even make it as far as reading the abstract :(

> _List comprehensions_ are a widely used programming construct, in languages
> such as Haskell and Python and in technologies such as Microsoft's Language
> Integrated Query. They generalize from lists to arbitrary _monads_ ,
> yielding a lightweight idiom of imperative programming in a pure functional
> language. When the monad has the additional structure of a so-called
> _ringad_ , corresponding to 'empty' and 'union' operations, then it can be
> seen as some kind of collection type, and the comprehension notation can
> also be extended to incorporate _aggregations_. Ringad comprehensions
> represent a convenient notation for expressing _database queries_. The
> ringad structure alone does not provide a good explanation or and efficient
> implementation of relational _joins_ ; but by allowing heterogeneous
> comprehensions, involving both bag and indexed table ringads, we show how to
> accommodate these too.

------
Odenwaelder
Not related to the content, but I always enjoy looking at beautifully typeset
LaTeX documents.

