(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
just use GHC for OSX https://ghcformacosx.github.io
the rest of these directions are preserved for historical purposes
xcode-select --install ; brew tap homebrew/versions ; brew tap homebrew/dupes \
| module Finite | |
| import Data.Fin | |
| import Language.Reflection.Elab | |
| import Language.Reflection.Utils | |
| %default total | |
| ||| A bijection between some type and bounded numbers | |
| data Finite : Type -> Nat -> Type where |
| module NatInd | |
| import Language.Reflection.Elab | |
| import Language.Reflection.Utils | |
| %default total | |
| trivial : Elab () | |
| trivial = do compute | |
| g <- snd <$> getGoal |
| {-# language DataKinds, PolyKinds, ScopedTypeVariables, UndecidableInstances, | |
| FlexibleInstances, FlexibleContexts, GADTs, TypeFamilies, RankNTypes, | |
| LambdaCase, TypeOperators, ConstraintKinds #-} | |
| import GHC.TypeLits | |
| import Data.Proxy | |
| import Data.Singletons.Prelude | |
| import Data.Singletons.Decide | |
| import Data.Constraint |
Elm is a statically typed functional language that compiles to JavaScript. It's well-known for its developer experience: the compiler provides nice error messages, the package system enforces semantic versioning for all published packages and makes sure every exposed value or type has some documentation and type annotations.
| {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeInType, TypeOperators, | |
| TypeFamilies, GADTs, UndecidableInstances, InstanceSigs #-} | |
| {-# OPTIONS_GHC -Wincomplete-patterns #-} | |
| import Data.Kind | |
| import Data.Singletons.TH | |
| import Data.Singletons.Prelude | |
| import Prelude hiding ( take ) | |
| $(singletons [d| |
| # https://mail.haskell.org/pipermail/ghc-devs/2017-July/014364.html | |
| # https://downloads.haskell.org/~ghc/8.2.1-rc3/ | |
| # http://taylor.fausak.me/2017/05/17/testing-ghc-release-candidates-with-stack/ | |
| compiler: ghc-8.2.0.20170704 | |
| compiler-check: match-exact | |
| resolver: ghc-8.2.0.20170704 | |
| setup-info: | |
| ghc: |
How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?
These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.
By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.
This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).
Matrix multiplication is a mathematical operation that defines the product of