OSX

Terminal.app v. erlang and Latin-1 characters

On pages 29-30 of “Programming Erlang” by Joe Armstrong, the author goes over character strings. Erlang uses Latin-1 as it’s character set. At first, Terminal.app wasn’t showing the non-US / ASCII characters.

There’s a two-step process to solve this:

  1. Terminal->Window Settings…->Display->”Character Set Encoding” set to “Western (ISO Latin 1)”
  2. Set the environment variable LC_ALL to “en_US” before you run erl. Also, see the next paragraph for explanations.

Terminal.app Erlang Latin 1Terminal.app Latin 1 Settings

The above steps are for U.S. English — something similar is available for most locales, but I don’t know the specifics. Of note, is the 2nd step; firstly, LC_CTYPE is the specific value to set, but LC_ALL sets LC_* to the assigned value, so one usually wants LC_ALL, unless you have a very unique locale configuration. Secondly, I’m using Gentoo Prefix Portage environment on OSX, so while I feel that these directions are applicable to most OSX installs, my setup is slightly different, so your mileage may vary. Thirdly, for those that need UTF-8, they can set LC_ALL to “en_US.UTF-8″, and then they only have to toggle Terminal.app’s character set encoding. Why en_US.UTF-8 works, I do not know — Latin 1 is not a subset of UTF-8, so I’ll leave that to more inquiring minds.

After you find settings that you are happy with, consider adding export LC_ALL="en_US.UTF-8" to your ~/.bash_profile if you’d like it to load with every terminal window that opens. My ~/.bash_profile sources my ~/.bashrc, because ~/.bashrc is supposed to be safe for scripts that run as your user, but non-interactively; so, ~/.bash_profile tends to get a lot of my environment look and feel code.

OSX
erlang

Comments (0)

Permalink

T-Mobile Dash, OS X, and Internet Sharing

UPDATE: everyone at my workplace knows that I love to iPhone-hate, but I would just like to compare the annoying but simple PAN tethering steps for OSX to Dash with the steps described here. Suffice to say, you need to hack the iPhone’s OS — a terrible only-option, in my opinion, but a well documented one. I used to hack on homebrew software for my PSP, so I can appreciate these efforts, but I also don’t take having to use homebrew seriously, especially for high-end phones. Laughable.

I recently upgraded my aging Treo 650. I really do like the Palm OS — I’ve been using it for years and years — but the phone was starting to drop calls frequently after one too many drops straight on it’s antenna. *whoops*

So, I got a T-Mobile Dash. As a phone, I like it. As a OSX user that likes having internet connectivity, as well as a business person that likes syncing my calender, tasks, etceteras, I knew I was going to be in for some fun.

Say what you will about how awesome the iPhone is, but for feature-set and “bang for buck,” the Dash is a clear winner. Considering I work for a media-centric company, not being able to record videos on the iPhone made it a non-option almost immediately.

I installed the Windows Mobile 6 upgrade (link). You’re going to have to do this from a Windows box, or from within Parallels or VMware. I didn’t use WM5 for long, but WM6 is stable, and honestly, a lot more pretty.

I’m using Mark/Space Missing Sync for Windows Mobile 4.0 (link). The pre-lease worked pretty well, but I’ve been having some issues with the current release. I have a good feeling from the Mark/Space people, however, so I think that it will be resolved soon.

There is some really good news, as well. Since 10.4.9, OSX supports PAN bluetooth profile, so I can use my Dash as a modem! On the Dash, you can turn this feature on by going to Start->Accessories->Internet Sharing, then make sure “PC Connection” is “Bluetooth PAN”, “Network Connection” is “T-Mobile Data”, and click “Connect”. On the OSX side, if the Bluetooth menu is in your menubar, just click on it, and select “Join Network on XXXX,” where XXXX is your device name.

MacBook Pro
OSX
Windows Mobile
bluetooth

Comments (4)

Permalink

built-in iSight on my MBP can’t record video

Somehow, my MBP’s install is messed up, and the built-in iSight camera cannot be read from in video mode — but yet, still pictures work. I discovered this, as I could not get QuickTime Broadcaster’s preview view to show any video (or for it to broadcast). Then, I discovered that iChat cannot initiate any video chats with anyone.

I have no clue how this problem started. Part of me wants to blame Darwin Streaming Server. I have it turned off, so I no it’s not a conflict with it running, but part of me wonders if just installing it messed something up.

I really don’t want to reinstall OSX. *sigh*

MacBook Pro
OSX
QuickTime

Comments (0)

Permalink

There and back again …

Lately, I’ve been using OSX as my primary operating system, and I’m taking this chance to test posting from TextMate to Wordpress.

OSX

Comments (0)

Permalink

Installing PostgreSQL 8 on OSX via port

Attempting to install postgres via Darwin Ports forced me, for the first time to try to utilize variants. From what I understand, variants are somewhat like USE flags in Gentoo, but beyond that, I don’t know much.

The default postgres version in port is still 7, but postgresql8 is also in port, and currently is version 8.1.3. Looking at its Portfile, we can see that the server variant tells you handy commands that assist in setting up the server. To install the server variant, run:

sudo port install postgresql8 +server

After the install, if you load NetInfo Manager, you’ll notice that a postgres8 user was added. That user is used to set permissions in the steps you are asked to execute by the port post-install process. Follow the directions for setting up the default database, as well as interfacing with launchd. Reading man launchctl can’t hurt either.

The following seems to restart the server, not stop it:

sudo launchctl stop org.darwinports.postgresql8

The following can be used to fully stop the server:

sudo launchctl unload -w /opt/local/etc/LaunchDaemons/org.darwinports.postgresql8/org.darwinports.postgresql8.plist

… and to start (from a stopped state):

sudo launchctl load -w /opt/local/etc/LaunchDaemons/org.darwinports.postgresql8/org.darwinports.postgresql8.plist

OSX
PostgreSQL

Comments (0)

Permalink

Apple to not update Darwin for Intel platform much/at-all?

Slashdot has a way of blowing things out of the water, but as reported by them here, it looks like Apple may either be 0) taking extra long committing Intel-specific code into Darwin, 1) giving up on Free Software with respect to Darwin, or 2) on their way to closing more and more of the platform.

Full story here.

As many posters on Slashdot noted, I believe people have been silly for ever considering OSX an open and free platform. OSX isn’t free software, just some of its components are.

I like using Mac OSX overall, but my expertise (and heart) are in GNU / Linux based systems. I really hope Apple is either truly just taking a long time freeing the code. They could be simply taking a long time untangling proprietary code that they are license-encumbered to not free; for example, possibly information in drivers written to utilize the TPM chipset.

Mildly depressing, this all is. I hope it turns out well, for those of us who all use non-free operating systems.

OSX

Comments (0)

Permalink

So I got a Mac…again…

I’m starting a Macintosh and OSX category, since I now am, once again, the owner of a Mac (with the point of runnin OSX — I’ve used Linux on PowerPC for a long time).  I figure I need a place to keep handy notes, so…there you go.

OSX

Comments (0)

Permalink