JSConf.eu opening song - JavaScript Will Listen - Bella Morningstar
- Plask - Dean McNamee
- Plask
| ;; See http://okmij.org/ftp/continuations/implementations.html#dynamic-wind | |
| ;; and http://axisofeval.blogspot.com/2012/08/delimited-continuations-do-dynamic-wind.html | |
| ;; Slight trick here: use identity of yield-record-tag function as the actual tag | |
| (define (yield-record-tag) yield-record-tag) | |
| (define (make-yield-record v k) | |
| (list yield-record-tag v k)) | |
| ;; Yield simply aborts up to the generator's caller, delivering to it | |
| ;; the yielded value and the continuation for resuming after the call |
| #!/bin/bash | |
| # License: Public Domain. | |
| # Author: Joseph Wecker, 2012 | |
| # | |
| # -- DEPRICATED -- | |
| # This gist is slow and is missing .bashrc_once | |
| # Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch | |
| # (Thanks gioele) | |
| # | |
| # Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile? |
| package core | |
| import ( | |
| "net/http" | |
| ) | |
| // the Request struct wraps the http.Request struct, providing a slice of | |
| // strings representing the positional arguments found in a url pattern, and a | |
| // map[string]string called kwargs representing the named parameters captured | |
| // in url parsing. |
| /* See: http://0x10c.com/doc/dcpu-16.txt */ | |
| function hex(n) { | |
| return '0x' + n.toString(16); | |
| } | |
| function disassemble (code) { | |
| var PC = 0; | |
| var operand = function (bits) { |
| (ns pallet.cache.impl | |
| "An implementation namespace for pallet.cache") | |
| (defprotocol CacheProtocolImpl | |
| "Cache implementation interface." | |
| (lookup [cache e] [cache e default] | |
| "Retrieve the value associated with `e` if it exists") | |
| (has? [cache e] | |
| "Checks if the cache contains a value associtaed with `e`")) |
| (ns ded | |
| "Structural Data EDitor for Clojure with zippers. Inspired by Interlisp: http://larry.masinter.net/interlisp-ieee.pdf" | |
| (:require [clojure.zip :as z]) | |
| (:use [clojure.pprint :only (with-pprint-dispatch code-dispatch pprint)] | |
| [clojure.repl :only (source-fn)])) | |
| (defn print-hr | |
| "Prints 30 dashes and a newline." | |
| [c] | |
| (println (apply str (repeat 30 c)))) |
| #!/usr/bin/env ruby | |
| class MRISC | |
| def run(code) | |
| tokens = code.gsub(/(\*.*?\*)|[^a-z0-9,-;@\._]/,'').split(';') | |
| @vars,stack,i = {:_pc=>-1,:_oc=>0},[],0 | |
| tokens.map!{|t| t.chars.first=='@' ? (@vars[t.to_sym]=i-1;nil) : (i+=1;t.split(',').map{|e|numeric?(e) ? e.to_i : e.to_sym})}.compact! | |
| while @vars[:_pc] < tokens.size-1 | |
| @vars[:_pc] += 1 | |
| @vars[:_oc] += 1 |
| (require 'cl) | |
| (defconst count-syllables-negative | |
| '("cial" "tia" "cius" "cious" "giu" "ion" "iou" "sia$" ".ely$")) | |
| (defconst count-syllables-positive | |
| '("ia" "riet" "dien" "iu" "io" "li" | |
| "[aeiouym]bl$" | |
| "[aeiou]\\{3\\}" | |
| "^mc" |
| ;; Let's you do this: | |
| ;; | |
| ;; (make-css | |
| ;; '(("body.loading" | |
| ;; (font-size "12px") | |
| ;; (color "#fff") | |
| ;; (" ul#sidenav" | |
| ;; (" li" | |
| ;; (blah "blah")))))) | |
| ;; |