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
shedskin 0.2.1 planned features
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
  18 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
 
srepmub  
View profile  
 More options Dec 1 2009, 7:36 am
From: srepmub <mark.duf...@gmail.com>
Date: Tue, 1 Dec 2009 04:36:48 -0800 (PST)
Local: Tues, Dec 1 2009 7:36 am
Subject: shedskin 0.2.1 planned features
hi all,

so here's the current plan for shedskin 0.2.1, which should be
released in about two months:

-support for itertools (thanks to the work of jeremie)
-support for csv (by eating our own dogfood, using something like
python-dsv - thanks chris)
-if we support itertools, then I guess 'map'/'filter'/'reduce' should
work too (yes, I give up my opposition :))
-as well as 'next'.. (any other useful (new) builtin functions
shedskin doesn't support at the moment?)
-and while we're passing function references around, it should be
possible to place these in containers and to pass method references
around as well
-support for the 'key' argument of 'list.sort' and 'sorted'
-passing keyword arguments to generated extension modules (done)
-boost type inference scalability by disallowing parametric
polymorphism (outside of lib/, as for data polymorphism it's just not
worth it.)

thanks,
mark.


 
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.
srepmub  
View profile  
 More options Dec 20 2009, 7:38 am
From: srepmub <mark.duf...@gmail.com>
Date: Sun, 20 Dec 2009 04:38:17 -0800 (PST)
Local: Sun, Dec 20 2009 7:38 am
Subject: Re: shedskin 0.2.1 planned features
a status update:

> -support for itertools (thanks to the work of jeremie)

jeremie, I'm hoping to see another patch soon.. ^^ I'd be happy to
help out if you don't have time to fully complete it, now that most
other things on this list have been tackled. anyway, jeremie and I
sorted out most issues, and I think we can support practically
everything..

> -support for csv (by eating our own dogfood, using something like
> python-dsv - thanks chris)

I wrote a pure Python implementation based on _csv.c (and csv.py) from
CPython, and compiled it using shedskin (see csv15.py). I decided not
to support Sniffer for now, or custom Dialects, but most basic things
should work now.

> -if we support itertools, then I guess 'map'/'filter'/'reduce' should
> work too (yes, I give up my opposition :))

these have been added.. I also added support for passing around
builtin callables, which required a bit of surgery.. so the following
now works, for example:

print sorted([[2,3,4], [5,6], [7]], key=len)
print map(len, ['a','bc'])
print map(max, ['a','bc'], ['d'], ['e'])
print map(set, [[1]])

> -as well as 'next'.. (any other useful (new) builtin functions
> shedskin doesn't support at the moment?)

done.

> -and while we're passing function references around, it should be
> possible to place these in containers and to pass method references
> around as well

I decided to move this to a future release, because I've seen enough
function passing for now..

> -support for the 'key' argument of 'list.sort' and 'sorted'

done.

> -boost type inference scalability by disallowing parametric
> polymorphism (outside of lib/, as for data polymorphism it's just not
> worth it.)

this is the thing I will look into next. but if I get joris' original
blossoming algorithm to work with a simpler trick, I may also move
this one forward. there's already more than enough new stuff for a new
release.

some other things were improved in the meantime:

- forward referencing of variables and functions
- joris managed to improve basic indexing (without -b, by improving
inlining of __wrap)
- addition of 1-length lists and strings was optimized
- many, many bugfixes.

if I have time, I may look into buffers/memoryviews as suggested on my
blog (thanks!), to avoid copying overhead for extension modules, but I
will probably save this for the next release..

thanks,
mark.


 
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.
Jérémie Roquet  
View profile  
 More options Dec 20 2009, 3:29 pm
From: Jérémie Roquet <arkano...@gmail.com>
Date: Sun, 20 Dec 2009 21:29:21 +0100
Local: Sun, Dec 20 2009 3:29 pm
Subject: Re: shedskin 0.2.1 planned features
Hello,

2009/12/20 srepmub <mark.duf...@gmail.com>:

>> -support for itertools (thanks to the work of jeremie)
> jeremie, I'm hoping to see another patch soon.. ^^

^^

To sum up briefly what doesn't work yet for itertools:
 - imap
 - starmap
 - product
 - combinations_with_replacement (A 2.7 addition, btw)

The following have been completed since the first patch (and thanks to
Mark's improvements to shedskin):
 - chain (accepts an arbitrary number of input iterables)
 - tee (accepts an arbitrary number of output iterables)

The following have been added:
 - izip (with some limitations: the iterables must be of the same type)
 - izip_longest (with some limitations:  the iterables must be of the
same type, and there is no way to distinguish None and 0 in the
output)
 - permutations
 - combinations

> I'd be happy to
> help out if you don't have time to fully complete it, now that most
> other things on this list have been tackled. anyway,

Depends on when you want the module to be complete, but I think
product and combinations_with_replacement will be available very soon
(there is no challenge there).
I haven't thought much about imap and starmap, but I'm expecting some
challenge there... so that's the last I'll work on.

Best regards,

--
Jérémie


 
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.
Mark Dufour  
View profile  
 More options Dec 21 2009, 11:23 am
From: Mark Dufour <mark.duf...@gmail.com>
Date: Mon, 21 Dec 2009 17:23:28 +0100
Local: Mon, Dec 21 2009 11:23 am
Subject: Re: shedskin 0.2.1 planned features

> Depends on when you want the module to be complete, but I think
> product and combinations_with_replacement will be available very soon
> (there is no challenge there).

thanks for the update, and nice to hear you are almost finished.. :) I am in
no hurry to release, as I will probably need at least two more weeks to
improve TI somewhat..

now that I look at starmap again, it looks like it may be impossible to
support it fully at the moment.. the unpacking it does seems impossible to
model, because the number of arguments it unpacks cannot be known during
type inference (in contrast to (i)map, where you can count the arguments to
(i)map..).

so maybe we can leave starmap out for now..? it doesn't look like a very
popular function in any case..

thanks,
mark
--
"Overdesigning is a SIN. It's the archetypal example of what I call 'bad
taste'" - Linus Torvalds


 
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.
srepmub  
View profile  
 More options Dec 26 2009, 6:38 am
From: srepmub <mark.duf...@gmail.com>
Date: Sat, 26 Dec 2009 03:38:49 -0800 (PST)
Local: Sat, Dec 26 2009 6:38 am
Subject: Re: shedskin 0.2.1 planned features
btw,

it may be interesting to also add support for 'heapq' before the next
release. it is quite small, and uses several itertools functions..

(see the networkx thread about compiling a graph algorithm that in
turn uses heapq..).

mark.

On 21 dec, 17:23, Mark Dufour <mark.duf...@gmail.com> wrote:


 
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.
Jérémie Roquet  
View profile  
 More options Dec 26 2009, 6:54 am
From: Jérémie Roquet <arkano...@gmail.com>
Date: Sat, 26 Dec 2009 12:54:11 +0100
Local: Sat, Dec 26 2009 6:54 am
Subject: Re: shedskin 0.2.1 planned features
2009/12/26 srepmub <mark.duf...@gmail.com>:

> it may be interesting to also add support for 'heapq' before the next
> release. it is quite small, and uses several itertools functions..

> (see the networkx thread about compiling a graph algorithm that in
> turn uses heapq..).

I'm looking at it this afternoon (unless you've already started to
work on it, of course :p).

--
Jérémie


 
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.
Mark Dufour  
View profile  
 More options Dec 26 2009, 2:55 pm
From: Mark Dufour <mark.duf...@gmail.com>
Date: Sat, 26 Dec 2009 20:55:15 +0100
Local: Sat, Dec 26 2009 2:55 pm
Subject: Re: shedskin 0.2.1 planned features

> I'm looking at it this afternoon (unless you've already started to
> work on it, of course :p).

I'm still looking into type inference scalability at the moment, so go
ahead.. :)

thanks,
mark.
--
"Overdesigning is a SIN. It's the archetypal example of what I call 'bad
taste'" - Linus Torvalds


 
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.
Jérémie Roquet  
View profile  
 More options Dec 26 2009, 5:07 pm
From: Jérémie Roquet <arkano...@gmail.com>
Date: Sat, 26 Dec 2009 23:07:16 +0100
Local: Sat, Dec 26 2009 5:07 pm
Subject: Re: shedskin 0.2.1 planned features

2009/12/26 Mark Dufour <mark.duf...@gmail.com>:

>> I'm looking at it this afternoon (unless you've already started to
>> work on it, of course :p).
> I'm still looking into type inference scalability at the moment, so go
> ahead.. :)

I attached a "preview" version, with the following functions :
 - heappush
 - heappop
 - heappushpop
 - heapify
 - heapreplace

I still have to implement the following :
 - merge
 - nlargest
 - nsmallest

I'm using the same algorithms as CPython.

