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.)
On Wed, Feb 08, 2006 at 12:58:26AM +0900, [email protected] 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.
} 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 S. 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.
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.
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.
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 or whatever the kids are using nowadays.
A more sophisticated version could provide some interface to the
browser objects. Security would be nice.
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 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.
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.orghttp://en.policejnistat.cz
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 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
(Welcome to the Tcl 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!
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.
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Å?a Streda 08 Február 2006 11:13 Michal S. 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 V.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.