Tag Archives: ruby

The Power of Ruby: Metaprogramming Part one

25 Sep

Part one: Understanding Ruby

Meta programming, who hasn’t heard of it these days? You see it everywhere, you perhaps do so your self without even knowing. But what exactly is this thing called Metaprogramming. In Ruby; it’s probably you best friend. And if it’s not, I’m pretty damn sure it will be! It’s hotter then your girlfriend or perhaps your boyfriend. Hell, it’s probably even hotter then your sister hottest girlfriend and that other girlfriend .. well you catch my drift! But in all seriousness it’s somewhat makes Ruby the awesome programming language as it is. But before we can actually use metaprogramming in language, you must understand the very basics of how Ruby works. Continue reading 

Ruby 1.9.2 released

19 Aug

Yoki Sonoda has just announced the stable release of Ruby 1.9.2!

== About Ruby 1.9.2
Ruby 1.9.2 is mostly compatible with 1.9.1, except the
following changes:
* Many new methods
* New socket API (IPv6 support)
* New encodings
* Random class that supports various random number generators
* Time is reimplemented. There is no longer the year 2038 problem.
* some regexp enhancements
* $: no longer includes the current directory.
* dl is reimplemented on top of libffi.
* new psych library that wraps libyaml. You can use the library instead
of syck.
More details to be found here and here
It has been verified that 1.9.2 works on; Windows (32 and 64 bit  version as well as mingw 32), FreeBSD 6, MacOSX 10.5 (intel and 10.6, Solaris 10 and Symbian OS.
Let’s hope Rails 3 will get released this week too! :)

Objectiveresource does it need rails?

15 Aug

A couple of days back I was looking over my Blog Stats and an interesting search query came up:

objectiveresource does it need rails?

This query got me interested in trying out Objective resource without rails, and technically it should be possible because ObjectiveResource just requires the fetched XML to be in a specific format. So what we can do is create a simple XML document in the same format as Rails out puts its XML. And while we’re at it, let’s create a simple webserver which outputs the XML (honestly I just don’t have Apache working here on my laptop and I seriously can’t be arsed to set it up, and its way too much fun to create a simple Ruby webserver.). So let’s get started!

Continue reading 

Installing RVM, Ruby 1.9.2 and Rails 3 RC2

14 Aug

So you want to try ruby 1.9 and rails 3? Awesome! You’ve come to the right place. Before installing ruby 1.9 or rails 3 you want to install RVM (Ruby Version Manager). RVM is a handy tool which allows you to have multiple version of Ruby installed on your system (along with gems, which include Rails).

RVM — Ruby Version Manager

Straight from the RVM Website:

RVM is a command line tool which allows us to easily install, manage and work with multiple ruby environments from interpreters to sets of gems. RVM itself is easy to install!

I couldn’t have explained it better my self. So let’s get started! In order to install RVM just download the gem
sudo gem install rvm

Continue reading 

Obj C + Cocoa vs everything else

11 Aug

I haven’t written anything for quite a while, mostly because I simply had nothing interesting to write about. Or at least nothing interesting about Cocoa or Objective-C. The last couple of weeks I’ve been doing less than the usual amount of Objective-C and/or Cocoa. One of the reasons is work and partly because I’ve been lazy. With lazy I’m not saying I haven’t done any programming or reading about programming languages at all. Work has forced me in doing more Ruby/Ruby on Rails simply because the projects I’m on had higher priority than the iPhone apps. And to be fairly honest; I didn’t mind at all.

Continue reading 

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: