Entries Tagged 'UNIX' ↓

XCode 3 : Turn on that Scope Depth Syntax Highlighting !

I’m now diving into XCode 3, thanks in no small part to my new black MacBook! One thing I had been looking forward to is the syntax highlighting that shows you the scope of the function or method or code block. Beautiful stuff. I had envisioned it myself several years ago, when I first learned CSS. (I’m sure I’m not the first and obviously not the only…)

Now that XCode 3 finally has code folding, though not as slick as TextMate’s code folding, it will flash the scope depth highlighting colors. But it goes away quickly. Here is how to turn it on to stay (it isn’t obvious or self-apparent).

View>Code Folding>Focus Follows Selection

Or a picture …

Boot Access IS Root Access : Hack the Mac

Duh?! Physical access to any machine makes it highly vulnerable to accessing the contents of its storage media. Apple knows that. Any IT manager worth spitting on knows that. Steve Ballmer probably knows that. George Bush might even know that! These guys who developed the cold memory dumper are butt stupid because it’s a waste of time and effort. This is no big secret or mystery. If you have an OS X install disk that is not older than that particular Mac, you can simply put the disk in, force power down, restart booting from the install disk, from the Utilities menu launch Reset Password Utility. This allows you to change the password for any account on any connected bootable volume as well as enable the Root account! That’s a hell of a lot easier than this bullshit attack.Apple’s not stupid and this is no secret.If you really, really need more security, you simply do not allow physical access to the computer. Need more? Do not allow network connectivity. Need more? Enable a firmware password on the drive. Need more? Get custom firmware that disables startup keys normally available on the Mac OS. Need more? Be a Luddite.Security is always a trade-off with any connectivity. The old phrase Boot Access IS Root Access exists for a reason. 

Install Oniguruma on OS X !

You may have tried unsuccessfully to install the Ruby Gem ultraviolet or the gem it depends on, textpow, and if you did, it likely failed mysteriously. Well, you first need to download and install the Oniguruma regex library. These instructions should work on almost any *nix with GCC, as well as OS X 10.4 and 10.5 !First, go to  http://www.geocities.jp/kosako3/oniguruma/ and download the latest version of Oniguruma. (as of this writing, 5.9.1) In terminal, cd to the directory you downloaded the tarball to.Un-tar it: tar zxf onig-5.9.1.tar.gz Change to the directory of the un-tarred stuff:cd onig-5.9.1 Configure it, in most cases, just add the PATH you use, normally, /usr/local ./configure --prefix=/usr/local After that’s finished, sudo make and then,sudo make install
 Now, you can install that oniguruma gem with no trouble! Same goes for textpow and ultra edit. 

Ruby Gem BlueCloth not working? Not found? Not installed?

Some Ruby Gems are better than others. Some are great once they are working, but how to get them working is not always obvious… BlueCloth (the Ruby implementation of Markdown) is one of these. Unfortunately, simply doing sudo gem install BlueCloth is not enough. The BlueCloth home page, a Trac site, does not tell you squat about it either. So what do you do? Well, as with any gem that doesn’t just install easily and work with a simple require 'gem_name_here', the first thing to do is look in the gem’s directory!!If you do not know where your gems are, at the command line do gem environment and you will see the path to your gems. Copy that path and cd to it. Then do ls and you will see you’re still not there. cd gems will get you into the proper directory for the gems.Once there, you will notice that each gem has a directory with the name and version number of the gem itself. In this case, cd BlueCloth* should be enough to get you into the BlueCloth directory. If you do have more than one version, you will need to add the version number to that.Once inside the BlueCloth directory, you will see a README and install.rb, first read the README. Hmmm… it is not real clear language, but it does indicate you will need to run install.rb. OK. In the same directory, run ruby install.rb and you should see a few lines:Cloth Installer Revision: 1.3 Testing for the StrScan library...foundTesting for the Devel-Logger library...foundInstalling   If you get any error message, you either need to use sudo to do it, or you just do not have enough permissions/privileges on that machine.  If you get no error message, then you can now use BlueCloth for converting Markdown to html!In any normal Ruby code, simply be sure to add:
require 'rubygems'
require 'bluecloth'
 In a Rails application, simply add the second require line in application.rb and you will be ok to use BlueCloth from within your Rails application. You can actually use both require lines there, but the require for rubygems is just taking up space on the page at this point. If Rails is working, then RubyGems has already been required somewhere else! The beautiful thing is, BlueCloth is easy to use and very effective!  One more thing… this information is true on Linux, OS X, and any *NIX installation. On windows… I have no idea. Personally, I cannot see why people go through the pain of programming on windows, except that it can pay the bills…? 

