Skip to content

Instantly share code, notes, and snippets.

@macintux
macintux / seeding-cloud.md
Created August 30, 2017 13:49
Talk proposal for CodeMash 2018: Seeding the Cloud

Cloud, IaaS, PaaS, SaaS, containers... it's a very different kind of virtual reality we're in, and ready or not you're likely to find yourself interacting with virtual infrastructure sooner rather than later.

We'll talk about programmable, immutable infrastructure. We'll talk about declarative programming. Whether you think of yourself as a software developer or as a systems administrator, the lines are increasingly cloudy.

This talk will be a survey of the high-level concepts and the available tools to make this easier. When concrete examples are provided, AWS, Terraform, and Salt will be the likely culprits.

@macintux
macintux / abstraction.md
Created August 30, 2017 13:49
Talk proposal for CodeMash 2018: Of Abstraction and Precision

The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise. – Edsger W. Dijkstra

The entire history of software engineering is that of the rise in levels of abstraction. – Grady Booch

We live in a world dominated by a virtual machine (the JVM) and a virtual platform (AWS). These are concrete abstractions, despite the apparent contradiction in terms.

Virtualization, however, is just one form of abstraction. We'll talk about the evolution of programming languages, networking, hardware, systems orchestration... and while abstraction will undoubtedly be extolled as a good thing™ we'll discuss the sea monsters that dwell hidden behind the curtain, to mix some abstract metaphors. What is a leaky abstraction and what can you do about it?

@macintux
macintux / Fall-2017-jeep.md
Last active March 28, 2018 13:51
Fall 2017 Jeep maintenance & repairs

Much of this is related to stalling problems I've had and tried to diagnose for years. That finally seems to be licked after replacing the fuel injectors and adding heat shielding to the coil and injectors (turns out the inline 6 has heat problems that can cause fuel leaving injector number 3 in particular to prematurely ignite).

Front axle replacement was due to a comedy of errors, which I'd rather not elaborate on because stupid.

I've only recently started tracking these expenses via software, so I'd have to go digging up paperwork to go back further than August.

Early August: replace front axle, roughly $1800.

  • 8/17 - Oil, rotation, balance, alignment, spark plugs, sway bar links, tie rod and ends. $875
  • 8/18 - Investigate severe stalling following tuneup. Replace ignition coil. $277
  • 8/31 - Replace OPDA (preventative + possibly address stalling). $209
@macintux
macintux / cmon-python.txt
Created November 28, 2017 02:51
THIS IS WHY I HATE MUTABILITY
>>> head = 9
>>> ranks = [9, 8, 7, 6, 5]
>>> range(head, head-5, -1)
[9, 8, 7, 6, 5]
>>> range(head, head-5, -1) == ranks
True
>>> ranks.pop(0)
9
>>> ranks.pop(0) == 9
False
@macintux
macintux / patching-erlang-talk.md
Created August 31, 2017 16:46
Walking the High Wire: Patching Erlang Live (CodeMash 2018 talk proposal)

Two years ago at CodeMash we discussed how Erlang was a paradigm shift masquerading as a programming language. Last year we illustrated how fun it is to write. This year we show off one of its most powerful aspects: maintaining a production system.

Erlang (and Elixir, its younger sibling) allow you to not only trace the behavior of a production system, but also to query the data in memory, replace your code on the fly once you've found the problem, and fix the data that the old code mishandled, so the system keeps plugging away. Look, ma, no reboots.

Also discussed will be other criminally under-appreciated languages with similar features, because really, can you ever have enough magic tricks in your repertoire?

@macintux
macintux / bio.txt
Created August 30, 2017 13:50
Bio for talk proposals
John Daily has wandered a meandering path through systems and network administration, cyber security, global iOS mobile device management, technical evangelism, and software development. He has a passion for pragmatic programming languages such as C, Perl, and Erlang. Beauty is definitely in the eye of the beholder.
@macintux
macintux / thunk.erl
Created January 11, 2017 22:00
Implement in Erlang the lazy evaluation/streaming approach taught by Nathan Dotz at CodeMash 2017.
-module(thunk).
-compile(export_all).
%% > thunk:take(3, thunk:forever_zero()).
%% [0,0,0]
%% > thunk:take(3, thunk:fib()).
%% [1,1,2]
%% > thunk:take(18, thunk:fib()).
%% [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584]
@macintux
macintux / gist:2e17371bd581a2fd629237931f552e50
Created August 31, 2016 20:06
Pragmatic Functional Programming With Erlang
For many developers, the thought of learning functional programming is intimidating. Parentheses, lambda calculus, type theory, and you can't even modify a variable!
In this talk we'll look at code that does useful work without requiring a Ph.D. in greybeard. Talk to software on another computer without opening a socket. Iterate over your data without setting up an iterator class hierarchy. Disassemble a network protocol header with this one cool line of code!
We'll talk about ideas that are being adopted by languages you probably already use. No functional programming experience required, just a willingness to see what can happen when you think outside the OO box.
@macintux
macintux / erlang_dates.erl
Created June 22, 2016 20:06
Illustrate key Erlang date/time structures and conversions.
%% Date formats in Erlang are a bit tricky to keep straight,
%% especially since the `calendar' library leverages Gregorian seconds
%% (seconds since year 0) rather than the more traditional UNIX epoch
%% seconds.
%%
%% This module illustrates the structures and conversions.
-module(erlang_dates).
-compile(export_all).
@macintux
macintux / helperfuns.erl
Created January 13, 2014 03:37
Utility functions for Erlang-based Riak demos. These ignore error handling and use strings instead of binaries for readability. Using the anonymous functions makes for a cleaner read.
%% Useful in Erlang shell. These assume an already-defined handle named "Riak"
Get = fun(X, Y) -> helpers:get(Riak, X, Y) end.
RawGet = fun(X, Y) -> helpers:raw_get(Riak, X, Y) end.
Put = fun(X) -> helpers:put(Riak, X) end.
Update = fun(X, Y, Z) -> helpers:update(Riak, X, Y, Z) end.
Resolve = fun(X, Y) -> helpers:update(Riak, X, Y) end.
New = fun(X, Y, Z) -> helpers:new(X, Y, Z) end.
%% Add an object to Riak and retrieve it: