Category: EuroClojure

EuroClojre – Day 2

Wow! I thought Day 1 was Great – Day 2 just as good, including some great but “enterprise geeky” topics like Enterprise Integration in Clojure and A Perfect Storm for Legacy Migration ;-) Plus, we had Stuart Halloway’s…

Keynote – Narcissistic Design

20131015-104648.jpg

  • Stuart Halloway
  • Examples
    • Build Tools
    • ORM
  • Advanced
    • Integrating narcissism and agile practice
    • Technologies to avoid
      • Functional languages & databases
    • Never eliminate complexity, automate around it
    • Manage by pull request, because code is the first and best unit of discussion
  • Top 10
    1. Use OO, and don’t forget those setter methods!
    2. Prefer APIs over data
    3. Start with DSLs
      – Nothing says “screw you” like a DSL
      – JVM
    4. Always connect (and never enqueue)
    5. Create abstractions for information
      – Encapsulate!
    6. Use static typing across subsystem boundaries
      – Exceptions
    7. Put language semantics on the wire
      – Focus on programming rather than data languages
    8. Write lots of unit tests
      – Example Based Testing
      – TDD
      – Always be coding
      – Never get on the hammock
    9. Update information in place
      – The one thing about OO: gives you all the complexity but no history
    10. Leverage context

Using Clojure to Serve The Internet of Things

20131015-110116.jpg

  • Kontiki
    • Lightweight OS
  • Nest
  • How do I get iot on my CV?
    • Dev kits
      • mBed
      • Electric imp
      • RasberryPi
      • Arduino
    • Beagle bone
    • Open data sets
    • Web / Mob apps
  • Xively
    • LogMeIn
    • Went from Ruby
      • To Clojure
        • Order of magnitude improvement!
  • Architecture of “thermometer”
    • Twitter
      • Clojure hero ku
        • Clojure Xivi
          • ?
  • IoT
    • 1.1b PCs
    • 2mm2 32-bit computer with wiFi for $1
      • 32kB RAM
      • 128kB Flash
      • Radio
      • Weightless – OS?
        • Batt
          • 50 bytes/h for 10y on 2 AA Batt!
    • 5.8b mob
    • 1T Things
    • Main challenges
      • Discovery
      • Directories
      • Provisioning
      • Security
    • Should take off due to economies of scale
    • Massive Data Volumes
      • Motor
        • 1Gb data / h

Newspaper Massacre!

20131015-123343.jpg

  • Conways Law
  • Daily Mail
    • Mail Online
      • Largest online newspaper
        • Serve 154Bn images!
        • Cached by Akamai
        • Serve 1000 articles/s
      • Very long home page
  • Mobile
    • Gamechanger
      • Personalisation
        • Trying to scale
  • Published messages from Legacy to Topic
  • Challenge
    • Render the homepage
      • No caching
      • Response <300ms
  • Mustache
    • Templates Library
    • Themes
      • e.g. Mobile
  • Libs / Projects
    • Memcached
    • Mule
    • Reddis
    • Riemann
      • Graphite
      • Logstash
    • GitHub.com/mailonline
  • Ppl
    • @clifcunn
    • @jonpither
      • Pitheringabout
  • Config
    • Avout
      • Wrapper around Zookeeper
  • Services
  • Built a library around software infrastructure
  • Future
    • Rewrite everything
      • ~13kLOC
  • Devs sit next to newsroom
    • E2E Ownership
    • Responsibility
  • Terrible Legacy
    • Using Spring

(into reduce transient)

20131015-125828.jpg

  • Clojure.core/ancestors
    • (Ancestors (class []))
  • Libraries
    • avl.clj
    • core.rrb-vector
  • Guy Steel Talk
    • About sequential reduction

Lightning talks: Literate Programming, Bare Metal Lisp & Templating

20131015-153632.jpg

In search of workflow nirvana: Clojure, Emacs, Org

    • Rich Hickey
      • Ant Simulation
    • Org – mode in EMACS
    • Literate Programming
      • “is what you need to rise above the ordinary level of achievement”
    • Pedestal
    • Working on functional CMS system
    • hackerretreat.com

Lithium: a small Clojure-inspired Lisp on the bare metal

      • Compiles to x86
        • No runtime dependencies
      • Fluchtpunkt Lisp
      • Paper: An incremental approach to compiler construction
      • Movitz
        • Similar for Common Lisp
      • Synthesis: an efficient implementation of fundamental operating system services

Templating In Clojure

    • Hiccup
      • HTML as a data structure
      • No real separation
      • Good if full stack devs
    • clj-jade
      • Successor to HAML
      • Use Jade for J
      • Or moustache
    • Enlive
      • Transformations of HTML
      • Good for front-end
      • CSS Selector based
        • Can break transformations
      • Lacks HTML abstraction
        • + Hamilito

Enterprise Integration in Clojure

20131015-173247.jpg

  • clumsyjedi @ GitHub
  • Enterprise Integration Patterns
  • Looked At
    • Mule
      • Not used – too many problems
    • Camel
      • HolyGrail
    • Use
      • core.async
      • + Threaded Macros
    • Lamina
      • Event Stream Processing Library
        • Superset of EIP
      • Rysome
    • Storm
      • Java / Clojure Hybrid
        • Chosen
    • ClamQ
      • Clojure i/f for ActiveMQ
    • EEP
      • Good visualisation
  • Areas of Interest
    • Systems Integration
    • Business Rules Capture
    • Distributed Systems Orchestration
  • Using Vim
  • Beyond Patterns

