Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
GCI: Embedding Parrot into Firefox
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alexander Moquin  
View profile  
 More options Nov 26 2010, 4:10 pm
From: "Alexander Moquin" <alexmoq...@gmail.com>
Date: Fri, 26 Nov 2010 16:10:01 -0500
Local: Fri, Nov 26 2010 4:10 pm
Subject: GCI: Embedding Parrot into Firefox

Hi, I'm a GCI student, and recently wrote this document for one of the  
assignments.

Embedding the Parrot VM into Mozilla Firefox

  Placing a new interpreter into Firefox is something that, to me, seems  
very important, but as far as I know has never been attempted before.  
However, I see a very strait forward way of implementing this as a  
windowed, scriptable* plug-in. Why a plug-in? For one, it is much simpler  
for both the developer and the user, because the developer gets to use the  
API for plug-ins (NPAPI),which is well maintained and well documented on  
the Mozilla Developer Network here, while not having to search though the  
source code, edit it, and A. Create a new version of Firefox or B. Try and  
confince enough people at Mozilla to include it. And, for the user, all  
they have to worry about is installing a plug-in. Plus, (a very large,  
encouraging plus) NPAPI is already supported by:

> Epiphany, Google Chrome, Safari, Konqueror, Mozilla project  
> applications, Netscape Navigator and >Communicator, Opera, and Internet  
> Explorer up to 5.5SP2 (so sad that IE can't seem to properly support  
> much >anything standardized, except maybe hyperlinks...)

Also good is that that Parrot itself seems to made out of parrot file  
types and C/C++ files to interpret those (at least on the windows  
port),and the NPAPI is C, which should mean only a couple files added to  
parrot and probably some minor edits.

Now, there are many ways to use a (scriptable) plug-in from a web page,  
all using the <embed> and <object> tags. To activate from a web page, one  
could do some thing like this:

<embed type="application/x-parrot-perl" id="perlObj"></embed>
<!--The browser doesn't recognise x-parrot-perl nativly, searchs  
internally for it-->

<div style="display:none" id="myString">
    <!--some perl code-->
    <!--this is should allow for multiline code-->
</div>

<script type="application/javascript">
    var myString = document.getElementById('myString').innerTEXT
    myString.replace('<br />', '\n');
    getElementById("perlObj").code(myString)
    //calls the made-up parrot function code() and passes a string of code  
to it.
</script>

If I'm right, because it doesn't know it by default, the browser should  
look internally for a plug-in that accepts this MIME type which shall be,  
of course, parrot. The code function simply and unsurprisingly would take  
the string sent to the plug-in and interpret it as, in this case,  
Perl.(there are different ways to go about the above, but the way I gave  
seems to be the most effective form what I've looked at)

The plug-in itself another thing indeed. As said in the  
reference/documentation, Mozilla hosts files that give a starting point as  
samples for creating a plug-in here. Although I don't know C, they seems  
very simple to configure and take example from.

  Whatever the parrot community chooses to do, I can't wait.

*windowed and scriptable simply mean that the plug-in has a space to draw  
onto and that it can be accessed via javascript

_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Whitworth  
View profile  
 More options Nov 26 2010, 7:47 pm
From: Andrew Whitworth <wknight8...@gmail.com>
Date: Fri, 26 Nov 2010 19:47:17 -0500
Local: Fri, Nov 26 2010 7:47 pm
Subject: Re: GCI: Embedding Parrot into Firefox
I set up this little research project as a GCI task to explore the
idea of embedding Parrot into FireFox. An immediate goal would be to
allow JavaScript-on-Parrot to be a potential scripting engine in
FireFox, if only as an academic exercise. Of course, we would also
immediately get the ability to use other languages that run on Parrot
as the client-side script languages.

According to some of the information that Alexander dug up, it doesn't
look like we can do this in a natural way with <script
type="application/parrot-lang-x"></script> tag. If it's possible,
there is very very very little documentation about it. It is looking
like we could use <embed> tag run Parrot apps in (think of how
Silverlight or Flash run in a browser).

Getting Parrot into web browsers is something I want to pursue
personally in the coming year. This is just food for thought.

--Andrew Whitworth

_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »