'OS X: SPACES + FLUID
I’ve tried so many times to use Spaces, and I keep failing. As useful as it should be, it just never was. And I’ve finally realized why. Most of what I do is in a web browser. And spaces just wasn’t made for that. I want Gmail to always be in space 3. Facebook on 4. It just wasn’t meant for that. I’ve recently discovered Fluid. Fluid brings creates Site Specific...
SWITCHING FROM SVN TO GIT
I’ve been using SVN for several years now, so I’ve been partial to it, and reluctant to switch to another form of source control. I’m very comfortable with it, and I’ve got dozens of scripts to augment it and help me deal with it’s shortcomings, as well as a few blog posts. Easier to create a repository from existing code. This is the first thing I noticed about git...
I LIKE THE GENIUS FEATURE OF ITUNES
There’s a lot of people who don’t seem to like the genius feature of iTunes. In fact, quite a few seem to hate it. The complaints vary. I’m still confused by this complaint by my friend David. He wants iTunes to recognize band names after he’s changed them. If a band has a name, why should iTunes still recognize the band name after you’ve changed it? Of course,...
ERLANG RECORDS CHEATSHEET
I hate looking stuff up. I just like having this type of thing 1 click away, in a nice summary. This post is mostly for me. Define a record: -record( rule, {ruleid, site, rule, original} ). You can define a record in the shell using rd: 99> rd(rule, {ruleid, site, rule, original} ). rule Create an instance of a record: 100> A = #rule{ ruleid=1, site=2, rule=2, original=3}. #rule{ruleid =...
'ERLANG: INSTALLING LEEX'
Leex is an erlang version of Lex, a Lexical Analyzer Generator written by Robert Virding. Robert (and several others in #erlang on freenode) were incredibly helpful and considerate in helping me understand these tools. Leex is a tokenizer. It breaks the pieces of your file or text into tokens. You can then use a tool like yecc to take these tokens and generate useful parsers. First, you’ll...
4 GB OF RAM FOR MAC LAPTOP IS ONLY $61....
OK, so I haven’t bought new RAM in years, but still, $61 for 4GB of ram? Unreal.
ASK A QUESTION BOOKMARKLET
I snuck a feature into Answerbag… the ask a question bookmarklet. Anytime you’re on a page, and you want to ask a question about it, using the bookmarklet will automatically fill in the URL for you. How does it work, you ask? Simple. Drag the link below into your bookmark toolbar. Click on it, ask away! Ask a question
ERLANG - WORKING WITH ETS:SELECT_COUNT
In my last post, I covered using guards with Erlang’s ETS select/2 functionality. However, what if you’re looking to select a count of the number of matches for a given pattern? Lets use select_count for that. You can use the same pattern matching I covered in my previous post. There’s some weird behavior though, with the last parameter of the Result part of the record. It seems...
'ERLANG: ETS MATCHING WITH GUARDS (SELECT/2)'
Not every time we want to pull data out of an erlang ETS table is it as straightfoward as the previous example. Sometimes we want to get all values that are greater than zero, rather than just constants. We’ll need to use the ets:select function, which has support for guards. Here’s a basic setup. Tmp = ets:new(tmp, []). ets:insert(Tmp, {bob, 0}). ets:insert(Tmp, {jim, 1})....
'ERLANG: SUPER BASIC ETS MATCHING TUTORIAL'
I hate having to look stuff up to get examples, especially when I have to click on more than the first google link to figure things out. As a result, here’s a very, very basic intro do doing matching with ETS and erlang. It’s similar to a SELECT in SQL. Here’s some simple matching. 44> Tmp = ets:new(bacon, []). 26 45> ets:insert(Tmp, {joe, {fish, 1}}). true 46>...