20 April 2014

The Ruby Reflector

Topic

CoffeeScript

  Source Favicon
By Dan Tello of Viget.com Blogs 12 days ago.
Email

…really fast! I just finished building a fairly complex JS app. It handled compiling SASS, CoffeeScript with source maps, Handlebars Templates, and running LiveReload like it was no big deal.

By harnessing the power of node's streams you get fast builds that don't write intermediary files to disk. - gulpjs.com

This killer way to break up your gulpfile.js

A gulpfile is what gulp uses to kick things off when you run gulp . If you're coming from Grunt, it's …

viget.com Read
  Source Favicon
By Loren Segal of gnuu.org 1 month ago.
Email

Atom is based on Node.js and WebKit, using JS ( CoffeeScript), HTML, and CSS to customize and implement most of the features. Generally speaking, this is a good foundation— the problem is, Atom seems to have gotten it all wrong when it comes to laying down a strong architecture for both the plugin API and core components. If I could summarize this editor in one sentence, it would be: "Promisingly extensible editor sitting on a very shaky technical foundation" .

Because …

gnuu.org Read
  Source Favicon
Email

CoffeeScript

I love CoffeeScript and as a company we have embraced it for our all our projects. Ember is no exception to that. CoffeeScript made our Ember application more readable and easier to work with objects. The only thing that is odd is the syntax for a computed property , but that is a minor issue and we quickly adjusted to seeing it as normal. fullName: (-> "#{@get('firstName')} #{@get('lastName')}" ).property('firstName', …

robots.thoughtbot.com Read
  Source Favicon
Email

…_.map(users, updateUser(db))

updateUser = (db) -> (user) -> db.update("users", name: user.name)

The resulting JavaScript for our updateUser function will look like this: var updateUser = function(db) { return function(user) { return db.update("users", { name: user.name }); }; };

It's a simple trick, but a prime example of how CoffeeScript's syntax can make certain tasks much cleaner!

robots.thoughtbot.com Read
  Source Favicon
By Nick Plante of Zerosum Dirt(nap) 3 months ago.
Email

We're using the jasmine-rails test runner with CoffeeScript here, because that's what works for me (sorry Karma). Pay close attention to the spec_helper.coffee , which does much of the dependency injection needed to provide clean and intuitively named interfaces in our example controller spec.

<html><body>You are being <a href="https://github.com/gist/8480021">redirected</a>.</body></html>

This gives us nice ways to interface …

blog.zerosum.org Read
  Source Favicon
Email

Angular is not the default choice, yet. DHH made some bold moves in the past, like making CoffeeScript on by default (thank you!). Can the same happen to Angular?

3. Rails will encourage JS frameworks but stays JS-framework-agnostic.

This is more or less what is happening already in the community. People use Rails together with many of the existing JS frameworks, with success.

4. All of the above

We can see DHH keep recommending RJS. The Rails core will make Ember

andrzejonsoftware.blogspot.com Read
  Source Favicon
By David of Signal vs. Noise 4 months ago.
Email

Sam's excellent Eco template system (think ERB for CoffeeScript).

If your web application is all high-fidelity UI, it's completely legit to go this route all the way. You're paying a high price to buy yourself something fancy. No sweat. But if your application is more like Basecamp or Github or the majority of applications on the web that are proud of their document-based roots, then you really should embrace SJR with open arms.

The combination of Russian …

37signals.com Read
  Source Favicon
By Giles Bowkett of Giles Bowkett 5 months ago.
Email

…and plays a standard drum rhythm -- while the other is a drum machine in Node.js and CoffeeScript, with some brief notes on how to modify it to make it algorithmic, and/or change it from a drum machine to a melody player.

Here's the Clojure animation hack:

This is the Node.js animation hack:

I originally started on the Node.js code for my Teaching The Robots To Sing video series. Here's a promo video for that, which demonstrates some of the basic Node.js code …

gilesbowkett.blogspot.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup 6 months ago.
Email

httparty-with-cookies - Automatic cookie management for your httparty requests.

Levelling up in Ruby/Rails - for free - Sources for experienced developers to brush up on their skills.

How to Build an App in 48 Hours - Advice for those gearing up to participate in the Rails Rumble.

Sword - Server for developing static sites with automatic handling of things like Sass and CoffeeScript.

Rails configuration in the proper way - Leveraging configuration files to clean up your code.

afreshcup.com Read
  Source Favicon
On Labnotes 7 months ago.
Email

§ Does CoffeeScript Have A Future? Valid question in light of ES6 brining new language features.

You can get started with ES6 on Node.js using the harmony flags , or if you want ES6 on server and/or browser, have a look at Traceur .

§ I think generators are overly complex for anything but lazy evaluation. All the code I've seen so far looks clever by half .

But if you're curious about plain asynchronous JavaScript, promises and …

blog.labnotes.org Read