MattEzell.Info

March 20, 2010

MOVED – mattezell.info

Filed under: Uncategorized — eznet @ 3:11 pm

This blog has moved to mattezell.info… If you are coming to blog.eznet.frih.net, when you are coming to the old site – please update your bookmarks to http://mattezell.info

November 11, 2009

Google’s Newest Toy – Installing Go in Ubuntu 9.10

Filed under: Linux, Uncategorized — Tags: , , , , — eznet @ 12:00 am

Setting up Google Go in Ubuntu 9.10

Google Go

Google Go

Go is Google’s newest offering to the development community.  According to the project’s page, Go is an expressive, concurrent, garbage collected programming language that is simple, fast, safe, concurrent, fun and (best of all) open source. Touted as a cross between C/C++ and Python, Go seems to be generating a lot of buzz and hoards of seemingly early adopters despite having surfaced only earlier today (11.10.2009) .  Of course this is somewhat expected – what has Google ever released that didn’t generate it’s share of hype/buzz/excitement associated with it?

I bit.  I am guessing since you are reading this, you did too.

Getting Ready to Go

EDIT:  For more updated discussion on this, please head to my thread on Ubuntu Forums – http://ubuntuforums.org/showthread.php?t=1322518

The following instructions detail the steps that I used to setup Go on my x64 Ubuntu 9.10 (Karmic Koala) box.

Standard disclaimer: Your mileage may vary.  For me everything was pretty much straight forward when following the maintainer’s provided setup instructions (http://golang.org/doc/install.html). The only hiccup I encountered during setup was an error with a test during make – Error 2 in [net.test]. A quick bounce over to #go-nuts resolved that – friendly go-nut knowledge base, iant, advised me that there was an issue with this test on some machines in the release version and that I should pull an update. Update pulled, problem fixed.

For simplicity sake, I am working from the gnome-terminal. Access bash as you see fit.  When you see ‘$’, it denotes a command to enter in the CLI (Command Line Interface).  When you see ‘>’, it denotes and output line.

FYI – My Machine Info:

$uname -a
>2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:05:01 UTC 2009 x86_64 GNU/Linux

Installing Required Tools

Install Python Setup Tools if not installed – Makes installing Mercurial in Ubuntu easy.

$sudo apt-get install python-setuptools

Install Mercurial (using your newly installed Python Setup Tools):

$sudo easy_install mercurial

Install GCC (to build Go):

$sudo apt-get install bison gcc libc6-dev


Setting Up Your Environment

1) Make ‘bin’ directory for go – You may have one – this will create it for you if you don’t:

$mkdir ~/bin

2) Setting up environmental variables:

Edit your Bash environment variables to include the Go required variables as well as making sure your bin folder is in the $PATH

$cp ~/.bashrc ~/.bashrc.bu
$gedit ~/.bashrc

Add following to your .bashrc:

#Google Go Vars
export GOROOT=~/go
export GOOS=linux
export GOARCH=amd64
PATH=${PATH}:$HOME/bin

Reload .bashrc

$source .bashrc

Note: You can close your terminal session and restart terminal instead. Up to you.

Check out Go ( to your Go root using Mercurial)

$hg clone -r release https://go.googlecode.com/hg/ $GOROOT

Note: I had to pull an update due to errors during make (details below with build instructions):

$cd $GOROOT
$hg pull -u

Build Go

$cd $GOROOT/src
$./all.bash

If successful, results should be:

>— cd ../test
>0 known bugs; 0 unexpected bugs

Note on make errors: Before pulling an update on the repository, make resulted in:

