Skip to content

Instantly share code, notes, and snippets.

View philandstuff's full-sized avatar

Philip Potter philandstuff

View GitHub Profile
@philandstuff
philandstuff / euroclojure2014.org
Last active February 19, 2024 05:12
Euroclojure 2014

EuroClojure 2014, Krakow

Fergal Byrne, Clortex: Machine Intelligence based on Jeff Hawkins’ HTM Theory

  • @fergbyrne
  • HTM = Hierarchical Temporal Memory
  • Slides

big data

  • big data is like teenage sex
    • noone knows how to do it
    • everyone thinks everyone else is doing it
public class User {
public enum Gender { MALE, FEMALE };
public static class Name {
private String _first, _last;
public String getFirst() { return _first; }
public String getLast() { return _last; }
public void setFirst(String s) { _first = s; }
class Need
extend ActiveModel::Naming
attr_reader :id
attr_accessor :role, :goal, :benefit
def initialize(id, exists=false)
need = need_api_client.need(id)
if exists
assign_protected_attributes(need)
@philandstuff
philandstuff / keybase.md
Last active November 2, 2015 11:22
keybase.md

Keybase proof

I hereby claim:

  • I am philandstuff on github.
  • I am philandstuff (https://keybase.io/philandstuff) on keybase.
  • I have a public key whose fingerprint is B689 7602 30A4 7BBE 99B1 CC85 95CD AC56 5314 2611

To claim this, I am signing this object:

{-# LANGUAGE ExistentialQuantification #-}
import Data.Foldable
import Data.Set (Set)
import qualified Data.Set as Set
import Prelude hiding (mapM_)
data FizzBuzzTag = Fizz | Buzz deriving (Eq, Ord, Show)
type FizzBuzz = Set FizzBuzzTag
module FizzBuzz where
import Data.Maybe
data FizzBuzz = Fizz | Buzz deriving Show
whenDivisible :: Integral a => a -> b -> a -> Maybe b
whenDivisible d x n = if n `rem` d == 0 then Just x else Nothing
fizzbuzz :: (Show a, Integral a) => a -> String
fizzbuzz n = if null tags then show n else concatMap show tags
module FizzBuzz where
import Data.Foldable (fold)
whenDivisible :: Integral a => a -> b -> a -> Maybe b
whenDivisible d x n = if n `rem` d == 0 then Just x else Nothing
fizzbuzz :: (Show a, Integral a) => a -> String
fizzbuzz n = maybe (show n) id tagStr
where tagStr = fold [fizz n, buzz n]
fizz = whenDivisible 3 "Fizz"
@philandstuff
philandstuff / codemesh2014.org
Last active July 5, 2022 13:29
Code Mesh 2014

Codemesh 2014, London

keynote: complexity is outside the code

when I started programming:

  • architecture was always:
    • box - box - cylinder
  • then layers:
    • ideally:
@philandstuff
philandstuff / clojurex-2014.org
Last active June 30, 2017 21:39
Clojure eXchange 2014

Korny Sietsma, Pragmatic Performance Testing

quotes

  • “we don’t care about perf”
  • “clojure should be fast”
  • “we’re using mongo!”
  • “clojure might not be fast enough, we should use type hints”

JMeter