Jeff Clites <[EMAIL PROTECTED]> wrote:
> On Apr 16, 2004, at 9:29 AM, Leopold Toetsch wrote:
>> $ ./bench -b=^oo[234f]
> Looks cool!
Yep.
> BTW, I'm failing a bunch of tests now (Mac OS X); not sure if it's
> related:
Strange. valgrind doesn't indicate any problem with these tests.
> I'll po
Here is the updated version with hashvalue calculation. Please test it
on different platforms:
- $ perl c2str.pl src/objects.c > src/objects.str
- enable #include "objects.str" near the top of the file
- $ make
see also "Constant strings - again" from yesterday.
Thanks,
leo
c2str.pl
Descriptio
Jarkko Hietaniemi <[EMAIL PROTECTED]> wrote:
> The attached patch lazily changes both offs and d to unsigned, which
> seems to fine by the Tru64 cc.
Thanks, applied.
leo
Aaron Sherman <[EMAIL PROTECTED]> wrote:
> On Fri, 2004-04-16 at 18:18, Leopold Toetsch wrote:
> Sorry, I gave the wrong impression. I meant it looks suspiciously like
> Python is doing a lazy construction on those objects, not that there is
> anything wrong with the benchmark.
No, I don't think
On Apr 16, 2004, at 9:29 AM, Leopold Toetsch wrote:
With all current optimizations[1] I now have these timings:
$ ./bench -b=^oo[234f]
Numbers are relative to the first one. (lower is better)
p-j-Oc perl-th perlpython ruby
oo2 100%182%152%90% 132%
oo3 100%
On Fri, 16 Apr 2004, Juerd wrote:
> Defining ` to be a bareword quoting operator would be only one step away
> from what I suggested initially:
>
> 1. %hash`key
> 2. %array`5
> 3. :key`value
>
> 4. say `hello;
>
> This would make it like <<>> now, but allowing only one bareword, and
> only if it is
Perl.com has just made A12 available:
http://www.perl.com/pub/a/2004/04/16/a12.html
Warning -- 20 pages, the first of which is a table of contents.
Enjoy,
-- c
On Fri, 2004-04-16 at 18:18, Leopold Toetsch wrote:
> Aaron Sherman <[EMAIL PROTECTED]> wrote:
>
> > That looks suspicious... especially Python.
>
> You have the sources in examples/benchmarks. Maybe we are comparing
> apples and oranges. But the code looks good to me.
Sorry, I gave the wrong im
Aaron Sherman <[EMAIL PROTECTED]> wrote:
> That looks suspicious... especially Python.
You have the sources in examples/benchmarks. Maybe we are comparing
apples and oranges. But the code looks good to me.
> I would suggest using iterations that go much longer so that you can
> detect over-optim
Jonathan Scott Duff skribis 2004-04-16 15:51 (-0500):
> > To get an item out of a hash, you can write %varname{"key"}.
> > You can also write %varname<> if there aren't any spaces in
> > the key. Finally, if the key doesn't have any characters in it
> > except for letters, numbers
On Fri, 16 Apr 2004, Aaron Sherman wrote:
> > > @matrix... = <<1 0 0 1>>;
>
> In the case of:
>
> @matrix = <<1 2 3 4 5>>;
>
> You need only add the type:
>
> int @matrix = <<1 2 3 4 5>>;
> There is no string phase, or at least should never be.
> The compiler can
> pre-compute the
On Fri, Apr 16, 2004 at 03:12:58PM -0400, Aaron Sherman wrote:
> On Fri, 2004-04-16 at 12:35, Juerd wrote:
>
> > backticks encourage interpolation.
>
> ... and?
>
> >From the point of view of a Web developer who deals with (potentially)
> hostile data, I see the problem (though the solution is s
On Fri, Apr 16, 2004 at 09:16:15PM +0200, Juerd wrote:
> However, I could be guessing badly. It could be that someone who says
> Perl 6 should not have a third syntax because there are already two
> really has thought about it. We have many ways of saying "foo() if not
> $bar" in Perl 5 and I use m
On Fri, Apr 16, 2004 at 01:17:10PM -0700, Brent 'Dax' Royal-Gordon wrote:
> I don't claim that they won't be used often. I claim that the *best*
> solution is to fix the syntax we already have, not add more. Failing
> that, we should make sure that the syntax we add is as globally useful
> as
On Fri, 2004-04-16 at 12:35, Juerd wrote:
> backticks encourage interpolation.
... and?
>From the point of view of a Web developer who deals with (potentially)
hostile data, I see the problem (though the solution is smarter
tainting, not removing functionality). From the point of view of a
gener
Brent 'Dax' Royal-Gordon skribis 2004-04-16 13:17 (-0700):
> Clever definition of the colon operator, or creation of a
> bareword-quoting operator, would allow you to use "barewords" anywhere
> you wanted to.
Defining ` to be a bareword quoting operator would be only one step away
from what I sugg
Jonathan Scott Duff wrote:
On Fri, Apr 16, 2004 at 10:44:47AM -0700, Brent 'Dax' Royal-Gordon wrote:
Regex aliases, threads, lexicals, junctions, and dwimmery make things a
*lot* easier to program. This syntactic sugar you're proposing doesn't.
But it *does* make an oft-used construct easier to
Larry Wall skribis 2004-04-16 11:50 (-0700):
> On Fri, Apr 16, 2004 at 07:12:44PM +0200, Juerd wrote:
> : Except for the shocking number of closed-minded people on this list.
> You seem to be one of them. From my point of view, you've had your
> ego plastered all over this proposal from the start,
On Fri, Apr 16, 2004 at 07:12:44PM +0200, Juerd wrote:
Aaron Sherman skribis 2004-04-16 9:52 (-0400):
3. You proposed (late in the conversation) that both could co-exist, and
while that's true from a compiler point of view, it also leads to:
`stuff``stuff`stuff
Huh? No. That is a syntax er
On Fri, Apr 16, 2004 at 10:44:47AM -0700, Brent 'Dax' Royal-Gordon wrote:
> Regex aliases, threads, lexicals, junctions, and dwimmery make things a
> *lot* easier to program. This syntactic sugar you're proposing doesn't.
But it *does* make an oft-used construct easier to type. That adds up
ov
# New Ticket Created by Jarkko Hietaniemi
# Please include the string: [perl #28868]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=28868 >
In Tru64 I got a compilation warning from the src/string.c:
cc: Warning: src/st
David Wheeler skribis 2004-04-16 7:56 (-0700):
> And I'll bet it's something like this:
> for my $i (0..$#thingies) {
> my $css_class = $i % 2 ? 'blue' : 'yellow';
> print "$thingies[$i]\n";
> }
Probably.
Can't we in Perl 6 just use something like this?
for @thingies, qw(bl
Aaron Sherman skribis 2004-04-16 9:52 (-0400):
> 3. You proposed (late in the conversation) that both could co-exist, and
> while that's true from a compiler point of view, it also leads to:
> `stuff``stuff`stuff
Huh? No. That is a syntax error.
> $a`a=$a`b~`a` # Try to tell your edi
David Wheeler skribis 2004-04-16 9:58 (-0700):
> >for @thingies, qw(blue yellow) xx Inf -> $thingy, $class {
> >print qq[$thingy\n";
> >}
> I think that $class would be C after the second record in
> @thingies, unfortunately.
Even with the "xx Inf"? Why?
Juerd
Brent 'Dax' Royal-Gordon skribis 2004-04-16 0:25 (-0700):
> Number of keystrokes isn't our only concern here. This is Perl, not
> APL--we care about the size of the language and its intuitiveness too.
> (Perhaps not much, but we do.)
Not the only concern, but to me, it is as important as reada
Sean O'Rourke skribis 2004-04-15 8:55 (-0700):
> [EMAIL PROTECTED] (Juerd) writes:
> > I think it has to go because `pwd`, `hostname`, `wget -O - $url`
> > should not be easier than the purer Perl equivalents and because
> > ``'s interpolation does more harm than good.
> I have to disagree with yo
Juerd wrote:
Brent 'Dax' Royal-Gordon skribis 2004-04-16 0:25 (-0700):
I don't like %hash{'foo'} because it's ugly. I don't like %hash<>
because it's ugly and adds syntax. I don't like %hash`foo because it's
ugly, adds syntax, and looks nothing like an indexing operator. (I'll
revisit this t
On Thu, 2004-04-15 at 18:23, Austin Hastings wrote:
> > @matrix... = <<1 0 0 1>>;
> Keep in mind that you're using a quoting operator. For numbers, you can just
> use (0, 1, 2, 3)
> and probably be better understood. (The <> approach will
> work, but it will take all the numbers through a str
On Fri, 2004-04-16 at 12:29, Leopold Toetsch wrote:
> With all current optimizations[1] I now have these timings:
>
> $ ./bench -b=^oo[234f]
> Numbers are relative to the first one. (lower is better)
> p-j-Oc perl-th perlpython ruby
> oo2 100%182%152%90% 132%
> o
On Apr 16, 2004, at 10:14 AM, Juerd wrote:
Even with the "xx Inf"? Why?
Oh, right, missed that. Sorry.
David
With all current optimizations[1] I now have these timings:
$ ./bench -b=^oo[234f]
Numbers are relative to the first one. (lower is better)
p-j-Oc perl-th perlpython ruby
oo2 100%182%152%90% 132%
oo3 100%276%256%333%383%
oo4 100%137%
Mark J. Reed wrote:
Nope. I'd be perfectly happy if the modulus operator were spelled "mod"
instead of %, which has never struck me as particularly intuitive.
I always saw it as being a funny division sign. See the little slash in
there?
--
Brent "Dax" Royal-Gordon <[EMAIL PROTECTED]>
Perl an
On 2004-04-16 at 08:50:38, Brent 'Dax' Royal-Gordon wrote:
> Mark J. Reed wrote:
> >Nope. I'd be perfectly happy if the modulus operator were spelled "mod"
> >instead of %, which has never struck me as particularly intuitive.
>
> I always saw it as being a funny division sign. See the little s
> -Original Message-
> From: Mark J. Reed [mailto:[EMAIL PROTECTED]
> Sent: Friday, 16 April, 2004 11:43 AM
> To: [EMAIL PROTECTED]
> Subject: Re: backticks
>
>
> On 2004-04-16 at 11:17:41, Austin Hastings wrote:
> > I'm totally willing to agree with you, Mark.
>
> > A) Do you code hashin
On 2004-04-16 at 11:17:41, Austin Hastings wrote:
> I'm totally willing to agree with you, Mark.
> A) Do you code hashing algorithms so frequently that you need a special,
> low-cost-of-access operator built in to the language to support it?
Nope. I'd be perfectly happy if the modulus operator w
This vtable currently copies the string. I've tried now:
PMC_str_val(SELF) = value;
instead (perlstring.pmc:193). This breaks exactly one test which
explicitely tests this behavior nothing else.
And there is of course the assign opcode, that does the same. But we
could have:
set P0, "xx"
On Fri, 2004-04-16 at 10:56, David Wheeler wrote:
> On Apr 16, 2004, at 7:19 AM, Simon Cozens wrote:
>
> > I'll bet you the actual most *common* use of modulus is:
[...]
> > print $percent_done,"\n" unless $percent_done % 10;
> And I'll bet it's something like this:
> my $css_class =
> -Original Message-
> From: David Wheeler [mailto:[EMAIL PROTECTED]
>
> On Apr 16, 2004, at 7:19 AM, Simon Cozens wrote:
>
> > I'll bet you the actual most *common* use of modulus is:
> >
> > until ( my ($percent_done=done()) == 100 ) {
> > do_work();
> > print $perce
> -Original Message-
> From: Mark J. Reed [mailto:[EMAIL PROTECTED]
>
> On 2004-04-15 at 19:39:25, Austin Hastings wrote:
> > Of course you used for buffers that were not powers of 2. Had they
> > been powers of 2, you would have used & or &~. The fact that you
> > didn't use a power of 2
On Apr 16, 2004, at 7:19 AM, Simon Cozens wrote:
I'll bet you the actual most *common* use of modulus is:
until ( my ($percent_done=done()) == 100 ) {
do_work();
print $percent_done,"\n" unless $percent_done % 10;
}
And I'll bet it's something like this:
for my $i (0..$#t
While trying to speed up hash lookups [1] I came (again) to the problem
that we are missing true PMC constants. We just have a special Sub PMC
for storing subroutine entries but no general way to represent a
constant PMC item. E.g.:
.const pmc s = "value"
.const pmc i = 1
...
add $P
[EMAIL PROTECTED] (Mark J. Reed) writes:
> > The biggest use of modulus is in implementing hashes
>
> Rather, one of the biggest uses. I don't have documentation to support
> the claim that it is the biggest, and there are certainly others -
> date arithmetic, astronomy etc.
I'll bet you the ac
On 2004-04-16 at 09:23:44, Mark J. Reed wrote:
> On 2004-04-15 at 19:39:25, Austin Hastings wrote:
> > Of course you used for buffers that were not powers of 2. Had they
> > been powers of 2, you would have used & or &~. The fact that you
> > didn't use a power of 2 is pretty questionable. The dr
On 2004-04-16 at 00:25:51, Brent 'Dax' Royal-Gordon wrote:
> Number of keystrokes isn't our only concern here. This is Perl, not
> APL--we care about the size of the language and its intuitiveness too.
> (Perhaps not much, but we do.)
In any case, Perl is far more typable than APL unless you ha
On 2004-04-15 at 19:39:25, Austin Hastings wrote:
> Of course you used for buffers that were not powers of 2. Had they
> been powers of 2, you would have used & or &~. The fact that you
> didn't use a power of 2 is pretty questionable. The dread Unix
> wizards will no doubt have questions for you
Chromatic <[EMAIL PROTECTED]> wrote:
> After playing with vim syntax highlighting for a few minutes, I hacked
> up syntax highlighting for POD comments.
Thanks, applied.
leo
Jens Rieks <[EMAIL PROTECTED]> wrote:
> Hi,
> make_COW_reference in src/string.c does not check for a NULL string.
Thanks, applied.
leo
Chromatic <[EMAIL PROTECTED]> wrote:
> After playing with vim syntax highlighting for a few minutes, I hacked
> up syntax highlighting for POD comments. This works on my box, but I'm
> not quite sure it's portable. Are there any other vim hackers willing
> to try it out?
Works great here.
> It
It's time to come again with this topic, last discussion was AFAIK in:
Newsgroups: perl.perl6.internals
Date: Thu, 22 Jan 2004 14:35:54 -0500
Subject: Re: Another GC bug
From: [EMAIL PROTECTED] (Dan Sugalski)
Attached is the slightly modified version of c2str.pl. This generates a
string "
Hi,
make_COW_reference in src/string.c does not check for a NULL string.
Due to this, parrot crashes if the join OP is used and a PMC's __get_string
method returns a null string.
A test case (patch against t/op/string.t) as well as a patch (against
src/string.c) is attached to the message.
jen
Austin Hastings skribis 2004-04-15 19:37 (-0400):
> I'm sure that if Juerd or someone were to write a "PublicHash" class,
> they would cleverly reverse the access so that some collision-unlikely
> path would get the methods.
I'm sure I have explained several times already why I think using the .
o
Brent 'Dax' Royal-Gordon skribis 2004-04-15 16:56 (-0700):
> 1. Allow %hash<> to be typed as %hash. There would be a
>conflict with numeric less-than, but we can disambiguate with
>whitespace if necessary. After all, we took the same solution with
>curlies.
Curlies which, as said, I
Chromatic <[EMAIL PROTECTED]> wrote:
> What needs to be done before making it the default? I'm anxious to
> remove CALL__BUILD=1 from my parrot alias.
Waiting for famous final words by our big cheese...
leo
# New Ticket Created by chromatic
# Please include the string: [perl #28849]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=28849 >
Hi there,
After playing with vim syntax highlighting for a few minutes, I hacked
up syn
On Thu, Apr 15, 2004 at 12:27:12PM -0700, Scott Walters wrote:
> * Rather than eliciting public comment on %hash`foo (and indeed %hash<>)
> the proposal is being rejected out of hand (incidentally, the mantra of the Java
> community Process seems to be "you don't need X, you've got Y", and it took
[EMAIL PROTECTED] (Juerd) writes:
> I think it has to go because `pwd`, `hostname`, `wget -O - $url`
> should not be easier than the purer Perl equivalents and because
> ``'s interpolation does more harm than good.
I have to disagree with you here. The Perl way is not always the Perl
way -- the b
Brent 'Dax' Royal-Gordon writes:
> "If the inside of a hash indexer consists entirely of \w characters, it
> will be interpreted as the name of a hash key. If you want it to call a
> subroutine instead, add a ~ stringifying operator to the beginning of
> the call, or a pair of parentheses to th
On Apr 14, 2004, at 11:16 AM, Larry Wall wrote:
I think the idea of tagging complete strings with "language" is not
terribly useful. If it's to be of much use at all, then it should
be generalized to a metaproperty system for applying any property to
any range of characters within a string, such
Juerd wrote:
Brent 'Dax' Royal-Gordon skribis 2004-04-15 16:56 (-0700):
1. Allow %hash<> to be typed as %hash. There would be a
conflict with numeric less-than, but we can disambiguate with
whitespace if necessary. After all, we took the same solution with
curlies.
Curlies which, as said,
59 matches
Mail list logo