Skip to content

Instantly share code, notes, and snippets.

View paulkoegel's full-sized avatar

Paul Kögel paulkoegel

View GitHub Profile
(deftest test-two
(is (= 2 2 ads)))
@paulkoegel
paulkoegel / closures_illustrated.html
Last active August 29, 2015 13:56
JavaScript closures illustrated
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src='javascript.js'></script>
<link href="style.css" media="all" rel="stylesheet" type="text/css">
</head>
<body>
<h1>
JavaScript Closures Illustrated
</h1>
@paulkoegel
paulkoegel / ClojureScript - Lisp's Revenge (David Nolen.Goto conference).markdown
Last active August 29, 2015 13:57
ClojureScript - Lisp's Revenge (David Nolen.Goto conference)

LISP's Revenge - David Nolen (Goto Conference)

LISP

  • invented by John McCarthy in 1957 to solve the problem of artificial intelligence - simply because no existing programming language could meet his needs.
  • along the way, McCarthy invented interpreters, high-level meta programming, garbage collection, dynamic programming languages, functional programming, programming with recursive functions.
  • simplicity-to-expressive-power-ratio is VERY nice. Not the only language that has this, though.a

The languages we have today are not good tools for the task. We mainly build distributed systems on the web and nearly everything interesting we do is asynchronous - and with that also very likely concurrent.

#wrapper {
position: relative;
margin: 0 auto;
width: 800px;
text-align: center;
}
#doge {
width: 500px;
height: 576px;
}
@paulkoegel
paulkoegel / The Functional Final Frontier - (David Nolen.ClojureWest.2014-03).markdown
Last active July 6, 2017 06:11
The Functional Final Frontier - David Nolen at Clojure/West 2014

The Functional Final Frontier - David Nolen at Clojure/West 2014

(still incomplete, covers only the first 16 minutes)

Video

  • Functional programming and programming with values have proven their usefulness when building all kinds of systems, but they've been hard to apply when building user interfaces.

  • Object-oriented programming and user interfaces came up at around the same time and went hand in hand ever since. First user interfaces were, e.g., written in Smalltalk (created in 1972 by Alan Kay). This led to the development of the Model-View-Controller paradigm.

a {
color: #005A70;
}
.logo {
width: 200px;
height: 200px;
position: absolute;
top: 20px;
right: 50%;
margin-right: -100px;
@paulkoegel
paulkoegel / i hate almost all software.markdown
Created September 30, 2014 12:38
Ryan Dahl - "I hate almost all software" (archived from https://plus.google.com/116904230181415286707/posts/DnAMAN5sUR8 - which is not the original post)

I hate almost all software. It's unnecessary and complicated at almost every layer. At best I can congratulate someone for quickly and simply solving a problem on top of the shit that they are given. The only software that I like is one that I can easily understand and solves my problems. The amount of complexity I'm willing to tolerate is proportional to the size of the problem being solved.

In the past year I think I have finally come to understand the ideals of Unix: file descriptors and processes orchestrated with C. It's a beautiful idea. This is not however what we interact with. The complexity was not contained. Instead I deal with DBus and /usr/lib and Boost and ioctls and SMF and signals and volatile variables and prototypal inheritance and C99_FEATURES and dpkg and autoconf.

Those of us who build on top of these systems are adding to the complexity. Not only do you have to understand $LD_LIBRARY_PATH to make your system work but now you have to understand $NODE_PATH too - there's my little addit

<!DOCTYPE html>
<html>
<head>
<script src="http://jashkenas.github.io/underscore/underscore-min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.frame-container {
background: black;
@paulkoegel
paulkoegel / instructions.markdown
Last active August 29, 2015 14:07
Print youtube videos as a flip book

Print Youtube Videos as a Flip Book

  1. open Firefox (sadly doesn't work in Chrome yet).
  2. opt in for Youtube's HTML5 video player here: https://www.youtube.com/html5
  3. open a Youtube video with thumbnail previews (e.g. https://www.youtube.com/watch?v=sd4bqmP_460)
  4. hover over the videos progress bar so that a thumbnail appears
  5. run the script below in your JavaScript console
  6. wait a second for it to finish - it first shows you all thumbnails in an unsliced grid, 1 second later you should see it sliced and with black borders
  7. cross your fingers it's in a 5x5 grid - that's what the code expects, otherwise tight click on a thumbnail, "view background image", count rows and columns and modify the script's framesPerRow and framesPerColumn (lines 10 and 11) settings manually - I had varying grid sizes for the same video, not sure what influences this :(
  8. print with "print background images" ticked
@paulkoegel
paulkoegel / 2012-03-28-smacss-and-sass-the-future-of-stylesheets.markdown
Last active August 29, 2015 14:10
SMACSS and SASS - The future of stylesheets (by @jhilden)