Boorad's World
 

As I mentioned in Twitter, and on Erlang-Questions, we are getting together for Erlounge Atlanta on Wednesday, March 25, 2009.

The site of the debacle is Manuel's Tavern.  7pm is kickoff.  I might be a bit late, so please start without me.  Order, drink, talk... wash, rinse, repeat.

I've also learned today that an impromptu Startup Drinks will crash our happy party.  The more the merrier.

See you there.
BA

 
 

For those of you interested in my Emacs setup for Erlang development (let's face it, who wouldn't be interested in that?), you can find it here:

http://github.com/boorad/emacs/tree/master

Enjoy.

 
 

I attended Bar Camp Atlanta this weekend.  The event was a blast, but unfortunately I was only able to attend Friday nite.  I missed the distributed version control talk, and got my noodle cooked on "Genetic Algorithms in Javascript."  I also missed coffee w/ @ivey and @sanjay's Pipes talk.  :\

I gave a talk on Erlang and why you should use it.  My over/under for attendees was four, but I packed in about 20 people standing room only...  not too bad.  My slides can be found here.

Poker was great, including the whiskey... although I could have done without a couple of the beats put on me.  My playing partners seemed so nice.  But put chips in front of them, and cards, and whiskey... they changed real fast.   I'll be ready next time.

 
 

So I finally got a bit of time to get back to Erlang, and caught up on Kevin Smith's screencasts.  Watching him work with flymake enabled reminded me that when I set up his emacs/erlang rig earlier, I never got flymake to work.  Well, I finally did, so thought I'd share my changes.

Looking at 'git diff' I see I changed erlang_mode_config.el with my paths to Erlang stuffies:

