On Thursday, March 6, 2014 5:58:23 AM UTC-5, Andreas Wenk wrote:
>
> just some bikeshedding ... sry - your answers are all very good!
>
> On Wednesday, March 5, 2014 6:40:16 PM UTC+1, mike wrote:
>>
>>
>> By default, if you run this in Ruby, you will get what you expect.  It 
>> will open the file, then read its contents.  Javascript won't.  It will 
>> issue the command to the operating system to open the file, then attempt to 
>> read the contents whether the file has finished opening or not.  In 
>> javascript, you have to program the second statement as a function callback 
>> to the first statement.
>>
>
> please don't interchange JavaScript with node.js. What you mean here is 
> node.js - not JavaScript. JavaScript (ECMA Script) is not able to interact 
> with the os in any way but node.js is.
>
> Just wanted to make that clearer ...
>
> Cheers
>
> Andy
>

I stand corrected, you are quite right.  node.js is built on a version of 
Chrome's javascript runtime engine so that it's core language is identical 
to javascript.  Javascript is, primarily, asynchronous and therefore, 
node.js, is by inheritance.  However, the example I gave is clearly 
node.js, not javascript.

There's another correction.   The penultimate sentence of the fourth 
paragraph should read, "Managing dependencies with the Ruby bundler is way 
easier than npm (not node.js).  

Thanks,

Mike

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/d7056025-42b8-4adf-bf35-f66dc03883df%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to