This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Flow exposing (Flow(..), map, withDefault, mapDefault, view, update) | |
import Html | |
type Flow state | |
= NotRunning | |
| Running state | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Animation exposing (..) | |
import Task | |
import Process | |
import Time exposing (Time, millisecond) | |
type Animation state | |
= Setup state | |
| Animate state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function directory_to_titlebar { | |
local pwd_length=42 # The maximum length we want (seems to fit nicely | |
# in a default length Terminal title bar). | |
# Get the current working directory. We'll format it in $dir. | |
local dir="$PWD" | |
# Substitute a leading path that's in $HOME for "~" | |
if [[ "$HOME" == ${dir:0:${#HOME}} ]] ; then | |
dir="~${dir:${#HOME}}" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'json' | |
require 'uri' | |
@token = '' | |
def list_files | |
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago | |
params = { | |
token: @token, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updateItemBasedOnEditItemState : EditItemType -> Item -> Item | |
updateItemBasedOnEditItemState editItemType item = | |
let | |
stopEditing : { item | typeData : ItemTypeData } -> (Maybe.Maybe newEditState -> ItemTypeData) -> { item | typeData : ItemTypeData } | |
stopEditing item itemTypeDataWithoutEditState = | |
{ item | typeData = itemTypeDataWithoutEditState Nothing } | |
updateEditingState : { item | typeData : ItemTypeData } -> (Maybe.Maybe newEditState -> ItemTypeData) -> newEditState -> { item | typeData : ItemTypeData } | |
updateEditingState item itemTypeDataWithoutEditState editItem = | |
{ item | typeData = itemTypeDataWithoutEditState (Just editItem) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Welcome | |
## Start with a Lambda | |
## Get to Hello, world | |
# What is a lambda | |
## Ruby Syntax | |
## Identity | |
## K | |
## GetFirst | |
## GetSecond |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Title: I don't know Prolog, and so can you | |
Abstract: Prolog is a wildly popular declarative logic programming language that all the hot startups and whiz kids are using these days. So, being neither a hot startup nor a whiz kid, I figured I'd learn it. In this talk, I'll share some of the early learnings I've had that can only be considered "mind-bending." | |
We'll look at a bit of the syntax, the solver model and then dive into some wild and crazy list operations. Finding all the combinatorial variations of a list using the function isMember? Yup! We'll do that. | |
If you are anything like me, and I know you are, you'll come away from this talk saying "I'm sold! PROLOG FOREVER!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def render_template template, question: | |
template % { | |
:"question.text" => CGI::escapeHTML(question.display_text.to_s), | |
:"question.name" => CGI::escapeHTML(question.name.to_s), | |
:"question.email" => CGI::escapeHTML(question.email.to_s) | |
} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TypeStack { | |
public void push(T obj); | |
public T pop<T>(); | |
public T peek<T>(); | |
} | |
var stack = new TypeStack(); | |
stack.push("hello"); | |
var o = new OtherType(); | |
stack.push(o); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Idea based on this tweet exchange: | |
coreyhaines: Architecture where ever class is its own gem, communicating via drb. #thoughtleadering #thoughtlendering | |
coreyhaines: better yet, every method is its won gem, classes are built up by requiring gems that monkey-patch. #truth | |
josh_cheek: @coreyhaines As each method is a gem, it needs its a namespace, so it's defined in a module… Compose classes by including method's modules. | |
coreyhaines: @josh_cheek I do like the idea of composing via module inclusions, as well. Interesting. | |
coreyhaines: Seriously, though, the idea of defining classes via including single-method modules appeals to me. | |
So, here's my thought for the workshop. It is based a bit on some of the value that I saw doing coderetreats. | |
title: Super Awesome Happy Fun Coding Workshop, Great Job |