Re: Google App Engine

2008-04-08 Thread William Dode
On 08-04-2008, Duncan Booth wrote:
> Google have announced a new service called 'Google App Engine' which may 
> be of interest to some of the people here (although if you want to sign 
> up you'll have to join the queue behind me):
>
> From the introduction:
>
>> What Is Google App Engine?
...

It's also interesting to see that we can find django, webob and pyyaml 
in their sdk (license apache 2)

-- 
William Dodé  -  http://flibuste.net
Informaticien indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


subprocess freeze with rsync on windows

2006-04-07 Thread William Dode
Hi,

I try to call rsync (with ssh) with subprocess but _some times_ it
freeze without traceback, without any reason.

My code look like that :
def sh(self,cmd):
log.debug("S cmd: " + " ".join(cmd))
p = Popen(cmd, stdout = PIPE, stderr = PIPE)
stdout, stderr = p.communicate()
if stdout:
log.debug("S ret: %s" % stdout)
if stderr:
log.error("S err: %s" % stderr)
return p.returncode

When it freeze i need to kill the ms-dos console by hand.
I've no problem on linux with the same script.

thanks

the complet script (doing rsync and cp -al on the remote side) is
available freely here : http://flibuste.net/libre/snapy (but
documentation is in french)

-- 
William Dodé - http://flibuste.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-20 Thread William Dode
On 19-07-2009, Mark Dufour wrote:
> Hi all,
>
> I have just released version 0.2 of Shed Skin, an experimental
> (restricted) Python-to-C++ compiler (http://shedskin.googlecode.com).

I just tested it with a litle game, to find the places of horse on 
a board 5x5. The result is :

c 5s
gcj 7s
java 7s
shedskin 8s
python + psyco 18s
cython avec malloc *int 18s
cython 55s avec [] python
python 303s (5m3s)

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-21 Thread William Dode
On 20-07-2009, srepmub wrote:
>
>> Nice timings, can you please show me the Python, Java and C code
>> versions? I may do more tests.

Of course, the codes are here :

http://hg.flibuste.net/libre/games/cheval

Like you'll see, i tried to use exactly the same code for each langage.

>
> also, which shedskin options did you use? did you use -bw, to disable
> bounds and wrap-around checking? this can make quite a difference for
> code that does a lot of indexing. if the code uses random numbers,
> then -r can also make a big difference, to use C rand(), instead of
> Python compatible random numbers.
>
> and which C++ compiler flags did you use? the default -O2, or
> something like -O3 -fomit-frame-pointer -msse2..?

I used the default, shedksin cheval.py; make
shedskin 0.2

With -bw and -O3 -fomit-frame-pointer -msse2 i have 5.5s (instead of 8)

Let me know if you find better.

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-21 Thread William Dode
On 20-07-2009, Bearophile wrote:
> Skip Montanaro:
>> I read just enough French to know that "avec" means "with", but I don't
>> understand the difference between "avec malloc *int" and "avec []".  Can you
>> explain please?
>
> Maybe it's the time difference between using a Python list from Cython
> and using a C "array" allocated with a malloc from Cython.

yes, it's this

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-21 Thread William Dode
On 21-07-2009, srepmub wrote:
>
>> With -bw and -O3 -fomit-frame-pointer -msse2 i have 5.5s (instead of 8)
>>
>> Let me know if you find better.
>
> thanks. now I'm wondering how fast does the C version become with
> these flags..? :-)

I don't see any difference...

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-22 Thread William Dode
I updated the script (python, c and java) with your unrolled version 
+ somes litle thinks.

I also tried with python3.1, unladen Q2, ironpython1.1.1

Unfortunately it doesn't work more with shedskin, i'll see on the 
shedskin group...

c 1.85s
gcj 2.15s
java 2.8s
python2.5 + psyco 3.1s
unladen-2009Q2 145s (2m45)
python2.5 254s (4m14s)
python3.1 300s (5m)
ironpython1.1.1 680s (11m20)


-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-22 Thread William Dode
On 22-07-2009, srepmub wrote:
>
> please send any program that doesn't work with shedskin (it still is
> experimental after all) to me, or create an issue at
> shedskin.googlecode.com, and I will have a look at the problem.

