News for hackers. Stuff that matters.
Re:CoffeeScript -- You Are Totally Gonna Hate It by waxman on Saturday July 17, 2010 @11:39AM (#1523945)
Just wrote an API in CoffeeScript, using Node.js and Express.

It was surprisingly enjoyable. I can see this ecosystem giving Rails/Sinatra/Django a real challenge. CoffeeScript makes ssjs a lot easier once you get used to it, Node.js gives you free non-blocking/high concurrency, and Express, which just released 1.0, is quickly maturing into a really solid DSL/web framework.

I'm excited to see how this ssjs scene unfolds.

Re:CoffeeScript -- You Are Totally Gonna Hate It by jashkenas on Saturday July 17, 2010 @12:07PM (#1524006)
I'm excited to see how the judicious use of JavaScript will evolve webapps beyond the Rails/Sinatra/Django paradigm, and allow you to share the code for your application between the client and the server. V8/Node.js is just the cherry on top:

http://shootout.alioth.debian.org/u32/code-used-time-used-sh...

Thanks to the effort put in by the V8 team, JavaScript is now an order of magnitude closer to C speed than Ruby, Python, and Perl, and sits at the same tranche of performance as OCaml and Go.

Re:CoffeeScript -- You Are Totally Gonna Hate It by FraaJad on Saturday July 17, 2010 @02:53PM (#1524378)
The really interesting language in that comparison is LuaJIT. It is faster and more concise than Javascript. It's sad that a mature, small, concise language like Lua doesn't have more traction outside niches.
Re:CoffeeScript -- You Are Totally Gonna Hate It by pygy_ on Saturday July 17, 2010 @04:51PM (#1524614)
Lua fails in the "batteries included" domain. It is first and foremost developed as an extension language.

Furthermore, they are not really trying to promote the language beyond its current niches.

That said, there are good third party libraries and frameworks, and a Rubygems-like system called Lua Rocks.

Re:CoffeeScript -- You Are Totally Gonna Hate It by krakensden on Saturday July 17, 2010 @07:07PM (#1524833)
yeah, but so does Javascript
Re:CoffeeScript -- You Are Totally Gonna Hate It by brehaut on Saturday July 17, 2010 @08:59PM (#1524970)
But the one battery that is included in JS makes it unavoidable, and most programmers (the kind that don't read HN or proggit) are the kind to not want to learn another language. If you have the choice between using the quirky thing you know or learning something else, its a good bet most programmers will choose to use the tool the know, quality of the respective tools be damned ;)
Re:CoffeeScript -- You Are Totally Gonna Hate It by krakensden on Monday July 19, 2010 @10:06AM (#1528671)
"Batteries included" refers to a comprehensive standard library, which Javascript doesn't have.

The fact that Javascript is an in important feature in software that everyone runs is a whole different kind of advantage.

Re:CoffeeScript -- You Are Totally Gonna Hate It by beagle3 on Sunday July 18, 2010 @08:09PM (#1527155)
An included Web Browser with 99.99% of JavaScript interpreters is a pretty big battery.
Re:CoffeeScript -- You Are Totally Gonna Hate It by compay on Saturday July 17, 2010 @03:05PM (#1524410)
I really enjoy working with Lua, though the opportunities have been infrequent. While Node.js looks like a wonderful piece of technology, every time I hear about it I feel a bit bitter that yet another opportunity to popularize Lua has been missed.
Re:CoffeeScript -- You Are Totally Gonna Hate It by aaronblohowiak on Saturday July 17, 2010 @01:18PM (#1524191)
I'm working on a project that will let you share the same view code between rails, node and browsers. email me if this is something that you'd like to hack on (or check my github)
Re:CoffeeScript -- You Are Totally Gonna Hate It by jashkenas on Saturday July 17, 2010 @01:35PM (#1524222)
I presume you're referring to your EJSRB project:

http://github.com/aaronblohowiak/ejsrb/

I think that the usual way to share views between different languages is to use a language-agnostic templating engine, like Mustache, or Liquid.

How does EJSRB differ?

Re:CoffeeScript -- You Are Totally Gonna Hate It by aaronblohowiak on Monday July 19, 2010 @01:23AM (#1527708)
EJSRB is a full javascript context, and javascript is a language you probably already know. While our views are separate from controllers and models, they often need more advanced string manipulation than liquid or mustache give you. The fact that it is a full javascript context means you can define your own helpers, and have them still work on the client side. For instance, say you want to generate element ids from the json data. This belongs in a function that is accessible to your view layer, but you shouldn't have to program this twice (once for server, once for client.) AFAIK, there isn't a great way to accomplish this code sharing yet.
Re:CoffeeScript -- You Are Totally Gonna Hate It by mkramlich on Saturday July 17, 2010 @06:34PM (#1524801)
I'd rather see Python move to the web client-side than JavaScript move to the web server-side. I would not kick JavaScript out of bed though.
Re:CoffeeScript -- You Are Totally Gonna Hate It by drgath on Saturday July 17, 2010 @08:15PM (#1524924)
JS absolutely has its faults, and you can hope all you want. But just by the simple fact that JavaScript is supported in every popular browser, and the browser is the largest application platform on the planet, means JS will soon to be the defacto standard language. Server & client-side.
Re:CoffeeScript -- You Are Totally Gonna Hate It by Scramblejams on Saturday July 17, 2010 @07:38PM (#1524873)
You checked out Pyjamas?
Re:CoffeeScript -- You Are Totally Gonna Hate It by mkramlich on Saturday July 17, 2010 @09:12PM (#1524987)
checking it out now, thanks!