StructuredIO , an Elixir API for consuming structured input streams Last month I published a new Hex package called StructuredIO . This week the package passed a v1.0 milestone. StructuredIO is a library for Elixir and Erlang applications. What problem does it solve? In a nutshell, it simplifies working with structured input (such as markup or binary data) that streams from another process or…
Lately I’ve been working through the Matasano Crypto Challenges . As of the time of this writing I’ve completed just one of the six sets, but I intend to persevere to the end. Join me. My solutions may not be optimal (yet!), but I’m refactoring and tuning performance as I go. Continuous improvement, rah rah rah!
[ ]( http://www.flickr.com/photos/guccibear2005/5208121081 ) Over Thanksgiving Day weekend I released a new RubyGem called Cape . You may find it useful if you’re a user of both Capistrano and Rake . Install Cape by typing gem install cape at the command line, or make it a dependency of your project by using Bundler . What can Cape do? Mirror Rake tasks as Capistrano recipes, optionally…
UPDATE: There’s an updated implementation of this in the latest revision of the Gist . The new implementation provides for generic delegation (fast) as well as reflection (slow). [ ]( http://www.imdb.com/title/tt0312172 ““Monk” (2002–2009)”) My wife speaks of two kinds of trash: “clean” trash and “dirty” trash. This is not a distinction I consciously would…
UPDATE: I didn’t realize that git-filter-branch(1) has the option built in: --tag-name-filter . The moral of the story is: RTFM to avoid writing unnecessary code. :-/ Perhaps you’ve noticed commits in your Git repository that you or a team member created with the wrong credentials. Perhaps you see personal email addresses instead of corporate email addresses among the commit authors.…
UPDATE: I used htty as an example project in this post, but its use of Bundler has since changed. Because htty is a gem , its dependencies are now defined in htty.gemspec , along with all htty ’s other RubyGems metadata. Application projects (such as Rails applications) should use the techniques described in this post; RubyGems projects should not. To understand why, read Yehuda Katz’s…
[ ]( http://www.imdb.com/title/tt0058805 ) Since its release three weeks ago, lots of people have started using my console application for HTTP called htty . It’s been called the perfect tool for exploring web services. Install it with one command . You’ll need Ruby and RubyGems. It’s known to work well under OS X against Ruby v1.8.7 and v1.9.2. There’s a new version out…
I’ve been hacking instead of writing during my spare time the last couple months. The result is a streamlined console application for exploring web services and web sites. It’s something of a cross between curl and the Lynx browser. Installation It couldn’t be much easier. You’ll need Ruby and RubyGems. It’s known to work well under OS X against Ruby v1.8.7 and v1.9.2.…
I recently did some refactoring of our .NET Compact Framework codebase. The goal was to tighten up our use of delegates a bit. In case you didn’t know, there’s never a need to declare custom delegates in C♯ code. By way of a quick review, delegates are C♯ ’s strongly-typed function pointers. Closures, callbacks, and events are all implemented using delegates. The delegate…
[ ]( http://www.flickr.com/photos/45025094@N00/4373613067 ) The tasty morsel of the day is a simple jQuery plugin . It makes suggestions to the user for how to strengthen a weak password. For the purposes of this example, strong passwords contain characters in all of four categories: capital letters, lower case letters, numerals, and punctuation characters. Several jQuery and JavaScript best…
Programmers who come to Ruby from other languages – particularly C++ , C♯ or Java – tend to misuse Ruby’s throw statement. They type throw when they mean to type raise . What’s the difference? Like C++ , C♯ and Java, Ruby has first-class support for exceptions. Exceptions can be thrown using the raise statement and caught using the rescue keyword. Rubyists often speak of…