Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Some tasks for the interested
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Leopold Toetsch  
View profile  
 More options Jun 27 2004, 12:18 pm
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Sun, 27 Jun 2004 18:18:50 +0200
Local: Sun, Jun 27 2004 12:18 pm
Subject: Some tasks for the interested
1) Python has a complex builtin class. So we'll need one too.
    * Create a complex PMC.
    * Parse complex constants '4j'
    * Put these constants into the PBC?

2) We need a *array.sort (NCI) method(s)
    That's kind of a PITA: The fixed/resizable array PMCs don't
    have push/pop/unshift/shift ..., and shift/unshift will not
    really fly for these classes, but they have simple linear
    memory. The list.c based arrays OTOH have memory splitted
    into chunks, which complicates sorting.
    The compare function of sort must be overridable with PASM code.

I hope that's all finished, when I'm back from Germany on Thursday:)

leo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Worthington  
View profile  
 More options Jun 27 2004, 2:30 pm
Newsgroups: perl.perl6.internals
From: jonat...@jwcs.net (Jonathan Worthington)
Date: Sun, 27 Jun 2004 19:30:05 +0100
Local: Sun, Jun 27 2004 2:30 pm
Subject: Re: Some tasks for the interested
"Leopold Toetsch" <l...@toetsch.at> wrote:
> 1) Python has a complex builtin class. So we'll need one too.
>     * Create a complex PMC.
>     * Parse complex constants '4j'

j?  I've always used i as the imaginary unit, though I believe j is used
more in engineering fields ('cus they use i for current, or so I've heard).
i for "imaginary" would make more sense to me, but that's just me. ;-)

Jonathan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ion Alexandru Morega  
View profile  
 More options Jun 27 2004, 6:57 pm
Newsgroups: perl.perl6.internals
From: al...@iem.pub.ro (Ion Alexandru Morega)
Date: Mon, 28 Jun 2004 00:57:44 +0200
Local: Sun, Jun 27 2004 6:57 pm
Subject: Re: Some tasks for the interested

Jonathan Worthington wrote:
> "Leopold Toetsch" <l...@toetsch.at> wrote:

>>1) Python has a complex builtin class. So we'll need one too.
>>    * Create a complex PMC.
>>    * Parse complex constants '4j'

> j?  I've always used i as the imaginary unit, though I believe j is used
> more in engineering fields ('cus they use i for current, or so I've heard).
> i for "imaginary" would make more sense to me, but that's just me. ;-)

> Jonathan

IMO the parser should understand both. And if noone else desperately
wants to do it i'll be glad to help.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Sugalski  
View profile  
 More options Jun 28 2004, 10:15 am
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Mon, 28 Jun 2004 10:15:46 -0400 (EDT)
Local: Mon, Jun 28 2004 10:15 am
Subject: Re: Some tasks for the interested

Cool, go for it. I'd think that for the set_(integer|number) vtable slots
we'd set the real part and make the imaginary part 0, while the string
version'd look for the "x + yi" version.

I think for now both i and j are fine for the imaginary part.

And I'm now thinking that we want to do mmd for assignment. Dammit. :(

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
d...@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ion Alexandru Morega  
View profile  
 More options Jun 28 2004, 12:51 pm
Newsgroups: perl.perl6.internals
From: al...@iem.pub.ro (Ion Alexandru Morega)
Date: Mon, 28 Jun 2004 18:51:41 +0200
Local: Mon, Jun 28 2004 12:51 pm
Subject: Re: Some tasks for the interested

Dan Sugalski wrote:
> <>Cool, go for it. I'd think that for the set_(integer|number) vtable
> slots
> we'd set the real part and make the imaginary part 0, while the string
> version'd look for the "x + yi" version.

And have set_num_keyed set the real and the imaginary part (indexed as
strings, say "real" and "imag") and maybe change the modulus and the
argument independently. Also get_num_keyed will return the real part,
imaginary part, modulus and argument (and maybe cache the last two).

>And I'm now thinking that we want to do mmd for assignment. Dammit. :(

You'll have to explain that to me. :)

I've done some more work on the String PMC and its tests, I'll send a
patch later today.

>                                    Dan

alexm

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leopold Toetsch  
View profile  
 More options Jul 1 2004, 2:42 am
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Thu, 1 Jul 2004 08:42:30 +0200
Local: Thurs, Jul 1 2004 2:42 am
Subject: Re: Some tasks for the interested

Dan Sugalski <d...@sidhe.org> wrote:
> And I'm now thinking that we want to do mmd for assignment. Dammit. :(

Don't think so. We need, ehem, probably, set_complex, get_complex and so
on vtables. Complex is a basic type like integer, number, or bignum.

def main():
        i = complex(2 + 1j)
        print i

>>> dis(im.main)

  2           0 LOAD_GLOBAL              0 (complex)
              3 LOAD_CONST               1 (2)
              6 LOAD_CONST               2 (1j)
              9 BINARY_ADD
             10 CALL_FUNCTION            1

MMD does the math then automatically, if the proper slots are filled.
Happily, the tests don't use complex very often. It's just:

,--[ The Pie-thon README.txt ]-----------------------------------------
| The benchmark here is intended to make Dan Sugalski's life difficult:
`----------------------------------------------------------------------

>                                    Dan

leo

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Sugalski  
View profile  
 More options Jul 6 2004, 10:58 am
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Tue, 6 Jul 2004 10:58:16 -0400
Local: Tues, Jul 6 2004 10:58 am
Subject: Re: Some tasks for the interested
At 8:42 AM +0200 7/1/04, Leopold Toetsch wrote:

>Dan Sugalski <d...@sidhe.org> wrote:

>>  And I'm now thinking that we want to do mmd for assignment. Dammit. :(

>Don't think so. We need, ehem, probably, set_complex, get_complex and so
>on vtables. Complex is a basic type like integer, number, or bignum.

Probably. More a set_imaginary than set_compex, though. I don't think
that's needed as such for the benchmark, though. (And should it take
a BIGNUM or a NUMVAL?)

>def main():
>    i = complex(2 + 1j)
>    print i

>>>>  dis(im.main)
>   2           0 LOAD_GLOBAL              0 (complex)
>               3 LOAD_CONST               1 (2)
>               6 LOAD_CONST               2 (1j)
>               9 BINARY_ADD
>              10 CALL_FUNCTION            1

>MMD does the math then automatically, if the proper slots are filled.

Yeah. In this case, if the 1j constant is a PMC, it ought be a
Complex PMC (or an Imaginary one) and then MMD should work out fine
without needing slots.

>Happily, the tests don't use complex very often. It's just:

>,--[ The Pie-thon README.txt ]-----------------------------------------
>| The benchmark here is intended to make Dan Sugalski's life difficult:
>`----------------------------------------------------------------------

Ah, yeah, that's Guido--ever thoughtful. :)
--
                                Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
d...@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leopold Toetsch  
View profile  
 More options Jul 6 2004, 11:17 am
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Tue, 06 Jul 2004 17:17:19 +0200
Local: Tues, Jul 6 2004 11:17 am
Subject: Re: Some tasks for the interested

Dan Sugalski wrote:
> At 8:42 AM +0200 7/1/04, Leopold Toetsch wrote:
> Probably. More a set_imaginary than set_compex, though. I don't think
> that's needed as such for the benchmark, though. (And should it take a
> BIGNUM or a NUMVAL?)

NUMVAL. But for now, I'm using strings, which works fine. Too less time
to implement that whole stuff.

leo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »