Re: [Cython] Idea for automatic encoding and decoding

2009-12-17 Thread Stefan Behnel
Greg Ewing, 17.12.2009 00:14: Will there be a different handling for function signatures, or will it work the same everywhere? I.e. will a def func(bytes b) function always accept unicode, Not under my version of the proposal -- there is only automatic conversion between unicode and a

[Cython] remove old cruft

2009-12-17 Thread Lisandro Dalcín
Cython contains some code to C-compilelink generated C sources. This likely comes from Pyrex. I would like to remove all that (we already have pyximport, and there are better ways to implement .pyx - .so|.pyd): This change is going to require: 1) Fix Cython/Compiler/Main.py in a few places 2)

Re: [Cython] remove old cruft

2009-12-17 Thread Dag Sverre Seljebotn
Lisandro Dalcín wrote: Cython contains some code to C-compilelink generated C sources. This likely comes from Pyrex. I would like to remove all that (we already have pyximport, and there are better ways to implement .pyx - .so|.pyd): This change is going to require: 1) Fix

Re: [Cython] remove old cruft

2009-12-17 Thread Stefan Behnel
Lisandro Dalcín, 17.12.2009 16:16: Cython contains some code to C-compilelink generated C sources. This likely comes from Pyrex. I would like to remove all that (we already have pyximport, and there are better ways to implement .pyx - .so|.pyd): This change is going to require: 1) Fix

Re: [Cython] running Cython from a zip file

2009-12-17 Thread Dag Sverre Seljebotn
Lisandro Dalcín wrote: I'm experimenting with running Cython from a zip file containing the minimum code required to get a fully functional Cython compiler. So far, I can make a zipfile of about 290K $ ./mklite.sh ../cython-devel $ ls -alh cython.zip -rw-r--r--. 1 dalcinl users 289K

Re: [Cython] running Cython from a zip file

2009-12-17 Thread Stefan Behnel
Dag Sverre Seljebotn, 17.12.2009 19:01: Lisandro Dalcín wrote: I'm experimenting with running Cython from a zip file containing the minimum code required to get a fully functional Cython compiler. So far, I can make a zipfile of about 290K $ ./mklite.sh ../cython-devel $ ls -alh

Re: [Cython] remove old cruft

