Forum: Ruby RubyScript

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.
dpersik (Guest)
on 2005-12-08 00:00
(Received via mailing list)
I have done some searching on the web and have found very little about
RubyScript.  Any browsers support this?  The main thing I don't like
about AJAX is the Javascript, but using RubyScript as a replacement
would be cool.
dandiebolt (Guest)
on 2005-12-08 00:12
(Received via mailing list)
>I have done some searching on the web and have found very little about
RubyScript. Any browsers support this?

  This worked for me in IE6:

  <html>
<head>
 <script for=window event=onload language=RubyScript>
  @window.alert "Hello World !"
 </script>
</head>
<body>Hello World!</body>
</html>

  See:

  http://arton.hp.infoseek.co.jp/index.html

  http://www.mvps.org/scripting/languages/


removed_email_address@domain.invalid wrote:  I have done some searching on the 
web and have
found very little about
RubyScript. Any browsers support this? The main thing I don't like
about AJAX is the Javascript, but using RubyScript as a replacement
would be cool.
batkins57 (Guest)
on 2005-12-08 00:24
(Received via mailing list)
Of course, this will only work if the user has RubyScript installed on
their system - not necessarily practical for public web applications.
lukfugl (Guest)
on 2005-12-08 00:28
(Received via mailing list)
On 12/7/05, Dan D. <removed_email_address@domain.invalid> wrote:
>   This worked for me in IE6:
>
>   <html>
> <head>
>  <script for=window event=onload language=RubyScript>
>   @window.alert "Hello World !"
>  </script>
> </head>
> <body>Hello World!</body>
> </html>

