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
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java | |
index e2146a6..2dfa208 100644 | |
--- a/src/jvm/clojure/lang/Compiler.java | |
+++ b/src/jvm/clojure/lang/Compiler.java | |
@@ -6728,6 +6728,16 @@ static Namespace namespaceFor(Namespace inns, Symbol sym){ | |
return ns; | |
} | |
+static public Var varMissing(Symbol sym) { | |
+ if (sym.ns != null) { |
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
var mousewheel_buffer = []; | |
var mousewheel_buffer_size = 5; | |
$(document).mousewheel(function(e, d){ | |
// not for landing page | |
if (!app.current_timeline) { | |
return true; | |
} | |
if (mousewheel_buffer.length === mousewheel_buffer_size) { | |
mousewheel_buffer.shift(); |
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
imakewebthings | Caleb Troughton | #{"JavaScript" "CoffeeScript" "Ruby" "Python"} | 6840.0 | |
flyerhzm | Richard Huang | #{"Java" "JavaScript" "Ruby"} | 3407.5 | |
fredwu | Fred Wu | #{"JavaScript" "CoffeeScript" "PHP" "Ruby" "Python"} | 3226.0 | |
kissyteam | kissyteam | #{"Java" "JavaScript" "PHP"} | 2138.0 | |
JeffreyZhao | Jeffrey Zhao | #{"C#" "Java" "JavaScript" "CoffeeScript" "Ruby"} | 1943.0 | |
livid | Xin Liu | #{"JavaScript" "Ruby" "Python"} | 1928.5 | |
thoughtworks | ThoughtWorks Inc. | #{"Java" "C++" "JavaScript" "Objective-C" "Ruby" "Python"} | 1392.5 | |
sofish | sofish | #{"Ja |
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
({:username "imakewebthings", | |
:name "Caleb Troughton", | |
:language "JavaScript", | |
:score 5476.8} | |
{:username "flyerhzm", | |
:name "Richard Huang", | |
:language "Ruby", | |
:score 2776.2} | |
{:username "fredwu", | |
:name "Fred Wu", |
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
/** | |
* | |
*/ | |
package info.sunng.util.concurrent; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.Future; |
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 Proxy(object): | |
def __init__(self, target): | |
self.target = target | |
def __getattr__(self, name): | |
print "calling: ", name | |
return (lambda *x: self._call(*x)) | |
def _call(self, *args): |
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
import struct | |
import json | |
import clj | |
PROTOCOL_VERSION = 5 | |
PROTOCOL_HEADER = "bib" | |
PROTOCOL_HEADER_SIZE = 6 |
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 link-test.tcp | |
(:refer-clojure :exclude [float byte double]) | |
(:use [link core tcp codec])) | |
(def echo-handler | |
(create-handler | |
(on-message [ctx e] | |
(let [channel (.getChannel ctx)] | |
(.write channel | |
(.getMessage e)))))) |
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
(defmacro dosync+ [listeners & body] | |
`(let [on-start# (get ~listeners :on-start identity) | |
on-retry# (get ~listeners :on-retry identity) | |
on-committed# (get ~listeners :on-committed identity) | |
retires# (atom 0) | |
ctx# (atom {})] | |
(dosync | |
(if (zero? @retires#) | |
(swap! ctx# on-start#) | |
(swap! ctx# on-retry#)) |
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
import clj | |
import time | |
s = "[1 2 3 true false nil {:a 21.3 :b 43.2} \"Hello\"]" | |
t1 = time.time() | |
for i in range(10000): | |
clj.loads(s) | |
print time.time()-t1 |