-(add-to-list 'load-path "/opt/lib/erlang/lib/tools-2.6.1/emacs")
+(add-to-list 'load-path "/opt/local/lib/erlang/lib/tools-2.6.1/emacs")
 (require 'erlang-start)
 (setq erlang-indent-level 2)
-(add-to-list 'exec-path "/opt/bin")
-(setq erlang-root-dir "/opt")
+(add-to-list 'exec-path "/opt/local/lib/erlang/bin")
+(setq erlang-root-dir "/opt/local/lib/erlang")

Now, on to flymake_config.el, where I had another path change b/c I didn't put things in exactly the same place on my machine.

-    (list "~/emacs/flymake/bin/eflymake" (list local-file))))
+    (list "~/dev/erlang/kevsmith/emacs/flymake/bin/eflymake" (list local-file))))

Then, to recompile the .elc files, I ran this:

emacs -q --no-site-file -batch -eval "(add-to-list 'load-path \".\")" -f batch-byte-compile *.el

The same path changes were required in eflymake script, on the top line.

-#!/opt/bin/escript
+#!/opt/local/lib/erlang/bin/escript

Of course, the thing to do would be to modify these files to have one place for these settings to reside, and be more easily customizable for all.  But since I have things working, I want to get back to coding.  I hope to feel like before this was like 'coding in the dark.'  Off to code...

 
 

The Metro Atlanta Erlang Users Group, some single digits strong, will meet for the first time on September 20, 2008 at the Brick Store Pub in Decatur, GA.  For now, we are planning on meeting at 7pm.

The Brick Store has a fairly amazing beer selection, and they're light on the TV's so we can hopefully avoid the rabid Tech and Dawg football fans.  Let's sit upstairs if possible.

Please throw out suggestions for what to talk about in the comments, or we can just get together and meet/drink.  I can talk about a project I've got cooking, and my trials with backends, including CouchDB vs. Mnesia.  Kevin Smith says he will be there, so we can possibly guide his pragpodcast direction :)

Wifi is a bit iffy.  Decatur is blanketed, but I'm not sure if it's free.  I believe you need to be a resident.  So, that means I'll be calling on my friend who lives over there.  Happily, he's at least heard of Erlang.

Oh, and in addition to Erlang, I try to indoctrinate as many as I run into about the hotness of the D Programming Language.  You have been warned.

 
 

I really dislike exercising.  Recently, I've found myself back in the gym, trying to shed my 'programmer physique' as noted in the video of my Startup Riot talk.  So I hop on an elliptical, treadmill, stationary bike, etc. and get going.  There are TV's if I want to watch the 'fair and unbiased' reporting of Fox News, or watch Emeril bulge out of his apron, talking about cooking something healthy.  But not much really takes the pain away from the mind-numbing, boring task at hand. 

A few weeks ago, I caught my first startuplounge.com podcast, their #27, with Mitch Free of mfg.com.  Scott Burkett and Michael Blake have managed to create something more painful than exercising, so that while listening, my mind is distracted from the physical exertion, profuse sweating, heavy breathing, and shredding of my knees.  Well done, gents.

Kidding aside, this is an excellent resource for entrepreneurs.  I have known about the podcasts for a while, but just now started listening, because Quantum XML is now seeking VC funding.  For those of you who don't know, Quantum is bringing the fastest XML parser on the planet to market.

I was able to knock off Episode #1 this morning on the treadmill.  They have a nice bit of comedy mixed in with sage advice.  I mean, Sanford and Son is worked in, along with anal glaucoma...  really, just listen.

I'm psyched to have 24 more to go (one is mysteriously missing, possibly under FCC investigation?) so that should be about 6 weeks or so of trips to the gym.  And I'm really looking forward to #28, due any day, with Sig Moseley.  So, keep up the good work, guys.  And keep them coming.  Because if you don't crank out 3-4 per week starting in the fall when I need them, I'll be a fat slob again, and you'll have that on your consciences.

 
 

Holy crap.  I just realized that for some number of weeks, I've been running OS X 10.5.4, and nothing has blown up.  Erlang still works.  GDC still bangs out D binaries (note to self to check up on LLVMDC progress), and overall, I haven't had to recompile anything.

Same with iPhone Software Update 2.0 on my horrifically outdated iPhone 1.0 hardware.

More of those type upgrades, please.

 
 

On Thursday, July 10, I found myself attending a Rockies-Brewers game at 1pm CDT.  We arrived earlier than that, and had a few adult beverages on our way to a nice tailgate.  On our way into the parking lot, we saw some people playing Cornhole (as Cincinnatians call it).  But more interesting to me was a game being played a couple of cars down from us.  I hadn't seen it before.  It involves golf balls separated by a length of nylon rope being thrown like horseshoes to wrap around three horizontal bars for different scores.

The game appeared two days later on Cape Cod where I was attending a family reunion.  It was all the crowd wanted to play, after it was set up and people began to watch.  And throughout the week of vacation, we all wondered what it was called.  I thought, after this self-induced Internet blackout of vacation, a quick Google search would solve it for me in seconds.  Not so fast, my friends.  Here's a bit of what I found...

Like most outdoor games, it's a game of many names. It's also commonly referred to as:

Norwegian Horseshoes, Ladder Golf, Snakes, Hillbilly Golf, Polish Golf, Horseballs, Tower Ball, Bolo Golf, Gladiator, Bola, Snake Toss, BlongoBall, Ladder Toss, Bolo, Rodeo Golf, Dingle Balls, Bolo Polo, Cowboy Golf, Redneck Golf, Pocca Bolo, The Snake Game, Willy Ball, Ladder Ball, Slither, Zing-Ball, Snakes & Ladders, Hillbilly Horseshoes, Flingy Ball, Top Toss, Norwegian Golf, Monkey Bars Golf, Swedish Golf, Polish Horsehoes, Dandy Golf, Montana Golf, Lasso Golf, Australian Horseshoes, Ladder Game, Monkey Balls, Rattlerail Toss, Golfball Horseshoes, Arizona Golf Balls, Spin-It, Ball Dangle, Bolo Ball, Poor Mans Golf, Bolo Toss, even Testical Toss!

Sheesh.  I guess there needs to be a bit of consolidation on the naming front.  I trust some enterprising company to come along and standardize this puppy soon.  Otherwise it will spin out of control.  As the beer flowed on vacation, the family came up with suggestions that are not listed above, and perhaps should not be listed anywhere, now that I think about it.

 
 

I didn't find much out there on PostgreSQL drivers for Erlang.  There's one built into jungerl, and one put out by Erlang Consulting, as far as I can tell.  I can't stand CVS, there's no package download, and didn't already have jungerl or its 'pgsql' driver anywhere on my local, so I moved on to the Erlang Consulting 'psql' driver, which had a tarball.

after untarring in ~/dev/erlang/psql-0.1.3, I just typed 'make' and the /ebin folder filled nicely (i.e. my Erlang is working)

So, under the /docs folder, in overview.edoc, it said to modify sys.config (a file usually in $ERL_OTP_ROOT/releases/$VERSION) and add in your connection strings like such:

 {psql, [{default, {"192.168.1.101", 5432, "dev", "secret", "sql_test"}},
 {pools, [{default, 1}]}]}

I now think this is a bit dated, because the following code gave me a bit of a connection error during startup of the driver.

make_dat_files() ->
    ensure_started(psql),
    Pid = psql:allocate(),
    psql:sql_query(Pid, "select * from accounts;").

Config stuffies seem to have moved into the psql.app file in /ebin, but you don't edit that directly.  I found ~/dev/erlang/psql-0.1.3/src/psql.app.src, modified for my specific connection settings, and back at the root of the tarball, typed 'make' again.  Now, the psql.app file in /ebin had my connection info and I could go about my business.

I'm still very much a newb, but articles like this one would have saved me an hour on this issue, so enjoy.

 
 

So after the most recent 10.5.3 Leopard upgrade, I go to fire up the Erlang REPL and I get "Bus error."  Evidently this is somewhat common (as noted in #couchdb IRC channel), so I thought I'd just upgrade to a more recent Erlang. 

MacPorts barfs on me, so I decide to clean everything and start over.  Now with no trace of erlang, couchdb, or couchdb-devel, I start again. 

Hitting the megaco flex errors pisses me off, but I find this nice article that helps.  Basically, update flex to 2.5.35 or higher before trying erlang on OS X 5.3.  Here's a sample of the errors:

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_erlang/work/erlang-R12B-2" && make all " returned error 2
Command output: megaco_flex_scanner_drv.flex:31: unknown error processing section 1
megaco_flex_scanner_drv.flex:31: unknown error processing section 1
megaco_flex_scanner_drv.flex:31: unknown error processing section 1
megaco_flex_scanner_drv.flex:31: unknown error processing section 1
megaco_flex_scanner_drv.flex:31: unknown error processing section 1
megaco_flex_scanner_drv.flex:32: bad character: *

So, given errors surrounding hipe (MacPorts bug, can't find link) I removed it from my install command:

sudo port install erlang -hipe +smp

Cool, now Erlang works.  Let's get a new CouchDB from /trunk...

./bootstrap
./configure --with-erlang=/opt/local/lib/erlang/usr/include --prefix=/opt/local
make
sudo make install

Nice.  Now I have all of the new reduce hotness.