A Perfect Storm for Legacy Migration

20131015-181427.jpg

  • Twitter Storm
  • Clojure
  • Distributed runtime
    • For “eXtreme Processing”
  • Apache Thrift
  • Nimbus
  • ?
  • Gives
    • Stream Processing
    • Realtime Analytics
    • Continuous Computation
    • Distributed RPC
  • Concepts
    • Bolt
    • Spout
    • Topology
    • Grouping “field”

EuroClojure – Day 1

I’ll be putting some notes / mind maps up here from EuroClojure over the next two days. In the “agile spirit” I’m including my notes fairly raw below and may refine them later… For the meantime, in case you weren’t able to attend EuroClojure, here is a summary of some of the fun you’ve missed ;-)

Keynote

EuroClojure Keynote MindMap

Critical Theory

  • Nomad
  • Rhizome
    • “Interconnectedness of Things”
  • State
  • Information
    • Collapse of Abstracton to Reality
      • Brazilia

Software

  • Production methods
    • Prussian “Scientific Forestry”
      • Create Flawless Abstractions
    • vs Organic Forests
  • ~ Forest

Greeks

  • Techne
    • Timeless
  • Metis
    • Cunning
      • Local
      • Contextual
      • Nomadic

Refs

  • Patterns of Software
  • Fictions and the aleph
  • Data and reality
  • Seeing like a state
  • Simila and simulation
  • Invisible cities

Alexander

  • The Quality without a name
    • Contextual
  • Richard Gabriel
  • Pattern Language
    • To express patterns that were observed (locally)

Gerald Weinberg

  • An Introduction to Systems Thinking
  • Heuristic Devices don’t tell you when to stop

Make your own Lisp

Make your own LispBODOL

  • Homoiconic
  • Immutable
  • Typed
    • Robin Milner
    • Example
  • Pure
  • Makes HN Caremad
  • Pattern Matchinng
    • Used core.logic

Instaparse

  • Mark Engelberg
  • EBNF
    • Or Parse Combinators

Refs

  • GitHub.com/bodil/BODOL
  • GitHub.com/bodil/building-lisp

Misc

  • Core Match
    • Not used as specific to Clojure…?
  • Lispkell
    • Also Lisp + Haskell

Life in a Browser

Life in a Browser

Genetic Algorithms

  • Breed s-expressions

Zipper

  • Tree handling Library

Resources

  • Complexity – a guided tour
  • Complexity explorer
  • Stephen wolfram
    • A new kind of science

Biologically inspired computing – Artificial Life Project

  • In browser with core.async
  • Enlil
    • Head Mesopotamian god

20131014-154848.jpg

Liberator

Liberator

Free your data with RFC2616

  • Http 1.0
    • + Patch
      • Liberator doesn’t handle
    • + WebDav
    • Almost 40 decision points for all status codes

Only 1 use in prod – Clojure library

  • Implement REST Resources
    • On the server side

~ 1/3 LOC Takes care of most of the status code processing

  • Uses “standard” from http flow diagram
    • See web site

Automatically converts your data to JSON or EDN

Creative Machines

  • Creative Machines

    Book: Creative Music

    • Death = Entropy Chaos*
  • Recombinance
    • Creativity does not occur in a vacuum

    Influence

    • Serendipity

    Learning + Inference + Knowledge

    • Canon Builder
    • Association Network
      • Like Neural

    New neural networks

    Cognitive Bias

    Examples

    • Death Dance
    • Aaron
      • Painter
      • Howard Kern / Cohen
    • Music (overtone)
      • Markov Chains
      • Neural Nets

    David Cope

    • Emily Howell
      • Music

    Creativity

    • Can happen by
      • Combination
      • Exploration
      • Transformation
        • Reflect on System Rules
        • And Change those Rules
    • Psychological
    • Historical

    Functional

  • Functional 3D Game DesignNeed to get everything done in 16ms
    Channels

    • Side effectual
      • => !used

    Events
    Callbacks
    World
    Based on JMonkeyEngine
    Probably go to LWJGL
    Use Quarternions
    Vector

    • 3 imaginary numbers
    • 1 real number

    Functional Reactive Programming
    Modelling both Continuous and Discrete Data changes

Common Clojure Smells

Common Clojure Smells

Martin Fowler & Kent Beck

  • Refactoring

Long parameter lists

  • Underlying issues

Clojure specific smells

  • Locally scoped atoms
  • Magic Keys
    • aka Data structure coupling
    • Hard to figure out the cost of change of key names, data types etc…
    • Keep data aware fns together (defrecord?)
  • Indirection by partiality
  • Macromania
  • Parents Proliferation
    • aka Over-nesting
    • Trying to do everything in one expression
    • Balance between tenseness & readability
  • Lazi-itis
    • Excessive use of lazy evaluation
    • Many discrete steps with a final one that executes the seq
    • Consider pulling things in to coarser-grained steps to avoid long pipelines

Kent Beck

  • Smalltalk practice

Jennifer Smith

Do OO Heuristics apply to Functional code?