Skip to content

Instantly share code, notes, and snippets.

View hausdorff's full-sized avatar
🔜
Soon.

Alex Clemmer hausdorff

🔜
Soon.
View GitHub Profile

Last year I listened to "The Way We Teach Computing Hurts Women", a podcast episode by WYNC’s Manoush Zomorodi, talking about different approaches to get girls interested in tech and computer science from childhood to university. There’s some history about Ada Lovelace, the first computer programmer period, as well as discussion of Hello Ruby and Goldiblox, which are aimed at getting very young girls interested in computer science and engineering. (What would have been great would be a mention of Lauren Ipsum, an Alice-in-Wonderland style book about computer science principles and lady pirates.)

This brought up a lot of feelings for me, mostly to do with being involved in tech as a young girl but fading out of it until very recently – and still feeling stuck not so much because of gender but because of another part of my identity: my passions.

So you know how some celebrity artists or athletes talk about "I could sing before I could talk!" or “I was dancing before I could walk!”? That was me, but with two t

reasoned-php

A miniKanren in PHP.

Prologue

What the hell is this? It's a tiny logic programming engine!

What is logic programming, you ask? Logic programming is a largely underrated paradigm that radically changes the way you write, think about, and run,

Let's build a shell!

Introduction

Most of us use a shell, at least once in a while. Some spend most of their time in one. Often we take it for granted, not knowing or caring how it does what it does. In this workshop, we'll delve a little into that by building our very own shell!

Focus of the workshop

Shells have many different functions. This workshop will be focused on how processes are launched, and how their IO can be controlled with pipes. We'll be leaving things like environment variable expansion, signal handling and other things out, but I will give some examples of other directions to go at the end.

Rule 0. In particular, we have zero interest in dealing with a whole bunch of messy details, including but not limited to:

  • memory management

Fibonacci

Fibonacci is a CSS framework based on the Fibonacci sequence. It does not promise to be useful for web designers, merely a mathematical curiosity. It was created by [Redacted] with support from an unpleasantly cold winter that inspired code writing indoors.

Quick start

Drop in the fibonacci.css file and get cracking.

Some basic ideas

#! /bin/sh -x
wiki_url="http://dumps.wikimedia.org/other/pagecounts-raw/2012/2012-01/pagecounts-20120101-000000.gz"
wiki_file="./data/pagecounts-20120101-000000.gz"
uncompressed_file="./data/pagecounts-20120101-000000.txt"
log() {
message=$1
d=$(date)
echo "[$d] $message"

Prototype

The uncompressed file contains 5.5 million lines:

[rule146@rule146: data]$ wc -l pagecounts-20120101-000000.txt
 5596068 pagecounts-20120101-000000.txt

A bunch of lines need to be filtered out. Pages with prefixes like "Special:", "User:", and "File:" need to be filtered out.

in_thread do
loop do
sample :drum_bass_hard, amp: 2
sleep 2
end
end
in_thread do
import ast, inspect, imp
from ast_pretty_printer import print_ast
import sys
"""
High level algorithm:
takes in a file, finds all recursive functions
calls translator for each of the recursive functions found.
"""
#TODO: how do you distinguish between a normal-recursive and tail-recursive function?
echo "curl -X POST -H \"Content-Type: application/json\" http://<primary>:8080/v2/apps -d@simpleDocker.json"
curl -X POST -H "Content-Type: application/json" http://10.132.66.209:8080/v2/apps -d@simpleDocker.json