I tried it in IE6 (Version: 6.0.2900.2180.xpsp_sp2_gdr.050301-1519),
didn't work. It did prompt me that "Active Content" was being blocked,
but after unblocking and refreshing there was still no popup alert.
(It didn't work in Firefox either, but I was expecting as much.)

Jacob F.
dandiebolt (Guest)
on 2005-12-08 00:41
(Received via mailing list)
>I tried it in IE6 (Version: 6.0.2900.2180.xpsp_sp2_gdr.050301-1519), didn't work

  That is the exact version of IE6 I have so there must be another issue
at play.
lukfugl (Guest)
on 2005-12-08 01:05
(Received via mailing list)
On 12/7/05, Dan D. <removed_email_address@domain.invalid> wrote:
> >I tried it in IE6 (Version: 6.0.2900.2180.xpsp_sp2_gdr.050301-1519), didn't work
>
>   That is the exact version of IE6 I have so there must be another issue at play.

Possibly you already have some RubyScript plugin installed?

Jacob F.
dandiebolt (Guest)
on 2005-12-08 01:13
(Received via mailing list)
Of course you have to install it - you only get VBScript and JavaScript
functionality out of the IE box.
lukfugl (Guest)
on 2005-12-08 02:14
(Received via mailing list)
On 12/7/05, Dan D. <removed_email_address@domain.invalid> wrote:
> Of course you have to install it - you only get VBScript and JavaScript
> functionality out of the IE box.

Well, I think that's what the OP was referring to, whether any
browsers supported it "Out of the Box". While RubyScript is cool and
great, it's not very useful for a public site if you have to hope the
users have installed the plugin first.

What we need, rather -- since we're pretty much stuck with JavaScript
as the defacto standard -- is to continue to publicize the libraries
like Prototype that make working with JavaScript much more palatable
and, in some ways, Rubyesque.

Jacob F.
james_b (Guest)
on 2005-12-08 02:55
(Received via mailing list)
removed_email_address@domain.invalid wrote:
> I have done some searching on the web and have found very little about
> RubyScript.  Any browsers support this?  The main thing I don't like
> about AJAX is the Javascript, but using RubyScript as a replacement
> would be cool.


JavaScript may be sweeter than you know.


http://www.crockford.com/javascript/little.html
http://interglacial.com/hoj/hoj.html
http://www.joeganley.com/code/jslisp.html
http://w3future.com/html/stories/hop.xml


James


--

http://www.ruby-doc.org       - Ruby Help & Documentation
http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
http://www.rubystuff.com      - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com     - Playing with Better Toys
http://www.30secondrule.com   - Building Better Tools
dandiebolt (Guest)
on 2005-12-08 03:48
(Received via mailing list)
>we're pretty much stuck with JavaScript ...  publicize the libraries that make working 
with JavaScript much more palatable and, in some ways, Rubyesque.

  In all practical terms you are stuck with JavaScript on the client.

  But I am curious how this could be done - make working with JavaScript
more Rubyesque. Unless the browser supports Ruby there isn't much you
can do that is Rubyesque. You can send XML, YAML or JSON to the browser
upon an xmlhttprequest but only the JavaScript engine can do something
with it. Would sending YAML to a JavaScript enabled browser be
considered Rubyesque?
    "YAML originally took off in the Ruby community as a better XML ..."
  http://ajaxian.com/archives/2005/11/json_yaml_its_g.html
  I don't see RubyScript having any practical value over JavaScript
client-side.
tsumeruby (Guest)
on 2005-12-08 04:12
(Received via mailing list)
On Thursday 08 December 2005 09:13 am, Jacob F. wrote:
> Well, I think that's what the OP was referring to, whether any
> browsers supported it "Out of the Box". While RubyScript is cool and
> great, it's not very useful for a public site if you have to hope the
> users have installed the plugin first.
>
> What we need, rather -- since we're pretty much stuck with JavaScript
> as the defacto standard -- is to continue to publicize the libraries
> like Prototype that make working with JavaScript much more palatable
> and, in some ways, Rubyesque.
>

I disagree with being stuck with javascript. People are stuck with
javascript
as a programmer stuck to php. You have a choice, and you need to force a
user
to install it. Wide usage will get more attention. If you also look at
the
Mozilla project, they are embedded Python stubs in for the next
milestone so
it will be easy to use XUL+Python. I really would want this to be
XUL+Ruby
though.

Tsume
logancapaldo (Guest)
on 2005-12-08 04:16
(Received via mailing list)
On Dec 7, 2005, at 8:44 PM, Dan D. wrote:

> engine can do something with it. Would sending YAML to a JavaScript
> enabled browser be considered Rubyesque?

I think he was pointing out that javascript is actually quite a
dynamically language. It has higher order functions, you can extend
an object at runtime, etc.
james_b (Guest)
on 2005-12-08 04:44
(Received via mailing list)
Jacob F. wrote:
>
> What we need, rather -- since we're pretty much stuck with JavaScript
> as the defacto standard -- is to continue to publicize the libraries
> like Prototype that make working with JavaScript much more palatable
> and, in some ways, Rubyesque.


The poorly-named Prototype.js helps hide developer interaction with
JavaScript; you learn a set of library-specific calls, and you're done.
You don't need to know much actual JavaScript, just someone's idea of a
suitable API.

People who are going to write client-side Web code should just learn
JavaScript. It isn't hard, it offers many things found in Ruby, and
you'll know what your code is doing, and why, without loading 47k of
library code before you've even started.   Learn what JavaScript's
'prototype' is and what it can do.   (Casual browsing of some JavaScript
books, though, suggest that most authors don't even mention 'prototype',
and tend to teach the language as if it were some Java or C variant.
Sad.)



James


--

http://www.ruby-doc.org       - Ruby Help & Documentation
http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
http://www.rubystuff.com      - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com     - Playing with Better Toys
http://www.30secondrule.com   - Building Better Tools
blargity (Guest)
on 2005-12-08 09:49
(Received via mailing list)
On Wednesday 07 December 2005 20:11, removed_email_address@domain.invalid wrote:
>
> I disagree with being stuck with javascript. People are stuck with
> javascript as a programmer stuck to php. You have a choice, and you need to
> force a user to install it. Wide usage will get more attention. If you also
> look at the Mozilla project, they are embedded Python stubs in for the next
> milestone so it will be easy to use XUL+Python. I really would want this to
> be XUL+Ruby though.
>
> Tsume

There is a difference though.  PHP is server side, so migrating away
from it
only forces installation ONCE on the server side.  Migrating away from
Java
Script involves forcing every single client to install X.  While that
draws
attention, most users simply won't bother, or will attempt to get the
information via some other means.  This is bad for especially commercial
web
apps.
perrin (Guest)
on 2005-12-08 16:27
(Received via mailing list)
On Thu, Dec 08, 2005 at 04:48:57PM +0900, Kevin B. wrote:
>
> There is a difference though.  PHP is server side, so migrating away from it
> only forces installation ONCE on the server side.  Migrating away from Java
> Script involves forcing every single client to install X.  While that draws
> attention, most users simply won't bother, or will attempt to get the
> information via some other means.  This is bad for especially commercial web
> apps.

four words: code that degrades gracefully

more explicit: Use code that degrades gracefully for people who don't
have Rubyscript plugins installed, and include some kind of "best viewed
with plugin X" indicator on the page.  Everybody can still get all the
information needed that way without going somewhere else, and those who
go to the trouble of installing the indicated plugin will be rewarded
with a richer user experience.

--
Chad P. [ CCD CopyWrite | http://ccd.apotheon.org ]

unix virus: If you're using a unixlike OS, please forward
this to 20 others and erase your system partition.
unknown (Guest)
on 2005-12-23 00:54
(Received via mailing list)
Maybe a replacement to JavaScript is what Google had in mind when
hiring Guido (creator of Python)
This topic is locked and can not be replied to.