BTW, concerning itertools, product and combinations_with_replacement
are implemented too.

Best regards,

--
Jérémie

  heapq_tests.py
1K Download

  heapq.cpp
< 1K Download

  heapq.hpp
3K Download

  heapq.py
< 1K Download

 
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.
Mark Dufour  
View profile  
 More options Dec 27 2009, 5:42 am
From: Mark Dufour <mark.duf...@gmail.com>
Date: Sun, 27 Dec 2009 11:42:51 +0100
Local: Sun, Dec 27 2009 5:42 am
Subject: Re: shedskin 0.2.1 planned features

haha, great, thanks :D I will try to have a look today or tomorrow (not much
access to a computer at the moment..)

mark.

2009/12/26 Jérémie Roquet <arkano...@gmail.com>

--
"Overdesigning is a SIN. It's the archetypal example of what I call 'bad
taste'" - Linus Torvalds

 
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.
Mark Dufour  
View profile  
 More options Dec 27 2009, 11:01 am
From: Mark Dufour <mark.duf...@gmail.com>
Date: Sun, 27 Dec 2009 17:01:30 +0100
Local: Sun, Dec 27 2009 11:01 am
Subject: Re: shedskin 0.2.1 planned features

the heapq implementation looks quite good, so I committed it to SVN. I only
changed the type model a bit, to model the flow of 'item' arguments into the
heap. I will update the LICENSE and 'thank you' section later, before the
next release..

thanks again :D

--
"Overdesigning is a SIN. It's the archetypal example of what I call 'bad
taste'" - Linus Torvalds

 
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.
Jérémie Roquet  
View profile  
 More options Dec 27 2009, 11:10 am
From: Jérémie Roquet <arkano...@gmail.com>
Date: Sun, 27 Dec 2009 17:10:20 +0100
Local: Sun, Dec 27 2009 11:10 am
Subject: Re: shedskin 0.2.1 planned features
2009/12/27 Mark Dufour <mark.duf...@gmail.com>:

> the heapq implementation looks quite good, so I committed it to SVN. I only
> changed the type model a bit, to model the flow of 'item' arguments into the
> heap. I will update the LICENSE and 'thank you' section later, before the
> next release..

> thanks again :D

You're welcome :-)

--
Jérémie


 
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.
Mark Dufour  
View profile  
 More options Dec 27 2009, 11:12 am
From: Mark Dufour <mark.duf...@gmail.com>
Date: Sun, 27 Dec 2009 17:12:00 +0100
Subject: Re: shedskin 0.2.1 planned features

> BTW, concerning itertools, product and combinations_with_replacement
> are implemented too.

great to hear! so iirc, that only leaves imap..? do you agree that starmap
is too difficult or even impossible to support at the moment?

I'm making some good progress here as well. with a few minor improvements to
the type inference engine, I already got the (almost) original matching
algorithm to compile.. that means it probably won't be necessary to make any
large changes, and we should be able to release 0.3 in a few weeks.

thanks,
mark.
--
"Overdesigning is a SIN. It's the archetypal example of what I call 'bad
taste'" - Linus Torvalds


 
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.
Jérémie Roquet  
View profile  
 More options Dec 27 2009, 12:28 pm
From: Jérémie Roquet <arkano...@gmail.com>
Date: Sun, 27 Dec 2009 18:28:21 +0100
Local: Sun, Dec 27 2009 12:28 pm
Subject: Re: shedskin 0.2.1 planned features
2009/12/27 Mark Dufour <mark.duf...@gmail.com>:

>> BTW, concerning itertools, product and combinations_with_replacement
>> are implemented too.
> great to hear! so iirc, that only leaves imap..?

imap, plus :
 - a small improvement to izip to (at least) support different
iterables types when there are only two iterables (since this is
already supported by tuples)
 - some improvements to "lazyfiy" the combinatoric generators so that
they support infinite iterators as input

I think that's all ;-)
We also have full support for islice, thanks to the special case you
added to cpp.py and the last modifications I've done to it.

> do you agree that starmap
> is too difficult or even impossible to support at the moment?

I'm not sure...
The major challenge with both imap and starmap is to call a function
with parameters that are only known at runtime. I think it is at least
possible to support some hard-coded numbers of parameters ; then we'll
have to find a way to put the parameters on the stack "manually", but
I fear there is no portable way to do this... :s

> I'm making some good progress here as well. with a few minor improvements to
> the type inference engine, I already got the (almost) original matching
> algorithm to compile.. that means it probably won't be necessary to make any
> large changes, and we should be able to release 0.3 in a few weeks.

