IO

Ready, Set, Go!

Google recently publicly released their new programming language, Go. I’ve known about this for some time, having worked for the big G while it was in development, although not directly involved.

Google has plenty of special purpose languages, but this is the first general purpose language to come out of Mountain View. That fact alone makes it quite interesting. Add to it that some of the original C and UNIX people are involved, and it becomes something that requires investigation.

GitHub is Moving to Rackspace!

In just a few short weeks we will be moving GitHub to a new home at Rackspace. We’re aware of the current stability and performance issues, and we want to let you know what we’re doing about it. After all, we’re GitHub users too! The move to Rackspace will bring about a new backend architecture and a lot more servers, leading to a much improved user experience for everyone. Thanks for sticking with us through our growing pains!

James will be right back after these interruptions

James will be right back after these interruptions

How many times has this happened to you?

[WAY-TOO-LOUD TV VOICE]: You’re working on some code, making good progress, solving a particular issue, when Oh No!,
you’ve run into a new bug. Now what?

You could open a browser, go to your issue tracker, and open a ticket. But that could take several minutes!

A bit of Optimization

As suggested earlier I did a bit of benchmarking and found these timings of the first version which kept everything in memory and the next version with two LRU storages (for InteractionProcessor and IO objects):

LRU Integration explained

Today I will present my reasoning which lead me to the implementation of the LRUHash as well as how I integrated it into the main code. We will look at how LRUHash works and how it is integrated into the project. Then I will answer some questions that were actually asked — or only thought.

Mini Irb and Mini Script/Console

In my last post, I introduced Bond‘s own version of irb’s completion. What I didn’t emphasize is that it doesn’t need irb. To prove it, I’ll show you a mini irb which has persistent readline history, error handling and Bond’s autocompletion … in 7 lines.

Mini Irb

A good starting point for a basic irb comes from this github snippet:

Original Author Name: 
Gabriel Horner

$stdout.sync = true to flush output immediately

Try this.

5.times do
  putc('.')
  sleep(2)
end

I was hoping that I will get a dot after every two seconds. But that’s not what happens when you run the code. I see nothing for first 10 seconds then I see five dots in one shot. This is not what I wanted.

Measuring & Optimizing I/O Performance

Measuring and optimizing IO performance is somewhat of a black art: the tools are there, the resources and discussions are plenty, but it is also incredibly easy to get lost in the forest. I speak from recent experience. Having gone down multiple false starts with filesystem optimization, RAID tweaking, and even app-level changes it really helped to finally step back and revisit the basics.

Profiling Ruby With Google’s Perftools

Benchmarking, profiling and debugging are all areas where better tool support could really benefit the Ruby community. Built in benchmark library and extensions such as ruby-prof provide us with a minimal level of introspection to help identify the common bottlenecks, but they still fall short of the available tools for the JVM, or other dynamic runtimes.

First Design Considerations

Now the interesting part begins! In an early phase like this I like to look at the problem I want to solve from different angles to get a feeling for implementation options. The output will look like an unsorted collection of notes – and that’s what it is! I don’t claim that this is the best approach around but this helps me to get a better grip of the problem.

Syndicate content