Opal: Ruby in Your Browser – the Basics
sitepoint.com
Opal: Ruby in Your Browser – the Basics
1–10 of 47 posts
Re: Opal: Ruby in Your Browser – the Basics
#2That said, it's very much a cool hack, and worth doing on that basis alone.
Re: Opal: Ruby in Your Browser – the Basics
#3Re: Opal: Ruby in Your Browser – the Basics
#4I'm not terribly convinced by these things that compile to javascript. I don't much care for javascript, but I'd rather take the bull by the horns than deal with a bunch of generated code, especially in any kind of commercial setting where it's going to be a lot easier to hire JS people rather than people who are both X-lang and JS experts. That said, it's very much a cool hack, and worth doing on that basis alone.
Unfortunately I think JS is having a lot of responsibility heaped on its slightly creaky shoulders these days, due to the growth in mobile intarwebsing and every man and his dog looking for a quick way to build the app that is going to bring them fame and fortune. As a result of this, we're seeing a lot of these frameworks which compile [arguably!] 'better' fuller-featured languages down into JS.
Personally I'd rather a scenario where people could code in and embed this in HTML as easily and ubiquitously as JS can be embedded. A bit of a pipe-dream I know, but wouldn't it be great if we could exploit the cross-platform accessibility of web apps, without having to turn everyone into a Javascript hacker?
Re: Opal: Ruby in Your Browser – the Basics
#5One big problem with this is that you still end up having to use raw JS anyway. Debugging is usually a big hassle too.
Re: Opal: Ruby in Your Browser – the Basics
#6 `#{context}.lineTo(#{x}, #{height})`
...you're doing it wrong. Please do figure out a way to "automagically" make things work without `...` or just don't bother.`...` should be a last resort option for when you just need to do something that can't be done any other way, not something that should be peppered over the entire code.
Re: Opal: Ruby in Your Browser – the Basics
#7Re: Opal: Ruby in Your Browser – the Basics
#8One big problem with this is that you still end up having to use raw JS anyway. Debugging is usually a big hassle too.
He may add source maps and debugging will not be cumbersome. Handling Coffeescript is not difficult if you can jump and add breakpoints in your browser over the original code.
Re: Opal: Ruby in Your Browser – the Basics
#9If one needs to write code like: `#{context}.lineTo(#{x}, #{height})` ...you're doing it wrong. Please do figure out a way to "automagically" make things work without `...` or just don't bother. `...` should be a last resort option for when you just need to do something that can't be done any other way, not something that should be peppered over the entire code.