Great :-)

Oh, BTW, I've noticed a small bug: it looks like shedskin prunes the
functions that are defined but not called, even if they are passed as
parameter to some other function.

Best regards,

--
Jérémie


 
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.
Jérémie Roquet  
View profile  
 More options Dec 28 2009, 6:31 am
From: Jérémie Roquet <arkano...@gmail.com>
Date: Mon, 28 Dec 2009 12:31:18 +0100
Local: Mon, Dec 28 2009 6:31 am
Subject: Re: shedskin 0.2.1 planned features

2009/12/27 Jérémie Roquet <arkano...@gmail.com>:

> Oh, BTW, I've noticed a small bug: it looks like shedskin prunes the
> functions that are defined but not called, even if they are passed as
> parameter to some other function.

Attached trivial test case: shedskin generates code that does not compile.

Best regards,

--
Jérémie

  prune.py
< 1K Download

 
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.
Mark Dufour  
View profile  
 More options Dec 28 2009, 3:24 pm
From: Mark Dufour <mark.duf...@gmail.com>
Date: Mon, 28 Dec 2009 21:24:19 +0100
Local: Mon, Dec 28 2009 3:24 pm
Subject: Re: shedskin 0.2.1 planned features

> I'm not sure...
> The major challenge with both imap and starmap is to call a function
> with parameters that are only known at runtime. I think it is at least
> possible to support some hard-coded numbers of parameters ; then we'll
> have to find a way to put the parameters on the stack "manually", but
> I fear there is no portable way to do this... :s

I suggest we skip starmap for now, and hardcode imap up to several
arguments. starmap is probably hardly ever used (I think?), and imap will
usually receive only a few arguments, so practically all use cases of
itertools should be covered already..

Oh, BTW, I've noticed a small bug: it looks like shedskin prunes the

> functions that are defined but not called, even if they are passed as
> parameter to some other function.

I've never really considered it to be a very useful feature to be able to
pass around functions, without ever using them, not even in theory.. :) but
I guess we could support this relatively easily..

thanks!
mark.
--
"Overdesigning is a SIN. It's the archetypal example of what I call 'bad
taste'" - Linus Torvalds


 
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.
Jérémie Roquet  
View profile  
 More options Dec 29 2009, 4:38 am
From: Jérémie Roquet <arkano...@gmail.com>
Date: Tue, 29 Dec 2009 10:38:11 +0100
Local: Tues, Dec 29 2009 4:38 am
Subject: Re: shedskin 0.2.1 planned features
2009/12/28 Mark Dufour <mark.duf...@gmail.com>:

>> Oh, BTW, I've noticed a small bug: it looks like shedskin prunes the
>> functions that are defined but not called, even if they are passed as
>> parameter to some other function.
> I've never really considered it to be a very useful feature to be able to
> pass around functions, without ever using them, not even in theory.. :) but
> I guess we could support this relatively easily..

Ok, I understand, I just forgot to call the predicates in the python
stubs. It works now ;-)

Thanks,

--
Jérémie


 
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.
Jérémie Roquet  
View profile  
 More options Dec 29 2009, 6:51 am
From: Jérémie Roquet <arkano...@gmail.com>
Date: Tue, 29 Dec 2009 12:51:21 +0100
Local: Tues, Dec 29 2009 6:51 am
Subject: Re: shedskin 0.2.1 planned features
2009/12/27 Jérémie Roquet <arkano...@gmail.com>:

>  - some improvements to "lazyfiy" the combinatoric generators so that
> they support infinite iterators as input

Well, actually this in not possible, and CPython does not do that either.

The following code in CPython causes an infinite loop, eating all the
available memory :

for i in itertools.combinations(itertools.count(), r = 2):
    break

Conclusion: Let's code a Haskell compiler, now ;-)

--
Jérémie


 
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.
Mark Dufour  
View profile  
 More options Dec 29 2009, 7:05 am
From: Mark Dufour <mark.duf...@gmail.com>
Date: Tue, 29 Dec 2009 13:05:08 +0100
Local: Tues, Dec 29 2009 7:05 am
Subject: Re: shedskin 0.2.1 planned features

> Conclusion: Let's code a Haskell compiler, now ;-)

good idea, that would be much easier than shed skin.. :-)

mark.
--
"Overdesigning is a SIN. It's the archetypal example of what I call 'bad
taste'" - Linus Torvalds


 
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 »