comp.lang.ada
 help / color / mirror / Atom feed
* Parrot for Ada?
@ 2002-07-31 23:02 Ingo Marks
  2002-08-01  2:45 ` SteveD
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ingo Marks @ 2002-07-31 23:02 UTC (permalink / raw)


Slashdot has an article about "Parrot". 

http://developers.slashdot.org/developers/02/07/31/1225200.shtml?tid=145

Parrot is an interesting virtual machine, similar to .NET CLR and JVM. It 
is planned to support Perl6 and other languages (so far Java, Python, Ruby, 
Scheme). One design goal is portability among several platforms (Linux, 
Cygwin, Win32, FreeBSD, Solaris, Tru64, OpenVMS). Parrot was chosen to 
implement Perl6 because .NET CLR and JVM would be "not suitable".

Details: http://www.astray.com/parrot/

AFAIK JGNAT is the only Ada compiler which compiles for a virtual machine 
(JVM). I don't know if there will be well supported Ada compilers in the 
future on upcoming platforms (64 bit AMD etc.) so I think it would possibly 
be a good thing to have one working Parrot Ada compiler which could be used 
on many platforms in the future.

Are there any Ada compiler experts here who could evaluate Parrot and tell 
us if it could be(come) a suitable VM for Ada?

If yes, then perhaps a simple way to get Ada onto Parrot could be to wait 
for a Java bytecode to Parrot compiler to compile JGNAT to Parrot.

More informations:

http://www.parrotcode.org/
http://www.perl.com/pub/a/2002/07/p6pdigest/20020723.html
http://astray.com/targeting_parrot/
http://dev.perl.org/perl6/

Regards,
Ingo




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Parrot for Ada?
  2002-07-31 23:02 Parrot for Ada? Ingo Marks
@ 2002-08-01  2:45 ` SteveD
  2002-08-03 13:14 ` Mike Greaves
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: SteveD @ 2002-08-01  2:45 UTC (permalink / raw)


"Ingo Marks" <adv@region-nord.de> wrote in message
news:ai9q8a$lan$04$1@news.t-online.com...
[snip]
> (JVM). I don't know if there will be well supported Ada compilers in the
> future on upcoming platforms (64 bit AMD etc.)

If I'm not mistaken the work to support the x86-64 has already been done for
the GCC back used by GNAT.  I would expect a supported compiler to be
released shortly after the silicon is released.

SteveD

> Regards,
> Ingo
>





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Parrot for Ada?
  2002-07-31 23:02 Parrot for Ada? Ingo Marks
  2002-08-01  2:45 ` SteveD
@ 2002-08-03 13:14 ` Mike Greaves
  2002-08-05 11:44   ` Ingo Marks
  2002-08-03 23:44 ` chris.danx
  2002-08-04  9:20 ` Florian Weimer
  3 siblings, 1 reply; 6+ messages in thread
From: Mike Greaves @ 2002-08-03 13:14 UTC (permalink / raw)


Ingo Marks <adv@region-nord.de> wrote in message news:<ai9q8a$lan$04$1@news.t-online.com>...

> Parrot is an interesting virtual machine, similar to .NET CLR and JVM. It 

> Parrot was chosen to 
> implement Perl6 because .NET CLR and JVM would be "not suitable".

The reason that .NET and Java VM's are "not suitable" is that they both
spend CPU cycles to enforce types at runtime, if I understand it
correctly.  This "wasted performance" irked the Perl guys, who wanted
a non-type-aware VM for their almost-untyped "programming language"
(I use the term very loosely ;-)

More below...  I have a *bunch* of thoughts...


> AFAIK JGNAT is the only Ada compiler which compiles for a virtual machine 
> (JVM). I don't know if there will be well supported Ada compilers in the 
> future on upcoming platforms (64 bit AMD etc.) so I think it would possibly 
> be a good thing to have one working Parrot Ada compiler which could be used 
> on many platforms in the future.
> 
> Are there any Ada compiler experts here who could evaluate Parrot and tell 
> us if it could be(come) a suitable VM for Ada?

I am certainly NOT a "Ada compiler expert".  8-)
I am an experienced programmer (other languages), but an Ada *novice*.
I am not even positive how Ada code, running in a JVM via JGNAT, is
type checked; I assume that there is both compile- and run-time checking
there.

I DID spend a chunk of time reading about the Parrot VM a couple of
months back, mainly to see if it was suitable as a back-end for Python,
which is a good language for some problem domains.

Speaking from memory, and brief familiarity:  Parrot is a VM based on
both stacks *and* registers.  JVM is stack-based-only.  Parrot is built
around a kind of "virtual processor", and it's byte code bears some
resemblance to the instruction sets of the Motorola 68000, and other
*real* processors.  It's more like a hypothetical-conventional-processor
emulator than a usual virtual machine.  It is not clear to me personally,
whether this is genius or madness; and is left as an excercise for the
reader.  ;-)

Any type checking is done by the front-end compiler, the VM knows nothing
about types - just like a real processor, and unlike JVM.  Apart from
portability, Parrot gives you nothing more at run-time than native object
code does.

Since you need to test any serious program on any target where it may  
be run, it seems to me that to use Parrot as the back end for a
"traditional" compiled language is a little pointless.  It's kind of
like *deliberately* compiling your program for the *wrong* architecture,
and then running it in an emulator.  8-/

JVM has (arguably) value beyond it's portable byte-code, but Parrot
doesn't appear to.  And the reality of Java is *not* the promised "write
once, run anywhere", but "write once, *test everywhere*".  Maybe Parrot
will do better in the "run anywhere" department.

It's worth noting that Parrot is a 32-bit VM, and AMD's x86-64
architecture will run x86-32 object code efficiently.  So a program
compiled to Parrot bytecode, then run on x86-64/Hammer/Opteron will be
32-bit object code running *inefficiently* on a 64-bit processor.  While
a program compiled to x86-32 object code (with an *existing* gnat/x86
compiler), then run on x86-64/Hammer/Opteron will be 32-bit object code
running *efficiently* on a 64-bit processor.  Take your pick.  ;-)

I've run out of wind, at last...



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Parrot for Ada?
  2002-07-31 23:02 Parrot for Ada? Ingo Marks
  2002-08-01  2:45 ` SteveD
  2002-08-03 13:14 ` Mike Greaves
@ 2002-08-03 23:44 ` chris.danx
  2002-08-04  9:20 ` Florian Weimer
  3 siblings, 0 replies; 6+ messages in thread
From: chris.danx @ 2002-08-03 23:44 UTC (permalink / raw)


Ingo Marks wrote:
> Slashdot has an article about "Parrot". 
> 
> http://developers.slashdot.org/developers/02/07/31/1225200.shtml?tid=145
> 
> Parrot is an interesting virtual machine, similar to .NET CLR and JVM. It 
> is planned to support Perl6 and other languages (so far Java, Python, Ruby, 
> Scheme). One design goal is portability among several platforms (Linux, 
> Cygwin, Win32, FreeBSD, Solaris, Tru64, OpenVMS). Parrot was chosen to 
> implement Perl6 because .NET CLR and JVM would be "not suitable".


There was a discussion on Parrot on the virtmach mailing list, and looks 
like ones about to kick off.  Don't know if it's useful (virtmach is 
such a low traffic list, I usually forget all about it and rarely read 
any posts).

The posting address is virtmach@iecc.org, if you run a search for that 
with google the subscription address will likely turn up.


Chris

-- 

to reply by personal email change 'spamoff' to 'chris'




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Parrot for Ada?
  2002-07-31 23:02 Parrot for Ada? Ingo Marks
                   ` (2 preceding siblings ...)
  2002-08-03 23:44 ` chris.danx
@ 2002-08-04  9:20 ` Florian Weimer
  3 siblings, 0 replies; 6+ messages in thread
From: Florian Weimer @ 2002-08-04  9:20 UTC (permalink / raw)


Ingo Marks <adv@region-nord.de> writes:

> Slashdot has an article about "Parrot". 
>
> http://developers.slashdot.org/developers/02/07/31/1225200.shtml?tid=145
>
> Parrot is an interesting virtual machine, similar to .NET CLR and JVM.

It is rather different.  It looks more like MIX in some way; the
registers haven't got a predefined width, and there is no trapping
integer arithmetic.  It's pretty hard to compile efficient Ada code
for it, I suppose.

> AFAIK JGNAT is the only Ada compiler which compiles for a virtual machine 
> (JVM).

AverStar used to offer AdaMagic.

> Are there any Ada compiler experts here who could evaluate Parrot and tell 
> us if it could be(come) a suitable VM for Ada?

Unless the developers can be convinced to add fixed-width registers
(so that it makes sense to talk about Integer'Base) and trapping
integer arithmetic, I don't think it's suitable for compiling Ada
code.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Parrot for Ada?
  2002-08-03 13:14 ` Mike Greaves
@ 2002-08-05 11:44   ` Ingo Marks
  0 siblings, 0 replies; 6+ messages in thread
From: Ingo Marks @ 2002-08-05 11:44 UTC (permalink / raw)


Mike Greaves wrote:

> I am certainly NOT a "Ada compiler expert".  8-)

Are you sure? 8-)

Thanks for your detailed reply.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-08-05 11:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-31 23:02 Parrot for Ada? Ingo Marks
2002-08-01  2:45 ` SteveD
2002-08-03 13:14 ` Mike Greaves
2002-08-05 11:44   ` Ingo Marks
2002-08-03 23:44 ` chris.danx
2002-08-04  9:20 ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox