I hereby claim:
- I am amacdougall on github.
- I am amacdougall (https://keybase.io/amacdougall) on keybase.
- I have a public key ASAGCmbFfRcSjbInd-pBM-SHxNJCAVCs8wJ1RvZj3opBjAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function is(a) { | |
return b => a === b; | |
} | |
function isNot(a) { | |
return b => a !== b; | |
} | |
class SimpleMembershipSet { | |
constructor(values = null) { |
Lately I've been reading The Book of the New Sun, by Gene Wolf. I began reading it once, when I was a teenager, but I didn't have the vocabulary or the perspective to understand it. The books are set millions of years in the future, when the sun itself is fading as glaciers creep inexorably toward the equator, and the author recklessly overstuffs the narrative with archaic terms, instead of invented ones, to describe things which would be unfamiliar to us. Only slowly do we come to understand the concrete reality behind the archaic terms: "destriers" are genetically engineered riding sabertooths; "voulges" are energy weapons; a hundred long-forgotten professions, from uhlan to heirodule to claviger, make appearances, and their true nature is obscured at first, or forever, by the linguistic veil.
What is more, the author is deeply unreliable. We sometimes find the narrative disjointed, and are forced to deduce what he has left unsaid; or contradictory, and he confesses later that he lied. And most of all, thi
I spent a few hours over the weekend doing challenges and stuff with the keyboard, and I think I've got the hang of it. It will probably take more practice before I can use the keyboard effectively in continuous battle, but I was surprised how quickly I took to it. It's probably because I was already good at vim...
Basic movement feels a bit harder, but I think that's down to familiarity. Switching between standing and crouching block is a bit weird, because holding down the keys just feels different from using the stick. And a few special moves are harder, such as the hcb, f moves: I have to complete the hcb, release the keys entirely, then hit f+attack. But when I look at the results in a keyboard input display, such as https://www.microsoft.com/appliedsciences/KeyboardGhostingDemo.mspx, I can see my error: the hcb is "fds", and if I don't completely release the S key before hitting F again, I'm holding two opposite directions at the same time, and the game system doesn't recognize the forward direction.
(defn- distinct-users [] | |
(let [step (fn step [users usernames emails] | |
(lazy-seq | |
((fn [[u :as users] usernames emails] ; first user, usernames, emails | |
(when-let [s (seq users)] | |
(if (or (contains? usernames (:username u)) | |
(contains? emails (:email u))) | |
(recur (rest s) usernames emails) | |
(cons u (step (rest s) | |
(conj usernames (:username u)) |
# Customize FACE_CARDS, JOKERS, and SUITS however you like. Run this file by | |
# simply typing this at the command line: | |
# | |
# ruby deal.rb number_of_cards | |
# | |
# If number_of_cards is omitted, you'll get five. And obviously Ruby has to be | |
# installed, you have to be in the directory that contains the file (or supply | |
# the path to it), etc. | |
class Deck | |
FACE_CARDS = { |
To make libraries available, add them to the :dependencies
vector in your
project.clj. Remember that you can create a new project folder with lein new [<template-name>] <project-name>
. Here are the dependencies used for this JSON
loading adventure:
:dependencies [[org.clojure/clojure "1.7.0"]
[clj-http "2.0.0"]
[ | |
{ | |
"_id": "55c907c64caeb310824a048b", | |
"isActive": true, | |
"balance": "$1,011.82", | |
"picture": "http://placehold.it/32x32", | |
"age": 24, | |
"eyeColor": "green", | |
"name": "Hope Willis", | |
"gender": "female", |