Re: Python un-plugging the Interpreter

2007-04-26 Thread cfbolz
On 25 Apr., 16:09, Steve Holden <[EMAIL PROTECTED]> wrote:
> >  Python as a language is in good shape.  But the CPython
> > implementation is holding back progress.   What we need are better
> > and faster implementations of the language we've got.
>
> Hear, hear!
>
> >  PyPy, ShedSkin, and Jython all were steps in the right
> > direction, but none had enough momentum to make it.
> > Jython hasn't had a release since 2002, ShedSkin is basically
> > one guy, and the EU pulled the plug onPyPy.
>
> Hey there, loose talk costs lives, you know. That is a complete
> mischaracterization of the true position.

Indeed!

> Progress on Jython may not have been stellar, but it has occurred and is
> ongoing. Yes, Shedskin is "one guy", but so was Psyco and that was (and
> remains) a useful tool.
>
> As far as I am aware the PyPy project has come to the end of its initial
> EU funding, and they chose to focus on producing deliverables close to
> the end of the project phase rather that divert effort into securing
> ongoing funding. So nobody has "pulled the plug", and I believe there is
> every possibility of a further round of funded research and development
>   in the future. Certainly the results to date would justify that action
> on the part of the EU. I don't know if and when the request for further
> funding will be submitted.

Indeed here too. "pulling the plug" sounds like an extremely unfair
description. There never was the plan to get funding longer than what
we got so far (at least not with additional action from our side). And
yes, there is the possibility of getting additional funding in the
future, although we are not concretely thinking about it yet.

Apart from that, work on PyPy is definitely continuing, at least after
the much needed break most PyPy-developers are currently taking to
recover from the stress of the EU project (yes, funding has its
downsides too).

Cheers,

Carl Friedrich

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Abelson and Python

2006-11-24 Thread cfbolz

Fredrik Lundh schrieb:

> markscottwright wrote:
>
>  > If it were that easy, the PyPy guys would be done by now.
>
> if the PyPy guys had focused on writing a Python interpreter in Python,
> they'd been done by now.
>
> 

The "Python interpreter in Python" part of PyPy _is_ done. Since quite
a while even (something like July 2005) compilation to C works, and the
interpreter was more or less finished since quite a while before that.
There were some things missing at that point but interpretation of
Python code that didn't use any fancy builtin modules worked.

Cheers,

Carl Friedrich Bolz

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PATCH: Speed up direct string concatenation by 20+%!

2006-09-29 Thread cfbolz
Robin Becker wrote:
> Larry Hastings wrote:
> __
>> THE PATCH
>>
>> The core concept: adding two strings together no longer returns a pure
>> "string" object.  Instead, it returns a "string concatenation" object
>> which holds references to the two strings but does not actually
>> concatenate
>> them... yet.  The strings are concatenated only when someone requests
>> the
>> string's value, at which point it allocates all the space it needs and
>> renders the concatenated string all at once.
>>
>> More to the point, if you add multiple strings together (a + b + c),
>> it *doesn't* compute the intermediate strings (a + b).
>>
>> Upsides to this approach:
> 
>
> wouldn't this approach apply to other additions eg list+list seq+seq etc
> etc.

no, I think it depends on strings being immutable. If you do list1 +
list2 that way and list1 is mutated then the resulting list would be
changed too (at least if you don't do additional things).

> I suppose the utility of such an approach depends on the frequency with
> which multiple strings/lists/sequences etc are added together in real code.

I think there are quite a lot of string additions around, it's just
that people get told to use join all the time, so they are not written
using "+".

Cheers,

Carl Friedrich Bolz

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pypy-0.9.0: stackless, new extension compiler

2006-06-26 Thread cfbolz
Hi all!

Michael Hudson wrote:
> The PyPy development team has been busy working and we've now packaged
> our latest improvements, completed work and new experiments as
> version 0.9.0, our fourth public release.

Unfortunately the download links for the release tarballs did not work
until very recently. They are now working though. You can download the
0.9 release of PyPy under:

http://codespeak.net/download/pypy/pypy-0.9.0.tar.bz2
http://codespeak.net/download/pypy/pypy-0.9.0.tar.gz
http://codespeak.net/download/pypy/pypy-0.9.0.zip

For detailed notes about how to get started into the world of PyPy see
here:

http://codespeak.net/pypy/dist/pypy/doc/getting-started.html

Sorry for the fuss and cheers,

Carl Friedrich Bolz

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python2CPP ?

2006-04-12 Thread cfbolz
Hi!

Szabolcs Berecz schrieb:
> On 4/12/06, Michael Yanowitz <[EMAIL PROTECTED]> wrote:
> > 2) Efficiency. It is alot quicker to code something in Python. If I can
> >write it in Python and auto-convert it to C++. I would save time coding.
>
> I don't think you will get a more efficient code. The reason is the
> extremely dynamic nature of python. Almost everything is done at
> runtime. I think one goal of PyPy is to automatically infer the types
> of variable, but I don't think they have reached that point, yet. One
> project you can consider is the psycho python package which generates
> specialized native code at the price of high memory consumption.

PyPy can infer the types of variables - but not of any Python program.
Also the C code that is the result is quite a bit more efficient
(currently around a factor of 300 or so), but it works only for a
restricted subset of Python (which is called RPython in PyPy jargon).
PyPy can translate not only to C, but also to LLVM. Backends for
Smalltalk, the CLI and Javascript are being worked on.

> > 3) Education. I would learn more about Python, C++, their similarities and
> > differences.
>
> I don't think so. Higher level languages translated to C are not very
> readable (or at least that's what I have seen)

The result of a PyPy translation is definitively _not_ readable :-).

> > 4) Other. Just want to know how well Language translators work these days. I
> > have seen
> >Fortran2C and Pascal2C translators in the past. Would like to see how
> > well these
> >work with Python.
>
> Than I think PyPy is the way to go. I have heard about another project
> with the goal of translating python to high efficiency C++ code but
> forgot the url. Anybody?

It is not the goal of PyPy to be a generally useful Python to C (or to
anything else) translator. The translator is just a side-product of how
PyPy bootstraps its interpreter (which is written in RPython). The
result might be somewhat useable for other stuff too, but it was never
meant to work for a general Python program.

Cheers,

Carl Friedrich Bolz

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: implementation of "complex" type

2006-03-09 Thread cfbolz
Hi!

Russ wrote:
> I tried the following:
>
> >>> x = complex(4)
> >>> y = x
> >>> y *= 2
> >>> print x, y
> (4+0j) (8+0j)
>
> But when I tried the same thing with my own class in place of
> "complex" above, I found that both x and y were doubled. I'd like to
> make my class behave like the "complex" class. Can someone tell me the
> trick? Also, where can I find the code for for the "complex" class? I
> hope it's written in Python! Thanks.

In CPython it is actually written in C, implemented in the
Objects/complexobject.c file. See for example:

http://svn.python.org/view/python/trunk/Objects/complexobject.c?rev=42596&view=markup

In PyPy it is indeed a pure Python implementation right now:

http://codespeak.net/svn/pypy/dist/pypy/module/__builtin__/app_complex.py

Cheers,

Carl Friedrich Bolz

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-08 Thread cfbolz
Kay Schluehr wrote:
> Alex Martelli wrote:
>
> > try it (and read the Timbot's article included in Python's sources, and the
> > sources themselves)...
>
> Just a reading advise. The translated PyPy source
> pypy/objectspace/listsort.py might be more accessible than the
> corresponding C code.

indeed. it is at

http://codespeak.net/svn/pypy/dist/pypy/objspace/std/listsort.py

Cheers,

Carl Friedrich Bolz

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: HELP ! Anybody knows where the stackless python website is ?

2005-04-12 Thread cfbolz
Hi!

Pierre-Frédéric Caillaud wrote:
> I've been trying desperately to access http://www.stackless.com but
> it's been down, for about a week now !

The stackless webpage is working again.

Regards,

Carl Friedrich Bolz

--
http://mail.python.org/mailman/listinfo/python-list


Re: Python for a 10-14 years old?

2005-03-25 Thread cfbolz
Simon Brunning wrote:

> I don't know about kid's tutorials, but I can recommend that you try
> the turtle module. It's great for kids. It gives really good
immediate
> feedback, You can start out using it interactively:


FWIW there is a German Book called called "Python für Kids" by Gregor
Lingl which is mostly based on the turtle module. My little brother (13
then) actually learned Python with it.

Carl Friedrich Bolz

--
http://mail.python.org/mailman/listinfo/python-list