This file contains hidden or 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
onfou | |
eventerpretatio | |
rlahair | |
machpel | |
tledo | |
curselv | |
darkne | |
elchized | |
imelec | |
ffend |
This file contains hidden or 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 lookup | |
"Lookup a variable in the model. Respects inversion of the variable if it is | |
specified with a - symbol. Returns nil if the variable is unset." | |
[model v] | |
(if (= (get v 0) \-) ; If the first character is '-' | |
(if-let [[k v] (find model (subs v 1))] ; If v is defined in the map get it | |
(not v) ; return not v if we found it | |
nil) ; otherwise return nil | |
(get model v))) ; If it isn't inverted simply get it |
This file contains hidden or 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 lookup | |
"Lookup a variable in the model. Respects inversion of the variable if it is | |
specified with a - symbol. Returns nil if the variable is unset." | |
[v model] | |
(if (= (get v 0) \-) ; If the first character is '-' | |
(let [value (get model (subs v 1))] ; let value equal the value of the var | |
(if (nil? value) ; if the variable is unnassigned | |
nil ; return nil | |
(not value))) ; otherwise return not value |
This file contains hidden or 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 lookup | |
"Lookup a variable in the model. Respects inversion of the variable if it is | |
specified with a - symbol. Returns nil if the variable is unset." | |
[v model] | |
(if (= (get v 0) \-) ; If the first character is '-' | |
(let [value (get model (subs v 1))] ; let value equal the value of the var | |
(if (identical? value nil) ; if the variable is unnassigned | |
nil ; return nil | |
(not value))) ; otherwise return not value |
This file contains hidden or 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 lookup [v model] | |
"Lookup a variable in the model. Respects inversion of the variable if it is | |
specified with a - symbol. Returns nil if the variable is unset." | |
(if (= (get v 0) \-) ; If the first character is '-' | |
(let [value (get model (subs v 1))] ; let value equal the value of the var | |
(if (identical? value nil) ; if the variable is unnassigned | |
nil ; return nil | |
(not value))) ; otherwise return not value | |
(get model v))) |
This file contains hidden or 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 scala.actors._ | |
import scala.actors.Actor._ | |
case object Poke | |
case object Idling | |
class Kid () extends Actor { | |
def act () = loop { | |
if (mailboxSize == 0) this ! Idling |
This file contains hidden or 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
$ curl -v http://zeitnow.nodejitsu.com/ | |
* About to connect() to zeitnow.nodejitsu.com port 80 (#0) | |
* Trying 165.225.129.253... | |
* connected | |
* Connected to zeitnow.nodejitsu.com (165.225.129.253) port 80 (#0) | |
> GET / HTTP/1.1 | |
> User-Agent: curl/7.25.0 (x86_64-pc-linux-gnu) libcurl/7.25.0 OpenSSL/1.0.1 zlib/1.2.6 libidn/1.24 libssh2/1.4.0 librtmp/2.3 | |
> Host: zeitnow.nodejitsu.com | |
> Accept: */* | |
> |
This file contains hidden or 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 sock = require('net').createConnection(process.argv[3], process.argv[2]); | |
sock.on('connect', function () { | |
process.stdin.pipe(sock); | |
}); | |
sock.on('data', function (data) { | |
console.log(data.toString()); | |
}); |
This file contains hidden or 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 outer () { | |
var foo = 'yellow'; | |
function inner () { | |
foo = 'blue'; | |
} | |
function out () { | |
console.log(foo); | |
} | |
return [inner, out]; | |
} |
This file contains hidden or 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
06:48 PM russfrank @ clarion ~/code/marked fmt? | |
$ cat postbench | |
marked completed in 3516ms. | |
marked (gfm) completed in 3567ms. | |
marked (pedantic) completed in 3299ms. | |
discount completed in 5421ms. | |
showdown (reuse converter) completed in 9914ms. | |
showdown (new converter) completed in 11393ms. | |
markdown-js completed in 27392ms. |