[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby in Browsers?

petermichaux

2/7/2006 3:56:00 PM

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

13 Answers

Gregory Seidman

2/7/2006 4:16:00 PM

0

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



Mark Somerville

2/7/2006 4:44:00 PM

0

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

> 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


Jeff Barczewski

2/7/2006 5:26:00 PM

0

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

Jon Smirl

2/7/2006 9:11:00 PM

0

Venkman Javascript debugger makes things much easier in FIrefox.
http://www.mozilla.org/project...

The Web Developer extension is also useful:
http://chrispederick.com/work/web...


--
Jon Smirl
jonsmirl@gmail.com


petermichaux

2/8/2006 12:35:00 AM

0

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

Paul Stadig

2/8/2006 1:06:00 AM

0

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

petermichaux@yahoo.com wrote:
> 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.

Guillaume Marcais

2/8/2006 3:19:00 AM

0

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/softwa...). 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.

>
> Paul
>
> petermichaux@yahoo.com wrote:
>> 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.
>
>



Michal Suchanek

2/8/2006 10:14:00 AM

0

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 cancompile Mozilla or Konqueror for almost any platform you choose, andboth support JavaScript, the support for Flash is much worse.Flash is a proprietary technology, and the binary plugin to interpretit is available only for a handful of platforms. You can use it on OSX, win32, possibly win64 and wince, and x86 Linux. It is quite likelyit will work in emulation on x86 NetBSD or x86_64 Linux. But GNU/Linuxon ppc, mips, alpha, Solaris on anything, or any other OS is quitehopeless.There is a free flash player in which next to nothing works, and I amnot even sure it works as a browser plugin.I do not know waht is ActionScript. The situation with Java plugin issimilar except Sun makes a version for Solaris as well.So I do not see any cross-platform browser scripting other than JavaScript.ThanksMichal-- 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 commandoto your picnic .. because they think you are weird. www.music-versus-guns.org http://en.police...

Aníbal Rojas

2/8/2006 11:21:00 AM

0

Thanks a lot for those pointers!

Aníbal Rojas
http://www.lacarao...
http://www....

Paul Stadig

2/8/2006 2:55:00 PM

0

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