i am a ROR Developer .
I feel happy to develop in ROR over other frameworks because of the
simplicity of Ruby Language
For browser side code i am using Javascript/ActionScript .
but i would like to use Ruby in browser side also (instead of
Javascript/ActionScript)
Is there any way to do this ?
or
Is there any active development /future plan to implement Ruby VM on
browser engine (instead of javascript/actionscript engines ) ?
if yes? then i also want to join in that community/dev team .
if not? please some body initiate a plan to develop a Ruby VM for
browser engine (so i can join with you)
i know already that prototype/jquery frameworks are there but those are
not
looking like pure ruby code
Anyone have an Idea/Suggestion/Intrest ?
please let me know
If you have been to any large corporate’s offices of late, you would
notice that pcs are so locked down it’s surprising you’re still allowed
to touch the keyboard.
If you tried to require such users to load Ruby, you would immediately
lose a huge target audience. Would all those employees wait until they
got home to user your site, or log on to a more friendly competitor?
If you want to code in Ruby, I suggest you need to think about a
pe-processor that turns Ruby into JavaScript prior to sending the page.
I am sure there are quite a few projects out there to do what you wish to.
Quite sometime back I came across this - John Resig - JavaScript Programming
On Thu, 7 Apr 2011 15:44:50 +0900, Sniper A. wrote:
Hi Ninjas,
i am a ROR Developer .
I feel happy to develop in ROR over other frameworks because of the
simplicity of Ruby Language
For browser side code i am using Javascript/ActionScript .
but i would like to use Ruby in browser side also (instead of
Javascript/ActionScript)
Is there any way to do this ?
I have a project called ColdRuby which is essentially a Ruby 1.9
bytecode
to JavaScript translator. It cannot (yet) even load mspec/RubySpec, but
is
already somewhat usable.
On Fri, Apr 08, 2011 at 05:37:49AM +0900, Peter Z. wrote:
On Fri, 8 Apr 2011 01:48:58 +0900, Chad P. wrote:
I don’t see any license listed. Did I overlook it?
The Ruby license, of course. It is implicit.
(Indeed, I just forgot to add it to git. Fixed already.)
I haven’t looked closely enough to know which way this goes, but one of
two sets of conditions are likely to apply here:
It’s “implicit” because it incorporates Ruby Licensed code in a way
that requires the Ruby License to be applied to the whole project. In
this case, you violate the terms of the license if you do not include
the
license text with the code.
It’s not “implicit”, and needs license notification.
I’m not a lawyer, but I spend a lot of time trying to avoid giving
lawyers reason to contact me with bad news.
I have a project called ColdRuby which is essentially a Ruby 1.9
bytecode to JavaScript translator. It cannot (yet) even load
mspec/RubySpec, but is already somewhat usable.
I think it might be actually quite interesting for the original poster
to take some of FONC’s work such as OMeta, and then the Rubinius
project… and use it to build Ruby in OMeta, which could then be used
quite easily to plug this Ruby implementation in OMeta into the
JavaScript implementation OMeta which is already existing…
For an example of SmallTalk already written in OMeta/JS (ie SmallTalk
running inside Javascript, through OMeta), please see:
Given that JavaScript is pretty much the only fully realised
cross-browser cross-platform implemented programming language that we
have available to us (ie guaranteed to be on EVERY machine for the last
10 years), and also given that so much work is continually put into
making these interpreters fast and small, I think writing things on top
of JavaScript is a brilliant idea.
The other interesting thing about targeting OMeta as an implementation
language for a VM in Ruby, while incredibly technically challenging, is
that it would be infinitely rewarding, as there are versions of OMeta
written in most common programming languages already (which means the
target language base of the Ruby implementation in OMeta would grow
without any additional effort on the part of the programmers)… people
are writing OMeta implementations in various languages, and there are
already ones written in:
OMeta itself, C#, SmallTalk, Scheme, Lisp, Python and Ruby (I’m fairly
sure there are some written in id.st (or Cola, whatever you want to call
it) as well ;-))
Just my two cents.
“You are now able to program any browser in the world with any language
you want”
I’m not a lawyer, but I spend a lot of time trying to avoid giving
lawyers reason to contact me with bad news.
Please, treat all my words about implicit license as a form of bad
humor.
It does not incorporate any external code, just mine, and I always
intended
to use the Ruby license, but it somehow got not included in the git
tree.
map{|address| all_as_one_sentence of address} of addresses of students of
this_school
Just wondering if this is a possibility?
julian.
I don’t think my brain would be very fond of this, I like starting with
the
thing I know and applying a series of transformations to it via methods
to
turn it into the thing I want. I feel like I’d have to keep jumping to
the
right to see what I have, and then back to the left to see what I’m
doing to
it.
join of map(&:name) of students
join of map(&:name) of courses
They are the same until the very end, so you can’t know what you’re
talking
about until after you’re done talking about it.
But maybe if I experienced I’d become more familiar some way of thinking
that fits better with this syntax. Maybe in practice, it would only be
used
in situations like name of student where it feels natural and the
context
is straightforward, and not in situations like join of array where
join is
an action rather than an attribute.
IDK, I’d try it out if someone went and did it, but I don’t think I’d
advocate that someone put forth the effort to do it otherwise (though it
might not be very difficult, might just require a handful of lines of
yacc
or something)
That is incredibly cool! But can you really implement any language?
What about languages that are completely different from javascript?
In Haskell, for example, everything happens lazily, data is
immutable, there is a complex type system. Can you really map this
right to javascript? (or am I misunderstanding OMeta?)
My take here is full of handwaving. I’ll admit I’ve never of O-Meta
before.
Comp sci point of view:
OMeta is turing complete? If so then by universality it is possible.
Further, OMeta can run C#, it doesn’t take a huge stretch of the
imagine to say it can run C. Haskell can compile to C*. Therefore it can
run Haskell.
The best way to do it though would be to port the STG-Machine** into
O-meta. Fun!
** See “Implementing lazy functional languages on stock hardware: the
Spineless Tagless G-machine”, Simon Peyton Jones 1992. The link on SPJ’s
website is dead unforunately
I’ve been tempted to port STG into ruby before. Or maybe just
G-Machine because it’s simpler. It just sounds like a fun little
project.
Sorry for yet another random long interjection on functional
programming. SIGH.
most common programming languages already (which means the target language
“You are now able to program any browser in the world with any language you
want” OMeta - JavaScript as Assembly - YouTube
Julian.
That is incredibly cool! But can you really implement any language?
What
about languages that are completely different from javascript? In
Haskell,
for example, everything happens lazily, data is immutable, there is a
complex type system. Can you really map this right to javascript? (or am
I
misunderstanding OMeta?)
Do we actually need to have full ruby spec implemented? Don’t forget
about the 20/80 rule of the universe - there are only 20 % of features
that provide 80% of value.
It seems that it’s impossible in any time soon to create a full-featured
Ruby JS. There were lots of project of this kind (HotRuby, RubyJS, Red,
… google github) and it seems that all of them are dead by now,
although some of them got some attention in past.
But look at the success of CoffeeScript, it doesn’t try to solve all
problems at once, but it eliminates the most annoying problems.
Maybe it would be better do it in the same way? Take the core part, that
can be easily implemented and leave the rest to the better time?
I mean - the most valuable part (for me) would be the ruby syntax,
blocks, naming conventions, core library method names and semantic. And
if there would be the Prototypical model instead of Ruby Object Model -
it’s not a big deal. The Prototypical model is also very powerfull, and
JS problems are mainly from the bad implementation of the Prototypical
model not from the model itself.