View adler.hs
adler32 :: String -> Int
adler32 = helper 1 0
where
helper a b (x:xs) = helper a' b' xs
where a' = (a + (ord x .&. 0xff)) `mod` base
b' = (a' + b) `mod` base
base = 65521
helper a b _ = (b `shiftL` 16) .|. a
View what-i-wish-id-known-about-equity-before-joining-a-unicorn.md

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

View .gitignore
.stack-work
View sync.py
#!/usr/bin/python
'''
A simple script to get the top 100 songs from Clementine DB and copy it to
my phone.
TODO:
1. Handle phone unmount properly. MTPFS suck!
2. Dont copy files already there
3. Delete old files?
View keybase.md

Keybase proof

I hereby claim:

  • I am jaseemabid on github.
  • I am jaseemabid (https://keybase.io/jaseemabid) on keybase.
  • I have a public key whose fingerprint is 0D01 F83F 9C88 2B6F 42B0 B93B FE8B A47C AF68 AB61

To claim this, I am signing this object:

View emacs.org

Setup with Emacs Development environment with EDTS, Flycheck and use-package

This tutorial assumes a reasonably new version of Emacs (24.4+)

EDTS

Erlang Development Tool Suite aims to provide common IDE like functionality.

Use-package

View ttlist.erl
%% Simple tail truncated list
-module(ttlist).
-export([new/0, new/1, insert/2, lci/1]).
-export([test/0]).
new() -> [].
new(L)
when is_list(L) ->
View lisp.org

Hello!

I’m Jaseem Abid

2009 - ‘13 Batch @jaseemabid gh/jaseemabid

A micro manual for LISP - Not the whole truth

View prof.erl
%% @doc Run the MFA, but log the time taken for it as well.
prof(M, F, A) ->
Note = atom_to_list(M) ++ ":" ++ atom_to_list(F),
prof(Note, M, F, A).
prof(Note, M, F, A) ->
S = os:timestamp(),
Result = apply(M, F, A),
E = os:timestamp(),
Diff = timer:now_diff(E, S)/1.0e6,