I did it, on the discussion group
http://groups.google.com/group/shedskin-discuss/browse_thread/thread/c1f47a7c21897b44

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-22 Thread William Dode
On 22-07-2009, George Sakkis wrote:
> On Jul 22, 7:38 am, William Dode  wrote:
>
>> I updated the script (python, c and java) with your unrolled version
>> + somes litle thinks.
>>
>> I also tried with python3.1, unladen Q2, ironpython1.1.1
>>
>> Unfortunately it doesn't work more with shedskin, i'll see on the
>> shedskin group...
>>
>> c 1.85s
>> gcj 2.15s
>> java 2.8s
>> python2.5 + psyco 3.1s
>> unladen-2009Q2 145s (2m45)
>> python2.5 254s (4m14s)
>> python3.1 300s (5m)
>> ironpython1.1.1 680s (11m20)
>
> Cool; it would be interesting to see the numbers for Jython and Boo as
> well if it's not too much effort.

I just tried with jython, but oddly it's faster without array.
Thanks to Mark, i could compile to shedskin again.
And add somes little improvements...

c 1.65s
gcj 1.9s
java 2.4s
python2.5 + psyco 2.9s
shedskin 3.4s
unladen-2009Q2 125s (2m05)
Jython 2.2.1 on java1.6.0_12 176s (without array, like shedskin)
Jython 2.2.1 on java1.6.0_12 334s (with array)
python2.5 215s (3m35s)
python3.1 246s (4m06s)
ironpython1.1.1 512 (8m32s)


-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-22 Thread William Dode
On 22-07-2009, William Dode wrote:

> c 1.65s
> gcj 1.9s
> java 2.4s
> python2.5 + psyco 2.9s
> shedskin 3.4s

with -bw i have 2.6s

> unladen-2009Q2 125s (2m05)
> Jython 2.2.1 on java1.6.0_12 176s (without array, like shedskin)
> Jython 2.2.1 on java1.6.0_12 334s (with array)
> python2.5 215s (3m35s)
> python3.1 246s (4m06s)
> ironpython1.1.1 512 (8m32s)

somebody can test with ironpython on windows ?

Anyway, it's very impressive. I wonder if unladen will be so close in 
the futur.

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-22 Thread William Dode
On 23-07-2009, Kurt Smith wrote:
> On Wed, Jul 22, 2009 at 2:48 AM, Bearophile wrote:
>> greg:
>>> Posting benchmark times for Pyrex or Cython is pretty
>>> meaningless without showing the exact code that was
>>> used, since times can vary enormously depending on
>>> how much you C-ify things.
>>
>> Was this link, shown by William, not enough?
>> http://hg.flibuste.net/libre/games/cheval/file/46797c3a5136/chevalx.pyx#l1
>
> I took a stab at converting the recent psyco-optimized code to cython,
> and got a speedup.

thanks, i updated my repo with litle more tips.

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: psyco V2

2009-07-24 Thread William Dode
On 23-07-2009, Christian Tismer wrote:
> On 7/17/09 4:11 AM, Bearophile wrote:
>> Very good, thank you. I'll try it when I can.
>>
>> Is Psyco3 going to borrow/steal some ideas/code from Unladen Swallow?
>
> Psyco3: nice typo! :-)
>
> Well, I haven't so far found a new idea there that I'd want
> to borrow and did not know from PyPy, before.
> Wasn't the project plan saying the opposite, borrowing
> some ideas from psyco? :-)
> http://code.google.com/p/unladen-swallow/wiki/ProjectPlan

How do you see the futur of psyco when unladen-swallow will grab the 
best of psyco (if they can !) ?

Wait and see ?

Anyway, thanks a lot for your work that we can use NOW !


-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: psyco V2

