10.6 mac ports - Sept 3rd
Mac ports. 10.6. Don't go outside at night, kids. What a PITA this has been if you're down in the weeds doing development. From a GUI perspective, not much has changed. Life's different down close to the operating system. I'll detail python26 building if needed, but assuming you get it working, and you get on to mercurial, you'll notice that things don't work. You'll get something like:
Traceback (most recent call last):
File "/opt/local/bin/hg", line 27, in <module>
mercurial.dispatch.run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 27, in dispatch
return _runcatch(u, args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 97, in _runcatch
ui.warn(_("abort: could not import module %s!\n") % m)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/i18n.py", line 43, in gettext
return u.encode(encoding.encoding, "replace")
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
self._load()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/demandimport.py", line 47, in _load
mod = _origimport(head, globals, locals)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/encoding.py", line 22, in <module>
encoding = locale.getpreferredencoding() or 'ascii'
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/locale.py", line 531, in getpreferredencoding
import _locale
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/demandimport.py", line 84, in _demandimport
return _origimport(name, globals, locals, fromlist)
ImportError: No module named _localeLame. Turns out the fix is easy. python26 isn't installing _local.so correctly. Run a quick sudo port -vv install python26 and when it comes time to doing its install, push ctrl+c. Next type:
% sudo cp /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.2/build/lib.macosx-10.6-i386-2.6/_locale.so /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
And you're good. Thank god the other OS level fixes I needed are in place otherwise I'd be going crazy dealing with 64 bit vs 32bit and Mach-O vs. dwarf2.
Posted at: 10:00:00/Sean
10.5.7 MobileMe sync failure and Verisign
On an idle afternoon, I did whate very other sane computer user did: pushed update to upgrade my laptop to OS-X 10.5.7. Peachy. As per every other upgrade in the last 3 years, everything just worked as expected. Except MobileMe sync'ing. Grr...
Turns out Apple was sold a bill of goods from Verisign and in 10.5.7 Apple made the mistake of using Verisign's "Online Certificate Status Protocol" service. If I weren't using bfilter, I would've never noticed this bit of pseudo-evilness. Every time you sync with MobileMe, Verisign gets a series of connections to either evintl-ocsp.verisign.com or evsecure-ocsp.verisign.com. This is only an issue if you 1) don't want Verisign to know when you connect to MobileMe, or 2) you happen to use BFilter along with MobileMe, in which case you'll have noticed syncing suddenly stopped working.
There are two solutions: bypass bfilter and let Verisign receive these connections, or deadend requests to Verisign before bfilter has a chance to mangle the response. I'm including the /etc/hosts entry below (my preferred alternative). Add the following to /etc/hosts and you should be good to go:
127.0.0.1 evintl-ocsp.verisign.com
127.0.0.1 evsecure-ocsp.verisign.com
Eff Verisign.
Posted at: 10:00:00/Sean
Visual Basic: The Saddest, most pathetic of languages
Albeit scarred for life, I just survived an encounter with Visual Basic for Excel (VB 6.3). I haven't had to muck around with this kind of shit in forever (getting close to a decade), but thought it'd be neat to save the day and flex a little programming foo. Last time I did anything with VB... it was essentially contrived data munging taken from an easy to manipulate spreadsheet. This challenge? Reading a chunk of user entered data and populating a drop-down list box. Not so hard, right? Right? Oh. My. God.
The data input required me to iterate over a non-unique list of values in a column of a spreadsheet, create a unique list, sort, and insert the result in to a combo box (drop down list, whatever your widget vernacular). Figuring this must be a well documented method or function, I searched inside of Microsoft's VB help editor for term array to get a list of helper functions. It should have been a clue that this was gunna suck when the result was nearly empty and largely irrelevant.
But, being the stubborn clod that I am with regards to being able to hammer through problems, this did not deter (hindsight? I should have run for the hills, tail tucked firmly between legs). Jumping over to $GOOG, I didn't see anything that indicated there was any kind of a unique() function or method. More surprisingly, there isn't a sort() method. Unbelievable. Wanna know what's sad? I'm not the first one to deal with this.
I dare you: type in to your search engine of choice, a search query that goes something to the extent of: "[language] array sort" or change out "sort" for "unique". Ruby, C++, Java and even PHP: all well documented and easy to search for. VB? bwhahahaha! Not so much.
After a few dozen useless search results, I started panic'ing and the reality of having to dust of a qsort() routine from some of my more anctient brain tapes was starting to seem like a less than awful idea. Fortunately, I struck gold and it turns out other people carry around little stashes of code that return a unique array... Though I've misplaced the link, my favorite blurb of VB code was an implementation of qsort(). Honestly, when was the last time you had to write/include array primitives?
Oh! And did you know that VB lacks the ability to continue an iteration in a for loop? Try writing the C equiv in VB: for (int i = 0; i < 100; ++i) continue; I would have given my left hangnail to be able to write Continue For in the VB version. Supposedly newer versions of VB have this, but that just seems like a language omission that's beyond brain-dead. Thank god for Goto labels otherwise I'd be still hacking away I fear. *facepalm*
Microsoft has made VB painful to develop in and has crippled its help functionality on Windows. In fact, it is so bad on Windows that I resorted to using the help editor on my Mac laptop, should've been a clue (the irony of having better VB help in Mac Office can't be understated). VB remains as painful of an experience as I remember, but now that I've got a boatload more experience under my belt, it stands out even more as a technical perversion.
UniqueArray() function included after the break. I don't want to have to dick around searching for that ever again. *sigh*
Posted at: 23:00:00/Sean -
Read more...Linux vs. FreeBSD
I had a marketing "Ah ha!" moment this morning regarding Leenox's popularity. Observe the following: Linux popularity explained
Posted at: 10:00:00/Sean
Voting machine evil
No sooner than I say that I have nothing to write about, than suddenly something fundamentally evil comes along and compels me to soak up some of them bits on that intarweb. Taken from Bradblog, here are some choice excerpts:
Circuit court judge, county clerk, and election officials among eight indicted for gaming elections in 2002, 2004, 2006
Brad Blog
And a good summary from Slashdot:
The election officials divvied up money intended to buy votes and then changed votes on the county's (popular, unverifiable) ES&S touch-screen voting systems, affecting the outcome of elections at the local, state, and federal levels.
Slashdot
Posted at: 11:00:00/Sean
Who has time any more?
So little time and so little I want to say publicly these days. Got to love the intermittency of the value of online communication. If you're interested in useless prattle and commentary that has a value near $0.00, check out my twitter stream.
Posted at: 12:00:00/Sean
Posted at: 09:00:00/Sean -
Read more...0wn3d...
Gamers love excuses and will never admit to being schooled - something's always to blame.

Posted at: 13:30:00/Sean
My new favorite fail...
Fail became epic fail became gfail, became fed fail. Ha!

Posted at: 17:00:00/Sean
Bear Safety
Backpackers, enjoy.

Posted at: 14:45:00/Sean