Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 8:45 PM +0200 8/24/04, Leopold Toetsch wrote:
>>Dan Sugalski <[EMAIL PROTECTED]> wrote:
>>> Nope -- we don't have bigints. :)
>>
>>Pardon, sir?
> We've got the big number code, but I don't see much reason to
> distinguish between integers and non-inte
John Siracusa <[EMAIL PROTECTED]> wrote:
> On Tue, 24 Aug 2004 14:46:53 -0400, Dan Sugalski <[EMAIL PROTECTED]> wrote:
>> The big question is whether being clever and producing the tightest
>> type is worth the time to figure out what that type is, as well as
>> the potentially uncertain output typ
Joshua Gatcomb <[EMAIL PROTECTED]> wrote:
> parrotbench.pl didn't correctly handle hyphens in
> names (it was using \w char class) - fixed
Updated in CVS. Thanks.
leo
Felix Gallo <[EMAIL PROTECTED]> wrote:
> Dan, any feeling about RISC vs. CISC? Because to me, this seems
> like a good place to punt, and provide two, maybe three mults:
Not the best idea. The same argument would hold for all operations that
could overflow. With such a strategy will end with MMD
--- Peter Kay <[EMAIL PROTECTED]> wrote:
> Ok, what's the elegent way to ignore/dispose of the output the tested
> module produces?
What I do whenever this happens is to move the printing code to a subroutine or method
and
override that to capture the output. So if I have something like this:
On 24 Aug 2004, at 16:04, Peter Kay wrote:
I am attempting to write tests (using whichever Tests::...) for a
module that will use Test::Harness. The module outputs to STDOUT (it
just does).
You might find
http://www.mail-archive.com/[EMAIL PROTECTED]/msg01690.html of
interest.
[snip]
So far,
On Tue, 24 Aug 2004, Aaron Sherman wrote:
> On Tue, 2004-08-24 at 11:50, Dave Whipp wrote:
>
> > You're assuming that C in a ternary operator. It
> > could be a binary operator, defined as {eval $RHS if $LHS; return $LHS}. For
> > that interpretation, one might choose a different name (e.g. C).
>
On 24 Aug 2004, at 22:14, Aaron Sherman wrote:
You don't HAVE to use auto-topicalization. You CAN always write it
long-hand if you find that confusing:
for @words -> $word {
given ($chars($word) > 70) -> $toolong {
say abbreviate($word) ?? $word;
On Aug 24, 2004, at 2:45 PM, Aaron Sherman wrote:
Please let me know who is appropriate for this, and whatever you do,
please don't reply to / CC the list. We don't need to bog down the
works
with discussion of spam filtering.
I don't think your SPF implementation is doing the right thing. I'll
At Tue, 24 Aug 2004 15:19:52 -0400,
Dan Sugalski wrote:
>
> At 11:47 AM -0700 8/24/04, Sean O'Rourke wrote:
> >At Tue, 24 Aug 2004 13:33:45 -0400,
> >Dan Sugalski wrote:
> >> 7) Strings are treated as floats for math operations
> >
> >I think we can do better than this by first converting a strin
Please let me know who is appropriate for this, and whatever you do,
please don't reply to / CC the list. We don't need to bog down the works
with discussion of spam filtering.
I'm noticing that mail from perl6-* is showing up with this header:
Received-SPF: softfail (mail.ajs.com: transitioning
On Tue, 2004-08-24 at 15:55, Adam D. Lopresto wrote:
> On Tue, 24 Aug 2004, Aaron Sherman wrote:
> > Yep, and since ~~ auto-topicalizes its lhs for its rhs, your binary ??
> > is all you need. I wish I'd seen your message before I sent my recent
> > one, as I would have just started from there.
>
Nick writes:
> 2 * 3 give a bignum. That feels evil.
> Except that the way that $a = 2 * 3 will work is that the assignment of
> the bignum temporary to $a will cause $a to drop it back to an int
> (for most languages' choice of target PMC) ?
Dan, any feeling about RISC vs. CISC? Because to me, t
On Tue, Aug 24, 2004 at 03:08:21PM -0400, Dan Sugalski wrote:
> At 8:56 PM +0200 8/24/04, Leopold Toetsch wrote:
> >Dan Sugalski <[EMAIL PROTECTED]> wrote:
> >> 5) Multiplication of two ints produces a bignum or an int, depending
> >> on the result
> >
> >Why that difference?
>
> At this point I'
Dave Whipp <[EMAIL PROTECTED]> wrote:
>
> "Brent 'Dax' Royal-Gordon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > The overloading of 'or' there is (IMHO) far more dangerous than the
> > overloading of '::' being discussed in this thread.
>
> Not necessarily. You're assuming tha
On Tue, 2004-08-24 at 11:50, Dave Whipp wrote:
> You're assuming that C in a ternary operator. It
> could be a binary operator, defined as {eval $RHS if $LHS; return $LHS}. For
> that interpretation, one might choose a different name (e.g. C).
> We could actually define ?? as a binary operator in
At 11:47 AM -0700 8/24/04, Sean O'Rourke wrote:
At Tue, 24 Aug 2004 13:33:45 -0400,
Dan Sugalski wrote:
6) Division of two ints produces a bignum
Where "bignum" means both "bigger than 32-bit integer" and "rational
number"? So
Yes.
4 / 2 ==> Bignum("2/1")
which doesn't get automatically downg
At 8:56 PM +0200 8/24/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
Okay, so:
4) Addition and subtraction of ints produces an int
???
Yeah, that was wrong. Later fixed. :)
5) Multiplication of two ints produces a bignum or an int, depending
on the result
Why that differen
At 8:45 PM +0200 8/24/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
At 1:42 PM -0400 8/24/04, Butler, Gerald wrote:
Shouldn't 4 also have potential to produce BigInt?
Nope -- we don't have bigints. :)
Pardon, sir?
We've got the big number code, but I don't see much reason to
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> Okay, so:
> 4) Addition and subtraction of ints produces an int
???
> 5) Multiplication of two ints produces a bignum or an int, depending
> on the result
Why that difference?
Int Int gives Bigint or Int (whatever fits)
for in (abs, neg, add, sub
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 1:42 PM -0400 8/24/04, Butler, Gerald wrote:
>>Shouldn't 4 also have potential to produce BigInt?
> Nope -- we don't have bigints. :)
Pardon, sir?
leo
At Tue, 24 Aug 2004 13:33:45 -0400,
Dan Sugalski wrote:
> 6) Division of two ints produces a bignum
Where "bignum" means both "bigger than 32-bit integer" and "rational
number"? So
4 / 2 ==> Bignum("2/1")
which doesn't get automatically downgraded to a normal int. Ok.
> 7) Strings are tre
> > Here is the modified parrotbench script along with
> > the
> > new data collection script and the script to make it
> > into a web page.
> >
> > I don't know what kind of layout/data would be
> > useful
> > to people so let me know if you want something else.
> >
> > I will update every Tuesd
On Tue, 24 Aug 2004 14:46:53 -0400, Dan Sugalski <[EMAIL PROTECTED]> wrote:
> The big question is whether being clever and producing the tightest
> type is worth the time to figure out what that type is, as well as
> the potentially uncertain output type.
Tangentially related: will promotion be su
At 1:39 PM -0400 8/24/04, Simon Glover wrote:
On Tue, 24 Aug 2004, Dan Sugalski wrote:>
6) Division of two ints produces a bignum
Surely it should only produce a bignum as a last resort. For instance,
shouldn't:
4 / 3
produce a float?
A float or a bignum, both are reasonable. There's that who
At 2:08 PM -0400 8/24/04, Matt Fowles wrote:
> >From: Dan Sugalski [mailto:[EMAIL PROTECTED]
> >10) The destination PMC is responsible for final conversion of the
>inbound value
>
I know there has been a lot of grumbling in the past about the need to
create PMCs to be the LHS of operations. I
--- Joshua Gatcomb <[EMAIL PROTECTED]>
wrote:
> Here is the modified parrotbench script along with
> the
> new data collection script and the script to make it
> into a web page.
>
> I don't know what kind of layout/data would be
> useful
> to people so let me know if you want something else.
>
On Tue, 2004-08-24 at 08:24, Aaron Sherman wrote:
> $foo => 'a' or 'b'
I was too focused on the idea of C/C<::> as a pair-like construct,
and I missed what should have been obvious:
a ?? b :: c
IS
given a { when true { b } default { c } }
Which S4 tells us is:
a -
--- Sebastian Riedel <[EMAIL PROTECTED]> wrote:
> >
> Take a look at tools/dev/parrotbench.pl
> It already does most of the things you want, you
> just have to parse it's
> output and feed it to your database.
> >
> Cheers,
> Sebastian
parrotbench.pl didn't correctly handle hyphens in
names (it
On Tue, Aug 24, 2004 at 01:51:12PM -0400, David H. Adler wrote:
>
> > (oh, and as an aside I released a new Acme::Test::Buffy, with slightly
> > improved documentation and spelling too - but no one cares about that)
>
> Says who?
*I* care. And you have no idea how stupid I felt submitting an R
Oops. I meant BigNum.
-Original Message-
From: Dan Sugalski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:47 PM
To: Butler, Gerald; '[EMAIL PROTECTED]'
Subject: RE: Numeric semantics for base pmcs
At 1:42 PM -0400 8/24/04, Butler, Gerald wrote:
>Shouldn't 4 also have potenti
Shouldn't 4 also have potential to produce BigInt?
-Original Message-
From: Dan Sugalski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:34 PM
To: [EMAIL PROTECTED]
Subject: Numeric semantics for base pmcs
Okay, so:
1) We round to zero when going from float to int
2) Overfl
Dan~
> >-Original Message-
> >From: Dan Sugalski [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, August 24, 2004 1:34 PM
> >To: [EMAIL PROTECTED]
> >Subject: Numeric semantics for base pmcs
> >
> >10) The destination PMC is responsible for final conversion of the
> >inbound value
> >
I know
On Tue, Aug 24, 2004 at 10:38:50AM +0100, Mark Fowler wrote:
> I released another testing module yesterday:
>
> http://search.cpan.org/dist/Test-DoubleEncodedEntities/
I note that that's not the name in the subject of your mail. I hope
this is the right one. :-)
> (oh, and as an aside I rele
At 1:42 PM -0400 8/24/04, Butler, Gerald wrote:
Shouldn't 4 also have potential to produce BigInt?
Nope -- we don't have bigints. :)
-Original Message-
From: Dan Sugalski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 1:34 PM
To: [EMAIL PROTECTED]
Subject: Numeric semantics for ba
On Tue, 24 Aug 2004, Dan Sugalski wrote:>
>
> 6) Division of two ints produces a bignum
Surely it should only produce a bignum as a last resort. For instance,
shouldn't:
4 / 3
produce a float?
Also, what about a case like:
4 / 2
Does that produce an int, a float or a bignum?
> 9) An
Okay, so:
1) We round to zero when going from float to int
2) Overflows, underflows, and division by zero throws an exception
3) All-float operations produce floats
4) Addition and subtraction of ints produces an int
5) Multiplication of two ints produces a bignum or an int, depending
on the resul
At 11:34 AM -0400 8/24/04, Butler, Gerald wrote:
So, would it have things like
$i = $j /E $k
$i = $j %E $k
which would both throw and exception if $k == 0 whereas
$i = $j / $k
$i = $j % %k
would not throw an exception and would instead return NaN
That'd be the plan, yeah. $i wouldn'
So, would it have things like
$i = $j /E $k
$i = $j %E $k
which would both throw and exception if $k == 0 whereas
$i = $j / $k
$i = $j % %k
would not throw an exception and would instead return NaN
-Original Message-
From: Dan Sugalski [mailto:[EMAIL PROTECTED]
Sent: Tu
I am attempting to write tests (using whichever Tests::...) for a module
that will use Test::Harness. The module outputs to STDOUT (it just does).
Now, in theory, Test::Harness currently ignores anything that doesn't
start with "ok" or "not ok", but for whatever reason, when I have
"no_plan",
At 11:29 -0400 8/24/04, Dan Sugalski wrote:
>What I'm thinking is that we add an O or X (or E, I don't care. I suppose we could
>get more verbose there too) variant to the basic math ops which checks the result for
>validity and throws an exception on something exceptional happening.
For floatin
Sam Phillips <[EMAIL PROTECTED]> wrote:
> Problem:
> 1) To create an efficient implementation of Basil I'll need a big
> PerlArray that is formed by expressions that create PerlStrings or more
> PerlArrays.
How big is "big"?
> So my main question is this: Are PerlArrays and PerlStrings an effici
At 4:26 PM +0100 8/24/04, Nicholas Clark wrote:
On Tue, Aug 24, 2004 at 10:49:37AM -0400, Dan Sugalski wrote:
As for rounding, I'm open to changes there too. Standard for
computing is round-to-zero, since it's easy (drop the fractional
part) but I was always taught round-to-closest-int. Too many
"Brent 'Dax' Royal-Gordon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Aaron Sherman <[EMAIL PROTECTED]> wrote:
> > I've always thought that particular bit of sugar was rather dangerous.
> > I'd even prefer a longhand:
> >
> > $foo either 0 or split();
>
> The overloading of
At 11:29 AM -0400 8/24/04, Matt Fowles wrote:
Dan~
I'm thinking now that multiplication of integers should upgrade to a
float (which is large enough to hold the result with no loss of
precision), division of integers should return a bignum (or a
bigrat), and all float operations should produce
Okay, since we're finally talking defined math semantics, lets talk
the low-level ops.
All our math ops right now just quietly do their thing. If values
wrap, truncate, or otherwise fuzz out, we don't do anything special.
This is fine, and fast, and what many languages want. It is, however,
re
Dan~
> I'm thinking now that multiplication of integers should upgrade to a
> float (which is large enough to hold the result with no loss of
> precision), division of integers should return a bignum (or a
> bigrat), and all float operations should produce floats. The
> destination PMC type can do
On Tue, Aug 24, 2004 at 10:49:37AM -0400, Dan Sugalski wrote:
> As for rounding, I'm open to changes there too. Standard for
> computing is round-to-zero, since it's easy (drop the fractional
> part) but I was always taught round-to-closest-int. Too many physical
> sciences classes, I expect. E
At 11:05 AM +0200 8/24/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
I'm up for some discussion on this one. I'm tempted to leave integer
binary ops integers,
I've already outlined that Python as well as Perl6 silently promote to
BigInt. I'd rather have Integer as the common
At 12:03 PM +0200 8/24/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
cvsuser 04/08/23 13:24:37
Modified:build_tools build_nativecall.pl
Log:
Due to an amazing amount of ineffable evil in hash.c, build_nativecall
got redone to use a PerlHash and PMCs instea
Hello,
I am currently in the early stages of writing a (parrot targeting)
compiler for an interpreted language I have been working on/with for the
past 4 years.
Background:
The language (Basil) is basically a functional (ish) language with a
C-like syntax that has an implicit concatenation (or
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> cvsuser 04/08/23 13:24:37
> Modified:build_tools build_nativecall.pl
> Log:
> Due to an amazing amount of ineffable evil in hash.c, build_nativecall
> got redone to use a PerlHash and PMCs instead of the lower-level access
> system it had
Luke Palmer wrote:
Aaron Sherman writes:
$foo??0::split()
ouch!
Yeah, seriously. I mean, what a subtle bug! It would take him hours to
figure out went wrong!
Sarcasm is an ugly thing.
One thing that I just thought of that could be intersting:
$foo => 'a' or 'b'
My thought was that l
I released another testing module yesterday:
http://search.cpan.org/dist/Test-DoubleEncodedEntities/
It detects strings like 'é' in your HTML, meaning it can detect
the case when you've double encoded your entities.
Anyone who spots any errors - please chuck 'em into RT. Patches agains
David Green wrote:
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aaron Sherman) wrote:
This bit of POD made me think about POD's lack of tabular formatting, a
common idiom in technical documentation. I know POD is still in the
wings, as it were, but I wanted to say this before I forget
/me fli
* Juerd ([EMAIL PROTECTED]) [040823 19:46]:
> David Green skribis 2004-08-23 11:30 (-0600):
> > One of the selling features (or one of the features that is always sold)
> > of POD is that you can mix it with your code. Except nobody does, at
> > least I can't recall that last time I saw a module
Aaron Sherman <[EMAIL PROTECTED]> wrote:
> I've always thought that particular bit of sugar was rather dangerous.
> I'd even prefer a longhand:
>
> $foo either 0 or split();
The overloading of 'or' there is (IMHO) far more dangerous than the
overloading of '::' being discussed in this thread.
[EMAIL PROTECTED] (Aaron Sherman) writes:
> > my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new("blah");
>
> Wow, that's pretty amazing... uh... I think I'd just prefer to do it
> the old fashioned way. If my suggestion was really that horrific, I
> withdraw the question.
These days, to
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> I'm up for some discussion on this one. I'm tempted to leave integer
> binary ops integers,
I've already outlined that Python as well as Perl6 silently promote to
BigInt. I'd rather have Integer as the common base type that implements
most of these two la
Stephane Peiry wrote:
dlfunc P2, P1, 'g_signal_connect_object', 'lptppi'
Whatever you'll try the current scheme is not compatible with this GTK
callback. Parrot needs a PMC as user_data. GTK awaits a GObject.
Parrot stuffs the interpreter and the Sub PMC into user_data and unpacks
that when th
Dan Sugalski <[EMAIL PROTECTED]> wrote:
> So, being clear here (I hope, though recent history suggests
> otherwise) what I want is the API that the GC/DOD system presents to
> the rest of the engine. This includes the functions you call to
> trigger a DOD or GC sweep, any functions or macros that
On Mon, 2004-08-23 at 18:13, Dan Sugalski wrote:
> The unary behavior of the types is reasonably straightforward. What
> I'm puzzling over right now is the binary behavior. It's the edge
> cases that are troublesome, of course -- what to do on overflow, and
> what to do with fractional results.
62 matches
Mail list logo