Forum: Ruby Ruby in Browsers?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
94e31fd5108ef7932267dfc94412b668?d=identicon&s=25 unknown (Guest)
on 2006-02-07 16:58
(Received via mailing list)
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
Bf6862e2a409078e13a3979c00bba1d6?d=identicon&s=25 Gregory Seidman (Guest)
on 2006-02-07 17:17
(Received via mailing list)
On Wed, Feb 08, 2006 at 12:58:26AM +0900, petermichaux@yahoo.com 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
Ddbd8bc32e3a87163b4658b2785d2082?d=identicon&s=25 Mark Somerville (Guest)
on 2006-02-07 17:45
(Received via mailing list)
On Wed, Feb 08, 2006 at 12:58:26AM +0900, petermichaux@yahoo.com 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.

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

On Tuesday 07 February 2006 16:15, Gregory Seidman wrote:
> 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
7572157852143be53747b2d08784cb6f?d=identicon&s=25 Jeff Barczewski (Guest)
on 2006-02-07 18:25
(Received via mailing list)
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
javascript
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
67cb6fef42a83929955ce5a5b3f33f6e?d=identicon&s=25 Jon Smirl (Guest)
on 2006-02-07 22:12
(Received via mailing list)
Venkman Javascript debugger makes things much easier in FIrefox.
http://www.mozilla.org/projects/venkman/

The Web Developer extension is also useful:
http://chrispederick.com/work/webdeveloper/
94e31fd5108ef7932267dfc94412b668?d=identicon&s=25 unknown (Guest)
on 2006-02-08 01:41
(Received via mailing list)
> 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.
9b945bfeebdf25fb6c9adc6ea7756c8c?d=identicon&s=25 Paul Stadig (Guest)
on 2006-02-08 02:08
(Received via mailing list)
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?


Paul
D8831c4665a164c6ce484003deb1afd6?d=identicon&s=25 Guillaume Marcais (Guest)
on 2006-02-08 04:18
(Received via mailing list)
Paul Stadig wrote:
> 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.
19f65b7dca6831edf989224b5ebd3fe0?d=identicon&s=25 unknown (Guest)
on 2006-02-08 06:08
(Received via mailing list)
On Wednesday 08 February 2006 10:08 am, Paul Stadig wrote:
> 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.
>

We still need to get rid of the white elephant which is standing in the
middle
of the room. yes, you know the one.. the one which beats the 800lb ugly
gorilla, the slow side of ruby. I think this is a need before any type
of
applet interface is made, and even so, one will need to create or use
some
type of custom toolkit which can be added with a nice API. A Tk based
solution would be good since it works everywhere.

> Is there any such project out there?
>
>
> Paul

Tsume
011737f94b61f527bd869eb54d735f57?d=identicon&s=25 Michal Suchanek (Guest)
on 2006-02-08 11:16
(Received via mailing list)
On 2/7/06, Gregory Seidman <gsslist+ruby@anthropohedron.net> wrote:

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

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

Thanks

Michal


--
             Support the freedom of music!
Maybe it's a weird genre  ..  but weird is *not* illegal.
Maybe next time they will send a special forces commando
to your picnic .. because they think you are weird.
 www.music-versus-guns.org  http://en.policejnistat.cz
C381828d1907912eab30cbe38d5ea245?d=identicon&s=25 unknown (Guest)
on 2006-02-08 12:25
(Received via mailing list)
Thanks a lot for those pointers!

Aníbal Rojas
http://www.lacaraoscura.com/
http://www.vp.com.ve/
9b945bfeebdf25fb6c9adc6ea7756c8c?d=identicon&s=25 Paul Stadig (Guest)
on 2006-02-08 16:00
(Received via mailing list)
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
66b7903817232d9d42357a269ad48043?d=identicon&s=25 Gonzalo Rubio (gonchuki)
on 2006-02-08 16:33
Paul Stadig wrote:
> 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.
912c61d9da47754de7039f4271334a9f?d=identicon&s=25 unknown (Guest)
on 2006-02-08 17:29
(Received via mailing list)
Quoting Michal Suchanek <hramrach@gmail.com>:

> I do not know what is ActionScript.

ActionScript is Flash's embedded dialect of ECMAScript (i.e.
JavaScript).  In actual .swf files, it's bytecode rather than raw
text, though.

-mental
430ea1cba106cc65b7687d66e9df4f06?d=identicon&s=25 David Vallner (Guest)
on 2006-02-08 22:40
(Received via mailing list)
DÅ?a Streda 08 Február 2006 11:13 Michal Suchanek napísal:
> That would be a great step back in compatibility. While you can
> 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 JavaScript.
>
> Thanks
>
> Michal
>

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

David Vallner
This topic is locked and can not be replied to.