Re: A defense for bracket-less code

2006-04-26 Thread Stelios Xanthakis
Edward Elliott wrote: > Dave Hansen wrote: > >>Not really. It was mostly a lead-in to that last sentence. Problems >>like this couldn't happen in Python. So it's an opportunity to get a >>giggle at the expense of programmers using a language that gives you >>enough rope to shoot yourself in th

Re: The whitespaceless frontend

2006-04-24 Thread Stelios Xanthakis
Hi, [EMAIL PROTECTED] wrote: > but maybe instead of the global.name something to refer to the upper > namespace (that can be the global one or the namespace of the function > that contains this one) can be more general: > upper.x = 1 > upper.upper.x = 1 > Well, people have been trying to come u

The whitespaceless frontend

2006-04-15 Thread Stelios Xanthakis
It had to happen :) http://pyvm32.infogami.com/EPL Seriously, this is not so much about the whitespace as for the new features, which might interest people who are thinking about new features. More specifically, "methods" and the "$" operator are really great and seem to solve the problem

pyvm source code

2005-12-30 Thread stelios xanthakis
Hi. pyvm is a program that can run python 2.4 bytecode. It can also run the bytecode of the 'pyc compiler' and consequently it can run python source code. It's written from the scratch and it has only been tested on a x86/Linux system. It's not portable yet, neither ready for the simple user, not

Re: Speed quirk: redundant line gives six-fold speedup

2005-08-25 Thread Stelios Xanthakis
Mark Dickinson wrote: > I have a simple 192-line Python script that begins with the line: > > dummy0 = 47 > > The script runs in less than 2.5 seconds. The variable dummy0 is never > referenced again, directly or indirectly, by the rest of the script. > > Here's the surprise: if I remove or com

Re: map vs. list-comprehension

2005-07-01 Thread Stelios Xanthakis
Mandus wrote: > jepp - faster, but still slower than the map. > > 100 iterations: > zip+list-comprehension: 8.1s > izip+list-comprehension: 7.5s > map: 7.0s > Strange. On 2.4.1 izip is the fastest. The thing is that if you put benchmark code in global the results are not fair as each var

Re: Loop until condition is true

2005-06-23 Thread Stelios Xanthakis
Michael Hoffman wrote: > Stelios Xanthakis wrote: > >> Magnus Lycka wrote: > > > > >>> Right. Silly me. Maybe in some future Python version, True and False >>> will be constants, like None is since Python 2.4. >> >> >> Actually, th

Re: Loop until condition is true

2005-06-21 Thread Stelios Xanthakis
Magnus Lycka wrote: > Konstantin Veretennicov wrote: > >> On 6/21/05, Magnus Lycka <[EMAIL PROTECTED]> wrote: >> >>> I don't know anything about the Python compiler internals, >>> but it doesn't seem very hard to identify simple literals following >>> while and if, and to skip the runtime test. (P

Re: pyvm -- faster python

2005-05-25 Thread Stelios Xanthakis
Hi Michael [...] > > Releasing open source means that people *may* fix their own bugs, or > abandon the code. [...] I agree with all the points made. Moreover let me add that "code is one expression of a set of good ideas", and ideas want to be free! ;) I've decided to release the source code

Re: pyvm -- faster python

2005-05-13 Thread Stelios Xanthakis
Armin Steinhoff wrote: >>> Is there a working version of lwc ??? >>> >> >> pyvm is written in lwc-2.0 which is not yet released because >> nobody's using it. > > > As you mentioned it ... lwc-2.0 is used for pyvm. So it is used :) > > Do you have an idea when lwc-2.0 will be releast ? > > Ever

Re: pyvm -- faster python

2005-05-13 Thread Stelios Xanthakis
Stelios Xanthakis wrote: > > Also, for the other part of the thread, I think that bytecode may > be in fact faster than machine code JIT. Forgot to add: It depends of course on how good is the bytecode. IMO Python's bytecode is pretty good for its purpose which is executing a dy

Re: pyvm -- faster python

2005-05-13 Thread Stelios Xanthakis
Armin Steinhoff wrote: >> >> pyvm has that. A big part of it is written in "lightweight C++" [1]. > > > Realy ? I have downloaded the lwc distribution and checked it out. > It was a surprise that none of the examples are working. > I'm using SuSE 9.0 with gcc 3.3.1 ... > :( > Is there a work

Re: pyvm -- faster python

2005-05-13 Thread Stelios Xanthakis
Hi, Kay Schluehr wrote: > > Why this? eval() consumes a string, produces a code object and executes > it. Wether the code-object is bytecode or a chunk of machine code makes > a difference in the runtime but does not alter the high level > behavioural description of eval(). In either way the comp

Re: pyvm -- faster python

