Skip to content

Instantly share code, notes, and snippets.

View patrickt's full-sized avatar
🍉

Patrick Thomson patrickt

🍉
View GitHub Profile
#include <stdio.h>
#include <helium.h>
#include <stdint.h>
#include <inttypes.h>
#include <unistd.h>
void my_callback(const helium_connection_t *conn, uint64_t mac, char * const message, size_t count)
{
printf("Connection %p received message '%s' from device %" PRIx64 ".\n", (void *)conn, message, mac);
}

A Quick and Dirty Lens primer

Why does Lens exist? Well, Haskell records suck, for a number of reasons. I will enumerate them using this sample record.

data User = User { login    :: Text
                 , password :: ByteString
                 , email    :: Text
                 , created  :: UTCTime
 }

A Quick and Dirty Lens primer

Why does Lens exist? Well, Haskell records suck, for a number of reasons. I will enumerate them using this sample record.

data User = User { login    :: Text
                 , password :: ByteString
                 , email    :: Text
                 , created  :: UTCTime
 }

A Quick and Dirty Lens primer

Why does Lens exist? Well, Haskell records suck, for a number of reasons. I will enumerate them using this sample record.

data User = User { login    :: Text
                 , password :: ByteString
                 , email    :: Text
                 , created  :: UTCTime
 }

A Quick and Dirty Lens primer

Why does Lens exist? Well, Haskell records suck, for a number of reasons. I will enumerate them using this sample record.

data User = User { login    :: Text
                 , password :: ByteString
                 , email    :: Text
                 , created  :: UTCTime
 }
cabal sandbox init
git submodule update --init --recursive --remote
cabal sandbox add-source vendor/snap-extras
cabal sandbox add-source vendor/riak-haskell-client
cabal sandbox add-source vendor/riak-haskell-client/protobuf
cabal sandbox add-source vendor/snaplet-riak
cabal install --enable-tests --only-dep --allow-newer -j
cabal configure --enable-library-profiling --enable-executable-profiling
cabal install -j --allow-newer --enable-tests --enable-library-profiling --enable-executable-profiling
cabal configure --enable-library-profiling --enable-executable-profiling

Keybase proof

I hereby claim:

  • I am patrickt on github.
  • I am patrickthomson (https://keybase.io/patrickthomson) on keybase.
  • I have a public key whose fingerprint is 9D65 E965 6644 113D FF41 B6BD B4C5 5885 9AE8 8E00

To claim this, I am signing this object:

%************************************************************************
%* *
\section[Driver-asm-fiddling]{Fiddling with assembler files}
%* *
%************************************************************************
Tasks:
\begin{itemize}
\item
Utterly stomp out C functions' prologues and epilogues; i.e., the
/usr/local/Cellar/ghc/7.8.3/lib/ghc-7.8.3/package.conf.d:
Cabal-1.18.1.4
array-0.5.0.0
base-4.7.0.1
bin-package-db-0.0.0.0
binary-0.7.1.0
rts-1.0
bytestring-0.10.4.0
containers-0.5.5.1
deepseq-1.3.0.2

Vince Staples - Summertime '06

9.5/10

Def Jam

Trauma has left its mark on Vince Staples. "You can ask anybody that knows me—I hate when it's loud around me," he intones [in an interview with Noisey][interview]. "I grew up in a very loud place. I heard a lot of ambulances, a lot of helicopters, a lot of gunshots that never made it to the news [...] Niggas who know me like 'Vince, you don't have fun!' I'm like 'Nah, I don't have time for that.'" Summertime '06, Staples's major-label debut, is a record of trauma -- Staples plays the role of war correspondent, grimly chronicling the violence endemic to his hometown of Long Beach. It is an extraordinary record, among the best rap debuts in decades, both jeremiad and paean to lost innocence.

Staples's rise to fame has been slow: his early-2010s features with Odd Future brought him critical acclaim, as Vince is one of the few whose verbal and poetic talents matched (and sometimes exceeded) OF's lyrical-genius-in-residence Earl Sweatshirt. It took some