Wadler: talking about currying. fn of arity one, return fn until there is no more arity left, and then the evaluation.
Haskell: Deep, simple principles. Purity, DSL, Types. SPJ:"laboratory for exploring crazy type systems"
Wadler: [On Type Classes in Haskell] Ad-hoc polymorphism: Type Classes allow you implement this on your own types (e.g + < > ...) -- "Binary method problem" -- assuming both parameters to a method have the same dictionary. Haskell requires this passed in.
Quickcheck reports minimal failing test. Q: How random is test generation?
SPJ: Software Transactional Memory. Atomically will be retried if fails
- so keep out IO / side effects or else they can run > once
Search: Joe Duffy - why MS dropped STM in .Net
feldspar: on github. Produces c with minimal intermediate values.
hackage.haskell.org - a bazillion packages
Logic
- Gentzen: Natural Deduction
- Alonzo Church: Lambda
Every good type system has a double barreled name. Logician & Computer Scientist
Featherweight Java - formal Blame Calculus : Wadler's calculus to take dynamic programs and verify at runtime that they satisfy type requirements.
! Epochal Time Model
Moseley & Marks: Out of the Tar Pit : paper on suffesting from complexity and the causes are state and control. FP and Declarative programming to remove control. Removing state and replacing with relational algebra
Database are inherently stateful. Update & place oriented.
Value of an identity at any point of time is its state
Comparison to growth of a tree, facts (inner rings) are immutable, growth is through attrition
-- Store changes in memory (appending to log) until there's a sizable amount and merging it in is efficient -- Log to storage -- Live index, then -- Merged index
Extra data written to disk and then GC'd
Can cache because data is immutable. "cache under"?
db.asOf, db.since db.with(tx) db.filter(pred) - O M G
My mind is blown.
Removing data is not available. May be required for government legislation.
Started with a quick run through Roy, CoffeeScript, Dart, TypeScript. And GWT
Web moving towards consolidation rather than fragmentation
Use Google Closure compiler to remove dead code.
- Useful as great amount of Clojure is compiled to JS.
- Lift out uneccessary closures
Boolean inference (to make JS truthiness go away and work as Clojure truthiness) is achieved by calling out to another function
- Book: Purely Functional Data Structures
V8 is fast and good enough for immutable data structures. Garbage collection of discarded values is
Imprisoned data:
Riak: Big Hashmap Column store: Nested hashmap of hashmaps
Euler: Seven Bridges of Konigsberg
Easley and Kleinberg: Graph theory on the relationships between alliances prior to WWI
Cypher: Neo4j graph query language Written in ascii art!
Jim Webber has Neo4j tutorial based on all Doctor Who data available on github
Can run F# on Monodroid on Android devices Future plans to transpile to Javascript
The World Bank has a lot of open data!
- REST API
Easy parallelize and then run synchronously. | with pipe character
Apiary.io REST API documentation. Doesn't look too horrible
Type Providers can be created automatically from services with documentation on Apiary
Internal DSL: When the DSL is part of the language External DSL: When you have your own lexer and parser and it's not part of the host language
Ruby: Lovechild of smalltalk and lisp but appealing to perl coders
Client side:
- Easy to hack on for contributors
- Easy to write scripts for ops guys
Server side:
- Needed to be highly scalable
- Doesn't need to be easily hackable for contributors
20 workers
- In Ruby / Unicorn 19.2GB RAM ** 40% of the CPU in garbage collection
- Erlang 600MB
Webmachine: Basho web state machine. Produces some awesome trace diagrams
CouchDB. Dropped
- Append only ** Lots of writes ** So big time compacting
- At the time, no concurrency ** So only one request at a tiem
- Leaking file handles so had to be frequencly restarted
Replacement DB: Decided to go back to SQL with MySQL
- Heavy write load
- Easy to sell customer hosted Chef with free SQL database
- And they know how to maintain it
- Live migrated to MySQL while the system was running
Live migration
- dark release ** Switch clients over one at a time to test
- gen-fsm - developed finite state machine in Erlang
Libs - > Services Runtime & Core libs -> ? * Language Primitives - > Protocols and message formats
*(RH says Simple Services)
Best message formats are:
- Self describing
- Extensible
Need to be able to name values
- Permalinks capture values, non-permalinks are references.
Think of communication between systems as movement of values.
- Avoid objects
- "flow vs places"
"Flow oriented programming" over "Place oriented programming"
"Queues rule"
- Decouplling producer and consumer
- The publisher does not need to know or care who picks up the values
Systems have to be designed to deal with failure
- 404, etc
Erlang is "the language of the systems"
- Provides a "holistic" approach ** But not as ideally placed for dealing with non-Erlang systems
- Services as fundamental units
- Designed for failure
We should move towards data driven interfaces
Summary
- System language is emergent
- Build simple services
- Consider abstraction of your services
- provide values
- desgien to be composed
- be data driven and programmable
Find more info re "place oriented" from Rich Hickey