Re: Porting parrot on PDA -- work in progress

2007-02-13 Thread Patrick R. Michaud
On Tue, Feb 13, 2007 at 08:28:38PM +0100, Aldo Calpini wrote:
> I've managed to build parrot for the PocketPC. yes, really. 
>
> I would appreciate any feedback :-)

Feedback:  Truly amazing, and terrific work.  Aldo++

Pm


Re: Porting parrot on PDA -- work in progress

2007-02-13 Thread Joshua Isom

On Feb 13, 2007, at 1:28 PM, Aldo Calpini wrote:


whoa there!

furthermore, the Configure process uses $^O here and there, and this 
should eventually be replaced by an --arch=something parameter to 
Configure.pl (which defaults to $^O, of course).


my parrot does indeed run some of the examples/pasm files. I tried 
hello.pasm, fact.pasm, xml_parser.pasm, they all run just fine.


now, from what I understand looking at the Makefile, this parrot 
should be used to generate a lot of .pbc files that constitute the 
"core" Parrot library. this is going to be a real pain, because while 
it's true that I can run parrot on the PDA, all the directory 
structure (eg. runtime/parrot/library) is not there at all.


so I'm really puzzled about what to do next. is this parrot.exe alone 
worth something (except for running .pasm files, that is)? should I 
transfer the whole parrot directory to the PDA and build the library 
there, by hand?


I would appreciate any feedback :-)

cheers,
Aldo


You should be able to run most pir files and pbc files too, since the 
pbc files are platform independent.  It'd help to have then generated 
on a platform with the same endian for speed, but not required(portable 
byte code).  You can sort of pick and choose which libraries if you're 
feeling adventurous, and which headers.  They're often used in other 
files to run.  You won't need all the .h files since they're for 
linking with libparrot, so just the stuff with runtime.  You may even 
be able to get tcl running on your pda.




Porting parrot on PDA -- work in progress

2007-02-13 Thread Aldo Calpini

whoa there!

I've managed to build parrot for the PocketPC. yes, really. I hacked 
just a little the Configure process - now it _really_ compiles test 
executables, run them on the PDA and gather the result. this wasn't 
really hard.


I had a half-written Perl XS extension which uses RAPI to communicate 
with the PDA. I just worked on it a little and prepared a simple script 
which does the trick. all I had to do was to add a parameter to 
_run_command in lib/Parrot/Configure/Step.pm which simply does:


  if($remote) {
  $command = "$^X runonpda.pl $command";
  }

runonpda.pl is my simple script in this case. once I have my RAPI 
extension on CPAN, this could eventually be turned into a proper patch 
to Parrot's Configure.


the resulting files needed just a few fixes, mainly because Configure 
pulls out information about headers from Perl's Config.pm (which of 
course, in this case, isn't just right).


there are also minor glitches with threads and OS system calls, but they 
can be solved by creating a directory in config/gen/platform (eg. cegcc 
or whatever) and writing there the correct code.


furthermore, the Configure process uses $^O here and there, and this 
should eventually be replaced by an --arch=something parameter to 
Configure.pl (which defaults to $^O, of course).


my parrot does indeed run some of the examples/pasm files. I tried 
hello.pasm, fact.pasm, xml_parser.pasm, they all run just fine.


now, from what I understand looking at the Makefile, this parrot should 
be used to generate a lot of .pbc files that constitute the "core" 
Parrot library. this is going to be a real pain, because while it's true 
that I can run parrot on the PDA, all the directory structure (eg. 
runtime/parrot/library) is not there at all.


so I'm really puzzled about what to do next. is this parrot.exe alone 
worth something (except for running .pasm files, that is)? should I 
transfer the whole parrot directory to the PDA and build the library 
there, by hand?


I would appreciate any feedback :-)

cheers,
Aldo