- MacRuby was going to be Ruby for OS X
- JIT Compiler or AOT Compiler
- Experimental static compilation
- The Garbage Collector - libauto
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
(ns core.logic.util.flatteno | |
(:require [clojure.core.logic :as cl])) | |
(cl/defna unwrapo | |
"Unwrapps an arbitrarily deeply nested list" | |
[l o] | |
([[e] o] | |
(unwrapo e o)) | |
([[f . r] o] | |
(cl/conso f r 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
// So, ECMAScript 6 Harmony arrow_function_syntax says: | |
// ----8<----8<----8<---- | |
// ''=>'' has only lexical ''this'', no dynamic ''this'' | |
const obj = { | |
method: function () { | |
return () => this; | |
} | |
}; | |
assert(obj.method()() === obj); | |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <luajit-2.0/lua.h> | |
#include <luajit-2.0/lualib.h> | |
#include <luajit-2.0/lauxlib.h> | |
#include "main.h" | |
#define CHECK_LOADED(i) if(i) {\ | |
fprintf(stderr, "Problem loading: %s\n",\ | |
lua_tostring(L, -1));\ |
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 SampleController < UIViewController | |
def viewDidLoad | |
super | |
self.view.backgroundColor = UIColor.whiteColor | |
frame = UIScreen.mainScreen.applicationFrame | |
origin = frame.origin | |
size = frame.size | |
text_view = UITextView.alloc.initWithFrame([[origin.x, origin.y], |
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
(defn comp-map [ma mb] | |
(reduce (fn [a [k v]] | |
(and a | |
(if (and (map? v) (map? (mb k))) | |
(comp-map v (mb k)) | |
(= v (mb k))))) | |
true | |
ma)) | |
(comp-map {:a {:b 2 :c 3}} {:a {:b 2 :c 3}})) ;=> true |
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
(ns space-age) | |
(defn on-earth [seconds] | |
(/ seconds 31557600.0)) | |
(def orbital-periods | |
{:mercury 0.2408467 | |
:venus 0.61519726 | |
:mars 1.8808158 | |
:jupiter 11.862615 |
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
(let [dt (elapsed-time t) | |
balls (->> balls | |
(map #(move % dt)) | |
(map #(keep-in-bounds dt ctx %)))] | |
;; Do stuff with balls | |
) |
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
new-session | |
set -g default-command "reattach-to-user-namespace -l zsh" | |
set -g status-bg black | |
set -g status-fg green | |
setw -g window-status-current-bg yellow | |
setw -g window-status-current-fg black | |
set -g base-index 1 | |
set -g renumber-windows on |
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
set nocompatible " We're running Vim, not Vi! | |
syntax on " Enable syntax highlighting | |
filetype off " Disable filetype detection to keep Vundle happy | |
set shiftwidth=2 " That's a good tab width | |
set expandtab " ...and we don't like tab chars | |
set ts=8 " The only tabs we encounter should be in C code | |
set softtabstop=2 | |
set tw=132 " Wrapping to 132, vt100 default | |
set wrap | |
set grepprg=/usr/local/bin/ag " Ag is best |