Entries Tagged 'Perl' ↓

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. 

A Higher Level : What Ruby Represents

There is a pretty decent interview with Russ Olsen on his new book on design patterns in Ruby. In it he focuses on what is different and the same in Ruby design patterns. I’ve been thinking a lot about Ruby and what it represents, particularly when I’m (sadly) not working in Ruby.Mr. Olsen talks about how Rubyists just don’t bother with the factory patterns. As I understand it, the factory pattern has to do with object oriented classes that are called abstract classes and are developed as foundations for other classes. They’re then used to be sensible defaults that make descendent classes have lots of built-in goodness.Mr. Olsen wonders aloud why Rubyists don’t use them much. Well, it’s simple. Ruby itself has it built in for the most part. Ruby makes things clean enough that we don’t need to have our hands held and be told to stand in a straight line by somebody else most of the time. Sure, we make mistakes and duplicate things, but we can. And we can still make things work and get things done. Ruby also makes it a little bit pointless, since there are no truly private classes in Ruby. We can get at the core of anything and change it. There’s no company locking you in or limiting you with their private API. Ruby culture leverages the openness of the language as well as the old Perl attitude of “good enough for now, we can improve it later if needed.” 

Psst… hey!

Ruby also represents a new level of abstraction from the machine. These days, processing speed and power are at a surplus in most situations. There will always be some need for high-performance, low-level programming, but even there, what was once done in assembly language is now done in C or C++ and will someday be done in better languages. (better for humans, that is) With Ruby and modern computers (which will only continue to improve) most of us don’t need to worry about mucking around with all that low-level crap. Quite honestly, we should not be worrying about that low-level stuff unless it truly is warranted. Ruby culture here too is about knowing that it may not be the fastest, but knowing that we can have a working solution fast and have fun doing it.Ruby gives you a chance to be concise and expressive, while still thinking in human terms more than with many other languages. Python is close to this as well, but not in exactly the same way. Interestingly, there doesn’t seem to be any real contention or rivalry between Ruby and Python, or Perl for that matter. They happily coexist as different ways of <em>getting things done</em>.Ruby does deserve all the buzz it’s getting. Believe me, programming often turned me off completely when I was younger, but not because I was younger, because it was more tedious than it needed to be. Programming should generally be about being lazy. Making a machine do things for you. Ruby makes it intelligible enough to wrap your head around what you are doing so that you <em>can</em> do it.I’ll admit, I like to do quick and dirty with Ruby as well as any old Perl programmer would do. Yes, I’m talking duct-tape and quick-drying super-glue. You can optimize and refine later. Get things done today!And by the way, you don’t have to learn design patterns first. Ruby will naturally get you using a lot of them without thinking, but if you find Ruby is your cup of tea, <em>you will want more…!</em>

Ruby, Apple, and the year 2008…

It’s a bold new year for Ruby. The recent release of Ruby 1.9 (though it’s still not a production ready release), the inclusion of Ruby as an officially bundled item in OS X 10.5 (though 10.5 still needs a few dot-versions to reach production release itself), Rails 2.0, a whole plethora of new Ruby books…The Ruby year is going to be a good one. It may end up being a bit frustrating when the push to migrate to 1.9 actually does come, but shouldn’t be too bad.On the book side, there is a very interesting Ruby Design Patterns book as well as a few others, such as the Practical Ruby Projects book, and the FXRuby book.Now, we just need a RubyCocoa book, a Ruby Qt, a Ruby Tk, and a WxRuby book.We also need a Ruby game development book. I don’t have any interest in Lua, and Python is the Ruby for people who like the way Python does things.Myself, I’m working on a Cocoa wrapper app for RubyGems called Gem Commander. I’ve already got a proof of concept working app, but it’s slow going dealing with Cocoa and Objective-C after doing Ruby so much. Here is the logo for Gem Commander… Gem Commander logo You see, Ruby is just so expressive and feels modern. Objective-C and Cocoa (and AppleScript, while we’re at it) all definitely show their age after coming from Ruby. The method signatures in Objective-C are conceptually very cool, and the whole thing beats the hell out of C++ or Visual Basic, but the naming of methods and the way things work is sometimes just not graceful at all. (especially, as I said, after doing things in Ruby)Even RubyCocoa is just a dog in comparison to straight Ruby. It does present the opportunity to mix good Ruby expressiveness in to things, but at the cost of still needing to navigate through Apple’s ridiculous documentation. Apple really really really could learn a lot about documentation in the modern world from the Rails crowd. (minus the people Zed Shaw bitches about… ).On the subject of Apple, AppleScript itself is really a dog these days and is overlooked or under-attended by developers. Apple really just needs to overhaul the whole damn thing in favor of serious Python, Perl and Ruby scriptability out-of-the-box. Then, you would see a real explosion of cool stuff. 

Tag Spam :: The Next Big Thing

So, what’s the next big thing gonna be? TAG SPAM. That’s right Continue reading →

Ruby Culture : the ruby-talk mailing list

Ruby is a fun and interesting language to use. This is for sure. At first it looks a bit mysterious, but it grows on you. Ruby promotes a good friendly culture among its users because it is enjoyable to use Ruby. You can see this in action every single day on the ruby-talk mailing list. People are mostly polite and friendly and usually try to avoid flame wars. People go to the ruby-talk list with questions of course! But rather than the usual pile of RTFM or see the docs or this has already been answered in another thread that you get with other languages (perl might be an exception), people also visit the ruby-talk list to look for interesting puzzles to solve, to challenge themselves and find out if there is a better way to do it.

Good stuff.

eRUBY: Ruby + XHTML = .rhtml

eRuby means embedded ruby; embedded in xhtml, that is. The result is often a file with the .rhtml extension, Continue reading →

Amazing Rails Framework + Amazing TextMate

If you are wondering about Rails and Ruby, stop wondering and dive in. While you’re at it, get a good editor and machine to work with. This means a Mac and TextMate. If you don’t have a Mac already, get one, it’s not the cheapest, but not the most expensive; just the most value for your moollah! Continue reading →

PDF is Stupid, Word is Stupid Too!

Data formats are important. Choosing how to structure data is the first thing one might do with it. Deciding how to present information is equally important. Web sites need to stop using PDF and Word documents as the ONLY option for available information. It’s Continue reading →

No to Rails and Rails Apps.

I keep looking and browsing around and wondering? Where is the answer as to why I had so much trouble with Rails stuff? No luck. Nothing on the internet. And I’m pretty good at tracking down stuff. Especially with as many days as I’ve spent on this. No, the answer lies in the fact that as many people as there are out there using Rails, it isn’t really that big of a number. But what’s more, the problems I had most lay in standards, rather, the lack of standards. Continue reading →

RoX - Rails on OS X

RoX logoRoX - Rails on OS X
I’m really liking the sound of that. The performance is good too. I’m starting to see why it’s such a nice environment: my own Apache install, PHP, Perl, Python, C, Obj-C, Ruby, Rails, and TextMate to do it in with Safari to view it in. Sweet!