Rubyscript instead of javascript

E

Eleanor McHugh

Also, to this day, Flash for Linux is only available for 32-Bit x86
processors (which is pretty much exactly 0% of computers sold in the
last 2 years, with the exception of netbooks), and only for a small
number of distributions and browsers (excluding, for example, Opera).

I'd also like to point out that the stability of the OS X port of =20
Flash leaves a lot to be desired. It regularly crashes Safari on my =20
machines.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
 
M

Michael Tomer

This is only somewhat related, but Appcelerator Titanium
(http://www.appcelerator.com/) combines Webkit with Ruby/Python. It
doesn't quite answer the original question, because Appcelerator apps
aren't websites. Still, you can make apps just like a webpage with HTML5
and CSS3. Then, top it all off with Ruby, Python, and Javascript.
 
D

David Masover

I'd also like to point out that the stability of the OS X port of
Flash leaves a lot to be desired. It regularly crashes Safari on my
machines.

That's the theory behind something like Chrome.

Of course, the stability of either Chromium or Flash isn't great on Linux -=
=2D=20
but the architecture of Chrome means it's not often I can crash more than o=
ne=20
tab, and if it's just one, just refresh.
 
D

David Masover

Here is just a small excerpt of the languages that target ECMAScript:

* CIL bytecode (meaning any CLI language, and that includes Ruby,
Python, PHP, Perl, Scheme, Prolog(!), ... can run on ECMAScript),

This can actually work reasonably well -- as I understand it, the IronRuby =
and=20
IronPython compilers/interpreters live entirely inside the VM.
* JVM bytecode (meaning any JVM language, and that includes Ruby,
Python, PHP, Scheme, ... can run on ECMAScript),

Same here.
* YARV bytecode (meaning any YARV language, and that *obviously*
includes Ruby can run on ECMAScript),

This is problematic. MRI, at least, has tons of stuff written in C -- much =
of=20
which really doesn't need to be. This includes the Ruby parser itself --=20
meaning anything involving 'eval' will be broken on YARV-on-ECMAScript.

And then, it still raises the question of, is this the best we can do? I=20
suppose it is nice, compatibility-wise, and if we adopt a standard, maybe=20
browsers can accelerate it later...

I know I always dream of the day when Browsers start shipping large parts o=
f=20
jQuery, re-implemented as native code, with the change transparent to autho=
rs.
This not a problem if you explicitly target Mono.

It is a problem if all the docs, tools, etc, are for .NET.
It's also not entirely true: in several areas, .NET is several steps
behind Mono: modularity (developing the CoreCLR for Silverlight was a
major effort, while Mono was modular from day one),

That's not really visible to me as a developer.
iPhone support (Mono runs on
the iPhone just fine, .NET probably never will),

That's pretty much like Mono on Linux. Mono definitely has them beaten in=20
portability.
static native
compilation (Mono can compile a .NET application together with the
Mono runtime into a single static native executable, .NET always needs
the .NET runtime installed, even if you use NGen),

I'm really not sure why this helps. If I'm targeting Windows, most recent=20
Windows installations have .NET. If I'm targeting Linux, I can build a pack=
age=20
that depends on Mono.

I mean, it's cool to know it exists, but I'd be more interested in actual=20
ahead-of-time compilation as a performance boost.
64 Bit array
indices (explicitly allowed by the specification, but only implemented
by Mono with no plans by Microsoft),

I honestly can't remember ever having a flat array with more than four bill=
ion=20
elements. Cool, but it seems kind of like this:

http://xkcd.com/619/
SIMD support (some vague comments
by Microsoft, but nothing even remotely concrete), Continuation
support (no interest from Microsoft)-

These look interesting.

Of course, the major problem is that we've again got the market pretty much=
=20
dominated by Microsoft. If I want to write a portable app, I have to target=
=20
Mono, and then I have to remove these features and make it work on .NET.
Oh, and Silverlight has already failed. The next version of Office
will be web-based, but it uses only HTML, CSS and ECMAScript. If you
can build MS Office, Google Wave and Sun Research's Lively Kernel
without any plugins, then what the heck *would* you need Silverlight
for?

Developing said applications in a language other than ECMAScript (or=20
JavaScript, for the non-pedantic), and having it perform better (not worse)=
=20
than ECMAScript? Oh, and not having to deal with the DOM would be a plus.

Those are the reasons it looks attractive to me, anyway.

Of course, I entirely agree with you. The one web app I built that needed=20
plugins, the choice was forced by management (and Facebook, and MySpace). I=
=20
made a case for the audio tag, and lost.
The ECMA specifications are covered by the Microsoft Specification
Promise. Of course, that doesn't cover the parts not part of the ECMA
specifications, which includes Silverlight.

Right...

I'm also going to want to go back and have a lawyer read that Promise. Mayb=
e=20
I'm being paranoid...
This was the original goal for replacing SpiderMonkey. However, as it
turned out, Tamarin is heavily biased towards statically typed
languages like ActionScript, which is why Mozilla and Adobe decided to
drop Tamarin, only extract the tracing JIT and duct-tape that onto
SpiderMonkey, producing the current Mozilla ECMAScript engine,
TraceMonkey.

Interesting. I never knew that.

It does make me wonder whether the two would merge at some point, though. A=
nd=20
I still very much like the idea of piggybacking on Flash, rather than=20
Silverlight, to support browsers that don't natively have some feature I wa=
nt=20
=2D- at least, to the extent that I can't hack it with JavaScript alone.
Actually, Flash is also only supported on a tiny fraction of
platforms. Indeed, I believe Mono is actually better in this regard.

Citation needed, and it also misses the point. Flash IS INSTALLED on the=20
platforms it supports. The exception might be Linux, at least until said Li=
nux=20
user wants to watch The Daily Show.
For example, Flash 9 was released in 2006, but in 2007, the most
recent version of Flash for Linux was still Flash 7 (released 2003!),
which did not support ActionScript 3 nor Flex.

That's flipped completely, in that:
Also, to this day, Flash for Linux is only available for 32-Bit x86
processors

Wrong. Flash in general has only been 32-bit. It's just that Linux is the o=
nly=20
64-bit capable OS on which the majority of the system is 64-bit out of the=
=20
box, including the browser.

And, there is currently an alpha Flash 10 64-bit for Linux -- before Flash =
has=20
supported 64-bit on any other platform.

Also wrong in that it has nothing to do with the processor itself, and=20
everything to do with the OS. Nothing's stopping you from running a 32-bit=
=20
Linux on 64-bit hardware. Most people run 32-bit Windows on that hardware,=
=20
anyway.
only for a small
number of distributions

I downloaded a file that looked pretty distribution-agnostic -- I think it =
was=20
either a tarball or a binary. Indeed, once unpacked, the only critical file=
was=20
one little .so to be put wherever your browser looks for plugins.
and browsers (excluding, for example, Opera).

It uses the Netscape plugin API, which has been around forever, and which e=
ven=20
Konqueror wraps. If Opera doesn't support it, I kind of feel like that's=20
Opera's fault, or the fault of the community at large for not coming up wit=
h a=20
better standard for plugins.
Here is just a small excerpt of the languages that target Flash:

* YARV bytecode (meaning any YARV language, and that *obviously*
includes Ruby),
* C and
* haXe.

And, if we include Adobe Air, ECMAScript.

That was the other thing that got me excited -- since Air wraps a Webkit=20
browser, and since Adobe has made Air installation so easy, wouldn't it be=
=20
cool if I could deliver a shim for IE that simply loaded my shiny HTML5 app=
in=20
Webkit in Flash?

Unfortunately, Air seems to be mostly about downloadable apps (widgets?), n=
ot=20
so much embedding in webpages.
 
R

Rimantas Liubertas

Also, to this day, Flash for Linux is only available for 32-Bit x86
Wrong. Flash in general has only been 32-bit. It's just that Linux is the only
64-bit capable OS on which the majority of the system is 64-bit out of the
box, including the browser.

Not exactly true (anymore). OS X 10.6 runs majority of the system in
64 bits (including Safari) out of the box even if kernel runs in 32
bit mode by default. What's nice that now it runs plugins
sandboxed, so plugin crashing does not bring the browser down.
On the other hand, Flash still eats a lot of CPU on OS X :(


Regards,
Rimantas
 
M

Michal Suchanek

2009/9/11 Rimantas Liubertas said:
Not exactly true (anymore). OS X 10.6 runs majority of the system in
64 bits (including Safari) out of the box even if kernel runs in 32
bit mode by default. What's nice that now it runs plugins
sandboxed, so plugin crashing does not bring the browser down.
On the other hand, Flash still eats a lot of CPU =C2=A0on OS X :(

Flash eats a lot of CPU time.

It might be that the runtime is inefficient or that every kiddy with
no programming skills can churn out ActionScripts by using DreamWeaver
or somesuch without any regard for the load their toys put on the
machine of anybody who happens to end up on their page.

Either way it is not platform specific problem unless you consider
flash itself as the platform.

And yes, flash supports only a tiny fraction of platforms. Macromedia
wanted tight control over the flash platform so they disallowed
writing alternate flash viewers. The result is that if you put some
chips together, compile a web browser for that platform and put it
into a case to make a set-top box you won't have flash unless you are
Windows based, i386 LInux based or can emulate one of those. With the
additional catch that windows for non-i386 can have older player.

On the other hand, you should be able to run Java and Mono on any
platform for which you manage to build a graphical browser.
The portability of Java used to suck too but with openjdk it has much
improved lately.


Thanks

Michal.
 
J

Jeff Barczewski

We already have. It's called ECMAScript. The only thing missing to
make it a great truly great VM is GOTO, but it actually *does* have
GOTO, it's just spelled funny: E-X-C-E-P-T-I-O-N.

Here is just a small excerpt of the languages that target ECMAScript:

* CIL bytecode (meaning any CLI language, and that includes Ruby,
Python, PHP, Perl, Scheme, Prolog(!), ... can run on ECMAScript),
* JVM bytecode (meaning any JVM language, and that includes Ruby,
Python, PHP, Scheme, ... can run on ECMAScript),
* YARV bytecode (meaning any YARV language, and that *obviously*
includes Ruby can run on ECMAScript),
* any language implementation that uses PyPy (including Python,
Smalltalk, Prolog),
* Clojure,
* C,
* Flapjax,
* Caja,
* Objective-J,
* Clamato,
* haXe and
* links.



So are you saying that if someone writes a VM that has the proper ECMAScrip=
t
hooks then you could run one of these languages without needing to convert
into javascript or even run a VM in javascript?

Interesting.

Jeff
 
D

David Masover

And yes, flash supports only a tiny fraction of platforms. Macromedia
wanted tight control over the flash platform so they disallowed
writing alternate flash viewers.

I believe they've since changed this -- so technically, Gnash is allowed to
simply read the specs.

As for "fraction of platforms":
The result is that if you put some
chips together, compile a web browser for that platform and put it
into a case to make a set-top box you won't have flash unless you are
Windows based, i386 LInux based or can emulate one of those.

Or you talk to Adobe.

Consider the Wii, for instance. That's a PowerPC CPU, and it's not any OS I
know of, yet the Wii Browser (Opera) does have Flash.

Besides which, I'm not trying to convince anyone that Flash is a good target
-- only that it is a good way to get 99% of desktop browsers to support
something that you'd otherwise do in a standard way. If I "put some chips
together", for instance, I'd think I could get a browser that supports
On the other hand, you should be able to run Java and Mono on any
platform for which you manage to build a graphical browser.

With the caveat that it has to be installed. For the platforms Flash supports
(which admittedly isn't all of them), it's already installed. With Java, if
it's there, it's probably an older version.
 
M

Michal Suchanek

2009/9/11 David Masover said:
I believe they've since changed this -- so technically, Gnash is allowed to
simply read the specs.

Yes, perhaps flash support will improve too, eventually.
With the caveat that it has to be installed. For the platforms Flash supports
(which admittedly isn't all of them), it's already installed. With Java, if
it's there, it's probably an older version.

How did you get the impression that flash is already installed?

On Windows I do not get flash unless I install it, and I need
administrator rights for installing ActiveX components like Flash.

In Firefox on Linux I normally do not have any flash. If I do want it
I have to download some tarball and find out where to put flash plugin
(or perhaps run an installation script in terminal that might get the
place right). Automatic download of the plugin does not work on Linux.

I don't know about flash on OS X but it's the only platform I know of
that has the Java plugins pre-installed.

Thanks

Michal
 
D

David Masover

How did you get the impression that flash is already installed?

On Windows I do not get flash unless I install it,

Last I checked, Windows came out of the box with Flash installed and enabled,
in IE. Or, at the very least, it was included with the last IE upgrade I did.
In Firefox on Linux I normally do not have any flash.

I'll grant you that. However, I'm talking about Windows and OS X supporting
this out of the box, and on Linux, well:
If I do want it
I have to download some tarball and find out where to put flash plugin
(or perhaps run an installation script in terminal that might get the
place right). Automatic download of the plugin does not work on Linux.

Depends on your distro. On Ubuntu:

sudo apt-get install flashplugin-nonfree

But I'm less concerned by that, because with the scheme I described, Flash is
being used to support browsers which won't support what I want natively --
which is likely to be IE, mostly.
I don't know about flash on OS X but it's the only platform I know of
that has the Java plugins pre-installed.

Yes, it was pre-installed on OS X also, if I recall.

Keep in mind, I'm not just talking about preinstallations -- I'm talking about
actual usage statistics. For instance:

http://www.adobe.com/products/player_census/flashplayer/version_penetration.html

Granted, that's not exactly an unbiased source, but there isn't a market
surveyed that had less than 97% penetration by Flash 9, and I have no reason
to doubt those numbers.
 

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,169
Messages
2,570,919
Members
47,458
Latest member
Chris#

Latest Threads

Top