Skip to content

Instantly share code, notes, and snippets.

@krisajenkins
Created November 7, 2016 18:05
Show Gist options
  • Save krisajenkins/439209ad6773b40b82b95b0048737333 to your computer and use it in GitHub Desktop.
Save krisajenkins/439209ad6773b40b82b95b0048737333 to your computer and use it in GitHub Desktop.
My notes from CodeMesh 2016

CodeMesh 2016 <2016-11-03 Thu>

Space Monads

We move the effort into designing the type, so that writing the algorithm is simpler.

[#B] Look at Hoare Logic

There is a relationship between monads and Hoare Logic. Can I solve the 9-jigsaw puzzle with Monads? https://en.wikipedia.org/wiki/Hoare_logic

Look at applications of Kleisli monads.

Types capture our requirements.

His coding demos were totally type-hole driven.

Living With Errors

[#C] Adam Chlipala - Certified Programming with Dependent Types

[#C] C Hoare - How Did Software Get So Reliable Without Proof?

Exception occur when the run-time does not know what to do. Errors occur when the programmer doesn’t know what to do..

  • Joe Armstrong

[In the Erlang way of thinking] errors are the lack of specification.

Conflict Resolution for Eventual Consistency

http://trvedata.org

“Eventual consistency” is a vague term. Instead:

  • Eventual Delivery: Eventually, every operation seen by every node. (Asynchronous - may be received in any order.)
  • Convergence: Seen same operations == Has same state. (Again, regardless of order.)
  • Don’t lose data: otherwise it’s easy! ;-)

Algorithm

Each node has an ID. Each term has an ID. When adding a new term, give it the ID (largest ID seen so far + 1 :: Node_Name).

h1a
e2a
l3a
o4a

Send a message like, “Insert ‘l’ with ID 4b after item 2a.”

When you delete, you don’t delete data - you might get an operation that saying “insert after 2a”, but 2a has gone. Instead, you “tombstone” 2a and if such a message comes along, you just step forward to the first living item, and insert after that.

When you get conflicting edits, create the set of all possible changes, and decide each one logically…

“Causal context” - what did this node see at the time this operation happened?

[#B] Implement

It seems like implementing this just for strings wouldn’t be too hard. And would be super cool. And then we could look again at the paper.

It’d be fun to do it in Haskell. I wonder could we use:

  • Indexed monads to track states.
  • Arrows to make using indexed monads more pleasant.
  • Property-based tests to check the algorithm.
  • A free monad for the computation that could eventually write out versions of the algorithm in different languages(?)

Type Driven Development of Communicating Systems in Idris

I want it to be so cheap to write correct software that we do more of it.

The goal of Idris is to reduce the cost of writing correct software.

Type, Define, Refine

[#A] MEAP Book

Url: http://www.tinyurl.com/typedd Discount code: ctwcmesh

[#B] Read Type Driven Development With Idris

[#B] Make a state machine at the type level

Patterns of Parallelism

Energy usage scales linearly with the number of cores, but cubicly with the clock speed!

Sonic Pi & Erlang

The Dark Midis

CodeMesh 2016 <2016-11-04 Fri>

Streaming, Database & Distributed Systems - Ben Stopford

SSP - Stateful Stream Processing

  1. SSP is all about creating materialised views.
  2. From an infinite input.
  3. Either as a table, or as a stream.

https://kafka.apache.org https://hackage.haskell.org/package/haskakafka https://hackage.haskell.org/package/milena https://www.confluent.io/blog/bottled-water-real-time-integration-of-postgresql-and-kafka/ https://www.pipelinedb.com

Chandry-Lamport - https://en.wikipedia.org/wiki/Snapshot_algorithm CQRS - http://martinfowler.com/bliki/CQRS.html

Why bother?

  1. Streaming is a superset of ‘batch’.
  2. Separate the store and the view.
  3. Decentralized approaches are more general.

Martin Klepman - Turning the Database Inside Out

Web Programming without Errors, and Coding without Typing - Jessitron (Jessica Kerr)

rug the code editor assistant

Part of atomist?

Building a Graphical IDE in Elm/Purescript

Compiles to JS

  • [ ] Reason
  • [ ] Fable :research:
  • [ ] Bucklescript :research:

PureScript UI Libs

  • [ ] Flare (Limited to certain use cases).
  • [ ] Pux
  • [ ] Thermite
  • [ ] Halogen (It’s well supported and production-used, but haaard!)
  • [ ] Optic UI

Why The Free Monad Isn’t Free - Kelley Robinson

Distributed Consensus - Flexible Paxos

Part Time Parliament - Leslie Lamport

[#B] Log Cabin - Raft implementation

etcd

Stack Safety For Free - Phil Freeman

http://functorial.com/stack-safety-for-free/index.pdf

Alan Kay

[#C] Relational Constraint Programming for Dynamic Meanings

[#B] Computation: Finite and Infinite Machines - Minsky

[#C] Programs With Common Sense - McCarthy

[#B] Look at the Languages

  • [ ] Meta II
  • [ ] Linda

[#A] How To Tell Lies For Fun & Profit

Random

[#A] Can I use Formatting to create Type-safe Svg attributes?

Fun With Functional Dependencies

http://www.cse.chalmers.se/~hallgren/Papers/hallgren.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment