Helping out...

4 views
Skip to first unread message

Cadix

unread,
Oct 10, 2009, 11:00:28 AM10/10/09
to shedskin-discuss
I'd like to contribute to Shedskin, but I'm not quite sure where to
start other than sifting through the source code to familiarize myself
with it. I was hoping I could get a some guidance.

I am an intermediate C++ and Python programmer, but I am happy to help
in any capacity, including website maintenance and documentation. I
have a moderate amount of free time to devote to Shedskin, perhaps up
to eight hours a week.

Best,

Tyler

Jérémie Roquet

unread,
Oct 26, 2009, 7:01:46 AM10/26/09
to shedskin...@googlegroups.com
Hello Tyler, thanks for your message.

I fear Mark didn't see your mail because of spam filtering (I just saw
it today in my monthly spam-check).

2009/10/10 Cadix <046...@gmail.com>:

What I found the easiest to do is to add support for additional python
modules from the standard library ; you just have to create the
corresponding <moduleName>.py in the lib/ directory and add to it the
methods prototypes, with enough code to allow static type inference --
what the code actually does is of no importance (have a look at the
existing modules to get an idea).
Then, you've to write the actual C++ code in <moduleName>.{hpp,cpp},
again in the lib/ directory (the code must be in the __<moduleName>__
namespace ; functions have the same name as in Python ; useful base
classes are in lib/builtin.hpp). That's all. This is rather easy,
because there is very few to know about shedskin to get something that
works.

Btw, I'm working on the itertools module, so don't take that one ;-)

Then you have the compiler code, in Python ; but I didn't have
sufficient knowledge on this part to help you.

@ Mark : what about changing the google group messages policy to one
that requires prior moderation for first-time posters ? It could help
to distinguish between spam and non-spam. I'm ready to help you to
manage this, if you want.

Best regards,

--
Jérémie Roquet - Arkanosis
Programming artist
Developer in natural language processing - Exalead

srepmub

unread,
Nov 8, 2009, 6:39:51 AM11/8/09
to shedskin-discuss
hi guys,

sorry for allowing spam on the list while being on vacation for a
month. as per jeremie's suggestion, I changed the settings so messages
from new members are now moderated. thanks!

I also guess this is the reason I didn't see tyler's mail.

@tyler: thanks for offering to help out. we have a wiki that describe
some possible and useful tasks to start out with:

http://code.google.com/p/shedskin/wiki/Tasks

but I would suggest to just with shedskin to get a feel for things
first. for example, you could find some snippets online to test
(perhaps part of a pygame application?), toy with the 40 example
programs.. have a look at the output, perhaps do some profiling
(gprof2dot highly recommended). I'm sure you'll run into some bug or
performance problem that should be easy to fix, or some useful things
to report. alternatively, it might be insightful to just implement
some interesting algorithm in python yourself, and see if you can get
a good speedup from using shedskin, like I did with the disco example,
which uncovered some bugs and performance problems.


my apologies for the late reply! I should be much more responsive from
now on,
mark.

On Oct 26, 12:01 pm, Jérémie Roquet <arkano...@gmail.com> wrote:
> Hello Tyler, thanks for your message.
>
> I fear Mark didn't see your mail because of spam filtering (I just saw
> it today in my monthly spam-check).
>
> 2009/10/10 Cadix <0467...@gmail.com>:

srepmub

unread,
Nov 8, 2009, 11:59:27 AM11/8/09
to shedskin-discuss
here's an example session of mine. I wrote this little program last
week, so today I tried it with shedskin. after profiling with
gprof2dot, I found out int() does a really slow call to str.strip(),
addition of 4 essentially characters could be made much faster by
specializing add_strs for small numbers of arguments and checking for
characters only, and iterating over strings could also be optimized a
bit (striter.next).. all in lib/builtin.?pp. now it's a lot faster :)

seed = 9991
seq = list(str(seed))
niet_gehad = set(range(10000)) - set([seed])
while niet_gehad:
for c in '0123456789':
nr = int(seq[-3] + seq[-2] + seq[-1] + c)
if nr in niet_gehad:
seq.append(c)
break
niet_gehad.remove(nr)
print ''.join(seq)


mark.

Mark Dufour

unread,
Nov 8, 2009, 12:36:34 PM11/8/09
to shedskin-discuss
some thoughts from this, which you or anyone here might like to look
into, for starters:

-would it be faster in __add_strs to avoid 'resize(4)' etc.?

-we can probably optimize strip() a lot by returning 'this' if boths
ends are already non-whitespace.

-is addition of two 1-length strings perhaps also very slow at the moment?

something else I noticed today is that str.replace is not very
efficient. we can probably build the result without repeated copying.


thanks,
mark.
--
"One of my most productive days was throwing away 1000 lines of code"
- Ken Thompson

Zahari Zahariev

unread,
Nov 15, 2009, 8:21:28 AM11/15/09
to shedskin...@googlegroups.com
This is very nice idea to have some tasks up fron for people who might be afraid even to ask but if they do something then they'd be proud to show off :)
Reply all
Reply to author
Forward
0 new messages