OS X 10.5.zero Leopard Opinion, Finalized

Well, I gave Leopard a day; One whole day of mostly lost time trying to get things working for developing again. Granted, Continue reading →

OS X 10.5 Leopard, Ruby and Rails, almost

Well, OS X now comes a lot closer to having a good Ruby and Rails, but I don’t like it.
What’s the deal with giving a default Rails DB configuration using SQLite3?!!
Lame. Sorry. Most folks doing Rails work use MySQL…

And as for the gems installed… uh where is Rmagick? Why isn’t Image Magick installed? X11 is now installed by default, so it only stands to reason…
Nice try guys, but unless this is Ruby and Rails for Apple’s internal use, there’s not much point. I expect to see a one-click replacement soon, but I’m going to go back and hook up my old installation the Hivelogic way. It just works better and corresponds better to what’s available on real-world hosting providers.

The gem choices are somewhat odd. Limited and odd. I’m dumping it and going with my own. Apple, (Laurent) I will leave yours in /usr/bin but I will not use it. Thanks anyway.

OS X 10.5 Leopard : Is it Worth it?!

Like everybody else and their dog in Austin, I went to the Apple Store in Austin, at the Domain, to see OS X 10.5 Leopard on its debut day. Well, of course the Domain is an ultra-American, artificial-as-possible, prefab shopping strip with the same stupid chain shops you find everywhere else in upper-middle-class-suburban-America. It’s hip, trendy, popular, and 100% devoid of any real culture or humanity. A perfect example of why people hate Americans.

Unfortunately, Apple Stores are all in similar places in the USA. Fortunately, I expected this, and it didn’t come between me and my mission to try out Leopard and resist the temptation to buy anything.

The sad thing is, Leopard was kind of disappointing. In much the same way that Tiger was disappointing: Panther got most of it right already. Every new thing since Panther (almost) has been toy eye-candy. That’s not true, but that’s how it feels. Panther really felt revolutionary. Tiger was indeed evolutionary. But this Leopard… I don’t know. Maybe it will grow on me. That is after I get a new Mac that comes with it. I just didn’t see anything compelling enough to get me to buy the OS or even to get me to buy a new Mac NOW.

The Dock?
Yep, it’s a downgrade that is harder to make out visually.

Spaces?
Uh, needs a little work to make it smoother, but I get it, this little piggy cried “K D E” all the way home.

Time Machine?
Oh, I’m sure it’s as good as advertised. I saw the original Steve Jobs intro a year ago. It was neato-lookin’ and all that. But backup is not so critically difficult to me, clone a drive or use RAID mirroring, with cycling out. It’s not new. It doesn’t matter how you implement it so much, until you need to recover something!

Other features…?
Nothing really WOWed me. Really.

Bad stuff?
Well the Dock for one. But the GUI in general, has taken an ugly turn with the sharper corner radius on the rounded top corners and the lack of rounded corners on the toolbar. It looks like something pretending to be a Mac, like some KDE or Gnome theme that comes close but gets it wrong.

I can wait for the polish up.

The only compelling features to me were all the dev tools!! But unfortunately, the Apple Store that I went to did not feel compelled to display any of the dev tools. Talk about lame.

Allegro is Bad—

Look, this isn’t a pride issue, but it is an issue of standardization! I don’t care if people use British or American spelling conventions in general. However, in programming, it is well established that everyone uses American English spellings for code. Not because it’s better or any other silly reason, but because it’s a de facto standard that simply prevents errors. Most of the world doesn’t use English every day, but in code they do. Even in Allegro’s Xcode template, which has a simple “hello world” I see centre. Any other time that would be great and fine and I wouldn’t care at all. But in code, it should be center. Especially in C!! Unless you have an alias for a method or function in code that provides for different languages, don’t do it. It’s just asking for error-ridden code by others. I’m not liking Allegro one bit so far.

SDL, I miss you already…

Allegro on OS X — Sucks. (so far…)

I’m interested in learning a bit about game programming. So I decided to pick up a book and work through it in either C or C++ as necessary to get the concepts down. I may have picked a lemon. I browsed the books today, and I think I chose wrong. I picked up Game Programming All In One. I never trust book titles, they’re unreliable because they’re usually determined by marketing jerks. Unfortunately publishers can’t be trusted either. I’ve only seen one publisher (pragmatic programmers) that consistently aims for quality, knowing that quality sells better than quantity. The others are all hit and miss, but mostly miss. Continue reading →

Finally, a New OS for the old iBook!

Finally, I found the new OS for the old iBook. It was kind of under my nose the whole time. Continue reading →