can we use direct ruby instaed of javascript ?

S

Sniper Abandon

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 ?
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

by

Mokkai @ TLI
 
D

Dhruva Sagar

[Note: parts of this message were removed to make it a legal post.]

Hi,

I am sure there are quite a few projects out there to do what you wish to.
Quite sometime back I came across this -
http://ejohn.org/blog/ruby-vm-in-javascript/

<http://ejohn.org/blog/ruby-vm-in-javascript/>That should help you out, I
haven't used it or worked on it extensively, but it is close to what you
wish to do.

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 ?
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

by

Mokkai @ TLI


--
Thanks & Regards,
Dhruva Sagar <http://dhruvasagar.net>
----------------------------
Technical Developer - Mentor,
Artha42 Innovations Pvt. Ltd. <http://www.artha42.com/>

Become an expert in Rails. Join our 3 day Rails workshop and learn Ruby,
Rails 3, Cucumber and Git.
http://www.railspundit.com
 
S

Sniper Abandon

thx , but i thing HotRuby is dead. There are no updates from last 3
years
 
D

Dhruva Sagar

[Note: parts of this message were removed to make it a legal post.]

Hmmm, I only know of that.

thx , but i thing HotRuby is dead. There are no updates from last 3
years


--
Thanks & Regards,
Dhruva Sagar <http://dhruvasagar.net>
----------------------------
Technical Developer - Mentor,
Artha42 Innovations Pvt. Ltd. <http://www.artha42.com/>

Become an expert in Rails. Join our 3 day Rails workshop and learn Ruby,
Rails 3, Cucumber and Git.
http://www.railspundit.com
 
M

Mike Stephens

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.
 
P

Peter Zotov

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.

http://github.com/whitequark/coldruby
 
P

Peter Zotov

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.)
 
J

Julian Leviston

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:

http://tinlizzie.org/ometa/ometa-js-old/

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"

Julian.

----------------------------------------------
Buy my new album! 16 Sep 2010:
http://itunes.apple.com/au/album/erste-zeit/id393326346







=20
The Ruby license, of course. It is implicit.
(Indeed, I just forgot to add it to git. Fixed already.)
=20
I haven't looked closely enough to know which way this goes, but one = of
two sets of conditions are likely to apply here:
=20
1. 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.
=20
2. It's not "implicit", and needs license notification.
=20
I'm not a lawyer, but I spend a lot of time trying to avoid giving
lawyers reason to contact me with bad news.
=20
--=20
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
 
J

Julian Leviston

Hi,

Consider this:

some_data.to_s.split("\n").each{|item| puts item}

how about an alternative syntax for the dot operator:

each{|item| puts item} of split("\n") of to_s of some_data

or, more intelligently:

this_school.students.addresses.map{|address| a.all_as_one_sentence}

map{|address| all_as_one_sentence of address} of addresses of students =
of this_school

Just wondering if this is a possibility? :)

julian.=
 
P

Peter Zotov

I haven't looked closely enough to know which way this goes, but one
of
two sets of conditions are likely to apply here:

1. 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.

2. 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.

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.

Thanks for your efforts.
 
J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

Hi,

Consider this:

some_data.to_s.split("\n").each{|item| puts item}

how about an alternative syntax for the dot operator:

each{|item| puts item} of split("\n") of to_s of some_data

or, more intelligently:

this_school.students.addresses.map{|address| a.all_as_one_sentence}

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)
 
J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

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:

http://tinlizzie.org/ometa/ometa-js-old/

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"

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?)
 
J

Johnny Morrice

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!

* Check the list of GHC features http://www.haskell.org/ghc/

** 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.
 
J

Johnny Morrice

In Haskell, for example, everything happens lazily, data is
immutable, there is a complex type system.

Also, if you've already proved the program shouldn't crash due
to type errors, you don't need to check any types as you run.
 
R

Ryan Davis

Hi,
=20
Consider this:
=20
some_data.to_s.split("\n").each{|item| puts item}
=20
how about an alternative syntax for the dot operator:
=20
each{|item| puts item} of split("\n") of to_s of some_data
=20
or, more intelligently:
=20
this_school.students.addresses.map{|address| a.all_as_one_sentence}
=20
map{|address| all_as_one_sentence of address} of addresses of students = of this_school
=20
Just wondering if this is a possibility? :)

No. You want python or (*gulp*) applescript.
 
V

Vincent Manis

[Note: parts of this message were removed to make it a legal post.]


No. You want python or (*gulp*) applescript.

Actually, you want COBOL. Think about that :) -- vincent
 
Y

Yossef Mendelssohn

No. You want python or (*gulp*) applescript.

AppleScript was my first thought, and this "of" stuff is quite
possibly what I hate the most about trying to do anything in that
language.
 
A

Alexey Petrushin

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?
 
M

Michal Suchanek

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?)

This is incredibly cool but can you really translate any language into
machine code?
What about languages that are completely different from machine code?
In Haskell, for example, everything happens lazily, data is immutable,
there is a complex type system. Can you really map this right to
machine code? (Or am I misunderstanding your question?)

Thanks

Michal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top