I hereby claim:
- I am a-wortman on github.
- I am iximeow (https://keybase.io/iximeow) on keybase.
- I have a public key whose fingerprint is 4DFE 1A27 B8E0 9198 755B 339F BDA6 8873 AF27 D00E
To claim this, I am signing this object:
| #! /usr/bin/env ruby | |
| require 'rattler' | |
| class Test < Rattler::Runtime::ExtendedPackratParser | |
| grammar %{ | |
| %whitespace BLANK* | |
| start <- ext? components |
| public interface UIGenericElementRenderer<T extends glEEngine> { | |
| public void unsafeDraw(UIElement elem, T engine); | |
| } | |
| public abstract class UIElementRenderer<T extends glEEngine, U extends UIElement> implements UIGenericElementRenderer<T> { | |
| Class<U> myClass; | |
| public UIElementRenderer(Class<U> rendereeClass) { | |
| myClass = rendereeClass; | |
| } |
| implicit val byteOps: BitOps[Byte] = new BitOps[Byte] { | |
| def >>>(t: Byte, x: Int): Byte = (t >>> x).toByte | |
| def |(a: Byte, b: Byte): Byte = (a | b).toByte | |
| def &(a: Byte, b: Byte): Byte = (a & b).toByte | |
| //Need to put this in an `ArithmeticOps` or something, but this is ok for now | |
| def +(a: Byte, b: Byte): Byte = (a + b).toByte | |
| } | |
| implicit class WithBitOpts[T : BitOps](x: T) { | |
| def >>>(b: Int): T = implicitly[BitOps[T]].>>>(x, b) |
I hereby claim:
To claim this, I am signing this object:
| import Data.List.Split | |
| euler :: [[Int]] -> Int | |
| euler a = head (head (collapse a)) | |
| collapse :: [[Int]] -> [[Int]] | |
| collapse a = if length a > 1 then | |
| collapse ((init (init a)) ++ [euler18max (last a) (last (init a))]) else a | |
| --We ALWAYS want b to be one larger than a |
| trait Lazy[T] { | |
| def value: T | |
| def map[U](f: T => U): Lazy[U] | |
| def flatten[U](implicit lazyConv: (=> T) => Lazy[U]): Lazy[U] | |
| def flatMap[U](f: T => Lazy[U]): Lazy[U] | |
| } | |
| object Lazy { | |
| implicit def lazyIdentity[A]: (=> Lazy[A]) => Lazy[A] = (old) => Lazy { old.value } |
| object foo extends App { | |
| case class Elem(a: Int, b: String, c: Int) | |
| val l = Elem(1, "asf", 2) | |
| trait R[T] { | |
| def r(x: T): T | |
| } | |
| object defaultConvs extends Poly1 { |
| package net.iximeow | |
| import scala.slick.driver.SQLiteDriver.simple._ | |
| package object slick { | |
| var instanceNum = 0; | |
| def table(args: String*) = { | |
| val xs = args.toSeq | |
| var str = "" | |
| str += s"class T${instanceNum}(tag: Tag) extends Table[(${xs.mkString(", ")})](tag, ${'"'}t${instanceNum}${'"'}) {" |
| fn main() { | |
| let x: &Expr<&ValT> = &Unit::<&ValT> { | |
| expr: &IntValue { size: 5 } | |
| }; | |
| } | |
| trait ValT {} | |
| trait Expr<T> {} |
| // Wanted to ensure complete() was only called with a certain response type, to give guarantees about api response structure | |
| // (no accidental "returned a string when it should be json!" or "didn't actually give a body when I should have") | |
| trait CustomRouteDirectives extends spray.routing.directives.RouteDirectives { | |
| import spray.httpx.marshalling.ToResponseMarshallable | |
| import spray.httpx.marshalling.ToResponseMarshallable.{isMarshallable => _} | |
| import spray.httpx.marshalling.ToResponseMarshaller | |
| import spray.httpx.marshalling.ToResponseMarshaller.{ | |
| eitherMarshaller, | |
| futureMarshaller, | |
| liftMarshaller, |