05.30.06
Posted in Mathematics, ruby/rails at 1:11 pm by Haris
This post has gotten a bit longer than expected, so a quick summary is in order here: If you run Ruby 1.8.2 or earlier, be very careful about using rational.rb and mathn.rb. The algorithms in there for computing the gcd of numbers, necessary in almost every operation, are from kind of bad to utterly horrible, and in particular in one of my projects 30% of the program time was spent in computing gcds.
Ok, and now for our feature presentation:
Read the rest of this entry »
Permalink
04.12.06
Posted in TextMate, ruby/rails at 11:43 pm by Haris
Since the actual page does not accept comments, this entry is for you to post your comments on the ScopeHandler class. Fire away!
Current version: 1.2 Added RDoc support.
Current version: 1.2.1 Added nodesWithScope method. Example: handler.nodesWithScope("comment").
Later
Permalink
01.01.06
Posted in Gregarius, ruby/rails at 11:13 am by Haris
Well, time to continue with the next tutorial in the process of porting the Gregarius source code to Ruby on Rails. You can read the steps taken so far here. You can also see the results here. Read the rest of this entry »
Permalink
12.28.05
Posted in html/css, computers, Gregarius, ruby/rails at 10:36 pm by Haris
The time has finally come for me to jump on the Rails-wagon and learn Ruby on Rails. I will document here my efforts to port the fabulous Gregarius feed aggregator to Ruby. I admit this is not a tutorial for the complete novices, and definitely of no use to a seasoned Rails developer, unless they enjoy a good laugh. In particular, I am assuming that you have glanced at the standard tutorials here and here, as well as Amy Hoy’s wonderful list of articles on her site. I am sure there are other worthwhile tutorials out there, and you can probably find them documented at the wiki.
So to recap, I am assuming that you have Ruby and Rails installed and you have two terminal windows open, as well as your favorite editor ready to work on any file in the directory we are about to create, and of course your favorite browser open, so that we can view our results. Also keep in mind that whatever is presented here is my view on things, and it might very well be incomplete/inaccurate. Please feel free to correct me. This might also be an opportune moment to have a look at the Gregarius source code, to have some idea what we are trying to replicate. Of course for now we’ll only do some small bits of the overall monster.
Ready? Alright then, on with the show!
Read the rest of this entry »
Permalink
12.10.05
Posted in Uncategorized, Mac OS X, computers, TextMate, ruby/rails at 2:20 pm by Haris
I am starting to really like Ruby! I was working on my plugin, for Gregarius, and I found myself having to often have the php code spit out javascript code using echo. So something like:
function myinsert(node) {
var ob = document.getElementById("maindiv");
ob.setAttribute('style','display:none');
}
would be converted to:
Read the rest of this entry »
Permalink
· Next entries »