Verifying my understanding of psychotic bastard:
set x: fn (b) : cons : 't (cons 'b ())
is a valid way to say
(set x (fn (b) (cons (' t) (cons (' b) ()))))
Correct?
Verifying my understanding of psychotic bastard:
set x: fn (b) : cons : 't (cons 'b ())
is a valid way to say
(set x (fn (b) (cons (' t) (cons (' b) ()))))
Correct?
;; This is some code from chapter 3 of SICP. I chose it by going to | |
;; http://mitpress.mit.edu/sicp/code/index.html , clicking at random | |
;; and picking the first good, meaty function that caught my eye. It | |
;; is a demonstration of object orientation by way of functional | |
;; closures. | |
(define (make-account balance) | |
(define (withdraw amount) | |
(if (>= balance amount) | |
(begin (set! balance (- balance amount)) |
I have a friend who asked for some thoughts about his drawings. It was gonna be pretty public anyway, so once I realized that I needed half a dozen pictures to make my point, I asked if I could put my reply here.
I am qualified to say things about drawing because I am mediocre. Being mediocre is the best qualification, because it means I've had to really work to learn to make a nice drawing. Naturally talented people make poor teachers, because they haven't made all the mistakes. I've made plenty of them, and I'll make plenty more, but I am slowly mapping the minefield.
I'm gonna skip basics, 'cause you've heard them. (If you haven't, try reading Andrew Loomis: Drawing the Head and Hands, and Figure Drawing for All Its Worth; and Betty Edwards: Drawing on the Right Side of the Brain. The first two are free online.) Rather than say the same thing that every drawing book says, I wanna say the things that no one ever told me. I'm also gonna skip the complement sandwich --- you're doing fine. Your instincts
B | |
B | |
C | |
C | |
Car! Bar! Fooo! |
Array.prototype.map = function(func) { | |
var ret = []; | |
for (var i = 0; i < this.length; i++) | |
ret[i] = func(this[i]); | |
return ret; | |
} | |
var lisp = function() { | |
var builtin = { | |
cns: function(args) { |
alphabet = [("a", "a"), ("bee", "b"), ("see", "c"), ("dee", "d"), | |
("e", "e"), ("ef", "f"), ("gee", "g"), ("aitch", "h"), | |
("i", "i"), ("jay", "j"), ("kay", "k"), ("ell", "l"), | |
("em", "m"), ("en", "n"), ("o", "o"), ("pee", "p"), | |
("cue", "q"), ("ar", "r"), ("ess", "s"), ("tee", "t"), | |
("u", "u"), ("vee", "v"), ("double-u", "w"), ("ex", "x"), | |
("wye", "y"), ("zee", "z")] | |
def alpha_ind(a): | |
for i in range(len(alphabet)): |
FAIL = Symbol("Fail") | |
def eval(code, env): | |
ret = FAIL | |
if isinstance(code, Call): | |
function = eval(code.call, env) | |
new_env = function.bindings | |
for arg in function.lambda_list: | |
if arg.code: | |
new_env[arg.name] = code.args[arg.name] |
from mongoengine import * | |
from mongoengine import signals | |
__all__ = ["SellOrderItem"] | |
REJECTION_REASONS = [ | |
"Hole", | |
"Staining", | |
"Overall wear", | |
"Loose hem", |
"""Builds a character/word-indexed tree of files.""" | |
import itertools | |
import glob | |
punctuation = ".,;:/?<>{}[]()-_=+!@#$%^&*\/\\~*" # TODO be more systematic | |
def words_in_file(handle, max_len): | |
"""Returns an alphabetized list of unique words in the file. |
#include <stdio.h> | |
float rstr[20]; | |
static void doflasha() | |
{ | |
int err; | |
double tt,p1,p2,t2; | |
double volg, voll, volgm, dgm, zmw, ymw, xmw; | |
char *ptr; |