Precision number parsing in spreadsheet using ruby.

This blog post is not about how to parse spreadsheets using ruby. If you are looking for that, you are not gonna find that here. This blog post is about a problem I faced while parsing decimal numbers from a spreadsheet, long story short precision related problems. Here are the details (the longer version): Recently … Continue reading Precision number parsing in spreadsheet using ruby.

Ruby through rails part 5: Bundler Dsl

In this post, Sanjiv explains what happens under the hood when we do “bundle install”. While learning in detail about how are gems loaded, we learn a few useful Ruby tips and tricks and see some meta-programming at it’s pristine best!

narutosanjiv

Note: All path are relative to bundler gem path. For these blog, i am currently using ruby 2.1.2 and bundler 1.6.3.

While going through Bundler source code earlier, we have seen how bundler evaluates the Gemfile and creates function for each of keyword like gem, source and etc. Now we are going to see the implementation details of a few of these functions. Here is the `gem` function.

The `gem` function accepts one mandatory parameter – the name of the gem and other parameters is an array (called splat parameters). These can be any of :version, :git, :github, :platforms, :source or :group. The * operator (pronounced “star,” “unarray,” or, among the whimsically inclined, “splat”) does a kind of unwrapping of its operand into its components, those components being the elements of its array representation. This function first checks if gem name is provided as symbol and if it is, it throws an exception. The…

View original post 956 more words

My experience at RubyConf Brasil, 2014

This was my first time attending Rubyconf Brasil and it is one of the best experience I have ever had at a conference. The conference for the speakers started a day early. There was a barbecue party arranged at the Codeminer HQ. It was a good idea since a lot of speakers were not from … Continue reading My experience at RubyConf Brasil, 2014