Ruby 1.9 lands NaCl support, can run in Chrome
svn.ruby-lang.org
svn.ruby-lang.org
However, I can't help but notice that Ruby, as a programming language, is getting ported everywhere. It runs on all desktop operating systems, it runs on top of the JVM and on top of Android. For iOS there are 2 competing versions already. For .NET the interest was low, so IronRuby is kind of dying, but it's still decent for a .NET implementation. Ruby MRI evolved a lot from 1.8 to 1.9, being a decent VM for a scripting language. Rubinius is much like Smalltalk, having the standard library in Ruby itself, allowing you to access the internals of the VM. JRuby is awesome.
Then there are the specs. Amongst the scripting languages people use today, Ruby has some of the best specs. It started with RubySpec, which are test suites started by the people working on Rubinius and now used by everybody else. And now Ruby is becoming an ISO standard. This makes me happy because when it comes to equivalent dynamic languages, there is no spec other than the reference implementation, making third-party implementations an unfeasible task. Perl 5 is a really good example of this.
So does anybody else find this exciting? As a language, Ruby is really mature these days, while still being fun and productive. Much like Smalltalk was back in the day.
But since that's not going to happen, I instead lean heavily towards the path of least resistance when it comes to languages. I write iOS apps in Obj-C, CRUD apps in Rails, DSP code in C++, and web front end in JS. The cost of context switching is less than the cost of swimming upstream all the time.
But here's the thing - there's always Deadline. :)
I wouldn't recommend iOS apps written in Ruby either, but the learning curve is too great for Obj-C. Not only do you have to learn a complicated API, but you also have to learn a new language, that's C with features from Smalltalk, and then get familiar with a new IDE. For beginners wanting to get shit done, without much time on their hands, that can be death by a thousand cuts.
Cocoa Touch is a different story though. Even an experienced UI programmer will probably need a few solid months of study to get up to speed.
In my limited experience it's easier to get going in Android but things get more fiddly as they get more complex. For example, gesture handling is a lot easier on iOS.
I really find strange how someone can have a hard time doing this type of context switch.
NaCl is open-source, which makes it literally immune to EEE. Google couldn't pull that off even if they wanted to.
The take-away here is to note that open-source does not preclude an EEE strategy. Once Google creates a specification for NaCl and Pepper, then we're talking. Until then, it's quite worrying.
* Perl6 - http://perl6.org/specification/
(ignore my previous tower of babel whining wrt this particular application which sounds completely awesome)
Does this sound scary to anyone else?
The difference in running Erlang here is simply that the browser would be joining a network of agents and spawning agents of its own, instead of joining a network of processes and spawning threads/web-workers of its own. This would allow a uniformity of process logic, such that an agent could be transparently running on a browser or on a server to complete a task, and messages could be being passed transparently across the network to facilitate this, without any of the code having to differentiate the cases.
NaCl ensures the browser sandbox environment remains in place--so, other than perhaps getting a bit hot, your computer won't be doing anything it wasn't already doing just running the Javascript the server served it.
For certain values of arbitrary; actually the code is restricted to the NaCl sandbox and the Pepper API.
What's up with that?
http://yugui.jp/nacl/example.html
Chrome/Chromium(?) 19+ required, I think.
It is just that the other browsers haven't implemented it yet. Blame them, not Google (or blame users who don't use Chrome, without whom this would be a non-issue).
Coming from the Chocolate Factory company does not make it suddenly good.
If you want native code just use native code on the desktop. The web is for documents and network protocols.
It would be fantastic if someone did the same thing with the jvm. Then I could use Java or Clojure or whatever JVM-based language I wanted - and make use of tons of pre-existing libraries.
NaCL is the sandbox I want, not the craplet sandbox. With NaCL I can use C libs and access useful OS services without having to sign the app and ask the user for permission to delete their hard drive.
So this means that any website could embed Ruby code (more strictly speaking, it could embed a Ruby interpreter) to be executed client-side on a browser supporting NaCl.
That said there could be a Chrome app that is a Ruby interpreter running on NaCl.
Ironically enough that's exactly what NaCl itself is.
On the other hand, this really sucks. Javascript is just maturing to where it is really awesome! And there is a ton of collaboration among app developers because javascript was the only game in town for so long.
Of course people will continue to collaborate but not, I fear, at the same level. 3rd party libraries will continue to be available, but not as many will fit in so neatly with people coding in other languages.
This has already come up a few times with coffeescript and in a couple years when it is truly easy for people to work in other languages, we'll have a tower of babel effect.
JS is really good. It isn't that hard to learn if you already know other languages. It has warts but it is also very powerful so often it is worth it (check out the lines of code and speed vs other languages):
I htink the pie is big enough for both NaCl and javascript apps.
It is, but you can also port existing applications to JS.
> I htink the pie is big enough for both NaCl and javascript apps.
It's a different pie. NaCl is chrome-only (and just enabled in the chrome store, in fact), while JS runs in all browsers.
You can't just port things to JavaScript the same way. JavaScript is a very different sort of language. "porting" something to JavaScript pretty much always means remaking the whole thing from ground up and hoping that your pixel pushing in canvas runs at an acceptable speed.
If you think you could write better programs then write better programs and contribute them.
It is a crap language designed in an afternoon and nowhere near good enough to solve the problems we currently use it for.
Just a few things of my head: 'this', 'var', no integers, semicolons, no block scope.
There's no point in dismissing JS due to simple lexical issues; those have in no way prevented us from maturing the language use through idioms, patterns, tools and collective knowledge.
JS is more than good enough as a basis for CoffeeScript and Emscripten - so why should we care whether scope context or a lack of block scope can be initially confusing?
"No integers" is bad.
"this" can swing either ways. It provides some cool possibilities.
"semicolons" however (either the presence or the removal of) is a totally inconsequential and trivial syntactic thing.
Removing semicolons doesn't even buy you what a small amount of syntactic sugar buys you. You saved a few keystrokes. Big fucking deal.
This lets you do bar = instance.foo; bar(x) and it'll still work. Much more consistent.