Re: ParrotIO File-Descriptors

2003-06-26 Thread Clinton Pierce
> Therefor I propose: > Remove the integer-valued File-Descriptors. The ParrotIO-objects > (wrapped in PMCs) are the only way to access IO. The > standard-descriptors stdin/stdout/stderr can be obtained by new ops > get_stdin (out PMC) > get_stdout (out PMC) > get_stderr (out PMC) > respectivly the

Question about scoping, .local and IMCC

2003-06-27 Thread Clinton Pierce
After a quick reading of this, I'd have expected the value of "f" at the indicated point to be 1, but instead it's 2. .local int f .sub _main .local int x .sub _foo1 f=1 x=2 call _foo2 end .end .sub _f

Re: Question about scoping, .local and IMCC (shorter)

2003-06-27 Thread Clinton Pierce
Sorry, the example was unnecessarily long. > After a quick reading of this, I'd have expected the value of "f" at the indicated > point to be 1, but instead it's 2. .local int f .sub _main .local int x .sub _foo1 f=1 x=2 call _foo2

Re: Question about scoping, .local and IMCC (shorter)

2003-06-27 Thread Clinton Pierce
> Yeah, I don't think you can use .local across subs like that. I think > .local means "local to this sub" and *inner subs aren't closures*. In > fact, I don't think inner subs are useful for much of anything at all. The more I read, the more likely I think this is a bug. For example, the note

Re: Question about scoping, .local and IMCC (shorter)

2003-06-28 Thread Clinton Pierce
> The story is like this: > - the "pseudo gloabal" declaration of C declares a variable usable in > both subs. This was invented[1] to cover vars outside of all subs in a > main execution stream, which is intersparsed with sub declarations, like > a perl programm could be. > - both subs "_foo1"

Re: Question about scoping, .local and IMCC (shorter)

2003-06-28 Thread Clinton Pierce
> Clint, I'm not sure which feature you mean is confusing here. I think you are > referring to supporting .local outside of subs, and I agree with that. However, > I think symbol tracking and scope checking is the high level language's > responsibility so the example you provided really should not

Re: [perl #22706] IMCC (& Parrot) crash with -t when invoke is run

2003-06-29 Thread Clinton Pierce
Clarification: running an invoke() at *any* time will cause all subsequent tracing to segfault. Thus (pseudoPASM): loadlib dlfunc invoke trace 1 end Will cause the segfault. > Original Message- > From: "Clinton A. Pierc

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 #22706] IMCC (& Parrot) crash with -t when invoke is run

2003-06-30 Thread Clinton Pierce
> I checked in a fix for something that *may* have fixed this, but I'm > not sure as I can't test it out at the moment. Try sync'ing up to CVS > and giving it another whirl. Still no luck. No luck either in getting a stack trace to the problem. This may just be a quirk in MSVS.NET. I can't ge

Stupid Parrot Tricks

2003-07-03 Thread Clinton Pierce
Prompted by a comment in gnat's journal on use.perl.org, I present: Parrot BASIC CGI http://www.camfriends.org/testform.html Let the fun begin. :)

Fw: Re: [ANNOUNCE] Parrot is feature-frozen until Wednesday

2003-07-04 Thread Clinton Pierce
Whoops. Needed to go to the list as well. > Original Message- > From: "Clinton Pierce" <[EMAIL PROTECTED]> > To: "Dan Sugalski" <[EMAIL PROTECTED]> > Date: Fri, Jul-4-2003 4:24 PM > Subject: Re: [ANNOUNCE] Parrot is feature-

Re: [perl #22877] GC/Sweep errors in latest build

2003-07-04 Thread Clinton Pierce
> > I don't have a small test case for this. > > Please read some threads about IO & such after my post: > > Subject: Timely destruction and TRACE_SYSTEM_AREAS > Date: Thu, 26 Jun 2003 09:59:18 +0200 > > If your are sure, that you are on a different kind of bug, then I'll > have a closer look

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

Thanks for clearing up Px usage (was [perl #22854] )

2003-07-08 Thread Clinton Pierce
> 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 have to clone PMCs to get independed vars: Thanks for clearing this up. In my head I was confused between the difference in, say,

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