Re: [Python-Dev] Parser and Runtime: Divorced!

2005-10-30 Thread Evan Jones
On Oct 26, 2005, at 20:02, Evan Jones wrote: > In the process of doing this, I came across a comment mentioning that > it would be desirable to separate the parser. Is there any interest in > doing this? I now have a vague idea about how to do this. Of course, > there is no point in ma

[Python-Dev] Parser and Runtime: Divorced!

2005-10-26 Thread Evan Jones
t for Unicode, Longs, Floats, and Complex), but it works well enough to get the AST from a few simple strings, which is what I wanted. Evan Jones -- Evan Jones http://evanjones.ca/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.

[Python-Dev] [PATCH][BUG] Segmentation Fault in xml.dom.minidom.parse

2005-09-29 Thread Evan Jones
on both my Linux system and my Mac. I've also attached a patch that adds this test case to test_minidom.py. Thanks, Evan Jones -- Evan Jones http://evanjones.ca/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] Unicode byte order mark decoding

2005-04-05 Thread Evan Jones
ituations. A solution for this would be to add an argument named final to the decode and read methods that tells the decoder that the stream has ended and the remaining buffered bytes have to be handled now. This functionality is provided by a flush() method on similar objects, such as the

Re: [Python-Dev] Unicode byte order mark decoding

2005-04-01 Thread Evan Jones
ies to str.decode(). Any other attempt to create non-characters, such as unichr( 0x ), *should* raise an exception because clearly the programmer is making a mistake. Other than that: +1 on fixing this case. Cool! Evan Jones ___ Python-Dev maili

[Python-Dev] Unicode byte order mark decoding

2005-04-01 Thread Evan Jones
y allows the removal of these characters. (See C10 in Section3.2, Conformance Requirements.) My interpretation of the specification means that Python should silently remove the character, resulting in a zero length Unicode string. Similarly, both of the following lines sho

Re: [Python-Dev] Memory Allocator Part 2: Did I get it right?

2005-03-11 Thread Evan Jones
arise when it is reviewed. I am still lurking on Python-Dev, and I will strive to correct any defects ASAP. A few users have contacted me privately and have tested the patch, so it works for a few people at least. Evan Jones ___ Python-Dev mailing

Re: [Python-Dev] Windows Low Fragementation Heap yields speedup of ~15%

2005-02-18 Thread Evan Jones
ficant performance difference, it could be worth it. http://java.sun.com/j2se/1.5.0/docs/api/java/util/ ArrayList.html#ensureCapacity(int) http://www.sgi.com/tech/stl/Vector.html#4 Evan Jones ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Memory Allocator Part 2: Did I get it right?

2005-02-18 Thread Evan Jones
still relies on the invalid APIs. The only problem is that it is really hard to determine whether some code *does* violate the API usage. Great. Please ignore the patch on SourceForge for a little while. I'll produce a "revision 3" this weekend, without the compatibility ha

Re: [Python-Dev] Windows Low Fragementation Heap yields speedup of ~15%

2005-02-18 Thread Evan Jones
zing them. Well, it would also be useful to find out what code is calling the system malloc. This would make it easy to examine the code and see if it should be calling obmalloc or the system malloc. Any good ideas for easily obtaining this information? I imagine that some prof

Re: [Python-Dev] Windows Low Fragementation Heap yields speedup of ~15%

2005-02-16 Thread Evan Jones
hese are using it to allocate some sort of array or string, so it likely *should* go through the system malloc. Gfeller, any idea if you are using any of the modules on this list? If so, it would be pretty easy to try converting them to call the obmalloc functions instead, and see how that affects th

Re: [Python-Dev] Memory Allocator Part 2: Did I get it right?

2005-02-15 Thread Evan Jones
PyObject_Free everywhere they had a PyMem_Del/DEL/FREE call. Is it guaranteed that extension modules will be binary compatible with future Python releases? I didn't think this was the case. Thanks for the feedback, Evan Jones ___ Python-Dev mailing li

[Python-Dev] Memory Allocator Part 2: Did I get it right?

2005-02-15 Thread Evan Jones
7;ve included links to SourceForge and the previous thread. Thank you, Evan Jones Previous thread: http://mail.python.org/pipermail/python-dev/2005-January/051255.html Patch location: http://sourceforge.net/tracker/index.php? func=detail&aid=1123430&gr

Re: Moving towards Python 3.0 (was Re: [Python-Dev] Speed up function calls)

2005-01-31 Thread Evan Jones
of leveraging multiple processor environments is that multithreading seems to be where the big performance increases will be in the next few years. I am currently using Python for some relatively large simulations, so performance is important to me. Evan Jones ___

Re: [Python-Dev] Python Interpreter Thread Safety?

2005-01-28 Thread Evan Jones
nt weirdness happens, it just corrupts the application, not the VM. However, in Python, this could actually corrupt the interpreter itself, crashing the entire thing with a very ungraceful Segmentation Fault or something similar. Evan Jones ___ Pyth

Re: [Python-Dev] Python Interpreter Thread Safety?

2005-01-28 Thread Evan Jones
uldn't want to. Writing threaded code is especially easy (a relative stmt, not absolute) in Python because of it. Right, because currently Python switches threads on a granularity of opcodes, which gives you this serialization with the cost of never having parallel execution. Evan Jones _

Re: [Python-Dev] Python Interpreter Thread Safety?

2005-01-28 Thread Evan Jones
reference counting (which would have to grow atomic increment/decrement). Wouldn't it be up to the programmer to ensure that accesses to shared objects, like containers, are serialized? For example, with Java's collections, there are both synchronized and u

[Python-Dev] Python Interpreter Thread Safety?

2005-01-28 Thread Evan Jones
this is a problem? I'm curious about how much work it would be to allow concurrent execution of Python code. Evan Jones Note: One of the reasons I am asking is that my memory allocator patch is that it changes the current allocator from "sort of" thread safe to obviously unsafe.

Re: [Python-Dev] Improving the Python Memory Allocator

2005-01-24 Thread Evan Jones
d be mentioned in the introductory comments as well. This is one of those rough edges I mentioned before. If there is some concensus that these changes should be accepted, then I will need to severely edit the comments at the beginning of obmalloc.c. Thanks for your feedback, Evan Jones _

Re: [Python-Dev] Improving the Python Memory Allocator

2005-01-24 Thread Evan Jones
this. Does Python's cyclic garbage collector currently do this? If so, I could hook this "management" stuff on to its calls to gc.collect() Evan Jones ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/l

[Python-Dev] Improving the Python Memory Allocator

2005-01-23 Thread Evan Jones
rformance of programs that cyclically allocate and free large amounts of memory. This amount should be "self-tuned" to the application. Thank you for your feedback, Evan Jones python-allocator.diff Description: Binary data ___ Python-Dev maili