Oct 20, 2011

Roslyn compiler as a service

Summary: Roslyn, Microsoft’s project to open up the VB and C# compilers to support ‘compiler as a service’ scenarios, looks to be a post-Visual Studio 2012 deliverable.

Microsoft execs have been tight-lipped when I’ve tried to pin a ship date on “Roslyn,” the Microsoft “compiler as a service project.”

But we now know that Roslyn most likely will be a post-Visual Studio 2012 thing, according to slides and a presentation from Microsoft’s Build conference in September. (Yes, I’m still wading through all the Build information and presentations. There was a lot there.)

A quick Roslyn refresher: The Roslyn effort is about re-architecting the C# and VB compilers to support “compiler as a service” (CaaS) scenarios. Currently, a compiler is a black box; with Roslyn, Microsoft is working on opening it up so that all of the information processed via a compiler is available in application programming interface (API) form.

Here are few slides from the Build session that covered Roslyn, including one that shows an empty circle which seemingly designates the still-unannounced date when Roslyn will be delivered:








(If you’re curious about the codename itself, Roslyn is named for a mining town outside of Seattle that is featured in “Northern Exposure,” according to Microsoft Technical Fellow Anders Hejlsberg.)

Hejlsberg told Build attendees that Microsoft will release a Community Technology Preview (CTP) test build of Roslyn in mid-October this year. He demonstrated Visual Studio Roslyn during his session at Build, and showed off how Microsoft is building APIs — including a syntax tree API, symbol API, binding and flow API and an emit API — that mirror what its compiler pipeline offers. In addition to dogfooding these APIs itself, Microsoft also is going to make them publicly available, allowing others to build their own refactorings and tools using this information, Hejlsberg said.





