RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  

galori — 5 posts

"swift-ruby" is designed to bring over some good features from Apple's new Swift language to Ruby:

I implemented only one thing, the ? Optional method operator..please jump in and submit some Pull Requests!


I just came from Apple's WWDC and watched their introduction of the new Apple Swift programming language.

From Chris Lattner, a Swift developer at Apple personal site: "Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list."

The ? Optional operator is equivalent to ActiveSupport's "try":

The active support version would look like this:

e =

The Swift-Ruby version:

e =

So, clone the repo:, see Apple's reference:, and submit some PR's.
I was surprised at how minimal the code actually is. Here are the steps:
I just posted two new blog posts covering some useful git actions:

Using git to tag deploys and then using the "--contains" switch to determine the exact time & date a certain feature went live:

..and a collection of useful git commands and workflows, including Diffing Diff's, common ancestors of commits or branches, recommitting a commit, viewing a file in another branch without actually checking it out - and more:
array#only for ruby
A small post providing a semantic replacement for array.first when you only expect it to contain one item.
simple-useragent” gem - provides the ability to for cleaner browser specific CSS targeting*. For example, instead of the targeting IE7 with a CSS hack such as: *:first-child+html #content {height: 500px;} /* IE7 */ - you can now do this: .ie7 #content {height: 500px;}