'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>...
GOODBYE QUICKSILVER, HELLO LAUNCHBAR
It’s unfortunate that I’ve reached this point, since I thought quicksilver was a really awesome piece of software. Unfortunately, it’s just gotten to be completely unstable. Beach balls became all too common. So common, that I was willing to cough up $20 for LaunchBar after only trying it out for 10 minutes. I never was a power user of quicksilver - I did like a lot of things in...
TURNING TO THE DARK SIDE FOR A BIT....
For better or worse, I’ll be doing c# development for a while. I’ve never been particularly fond of Windows, so we’ll see how things go. I can say that I did manage to blue screen my box on day #2. If anyone has any good c# tutorials or books they’d recommend, I’d appreciate it.
MYSQL: ERROR 1267 (HY000): ILLEGAL MIX OF COLLATIONS (UTF8_UNICODE_CI,IMPLICIT)
I have never, ever seen this before. I don’t even know how the table was created with a different collation. However, I had all my other tables created with the character set utf8, no collation specified. I had to convert the second table to match the character set. This probably wouldn’t have been a problem if I wasn’t joining on a character field. alter table exclusion CONVERT...
EXECUTING MYSQL QUERIES WITHIN VIM
I haven’t been using vim for very long, but I’ve gotten over the initial learning curve of getting used to the different editing modes. With some help from the guys in #vim on irc.freenode.net, I managed to get this gem: ` map :call SwitchDB() :function SwitchDB() : let g:current_db = input(“Database > “) :endfunction map :call Doquery() :function Doquery() : if...