What does it mean when the guy who blogged about irb’s details and wrote most of the successful irb gems (hirb, bond, boson) decides to implement his own irb alternative? There must be something wrong with irb!
IRB rockets and colors
Introducing the fancy_irb
gem:
- Use fancy colors! You can colorize the prompts, irb errors, stderr and stdout
- Output results as Ruby comments
- Enhance your output value using procs
Tutorial: Build your own password safe with Ruby!
There are many implementations of password managers/safes out there. But lots of them are black boxes, either because they are not open source, or because they have to much features and it gets complicated to understand the source (which is most likely not written in a happy programming language). You don’t know, what really happens with your passwords. So…
Do it yourself!
Do it with Ruby!
Do it in less than 250 lines ;)
irbtools / Release the power of irb!
Equipped with some tools discussed at the germany.rb 2010 user group meetup, I’ve played around with my ~/.irbrc
and put together a little meta gem for some useful irb tools (github)
Gem: clipboard
The clipboard gem allows you to access the clipboard on Liunx, MacOS and Windows.
Requirements: A Mini RubyGems plugin
The .gemspec
file of a gem allows to specify requirements for that gem – but usually you do not get to see them. These five lines patch RubyGems, so that gem
displays the requirements of a gem after it has been installed:
Project Euler 19, 20, 21, 22, 23, 24, 25 (Ruby)
The next pack of Project Euler solutions.
Little heplers for Ruby print debugging
Not everyone likes debuggers. I rather print the debug values myself – it works and I do not need to learn a debugger :P
Do you know the official Ruby interpreter "goruby"?
## ## ## ## ## ## #### ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ######### #### ## ## ######### #### ## #### ## ## ## ## ## ## ## ## ## #### #### ## ## ## #### ## ## ##
New features of Ruby Zucker version 2 and 3
The Zucker gem has gotten some new features. Installation is as easy as
gem install zucker
and
require 'zucker/all'
Introducing Ruby Zucker - a new syntactical sugar gem
Zucker is a collection of lightweight scripts (cubes) that make Ruby even more beautiful: rubyzucker.info
The multi mega method list
One of my favourite ways of learning something about existing code is to load it into irb and play around with it. You are able to ask every object in irb what it can do. It is as easy as you just asking for methods
or public_methods
and the object will show its abilities. But often you get spammed by Object
or irb methods that you rarely want to use.
Project Euler 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 (Ruby)
More solutions for the projecteuler.net problems. Some of them are solved using 1.9.2 features.
Become a Proc Star!
One useful (and funny) feature of Ruby is the Symbol#to_proc
method that lets you write concise code like this: %w|1 2 3 4|.map(&:to_i)
. Almost everyone who knows this feature loves it ;). However, the use cases are pretty limited, because in most cases you need to pass parameters!
New Array and Enumerable methods in Ruby 1.9.2: keep_if, chunk...
In Ruby, dealing with Arrays and similar objects is pretty fun. And we have gotten more possibilities with Ruby 1.9.2 :)
The 28 Bytes of Ruby Joy!
The 28 Bytes of Ruby Joy will notably clean up your code:
Just another "Ruby code is beautiful" presentation ;)
These the slides for my proseminary about the Ruby syntax. It is loosely based on an essay by Yukihiro Matsumoto which is published in the O’Reilly book Beautiful Code. It is released under a creative commons license.
Upgrading to Rails 3: Obstacles and helper scripts
Transferring an existing project to Rails 3 is not that hard, but it usually cannot be done in 5 minutes.
RubyBuntu -4- Make gedit better than any IDE ;)
You can, of course, use an IDE for coding – but reconsider it: After hours of initialization, it tries to do everything for you… Somewhere in the never ending menu jungle… And you need to click all the time… Stop! Focus on the gist! You want to write code!
RubyBuntu -3- Be one with your command line!
Most Ruby programmers know: Many things can be done in much less time on the command line. To become more productive, you should take the 10 minutes to configure some basic settings.
RubyBuntu -2- Troubleshooting common Ruby ubuntu problems
A common Ruby experience on ubuntu: You get some stupid error, saying something would be missing – and you don’t know what to do…
RubyBuntu -1- Installing Ruby (and Rails) on ubuntu
Installing Ruby/Rails on ubuntu is not hard, but some little obstacles might be confusing.
SHA-256
This is a Ruby implentation of the SHA-256 hashing algorithm. Truth be told: It is almost a plain copy of the Wikipedia pseudocode ;)
Project Euler 1-5 (Ruby)
projecteuler.net tries to get you thinking about how to solve mathematical problems by programming. Here are the first five problems, solved in Ruby, including comments.