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
It's a subscription-based screencast site, where I post a new five- to | |
ten-minute screencast every week. For this, people pay a nominal fee | |
around $3 per month, giving them access to the full archives and new | |
screencasts as they happen. The style would be similar to the | |
screencasts I've posted on my blog: just me and the computer, recorded | |
in one take, although with much practicing. I'd focus not on new | |
languages and tools, but on the minute-to-minute mechanics of | |
effective programming practices, with an obvious bias toward the stack | |
and practices that I use. |
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
tell application "Finder" | |
open file ((path to home folder as text) & "Dropbox:notes") using ((path to applications folder as text) & "MacVim.app") | |
end tell | |
tell application "MacVim" | |
activate | |
end tell |
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
#define assert_equals(expected, actual)\ | |
if (expected != actual) {\ | |
printf("FAIL: %#Lx != %#Lx\n", (uint64_t)expected, (uint64_t)actual);\ | |
exit(1); \ | |
} | |
#define run_test(name)\ | |
printf("%s\n", #name);\ | |
name(); |
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
(set -e && ls content/*.markdown | while read p; do DATE=$(echo $p | cut -d '/' -f 2 | cut -d '-' -f 1-3); TARGET=$(echo $p | sed 's/-/\//' | sed 's/-/\//' | sed -E 's/[0-9]+-//' | perl -pe 's/^(.*\/.*\/.*\/)(.)(.*)$/\1\u\2\3/' | sed -E 's/-|_/ /g'); echo $TARGET; mkdir -p $(dirname $TARGET); echo "<\!-- $DATE -->" > $TARGET; cat $p >> $TARGET; rm $p; done) |
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
A Whole New World | |
Few of us have participated in the creation of our | |
infrastructure—operating systems, compilers, terminals, editors, etc., | |
even though many of us know how to build them in theory. Collectively, | |
we suffer from a learned helplessness around them: to build new | |
high-level tools, we'd also have to rebuild some of the | |
infrastructure, sometimes going all the way down to the kernel. We | |
can't imagine triggering such a large cultural and technological | |
shift, so we don't even try to build truly new tools for ourselves. |
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
Isolated unit testing—mocking everything—is a controversial topic. We'll briefly review what it is today, why people like it, and its problems. Then, on to the real goal: a trip through behavior vs. data, mutation vs. immutability, how data shape affords parallelism, transforming interface dependencies into data dependencies, and what it might look like to unify all of these with a slightly tweaked version of OO. Fortunately, Ruby is sufficiently flexible that we can do the whole experiment without leaving 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
static int | |
find_reusable_reload (rtx *p_in, rtx out, enum reg_class rclass, | |
enum reload_type type, int opnum, int dont_share) | |
{ | |
rtx in = *p_in; | |
int i; | |
/* We can't merge two reloads if the output of either one is | |
earlyclobbered. */ | |
if (earlyclobber_operand_p (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
class Changes < Actor | |
out :timeline_tweets_out | |
takes :tweets_in, :friends_in | |
def before | |
@friends = @friends_in.pop | |
end | |
def pump | |
tweet = @tweets_in.pop |
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
class Wrap | |
def self.wrap(s, max_length) | |
raise ArgumentError.new("Maximum wrap length can't be 0") if max_length == 0 | |
return [""] if s.rstrip.empty? | |
# Split into words and whitespace blocks | |
blocks = s.split /(\s+|\S+)\b/ | |
lines = [] | |
line = "" |
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
# A queue that you can pass to IO.select. | |
# | |
# NOT THREAD SAFE: Only one thread should write; only one thread should read. | |
# | |
# Purpose: | |
# Allow easy integration of data-producing threads into event loops. The | |
# queue will be readable from select's perspective as long as there are | |
# objects in the queue. | |
# | |
# Implementation: |