Re: parrot -I?

2005-08-11 Thread Leopold Toetsch
Amir Karger wrote: If I say perl Zcode/t/harness I want it to run parrot Zcode/z3.imc testfile.z3. My current problem is that z3.imc includes a file z3main.imc. So the above command breaks because z3.imc can't find the include file. If this were Perl, I would just say Perl-IZcode Zcode/z3.imc

parrot -I?

2005-08-10 Thread Amir Karger
If I say perl Zcode/t/harness I want it to run parrot Zcode/z3.imc testfile.z3. My current problem is that z3.imc includes a file z3main.imc. So the above command breaks because z3.imc can't find the include file. If this were Perl, I would just say Perl-IZcode Zcode/z3.imc testfile.z3. But I

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-07-08 Thread Clinton Pierce
.sub _main fdopen $P1, 0, r # STDIN BTW fdopen $P1, 0, # read STDIN 3. its currently only defined for PIO_OS_UNIX Okaaay, so the plan is for this to work and I should probably code this way anyway, right? You could just delete the #ifdef

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-07-08 Thread Leopold Toetsch
Clinton Pierce wrote: set P1[0], P0 getstdout P0# -- bug is here? Overwrote my P0. set P1[1], P0 Yep a bug is here. But this bug is a BASIC compiler bug. Things that go into aggregates (or are stored in lex pads/global tables) are stored by reference. You

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-07-08 Thread Leopold Toetsch
Clinton Pierce wrote: new $P4, PerlArray A current workaround for the missing clone in ParrotIO: getstdin P0 getstdout P1 getstderr P2 $P4[0], P0 $P4[1], P1 $P4[2], P2 leo

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-07-08 Thread Juergen Boemmels
Clinton Pierce [EMAIL PROTECTED] writes: Given that, there's a possible bug in Jürgen's patch (or IMCC?). Given: .sub _main call _INIT .arg 0 call _READLINE .result $S0 print $S0 end .end .sub _INIT $P0=new PerlArray # Array of BASIC

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-07-08 Thread Clinton Pierce
I'm not sure whether getstd\w+ is supposed to give me a new reference or not. From now on I'll code that portion defensively. What I do know is that imcc -t under Win32 is crash-happy and I can't trace beyond the first getstdin. Greatly simplified example: .sub _main $P0=new PerlArray

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-07-08 Thread Clinton Pierce
Typo! getstderr P3 # STDOUT Should have been getstdout Although... if left at getstderr the error also goes away. (Add that to my bullet list.) My haven't-grokked-the-code psychic abilities tell me that getstdout does something Real Bad to the stdout filehandle and

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-07-08 Thread Leopold Toetsch
Clinton Pierce wrote: What I do know is that imcc -t under Win32 is crash-happy Snippet runs fine on Linux (with typo adjusted or not) as well as your previous one, -t or not. But, as IO is under *construction* some issues might remain. They'll get resolved. leo

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-06-30 Thread Leopold Toetsch
Clinton A. Pierce (via RT) wrote: Suggestions welcome! First, always check the result of IO operations. If something fails, these return a PerlUndef, so: .sub _main fdopen $P1, 0, r # STDIN defined $I0, $P1 unless $I0, err read $S0, $P1, 255 print $S0

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-06-30 Thread Clinton Pierce
First, always check the result of IO operations. If something fails, these return a PerlUndef, so: .sub _main fdopen $P1, 0, r # STDIN defined $I0, $P1 *Doh* Stupid Newbie Error. unless $I0, err read $S0, $P1, 255

Re: [perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-06-30 Thread Leopold Toetsch
Clinton Pierce [EMAIL PROTECTED] wrote: .sub _main fdopen $P1, 0, r # STDIN BTW fdopen $P1, 0, # read STDIN 3. its currently only defined for PIO_OS_UNIX Okaaay, so the plan is for this to work and I should probably code this way anyway, right?

[perl #22854] Incongruity in Parrot IO and/or Parrot I/O crashes on STDIN read

2003-06-29 Thread Clinton A. Pierce
# New Ticket Created by Clinton A. Pierce # Please include the string: [perl #22854] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=22854 This is either an oversight in the current implementation *or* its a bug. Or