2. Proposal for _keyed opcodes
--
The thread with subject "pdd06_pasm, pdd08_keys: _keyed ops" clearly
showes the shortcomings of the current _keyed opcodes and the
implementation of these.[1]
My first proposal WRT a solution (modifying the run loop) did not earn
much
the tests under t/src currently fail on Win32 (with MSVC++ 6.0).
the first problem is that it needs another build step (make shared)
which is not mentioned anywhere. linking the programs require a
libparrot.lib which is not built by the standard make target.
probably it should be a prerequisite f
# New Ticket Created by Leopold Toetsch
# Please include the string: [perl #17455]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt2/Ticket/Display.html?id=17455 >
This patch changes the register and constant table addressing in the
produced core_
I have a sudden need to do signed 16-bit integer math in PASM. Any
suggestions on where to begin?
I'd rather not re-invent this wheel if someone else has a better idea. And
if I do, where can I find good tools for it?
On Fri, 20 Sep 2002, Clinton A. Pierce wrote:
> I have a sudden need to do signed 16-bit integer math in PASM. Any
> suggestions on where to begin?
Does shifting everything left by 16 bits (on 32-bit platforms) to operate
on, then shifting it back to the right to use, work?
/s
> basic.t 2/2
> basic_2.obj : error LNK2001: unresolved external symbol
> _internal_exception
I thought I submitted a patch for this to the bug list but I guess it was
eaten or malformatted... the list of exported symbols for win32
(config/gen/libparrot_def/libparrot_def.in) only includes the emb
John Williams wrote:
>On Fri, 20 Sep 2002, Larry Wall wrote:
>
>
>>On Fri, 20 Sep 2002, John Williams wrote:
>>: On Fri, 20 Sep 2002, Larry Wall wrote:
>>: >
>>: > Yes, in fact any list forced into scalar context will make a ref in Perl 6:
>>: >
>>: > $arrayref = (1,2,3);
>>:
>>: That wou
> >I was just thinking that $((1,2,3)) is also the same as [1,2,3],
> >and shorter than scalar(1,2,3).
> >
> I wonder if you can't just use $(1, 2, 3) to the same effect.
I think you can. I was under the impression that the C comma was dying,
so that would have to make a list or err.
> Al
Here is a discussion thread of Exegesis 5
http://www.perl.com/pub/a/2002/08/22/exegesis5.html at
http://developers.slashdot.org/developers/02/08/23/1232230.shtml?tid=145
But the signal/noise is too low, with side tracks into
Monty Python etc.
In section "Smarter alternatives" there is this co
According to Luke Palmer:
> I think to get Perl5 behavioueaur :), you do this:
>
> my @flatL = ( *("1a", "2a"), *("1b", "2b") );
Geez, I hope not, because that would imply that in
my @v = ( &func() );
that &func is called in a scalar context.
--
Chip Salzenberg - a.k.a. -
Larry wrote:
> : $shouldbe3 = (1,2,3) + 0;
>
> It's 3, though not for the reason a Perl 5 programmer would think.
> (In Perl 6 it's the length of the anonymous array, not the
> last value.)
This kind of clever magic always makes me nervous:
it introduces subtle bug potentials.
(7,8,9) ==
According to David Whipp:
> (7,8,9) == 3 # true
> (7,8) == 2 # true
> (7) == 1 # false
> () == 0 # true?
Hell, yes, why didn't I think of that? This is exactly the same
problem that afflicts Python's tuple syntax!
Larry, I strongly suggest that making () act in any way like [
On Fri, 20 Sep 2002, Chip Salzenberg wrote:
> According to Luke Palmer:
> > I think to get Perl5 behavioueaur :), you do this:
> >
> > my @flatL = ( *("1a", "2a"), *("1b", "2b") );
>
> Geez, I hope not, because that would imply that in
>
> my @v = ( &func() );
>
> that &func is called
On Fri, 20 Sep 2002, David Whipp wrote:
> Larry wrote:
> > : $shouldbe3 = (1,2,3) + 0;
> >
> > It's 3, though not for the reason a Perl 5 programmer would think.
> > (In Perl 6 it's the length of the anonymous array, not the
> > last value.)
>
> This kind of clever magic always makes me nervous:
> > This kind of clever magic always makes me nervous:
> > it introduces subtle bug potentials.
> >
> > (7,8,9) == 3 # true
> > (7,8) == 2 # true
> > (7) == 1 # false
> > () == 0 # true?
>
> I believe the last two cases should be:
>
> (7,)== 1
> (,) == 0
>
> B
> "SC" == Simon Cozens <[EMAIL PROTECTED]> writes:
SC> [EMAIL PROTECTED] (Uri Guttman) writes:
>> actually i just had another thought. you don't need any of the $foo :=
>> stuff as the match tree will have it all for you.
SC> Yes, but it's nice to be able to access the captured thin
On 20 Sep 2002, Simon Cozens wrote:
: > their names. also if you use a scalar to grab something which is in a
: > quantified outer rule what is put in the var? a ref to a list of the
: > grabbed things?
:
: *nod* Something I'd like to know.
Yes, in fact any list forced into scalar context will m
On Sun, 15 Sep 2002, Steve Fink wrote:
: What should this do:
:
: my $x = "the letter x";
: print "yes" if $x =~ /the { $x .= "!" } .* !/;
Depends. I think it may be necessary for speed and safety reasons
to set COW on the string we're matching, so that you're always matching
against the or
According to John Williams:
> I believe the last two cases should be:
> (7,)== 1
> (,) == 0
Gack! It's Python's tuple syntax! Run away! Run away!
Seriously, having actually programmed Python for money (no smiley --
it was NOT fun), I can say that this syntactical hack would be
On Fri, 20 Sep 2002, Tanton Gibbs wrote:
> > I believe the last two cases should be:
> >
> > (7,)== 1
> > (,) == 0
> >
> > Because its the perl6 comma that creates the list, not the parenthesis.
> >
> > ~ John Williams
>
> If this is the case, then can you also have:
>
> (,7)
>
>
On Fri, Sep 20, 2002 at 09:02:52PM -0600, John Williams wrote:
> On Fri, 20 Sep 2002, Tanton Gibbs wrote:
> > If this is the case, then can you also have:
> >
> > (,7)
> >
> > What is its length?
>
> Hmm, it's a syntax error in perl5.
I'd advocate it continuing to be a syntax error in perl 6.
On Fri, Sep 20, 2002 at 02:17:42PM -0700, David Whipp wrote:
> Larry wrote:
> > : $shouldbe3 = (1,2,3) + 0;
> >
> > It's 3, though not for the reason a Perl 5 programmer would think.
> > (In Perl 6 it's the length of the anonymous array, not the
> > last value.)
>
> This kind of clever magic
On Fri, Sep 20, 2002 at 10:16:38PM -0400, Chip Salzenberg wrote:
> According to John Williams:
> > I believe the last two cases should be:
> > (7,)== 1
> > (,) == 0
>
> Gack! It's Python's tuple syntax! Run away! Run away!
>
> Seriously, having actually programmed Python for m
> > This kind of clever magic always makes me nervous:
> > it introduces subtle bug potentials.
> >
> > (7,8,9) == 3 # true
> > (7,8) == 2 # true
> > (7) == 1 # false
>
> Why is this one false? I'd expect it to be true just as the others.
(7) == 7
why? Otherwise, we couldn't use
On Fri, 2002-09-20 at 04:14, Larry Wall wrote:
> On 20 Sep 2002, Simon Cozens wrote:
> : > their names. also if you use a scalar to grab something which is in a
> : > quantified outer rule what is put in the var? a ref to a list of the
> : > grabbed things?
> :
> : *nod* Something I'd like to kno
On Thu, 19 Sep 2002, Brent Dax wrote:
: Aaron Sherman:
: # topicalize: To default to C<$_> in a prototype (thus
: # acquiring the caller's current topic).
:
: Well, to topicalize a region of code is actually to specify a different
: topic, that is, a different value for $_. For example:
:
:
On 20 Sep 2002, Aaron Sherman wrote:
: Is that "any list" as oppopsed to "any array"? Or is that arrayref in a
: numeric context the length of the array? In other words does this do
: what I think I think it does?
:
: $shouldbe3 = (1,2,3) + 0;
It's 3, though not for the reason a Perl 5 pro
Larry Wall:
# That binds the dynamically surrounding $_ to $x as an
# out-of-band parameter. Can also bind to $_ to make it the
# current topic.
The problem I have with that is this:
sub for_trace(*@array, &block) {
loop($_=0; $_ < @array; $_++) {
On Fri, 2002-09-20 at 10:36, Larry Wall wrote:
> On Thu, 19 Sep 2002, Brent Dax wrote:
> : (An aside: it strikes me that you could use C as a scoped lexical
> : alias, i.e.
> : given $bar -> $foo {
> : print $foo;
> : }
> Sure, though it also aliases to $_.
>
Does that mean
On Fri, 2002-09-20 at 10:39, Larry Wall wrote:
> On 20 Sep 2002, Aaron Sherman wrote:
> : Is that "any list" as oppopsed to "any array"? Or is that arrayref in a
> : numeric context the length of the array? In other words does this do
> : what I think I think it does?
> :
> : $shouldbe3 = (1,
On Fri, 20 Sep 2002, Brent Dax wrote:
: Larry Wall:
: # That binds the dynamically surrounding $_ to $x as an
: # out-of-band parameter. Can also bind to $_ to make it the
: # current topic.
:
: The problem I have with that is this:
:
: sub for_trace(*@array, &block) {
: l
On Fri, 20 Sep 2002, Larry Wall wrote:
> But if a fast implementation needs to keep pointers into a string
> rather than offsets from the beginning, we're asking for core dumps if
> the string is modified out from under the pointers, or we have to
> adjust all known pointers any time the string ma
On 20 Sep 2002, Aaron Sherman wrote:
: On Fri, 2002-09-20 at 10:36, Larry Wall wrote:
: > On Thu, 19 Sep 2002, Brent Dax wrote:
:
: > : (An aside: it strikes me that you could use C as a scoped lexical
: > : alias, i.e.
: > : given $bar -> $foo {
: > : print $foo;
: > : }
:
: > Sur
On Fri, 20 Sep 2002, Larry Wall wrote:
>
> Yes, in fact any list forced into scalar context will make a ref in Perl 6:
>
> $arrayref = (1,2,3);
That would seem to obviate the need for brackets to define array
references. Is there any case where [1,2,3] would be needed instead of
(1,2,3)?
Al
On 20 Sep 2002, Aaron Sherman wrote:
: I assumed that's what C was. It does have the disadvantage of
: looking like variable assignment, though.
BTW, latest leaning is toward = rather than //= for parameter defaults,
since it can, in fact, be undef if the parameter is supplied, while //=
seems to
On Fri, 20 Sep 2002, Sean O'Rourke wrote:
: On Fri, 20 Sep 2002, Larry Wall wrote:
: > But if a fast implementation needs to keep pointers into a string
: > rather than offsets from the beginning, we're asking for core dumps if
: > the string is modified out from under the pointers, or we have to
On Fri, 20 Sep 2002, Larry Wall wrote:
> The current thinking as of Zurich is that the "given" passes in
> separate from the ordinary parameters:
>
> sub ($a,$b,$c) is given($x) {...}
>
> That binds the dynamically surrounding $_ to $x as an out-of-band
> parameter. Can also bind to $_ to mak
Larry said:
> BTW, latest leaning is toward = rather than //= for parameter
> defaults, ...
Horray!
Sorry. Couldn't resist. :-)
-angel
"Simple men are happy with simple presents"
On Fri, 20 Sep 2002, John Williams wrote:
: On Fri, 20 Sep 2002, Larry Wall wrote:
: >
: > Yes, in fact any list forced into scalar context will make a ref in Perl 6:
: >
: > $arrayref = (1,2,3);
:
: That would seem to obviate the need for brackets to define array
: references. Is there any
On Fri, 20 Sep 2002, Sean O'Rourke wrote:
: On Fri, 20 Sep 2002, Larry Wall wrote:
: > The current thinking as of Zurich is that the "given" passes in
: > separate from the ordinary parameters:
: >
: > sub ($a,$b,$c) is given($x) {...}
: >
: > That binds the dynamically surrounding $_ to $x as
On Fri, 20 Sep 2002, Larry Wall wrote:
> On Fri, 20 Sep 2002, John Williams wrote:
> : On Fri, 20 Sep 2002, Larry Wall wrote:
> : >
> : > Yes, in fact any list forced into scalar context will make a ref in Perl 6:
> : >
> : > $arrayref = (1,2,3);
> :
> : That would seem to obviate the need for
Personally, I like the looks of
sub foo($a, $b is given) { ... }
> Does this mean that we allow/encourage uses of $_ other than as a default
> for an optional argument? I think it would be less confusing and
> error-prone to associate the underscore-aliasing with the parameter $_
> wil
On Fri, 20 Sep 2002, Jonathan Scott Duff wrote:
> > But I cannot tell whether (7) is list context or numeric context,
>
> Nope, you can't tell without the surrounding context:
>
> (7) + 0;# numeric
> $a = (7); # list
> (7) == 1; # boolean (same as (7).length =
43 matches
Mail list logo