Here's an ADT which is not a GADT, in Haskell:
data Expr = IntExpr Int | BoolExpr BoolThe count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 29 Jul 2015 01:52:41 GMT till Fri, 29 Jul 2016 01:52:41 GMT.
Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:
githubUsers
.filter(user => user.followers > 6)| https://raw.github.com/wiki/user/repo/page.md?login=login&token=token |
To be able to use custom endpoints with the latest Spark distribution, one needs to add an external package (hadoop-aws). Then, custum endpoints can be configured according to docs.
bin/spark-shell --packages org.apache.hadoop:hadoop-aws:2.7.2
| def CLdump(cl: ClassLoader = Thread.currentThread().getContextClassLoader) = { | |
| val f = classOf[ClassLoader].getDeclaredField("classes") | |
| f.setAccessible(true) | |
| dump(cl) | |
| def dump(cl: ClassLoader): Unit = { | |
| if (cl == null) return | |
| val classes = f.get(cl).asInstanceOf[java.util.Vector[java.lang.Class[_]]] | |
| println(cl) | |
| println(classes.toArray.map(cl => "\t" + cl.toString).mkString("\n")) | |
| dump(cl.getParent) |
I'm going to start off by motivating what I'm doing here. And I want to be clear that I'm not "dissing" the existing collections implementation or anything as unproductively negative as that. It was a really good experiment, it was a huge step forward given what we knew back in 2.8, but now it's time to learn from that experiment and do better. This proposal uses what I believe are the lessons we can learn about what worked, what didn't work, and what is and isn't important about collections in Scala.
This is going to start out sounding really negative and pervasively dismissive, but bear with me! There's a point to all my ranting. I want to be really clear about my motivations for the proposal being the way that it is.
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutationReference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
| var https = require('https'); | |
| var util = require('util'); | |
| exports.handler = function(event, context) { | |
| console.log(JSON.stringify(event, null, 2)); | |
| console.log('From SNS:', event.Records[0].Sns.Message); | |
| var postData = { | |
| "channel": "#aws-sns", | |
| "username": "AWS SNS via Lamda :: DevQa Cloud", |
| /** This is in reference to @tploecat's blog http://tpolecat.github.io/2015/04/29/f-bounds.html | |
| * where he compares F-bounded polymorphism and type classes for implementing "MyType". | |
| * | |
| * Curiously, the in my mind obvious solution is missing: Use abstract types. | |
| * | |
| * A lot of this material, including an argument against F-bounded for the use-case | |
| * is discussed in: | |
| * | |
| * Kim B. Bruce, Martin Odersky, Philip Wadler: | |
| * A Statically Safe Alternative to Virtual Types. ECOOP 1998: 523-549 |
I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.