This Time Self-Hosted
dark mode light mode Search

Learning Ruby

Okay, lately I thought as I was being a bit “stuck” on my usual programming languages, C, C++, Python, …
Discarded Java as one alternative for me, I though I should have started learning a new language. My choice got to Ruby.. a bit because I heard a lot of good impressions about it, a bit because I know it has good Qt/KDE bindings.

So I started one of the things I planned some time ago but wasn’t going to do at all.. as Ruby is good at strings parsing, I’m trying to get a little analyzer to find out the ebuilds that uses features not compatible with Gentoo/FreeBSD.

Unfortunately, also if it started good, I’m now stuck during ebuild parsing as I don’t really know how to get a good way to search for such cases and report them.
Oh well, at least I started learning how Ruby works.

Now, the syntax is almost as messy as perl’s (that I don’t like at all), but being object oriented makes it more interesting for me. The string parsing is really lovely, but I found a couple of regexp able to crash ruby interpreter, and at one time it tried an illegal operation, too.
I think I’ll try in the next days to improve my knowledge of it to get to a point where I could make use of it in case I need it.

I also though of rewriting flamebot (that you find on #gentoo-dev and other #gentoo channels on freenode as ServoFlame, the backup bot in case jeeves and GenBot takes holiday :)), and I found rbot project as a framework for IRC bots, but.. FlameBot started as something scratchy, I wrote it on a couple of days when I wasn’t in the mood of doing anything, and it does its work (parsing bugzilla’s reports and so on), I think I’ll just add a couple more things (like being able to intercept urls for certain bugzillas – useful to display data from KDE or GNOME or FreeDesktop’s bugzillas but not for Gentoo’s as there’s already GenBot doing so – or being able to show the supported bugzillas).

Oh by the way, my personal life is more or less getting more stable, although it seems strange also to me 😉

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.