2009-12-17 Thread Robert Bradshaw
On Dec 17, 2009, at 7:29 AM, Stefan Behnel wrote: Lisandro Dalcín, 17.12.2009 16:16: Cython contains some code to C-compilelink generated C sources. This likely comes from Pyrex. I would like to remove all that (we already have pyximport, and there are better ways to implement .pyx -

Re: [Cython] running Cython from a zip file

2009-12-17 Thread Lisandro Dalcín
On Thu, Dec 17, 2009 at 8:24 PM, Robert Bradshaw rober...@math.washington.edu wrote: Really, that's hardly any savings at all. Maybe at one point this was really expensive? In any case, I think it might make more sense to generate the pickle at install time (with a possible error), and

Re: [Cython] [PATCH] Fix usage of elif on undefined values

2009-12-17 Thread Robert Bradshaw
On Dec 17, 2009, at 2:40 PM, Lisandro Dalcín wrote: On Thu, Dec 17, 2009 at 12:25 PM, Julien Danjou jul...@danjou.info wrote: This kills a compilation warning. Signed-off-by: Julien Danjou jul...@danjou.info --- Cython/Compiler/Nodes.py |2 +- 1 files changed, 1 insertions(+), 1

Re: [Cython] Idea for automatic encoding and decoding

2009-12-17 Thread Robert Bradshaw
On Dec 17, 2009, at 12:20 AM, Stefan Behnel wrote: Greg Ewing, 17.12.2009 00:14: Will there be a different handling for function signatures, or will it work the same everywhere? I.e. will a def func(bytes b) function always accept unicode, Not under my version of the proposal -- there is

Re: [Cython] remove old cruft

2009-12-17 Thread Lisandro Dalcín
On Thu, Dec 17, 2009 at 8:35 PM, Robert Bradshaw rober...@math.washington.edu wrote: On Dec 17, 2009, at 7:29 AM, Stefan Behnel wrote: Lisandro Dalcín, 17.12.2009 16:16: Cython contains some code to C-compilelink generated C sources. This likely comes from Pyrex. I would like to remove all

Re: [Cython] [PATCH] Fix usage of elif on undefined values

2009-12-17 Thread Lisandro Dalcín
On Thu, Dec 17, 2009 at 8:38 PM, Robert Bradshaw rober...@math.washington.edu wrote: On Dec 17, 2009, at 2:40 PM, Lisandro Dalcín wrote: On Thu, Dec 17, 2009 at 12:25 PM, Julien Danjou jul...@danjou.info wrote: This kills a compilation warning. Signed-off-by: Julien Danjou

Re: [Cython] Idea for automatic encoding and decoding

2009-12-17 Thread Robert Bradshaw
On Dec 15, 2009, at 12:06 AM, Stefan Behnel wrote: Robert Bradshaw, 15.12.2009 00:40: I don't think users doing input validation are going to stop doing input validation because of an easier str - char* conversion option. I'm also skeptical that having to manually do str - byes - char*

Re: [Cython] [PATCH] Fix usage of elif on undefined values

2009-12-17 Thread Robert Bradshaw
On Dec 17, 2009, at 4:08 PM, Lisandro Dalcín wrote: Good point, please push. Are there any other compilers that we should single out? We heavily use the assumption that inlined functions actually get inlined for optimization purposes. Intel? PathScale? PGI? Borland? (Open) Watcom? I

Re: [Cython] [PATCH] Fix usage of elif on undefined values

2009-12-17 Thread Lisandro Dalcín
On Thu, Dec 17, 2009 at 9:25 PM, Robert Bradshaw rober...@math.washington.edu wrote: On Dec 17, 2009, at 4:08 PM, Lisandro Dalcín wrote: Good point, please push. Are there any other compilers that we should single out? We heavily use the assumption that inlined functions actually get inlined

Re: [Cython] Idea for automatic encoding and decoding

2009-12-17 Thread Greg Ewing
Robert Bradshaw wrote: I actually think unicode - bytes is weirder than unicode - char* (because the latter is the best C has to offer for strings), though it's messier from a null-bytes and memory-management perspective. Another way of thinking about it is that unicode - bytes is the

Re: [Cython] Idea for automatic encoding and decoding

2009-12-17 Thread Greg Ewing
Robert Bradshaw wrote: For example byteso is o would no longer always hold, If you don't like that idea, then come up with another syntax for in-line type coercions, like C++ has done. Or will only def func(char*) accept unicode input? Yep. In my world that would only accept bytes. --

Re: [Cython] running Cython from a zip file

2009-12-17 Thread Stefan Behnel
Robert Bradshaw, 18.12.2009 00:24: On Dec 17, 2009, at 2:28 PM, Lisandro Dalcín wrote: On Thu, Dec 17, 2009 at 3:48 PM, Stefan Behnel wrote: No need to silence a warning that we generate ourselves. Unless the warning is pointless, as in this very specific use case. I actually meant that it

Re: [Cython] Idea for automatic encoding and decoding

2009-12-17 Thread Stefan Behnel
Greg Ewing, 18.12.2009 02:23: Robert Bradshaw wrote: Or will only def func(char*) accept unicode input? Yep. In my world that would only accept bytes. Sounds cleaner to me, too. Stefan ___ Cython-dev mailing list Cython-dev@codespeak.net

Re: [Cython] running Cython from a zip file

2009-12-17 Thread Stefan Behnel
Stefan Behnel, 18.12.2009 08:10: Robert Bradshaw, 18.12.2009 00:24: Really, that's hardly any savings at all. Maybe at one point this was really expensive? In any case, I think it might make more sense to generate the pickle at install time (with a possible error), and silently ignore