>make[1]: Leaving directory `/home/eznet/go/src/pkg/net’
>make: *** [net.test] Error 2

Updating via the ‘hg pull -u’ command above resolved this issue and allowed make to complete as desired.

GO play with Go

Tutorial: http://golang.org/doc/go_tutorial.html

July 16, 2009

Ubuntu & Python Shell: Code Completion

Filed under: Linux, Ubuntu — Tags: — eznet @ 10:41 pm

OK, so I know this is an old one, but one I felt is worth mentioning none the less.

Ubuntu does not, by default, have the PYTHONSTARTUP variable set – furthermore, the pythonstartup file does not exist initially either.  Fortunately, both of these ‘issues’ are easily resolved.

From bash,

you:~$ gedit .pythonstartup

Now to fill in your pythonstartup config file:

# pythonstartup
import os
import readline
import rlcompleter
import atexit
#Bind ‘TAB’ to complete
readline.parse_and_bind(‘tab:complete’)
#Set history file – ~\.pythonhistory

histfile = os.path.join(os.environ['HOME'], ‘.pythonhistory’)
#Attempt read of histfile
try:
readline.read_history_file(histfile)
except IOError:
pass
#Write history file at shell exit
atexit.register(readline.write_history_file, histfile)
#Cleanup
del os, histfile, readline, rlcompleter

Now set your PYTHONSTARTUP var:

you:~$ export PYTHONSTARTUP=~/.pythonstartup

Now you are good to enter the Python Interactive Shell with CODE COMPLETION AND HISTORY!

June 23, 2009

The Exorbitant Price of Movies Today

Filed under: Life — eznet @ 7:33 am

06/22/2009  RMP LEE BRANCH $12.25 (Coke and Popcorn)
06/22/2009  RMP LEE BRANCH $19.50 (2 tickets)
Total: $31.75

Summary: Yes, I paid it – doesn’t mean I think that $32 for a Saturday movie for 2 is exactly reasonable…

May 20, 2009

Support Alabama HB 373 – Remove Antiquated Alcohol % Beer Restrictions

Filed under: Life — eznet @ 5:07 pm

*HB373*
In case you are unaware, Alabama is currently in the process of attempting to reform its antiquated Alcohol Laws.  The bill has passed the house and now needs Governor Riley’s approval to pass it into law – Governor Riley really needs to know that we Alabamians want this to pass!!!

Current restrictions do NO GOOD in protecting Alabama’s citizens and only serves to restrict YOUR choices through political agenda and special interest arrangements – let the Governor know that your beer of choice is YOUR BEER OF CHOICE (even if it contains 7% alcohol). There is no logic behind the law – as we all know, there are plenty of legal (liquor) drinks well in excess of the 6% restriction placed on beer… So, logically speaking, how can a 6% restriction on BEER really be in the interest of the people?

Obviously, I would never ask you to act based on my word alone, so if you don’t know, get educated – http://alisondb.legislature.state.al.us/acas/searchableinstruments/2009rs/bills/hb373.htm

Switchboard: (334) 242-7100
Fax: (334) 353-0004
Email form: http://www.governor.alabama.gov/contact/contact_form.aspx

http://www.freethehops.org/blog/2009/05/keep-calling-the-governors-office/

-Matt

Here is my message to the Governor – feel free to replace my name with yours and edit where you see fit.

————————————————————————————————————————————————————–
Subject: HB373

Dear Gov. Bob Riley,
First, thank you for taking the time out of your day to address this issue.  I am writing to express my support of House Bill 373.  I am formally requesting that you, my elected governor, act in the best interest of my beautiful state of Alabama and sign HB373 into law.

Far too long has Alabama followed behind many of the other 49 states of this grand nation in removing antiquated laws and regulations from our books – please do not allow this to CONTINUE to happen in regards to the overly restrictive alcohol laws that have hampered the industry and individual’s rights for nearly all of Alabama’s great history.

Although I understand and appreciate many of Alabama’s conservative traditions and their supporting laws, one’s personal choice to consume a particular beverage should not be governed by the state when the beverage has been approved at the federal level.  Although one can clearly understand the need to regulate safety standards for approved beverages, current law does far more than this in that it prohibits most beverages for arbitrary and political reasons, with out the “for the good of our people” defense to support it (it’s no secret that the Birmingham Budweiser Distribution Company petitioned against previous similar bills to HB373 in the past).

Not only this, but current regulations on Alcohol have no logical backing in that prohibiting alcohol content in beer to <6% serves in NO WAY to protect Alabama’s people and only serve to hinder individual choice and freedom – as you likely well know, we Alabamians can buy beverages containing far in excess of 6% under current Alabama law.

Please, Governor Riley, pass HB373 so that the currently over-reaching laws and restrictions on Alcohol can be lifted so that me and my fellow Alabamians may drink our beverage of choice without the interference of big government.

Thank you very much for you time and attention.
Alabama Citizen Matthew Ezell

Older Posts »

Powered by WordPress