I hereby claim:
- I am anler on github.
- I am anler (https://keybase.io/anler) on keybase.
- I have a public key ASDPQr3lTAnvcEe0NS5_9sCJeasPjax0KN_u62h7cYJZlgo
To claim this, I am signing this object:
package coolcode | |
import java.io.File | |
import java.util.Properties | |
import org.scalatra.ScalatraServlet | |
class StaticFileServlet extends ScalatraServlet { | |
get("/*") { | |
val resourcePath = getResourcePath |
import Control.Monad.IO.Class | |
import Data.Functor.Identity | |
getline :: MonadIO m => m String | |
getline = (liftIO getLine) >> return "some fake input\n" | |
main :: IO () | |
main = do |
import cats._, cats.data._, cats.syntax._, cats.implicits._ | |
implicit def readerTMonadError[F[_], I, E](implicit AE: ApplicativeError[ReaderT[F, I, ?], E], M: FlatMap[ReaderT[F, I, ?]]) = | |
new MonadError[ReaderT[F, I, ?], E] { | |
def pure[A](x: A) = AE.pure(x) | |
def handleErrorWith[A](fa: ReaderT[F, I, A])(f: E => ReaderT[F, I, A]) = | |
AE.handleErrorWith(fa)(f) | |
def raiseError[A](e: E) = |
@scala.annotation.implicitNotFound("${EncryptKeyType} encrypted messages cannot be decrypted with ${DecryptKeyType}") | |
trait CanDecrypt[DecryptKeyType, EncryptKeyType] | |
object CanDecrypt { | |
implicit val pkOnSk = new CanDecrypt[PK, SK] {} | |
implicit val skOnPk = new CanDecrypt[SK, PK] {} | |
} | |
sealed trait PK // public key type | |
sealed trait SK // private key type | |
final case class Key [KeyType](jkey: java.security.Key) |
I hereby claim:
To claim this, I am signing this object:
(defn with-local-redefs-fn | |
[a-var its-new-value func] | |
(cast clojure.lang.IFn @a-var) | |
(alter-meta! a-var | |
(fn [m] | |
(if (::scope-count m) | |
(update-in m [::scope-count] inc) | |
(assoc m | |
::scope-count 1 | |
::thread-local-var (doto (clojure.lang.Var/create @a-var) |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't really have SREs and they make engineers pretty much do everything,
// when T is any|unknown, Y is returned, otherwise N | |
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N; | |
// when T is never, Y is returned, otherwise N | |
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N; | |
// empty object | |
type EmptyObject = { [key: string]: never }; | |
// when T is any|unknown, Y is returned, otherwise N | |
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N; | |
// when T is never, Y is returned, otherwise N | |
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N; | |
// empty object | |
type EmptyObject = { [key: string]: never }; | |