Microsoft recently made available to testers a developer preview build of its “Visual Studio 11″ suite. (This is the product that will likely be named Visual Studio 2012 when it ships next year.) Microsoft officials are making enhancements to the core languages (VB, C++, C# and F#) in the suite, as well as making JavaScript a “first class citizen,” now that JavaScript is key to writing apps for Windows 8)


Src: zdnet.com

Oct 15, 2011

Welcome to Renee!

Renee is a new Rack-based library for describing web applications. Sinatra delivered a new simple way to think about building web applications. The popularity of Sinatra both as a library and as a concept shows now enduring the concept really was. Sinatra was different from Rails because the entire DSL was lightweight, easy to read and combined routing and actions into a single file. However, let's consider an example from Sinatra to see where we can improve upon this.

Consider:


get '/blog/:id' do
 Blog.get(params[:id])
end

This is not too bad so far. The repetition of :id is a bit un-DRY, but not bad. Let's keep expanding upon this.

get '/blog/:id' do
 Blog.get(params[:id])
end

put '/blog/:id' do
 Blog.get(params[:id]).update_attributes(params)
end

Now, we've retrieved blog in two places. Time to refactor. We'd normally create a before filter, with the same path.


before '/blog/:id' do
 @blog = Blog.get(params[:id])
end

get '/blog/:id' do
 @blog
end

put '/blog/:id' do
 @blog.update_attributes(params)
end


Now we've repeated the same path three times. With Renee, we can describe these kind of ideas in a simple, easy-to-read way. Here is the equivalent in Renee.


path 'blog' do
 var do |id|
 @blog = Blog.get(id)
 get { halt @blog }
 put { @blog.update(request.params); halt :ok}
 end
end


This web library is inspired by Sinatra, but offers an approach more inline with Rack itself, and lets you maximize code-reuse within your application.

Platform-as-a-service cloud providers are adding Python, Java, and JRuby development capabilities

Platform-as-a-service cloud vendors Heroku and Engine Yard have been branching out to accommodate more developers by backing more programming languages.

Heroku, the cloud application deployment platform owned by Salesforce.com since early this year, added Python support this week and Java support late last month. Engine Yard as of this week is accommodating JRuby, a version of the Ruby language for the Java Virtual Machine.

Both Python and Java are in a beta stage on Heroku, although developers can use them now. In addition to these languages, Heroku supports development via Ruby, Node.js, and Clojure. Developers also can use PHP when developing applications for Facebook. Applications deployed on Heroku include consumer-facing Web applications as well as some enterprise business applications for the Web.

"We basically believe that moving forward, all software is Web software," said James Lindenbaum, Heroku co-founder. Heroku was acquired by Salesforce.com in January for $250 million.

Engine Yard, in adding JRuby support, bills itself as the first platform to make available all stable, production-ready implementations of Ruby. JRuby project leaders Charles Nutter and Thomas Enebo both work at Engine Yard, after having previously worked for Java founder Sun Microsystems.

Engine Yard, which has been running primarily Ruby on Rails Web applications, wants its customers to shift over to the JRuby variant of the language.

"[JRuby] is the only Ruby that is fully concurrent, which we believe is a bare minimum for running cloud applications," said Nic Williams, Engine Yard vice president of technology. Ruby is very resource-intensive and memory-hungry, he said. "With JRuby, it's much more efficient, much more performant, uses far less memory."

Engine Yard also supports development via PHP.

Src: InfoWorld

Heroku gets Scala


It was announced today at JavaOne that Heroku,SalesForce.com's recently acquired PaaS provider, is getting Scala support. Heroku is teaming up withTypesafe to add Scala support to the Heroku platform. Typesafe, "the Scala company", was co-founded by Scala creator Martin Odersky.


“Scala is well suited for cloud computing applications,” said Martin Odersky. “Its unique integration of object-oriented and functional language features makes it a scalable and productive way to code for cloud environments like Heroku.”


Adam Wiggins, Heroku co-founder and CTO declared “The Scala programming language, Typesafe's Akka middleware, and Heroku's platform are a powerful combination for developers building and delivering the next generation of applications and services on the web.”


Scala use seems to be rapidly growing since its high profile use in Foursquare, LinkedIn and Twitter. Heroku's adoption of Scala seems to be an indication of its recent successes.


This year Heroku, originally a Ruby PaaS provider, has added support for JavaScript/Node.js, Clojure, Java, and Python/Django.

Src: InfoQ

Upcoming Ruby Programming Competitions with Matz - Grand Prize - 1,000,000 JPY!


Dear Ruby Enthusiasts: 

 The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to invite you to enter the following Ruby competitions. If you have developed an interesting Ruby program, please be encouraged to apply.


  • Silicon Valley Competition (November 3, 2011 in Silicon Valley), Entry Deadline: October 17, 2011


Selected finalists will present their Ruby programs in front of Matz on November 3, 2011 in Silicon Valley (exact location to be announced later). Matz, together with a panel of judges, will select the winner. The winner will be invited to Fukuoka, Japan for an award ceremony to be held in March 2012 (hotel and airfare paid). If you enter the Silicon Valley competition, you will also be automatically entered in the Fukuoka competition described below.


  • Fukuoka Competition - Grand Prize - 1 Million Yen! (March 2012 in Fukuoka, Japan), Entry Deadline: November 15, 2011


You can enter the Fukuoka competition exclusively, or enter the above Silicon Valley Competition and be automatically entered in the Fukuoka Competition. Matz and a group of panelists will select the winners of the Fukuoka Competition. The grand prize winner will be invited to attend the award ceremony in Fukuoka, Japan in March 2012 (hotel and airfare paid). The grand prize for the Fukuoka Competition is 1 million yen(approximately $13,000!). Past grand prize winners include Rhomobile (USA) and APEC Climate Center (Korea).

Programs entered in these competitions do not have to be written entirely in Ruby but should take advantage of the unique characteristics of Ruby. Projects must have been developed or completed within the past 12 months to be eligible.

Please visit the following Fukuoka website for additional details or to enter:

http://www.myfukuoka.com/events/2012-fukuoka-ruby-award-competition

Cheers.

Sep 10, 2011

Scalr - open source software that scales web infrastructure

Need to scale? Scalr might be for you.

Scalr is open source software that scales web infrastructure.

 It helps you create and manage super-scalable infrastructure that provisions and configures everything -from cache to database- to handle spikes in demand; then decommissions servers when load decreases to lower cost.

When to use
Project launch
When you're ready to launch, Scalr will provision all the resources from the Cloud for a smooth product launch, even if a million users sign up the first day.

High Growth
Scaling websites is hard and expensive. Using the power of Cloud Computing, Scalr automatically scales your website infrastructure: it scales your database, scales your app servers, and even adds and configures load balancing and caching servers!

Fault-tolerance, backups, uptime, and efficiency
Scalr provides you with a high uptime, fault-tolerant website: Scalr monitors all your servers for crashes, and replaces any that fail. It backups your data at regular intervals, and uses Amazon EBS for database storage. And to make sure you never pay more than you should, Scalr lowers costs by decommissioning servers when load subsides.

Documentation
You can learn all about how Scalr scales your website, or how to use the API, at http://wiki.scalr.net

PoolParty - Cloud management. Simplified

PoolParty is a declarative cloud infrastructure.

It helps you to run a self-healing, auto-scaled and monitored cloud simply, in the clouds, on nearly any hardware, such as EC2, eucalyptus and vmware

PoolParty provides an executable description of a cloud computing infrastructure in a single file:

pool "myapp" do
  cloud "app" do
    using :ec2
    instances 1..1
    security_group do
      authorize :from_port => 22, :to_port => 22
    end
  end
end

Deployinator - Deploy code like Etsy

Deployinator is a deployment framework extracted from Etsy.

Here is a blog post explaining the rationale behind it and how it helps us out.

For anyone deploying code (engineers, designers… anyone really), it’s an easy process.
Once your code is ready to go, you go to Deployinator and push the button to get it on QA. From there it visits Princess (see the sidebar).

Then, when it’s ready to go live, you hit the “Prod” button and soon your code is live, and everyone in IRC knows who pushed what code, complete with a link to the diff.

For anyone not on IRC, there’s the email that everyone gets with the same information.

RubyJS

RubyJS translates Ruby code into Javascript code.

NOTE that it executes the Ruby code before it translates it into Javascript.

This has the advantage of being able to (mis-)use all of Ruby's meta-programming tricks in the global scope (i.e. for defining classes and methods, NOT within methods!).

Rack-webconsole, a Ruby/Rails console inside your browser


Rack-webconsole is a Rack middleware that enhances your development experience providing a JavaScript-powered bridge to your Ruby application backend.

With it you can interact with your database and explore the runtime environment from within the browser.

Although it should be used mainly in development environments, I personally think it could be a useful tool for staging as well.

Avoids the pain interacting with some console over an SSH session :) Here you have a little video showing how it works (watch in HD, otherwise you won't see the tiny letters!):

 

Tripwire - Stop hurting your users


Jeffrey Chupp and Jeremy Weiskotten recently built a new web service aimed at supporting developers, called Tripwire.

It integrates with Rails and remotely logs your form validation errors.

With this information, you can find out where your users are having the most trouble and streamline your web application.

Tripwire is in private alpha but will be open to the world soon.

Yes, Slim is speedy


Slim
Slim is a template language whose goal is to reduce the view syntax to the essential parts without becoming cryptic.

What?

Slim is a fast, lightweight templating engine with support for Rails 3. It has been tested on Ruby 1.9.2 and Ruby/REE 1.8.7.

Slim's core syntax is guided by one thought: "What's the minimum required to make this work".

As more people have contributed to Slim, there have been optional syntax additions influenced from their use of Haml and Jade. The Slim team is open to these optional additions because we know beauty is in the eye of the beholder.

Slim uses Temple for parsing/compilation and is also integrated into Tilt, so it can be used together with Sinatra or plain Rack.

Sample View:

doctype html
html
  head
    title Slim Examples
    meta name="keywords" content="template language"

  body
    h1 Markup examples
    #content.example1
      p Nest by indentation

    = yield

    - unless items.empty?
      table
        - for item in items do
          tr
            td = item.name
            td = item.price
    - else
      p No items found

    #footer
      | Copyright © 2010 Andrew Stone

    = render 'tracking_code'

    script
      | $(content).do_something();

Sep 2, 2011

FUEL PHP - An MVC Framework

The Model-View-Controller pattern is pretty much dominating professional, customer facing website design these days.

FUEL is a simple, flexible, community driven PHP 5.3 web framework based on the best ideas of other frameworks with a fresh start.

Sep 1, 2011

Should we use a database at all?

When people start an enterprise application, one of the earliest questions is "how do we talk to the database".

These days they may ask a slightly different question "what kind of database should we use - relational or one of these NOSQL databases?".

But there's another question to consider: "should we use a database at all?" Continue...

Aug 30, 2011

nide - Beautiful IDE for Node.JS

nide is a web-based IDE for Node.js, designed with simplicity and ease-of-use in mind.

The current version of nide was designed and developed in only 48 hours, at the Node.js KO coding competition.

Fulcrum - Alternative to Pivotal Tracker Project Management Tool

Fulcrum is an agile project management tool. It provides a real time overview of your project plan (product backlog), instantly adjusting the project plan based upon your team's prior performance.

Fulcrum aims to create an experience as instantaneous and interactive as the traditional tool for agile project management, the whiteboard.

Aug 29, 2011

Rails 3.1.0.rc8 has been released !!!


This is the final release candidate. Rails 3.1.0 will be release next on August 30th :-)


rubygems-pwn: A Vulnerability in RubyGems

If you've seen people saying to run  gem install rubygems-pwn  on Twitter (which I don't advise!), it's because it's a proof of concept for a vulnerabilty in RubyGems.

The rubygems-pwn project on GitHub has more information about it, but essentially you can push arbitrary Ruby code into gemspec parameters which will then be executed later on.

The vulnerability has been discussed in the rubygems repo where a fix has already been made but, hopefully, more general fixes should be made available soon. (If you want to see the direct example of a malicious gemspec, look here.)

Source: RubyFlow

Aug 25, 2011

Digging Into The Rails Command Line

Have you ever wondered what happens behind the scenes when you start your server using the following command: ?

rails s

Storks has written an excellent article on how the command is hooked up with the rails application.


Source: Storks