2009-07-26 Thread William Dode
On 24-07-2009, Christian Tismer wrote:
> On 7/24/09 1:04 AM, William Dode wrote:
>> On 23-07-2009, Christian Tismer wrote:
> ...
>
>>> Wasn't the project plan saying the opposite, borrowing
>>> some ideas from psyco? :-)
>>> http://code.google.com/p/unladen-swallow/wiki/ProjectPlan
>>
>> How do you see the future of psyco when unladen-swallow will grab the
>> best of psyco (if they can !) ?
>
> I have no objections, but also no idea so far how that could work.
> Sounded like an unreflected idea to me, without seriously
> checking the possibilities and/or implications. The same
> kind of research apparently did not happen concerning PyPy,
> which IMHO is much more suitable to take advantage from.
>
> This is for the current status of psyco, of course.
> It will change dramatically in the next months, slowly
> adopting some of PyPy's ideas. Then it might start to
> make more sense.

I didn't understand how psyco could use somes PyPy's ideas, i thought 
it's only the opposite... So i was going to read the PyPy's 
documentation : it's fascinating !!!

But how to test it ? The doc says : "When PyPy is translated into an 
executable like pypy-c, the executable contains a full virtual machine 
that can optionally include a Just-In-Time compiler."

Where is this 'option', is there somethings to activate it ?

thx

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: Shed Skin 0.2, an experimental (restricted) Python-to-C++ compiler

2009-07-27 Thread William Dode
On 27-07-2009, Bearophile wrote:
> William Dode':
>> I updated the script (python, c and java) with your unrolled version
>> + somes litle thinks.
> [...]
>> c 1.85s
>> gcj 2.15s
>> java 2.8s
>> python2.5 + psyco 3.1s
>> unladen-2009Q2 145s (2m45)
>> python2.5 254s (4m14s)
>> python3.1 300s (5m)
>> ironpython1.1.1 680s (11m20)
>
> Sorry for being late, I was away.
>
> In your last C version this code is useless because the C compiler is
> able to perform such simple optimization by itself (but probably
> Python isn't able, so if you want the code to be the similar in all
> versions it may be better to keep it):

I wanted so, specialy if it doesn't change a lot of the result (the 
difference is so small that i cannot see it)...

...

> I have tried your latest C version using your compiler options, my
> MinGW based on GCC 4.3.2 produces a crash at runtime.

Maybe because of -msse2 ?

> Using LLVM-GCC
> it runs in 1.31 seconds. The D version is a bit less optimized than
> your last C versions, yet using DMD it runs in 1.08-1.10 seconds.
> Let's see if someone is able to write a C version faster than that D
> code :-)
>
> Have you have compiled/read my D version? In the D version you may
> have missed that I did use an extra trick: unsigned integers, so it
> needs just two tests to see if a number is in the 0-5, 0-5 square :-)

I didn't see, fine ! But the difference is also too small to see...

> Note that Pyd, the Python-D bridge, may work with the latest DMD
> version still (and it works if you use a bit older DMD compiler):
> http://pyd.dsource.org/

I completly don't know anything about D... When i see the result of 
psyco or shedskin, i'm affraid i'll not look somewhere else soon !

However, i'd like to see a lisp implementation of this...

bye

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New implementation of re module

2009-07-27 Thread William Dode
On 27-07-2009, MRAB wrote:
> Hi all,
>
> I've been working on a new implementation of the re module. The details
> are at http://bugs.python.org/issue2636, specifically from
> http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for
> Python 2.6 on Windows if you want to try it out.
>

Someone can remember me how to compile it (on debian lenny), if possible 
with python2.5. I've also python3.1 that i build alone...

I could test it with pytextile, i've a bunch of texts to bench and 
compare.

Did you announce it on the unladen-swallow list ? They wanted to hack on 
RE also...


-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New implementation of re module

2009-07-28 Thread William Dode
On 28-07-2009, MRAB wrote:

> With the official Python 2.6 distribution for Mac OS X it works.
>> 
> The source code is intended to replace the current 're' module in Python
> 2.7 (and I'll be porting it to Python 3.2), so I'm not that worried
> about Python versions earlier than 2.6 for testing, although if there's
> sufficient need then I could tweak the sources for 2.5.

I understand now why i could'nt compile it !

So, i would like if it's not too much work for you.

-- 
William Dodé - http://flibuste.net
Informaticien Indépendant
-- 
http://mail.python.org/mailman/listinfo/python-list