2005-05-12 Thread Stelios Xanthakis
Kay Schluehr wrote: > > Yes. What we are seeking for and this may be the meaning of Armins > intentiously provocative statement about the speed of running HLLs is a > successor of the C-language and not just another VM interpreter that is > written in C and limits all efforts to extend it in a fl

Re: pyvm -- faster python

2005-05-11 Thread Stelios Xanthakis
Paul Rubin wrote: > > I hope that PyPy will replace CPython once it's solid enough. Trying > to stay backwards compatible with the legacy C API doesn't seem to me > to be that important a goal. Redoing the library may take more work > than the Prothon guy was willing to do for Prothon, but PyPy

Re: pyvm -- faster python

2005-05-11 Thread Stelios Xanthakis
Roger Binns wrote: >>I am not very interested on C compatibility. > > > That will rule out all the gui frameworks, SSL, cryptography > and numerous other packages. Have a look at what happened to > Prothon. What ultimately killed it was the problem of having > a decent library. You don't have

Re: pyvm -- faster python

2005-05-10 Thread Stelios Xanthakis
Roger Binns wrote: >>could You tell us a bit more about Your motivation to create an >>alternative C-Python interpreter? > > > I'd also be curious to know if the performance gains would remain > once it gets fleshed out with things like closures, long numbers, > new style classes and a C library

Re: pyvm -- faster python

2005-05-10 Thread Stelios Xanthakis
[EMAIL PROTECTED] wrote: > This project is probably a LOT of work; maybe people can tell us about > such efforts *before* doing so much work, so we can discuss it, and > avoid wasting time. > It is a lot of work indeed. Usually, when people announce "we shall create X", it doesn't happen. And yo

Re: pyvm -- faster python

2005-05-10 Thread Stelios Xanthakis
Kay Schluehr wrote: > > could You tell us a bit more about Your motivation to create an > alternative C-Python interpreter? There is AFAIK no such ambitious > project that has ever survived. The last one I remember died shortly > after it was born: > The motivation is that I just needed some byt

pyvm -- faster python

2005-05-08 Thread Stelios Xanthakis
Hi. pyvm is a program which can run python 2.4 bytecode (the .pyc files). A demo pre-release is available at: http://students.ceid.upatras.gr/~sxanth/pyvm/ Facts about pyvm: - It's FAST. According to the "cooked-bench" benchmark suite it finishes in 55% of the time python takes;) - It

ANN: Python benchmark suite

2005-04-09 Thread stelios xanthakis
Hi I'd like to announce the pyvmbench benchmark suite which is designed to evaluate different python implementations, different versions of the same implementation and different compilers/compilation flags for the same version of a python implementation (same). If you want, you can of course bench

Re: Can I play too?

2005-04-02 Thread stelios xanthakis
Scott David Daniels wrote: if __name__ == '__main__': import sys main(sys.argv[1:] or ['anagrams.py']) This is *exactly* the kind of testcases I'm looking for to test the soon-to-be-released pyvm. Great! I'll be back with results. For now, a fast anagrams.py is ---

Re: Looking for Benchmarklets to improve pyvm

2005-04-02 Thread stelios xanthakis
Skip Montanaro wrote: Take a look around for Marc Andre Lemburg's pybench suite. Thanks! Although pybench needs module.re and module.pickle, so I'll post results later. Moreover, I have similar tests. I'd prefer scripts that do *real* calculations. Stelios -- http://mail.python.org/mailman/list

Re: Looking for Benchmarklets to improve pyvm

2005-04-02 Thread stelios xanthakis
coffeebug wrote: Newbie here ("new" to the language and scripting in general). I'm trying to figure out what you mean by bytecode. Do you mean a virtual python environment that can be hosted by any anonymous operating system? For example, you want to run Python programs on BEOS so you crank up i

Looking for Benchmarklets to improve pyvm

2005-04-01 Thread stelios xanthakis
Hi. pyvm is a program that can run python 2.4 bytecode and most of the times produce the expected output. See http://students.ceid.upatras.gr/~sxanth/ I'm collecting small testlets to benchmark it, discover bottlenecks and improve it. They should be small and not use any crazy modules. On

Re: Big development in the GUI realm

2005-02-10 Thread Stelios Xanthakis
Alex Martelli wrote: Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: hassle to code, but if your application could dynamically select from whatever toolkit is available on the machine, you (and I should emphasis that this is an impersonal/generic "you" I reference) might be able to argue an exemption

Re: python-dev Summary for 2004-11-16 through 2004-11-30

2005-01-07 Thread Stelios Xanthakis
[EMAIL PROTECTED] wrote: Would you like the source with your function? Yes, since I asked for this feature something like two years ago ;-) Well, the main objection seemed to be that we can get the source of a function one way or another. For functions with a file (1) with "inspect" , for functio