Ruby in Browsers?

P

petermichaux

Hi,

I've had to start using JavaScript to make a DHTML interface. After
learning Ruby I feel like I'm taking a giant step back in productivity
and fun by using JavaScript. PITA.

Any moves out there to get Ruby imbeded in browsers?

How about Ruby as a client-side scripting web standard? (Maybe it would
have to be Ruby Light with the file accessors removed.)

Thanks,
Peter
 
G

Gregory Seidman

On Wed, Feb 08, 2006 at 12:58:26AM +0900, (e-mail address removed) wrote:
} I've had to start using JavaScript to make a DHTML interface. After
} learning Ruby I feel like I'm taking a giant step back in productivity
} and fun by using JavaScript. PITA.

That probably means you are using it wrong. Or you are running up against
cross-browser incompatibilities. JavaScript is a very nice language when
used properly.

} Any moves out there to get Ruby imbeded in browsers?
}
} How about Ruby as a client-side scripting web standard? (Maybe it would
} have to be Ruby Light with the file accessors removed.)

The biggest problem with JavaScript is incompatible APIs across browsers.
Adding Ruby to the mix would only make cross-browser compatibility more
difficult. Unless you could magically get everyone out there to
simultaneously switch to a browser that provided client-side Ruby scripting
in exactly the same way, it would only add to the mess.

If you really want client-side Ruby, start working on a
Ruby-to-ActionScript (or Flash bytecode) compiler.

} Thanks,
} Peter
--Greg
 
M

Mark Somerville

} I've had to start using JavaScript to make a DHTML interface. After
} learning Ruby I feel like I'm taking a giant step back in productivity
} and fun by using JavaScript. PITA.

I couldn't agree more. Writing Javascript is something I have no love for at
all.

That probably means you are using it wrong. Or you are running up against
cross-browser incompatibilities.

I could well be using it wrong. Maybe it is the browser inconsistencies. Maybe
it's because I find it a horror to debug. Whatever it is, It's a car crash of
a technology for me.

Mark
 
J

Jeff Barczewski

------=_Part_6640_27338705.1139333121969
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I agree, it would be nice if ruby could be used locally on the client as
seamlessly as javascript.

In the meantime there is a project called http://www.kavascript.com/ which
provides a way to write psudo ruby, run it through a compile step and
generate javascript. This would probably only work for standalone javascrip=
t
files and not embedded javascript. I don't know whether the benefits
outweigh the extra compilation step, but it is worth a try to see. I can't
comment further on the robustness of this project, nor have I used it yet
myself, but if you try it out maybe you can post something back to the list
about your experience.

Blessings,

Jeff

------=_Part_6640_27338705.1139333121969--
 
P

petermichaux

The biggest problem with JavaScript is incompatible APIs across browsers.
Adding Ruby to the mix would only make cross-browser compatibility more
difficult. Unless you could magically get everyone out there to
simultaneously switch to a browser that provided client-side Ruby scripting
in exactly the same way, it would only add to the mess.

What if the ruby community supplied the browser makers with a single
interpreter that they could plug in? Yes it might take a few years for
this to take wide spread effect but some applications can dictate the
user's browser. I'm working on one right now. These apps could go Ruby
earlier.
 
G

Guillaume Marcais

Paul said:
I've toyed with the idea of writing a plug-in for web browsers that
allowed you to run "Ruby Applets." The most primitive idea would be to
just call the Ruby intepreter whenever it encountered a .rb download or
an <embed> or whatever the kids are using nowadays.

A more sophisticated version could provide some interface to the
browser objects. Security would be nice.

Is there any such project out there?

Maybe a source of inspiration can be the TCL plugin
(http://www.tcl.tk/software/plugin/). But if I remember some discussion
in TCL conferences, to get browser manufacturer to include this
particular plug-in was just a pie in the sky, and installing a plug-in
to see a web site seems too high of a hurdle for many (most?) average users.

Don't get discouraged by it though. Go out and embed ruby in a plug-in
if you feel the urge. It could in did be a lot of fun!

Guillaume.
 
G

Gonzalo Rubio

Paul said:
I wouldn't be interested in getting browser manufacturers to include
the plug-in immediately. It would be rare to get something that would
have a hard takeoff like that. The idea would be to do something
similar to Java and the Java plug-in. If people like it then they use
it. If they don't, then whatever. If it get's popular, then maybe the
browser manufacturers would include it.

In cases where a person has control over such things they could use
Ruby and the Ruby plug-in instead of Java. In other cases, use Java or
something that the browser manufacturers include automatically. I just
thought it would be a cool idea. It seems possible. It would be one way
to escape from Java hell.


Paul

or may be if someone follows the idea for Ruby 2.0 to compile into Java
Bytecode it would be directly supported into browsers.
I know Matz said Rite won't generate Java Bytecode, but there are people
out there that want to follow that path.
 
D

David Vallner

D=C5=88a Streda 08 Febru=C3=A1r 2006 11:13 Michal Suchanek nap=C3=ADsal:
That would be a great step back in compatibility. While you can
compile Mozilla or Konqueror for almost any platform you choose, and
both support JavaScript, the support for Flash is much worse.
Flash is a proprietary technology, and the binary plugin to interpret
it is available only for a handful of platforms. You can use it on OS
X, win32, possibly win64 and wince, and x86 Linux. It is quite likely
it will work in emulation on x86 NetBSD or x86_64 Linux. But GNU/Linux
on ppc, mips, alpha, Solaris on anything, or any other OS is quite
hopeless.
There is a free flash player in which next to nothing works, and I am
not even sure it works as a browser plugin.
I do not know waht is ActionScript. The situation with Java plugin is
similar except Sun makes a version for Solaris as well.

So I do not see any cross-platform browser scripting other than JavaScrip= t.

Thanks

Michal

Personally, I'd murder if I could get away with either an Applet or Flash m=
ore=20
often. The proprietary bit -is- a pain, but at least you get something of a=
=20
consistent interface instead of the godawful mess of browser inconsistencie=
s=20
that are out there. Admittedly less than there used to be, but you can and=
=20
should still expect bugs with basic issues even when you have to support IE=
6,=20
which happily selectively ignores W3C standards with reckless abandon. The=
=20
less-than-easy-reading browser documentation doesn't really help either. An=
d=20
don't even get me started on box models, the way any JS brings Konqueror to=
a=20
grinding halt, and proprietary specialised set-top-box web browsers with=20
completely random (non-)support of features.

David Vallner
 

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
474,202
Messages
2,571,057
Members
47,662
Latest member
salsusa

Latest Threads

Top