This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#|@ | |
This is a simple capabilities implementation | |
that provides most of the properties described in | |
[_Capability Myths Demolished_](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.6.3660). | |
The only one missing (I think) is _A: No Designation Without Authority_. | |
I need to read more about the capabilities that exist in other systems, | |
but it seems like they wrap two things into the authority: | |
the designator and the operation (read, write, etc.). | |
However, our operations can match arbitrary patterns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** A composition of dunces^Wfunctors */ | |
trait ◦[F[_], G[_]] { type λ[A] = F[G[A]] } | |
object ◦ extends CompositionInstances0 { | |
implicit def composeFunctor[F[_]: Functor, G[_]: Functor]: | |
Functor[(F ◦ G)#λ] = | |
new Functor[(F ◦ G)#λ] { | |
def map[A, B](fa: F[G[A]])(f: A => B) = fa.map(_.map(f)) | |
} | |
} | |
abstract class CompositionInstances0 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def toCofree[F [_]: Functor, A](fa: Fix[F]): Cofree[F, Unit] = | |
Cofree((), fa.unFix.map(_.toCofree)) | |
// can be written as either of these | |
fa.cata(Cofree((), _)) | |
fa.convertTo[Cofree[?[_], Unit]] | |
// extendP → attributeTopDown ... ish | |
// extendPM → attributeTopDownM | |
def extendP[F[_]: Functor, A, B] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
packageOverrides = super: let self = super.pkgs; in | |
rec { | |
emacsMacPackages = self.emacsPackagesNgGen self.emacs24Macport; | |
emacs = emacsMacPackages.emacsWithPackages (with emacsMacPackages.melpaPackages; [ | |
ace-jump-mode | |
ac-slime | |
... | |
]); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +sellout is my blockchain ID. https://onename.com/sellout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 files changed, 23 insertions(+), 10 deletions(-) | |
core/src/main/scala/slamdata/fp/package.scala | 21 ++++++++++++++++----- | |
web/src/main/scala/slamdata/engine/api/server.scala | 12 +++++++----- | |
modified core/src/main/scala/slamdata/fp/package.scala | |
@@ -21,6 +21,7 @@ import slamdata.RenderTree.ops._ | |
import scalaz._; import Liskov._; import Scalaz._ | |
import scalaz.concurrent.Task | |
+import scalaz.effect._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from | |
@data sealed trait Meh[+A] | |
object Meh { | |
final case class Yep[A](mep: A) extends Meh[A] | |
final case class Nope[A]() extends Meh[A] | |
} | |
// I generate | |
sealed abstract trait Meh[+A] extends scala.AnyRef; | |
object Meh extends scala.AnyRef { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[error] /Users/greg/Documents/SlamData/slamengine/core/src/main/scala/slamdata/engine/analysis/fixplate.scala:271: type mismatch; | |
[error] found : scalaz.~>[[α(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)]F[slamdata.engine.analysis.EnvT[(term.this.Term[F], B),Term.this.CofreeF,α(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)]],[α(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)]slamdata.engine.analysis.EnvT[B,Term.this.CofreeF,F[α(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)]]] | |
[error] (which expands to) scalaz.NaturalTransformation[[α(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)]F[slamdata.engine.analysis.EnvT[(term.this.Term[F], B),Term.this.CofreeF,α(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)(in type λ)]],[α(in type λ)(in type λ)(in type λ)(in type λ)(in type λ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Does this look like a reasonable approach? | |
// What parts of this syntax aren’t going to work, etc.? | |
// What is missing? | |
package object logicalPlan { | |
data(LogicalPlan[A])( | |
Read[Path], | |
Constant[Data], | |
Invoke[Func, List[A]], | |
Join[A, A, JoinType, BinOp, A, A], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.slamengine_commits.mapReduce( | |
function () { | |
(function (key, value) { | |
function clone(src) { | |
if (((typeof src) != "object") || (src == null)) return src; | |
var dest = src.constructor(); | |
for (var i in (src)) dest[i] = clone(src[i]); | |
return dest; | |
}; | |
var rez = []; |