Re: [Cython] Memory views: dereferencing pointer does break strict-aliasing rules

2013-07-02 Thread Robert Bradshaw
On Tue, Jul 2, 2013 at 4:54 AM, Yury V. Zaytsev wrote: > Hi, > > The simplest possible program using memory views compiles with a large > number of warnings for me, even for a rather outdated version of gcc: > > def hello(int [:] a): > print(a, "world") > > If I translate it with the l

Re: [Cython] Update xdress link

2013-07-06 Thread Robert Bradshaw
On Sat, Jul 6, 2013 at 2:26 PM, Anthony Scopatz wrote: > Hello All, > > I was wondering if it would be possible to update the xdress link on the Of course. Done. - Robert ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mail

Re: [Cython] Bug report: compiler traceback instead of error message

2013-07-09 Thread Robert Bradshaw
Yes, we should be giving an error message here rather than crashing; thanks for the report. On Tue, Jul 9, 2013 at 7:36 AM, John Benediktsson wrote: > Hi, > > I had some trouble debugging a traceback that I got from Cython, which ended > up being a simple typo in a .pyx file. Below is a reduced

Re: [Cython] getting rid of redundancy in the docs

2013-07-15 Thread Robert Bradshaw
Great idea re wiki, especially as github makes doc edits and pull requests nearly as easy. I agree the docs need cleaning, I'll see what I can do once I get to real internet. On Jul 14, 2013 10:07 AM, "Anthony Scopatz" wrote: > Hello Stefan, > > I think that this is a good idea and I just thought

Re: [Cython] Windows Debug build improvement

2013-07-25 Thread Robert Bradshaw
On Thu, Jul 18, 2013 at 6:24 AM, Wolfgang wrote: > Hi, > > I tried to submit a improvement for the Windows build but the tracker is not > accessible without a login. This is to prevent spam. > On Windows if someone does a Debug build of an extension the flag _DEBUG is > set and so the Python Int

Re: [Cython] Windows Debug build improvement

2013-07-26 Thread Robert Bradshaw
Who sets _DEBUG? Wouldn't manually undeffing _DEBUG be just as easy as manually setting __PYX_WIN_DEBUG? Disclaimer: I've never developed Python on Windows, but it seems that Nikita's solution is simpler. On Thu, Jul 25, 2013 at 12:11 PM, WL wrote: > On 25.07.2013 18:01, Rob

Re: [Cython] patch for #655

2013-08-02 Thread Robert Bradshaw
On Tue, Jul 23, 2013 at 2:25 AM, Felix Salfelder wrote: > On Fri, Jun 28, 2013 at 06:39:45AM +0200, Stefan Behnel wrote: >> > the only thing that will affect the user (and which i should mention) >> > is: make uses file extensions to determine file types. particularly, i >> > have not found a port

Re: [Cython] [cython-users] new "cythonize" script

2013-08-10 Thread Robert Bradshaw
On Sat, Aug 10, 2013 at 11:39 AM, Stefan Behnel wrote: > Hi, > > I added a script as "bin/cythonize" that acts as a frontend for the > cythonize() compilation tool (and distutils' build_ext). > > https://github.com/cython/cython/blob/master/bin/cythonize > > One cool feature is that you can use i

Re: [Cython] [cython-users] Confused by user's guide

2013-08-12 Thread Robert Bradshaw
On Mon, Aug 12, 2013 at 1:37 AM, Zak wrote: > I bet some people are still confused, because I would have been confused if > I read that a few months ago. Let me explain with code: > > # This is a Python function: > def do_math(top, bottom): > return top / bottom > > # This is also a Python fun

Re: [Cython] [cython-users] Confused by user's guide

2013-08-13 Thread Robert Bradshaw
On Mon, Aug 12, 2013 at 9:58 PM, Stefan Behnel wrote: > Robert Bradshaw, 13.08.2013 06:13: >> def do_math2(top_temp, bottom_temp): >> cdef int top = top_temp >> cdef int bottom = bottom_temp >> return do_math_c(top, bottom) >> >> cdef do_math_c(

Re: [Cython] A bug when declare array.

2013-08-21 Thread Robert Bradshaw
On Sat, Aug 17, 2013 at 3:31 AM, yi huang wrote: > I use cython 0.19.1, when compile following code: > > cdef void some_function(): > cdef char buf[sizeof(long)*8/3+6] > > Got error message: > > Error compiling Cython file: > > ... >

Re: [Cython] [cython-users] Re: wiki spam

2013-08-28 Thread Robert Bradshaw
On Wed, Aug 28, 2013 at 11:53 AM, William Stein wrote: > On Wed, Aug 28, 2013 at 10:12 AM, Lars Buitinck wrote: >> 2013/8/28 : >>> On Wednesday, August 28, 2013 10:29:35 AM UTC-4, Josh Ayers wrote: I just noticed one of the pages on the Cython wiki was changed to spam. See the pag

[Cython] memoryviews bloat?

2013-09-09 Thread Robert Bradshaw
>> Wow. The first version of this PR used Cython memoryviews, which added a >> whopping 14 kLOC of generated C to the repo. Switched back to bare pointers >> to keep the compile times within bounds. > It would be interesting to hear the Cython team's point of view on that. > @sturlamolden @rober

Re: [Cython] Metaclass bug corrupts the heap

2013-09-12 Thread Robert Bradshaw
Thanks for the careful analysis. See https://github.com/cython/cython/commit/e8b54dec4cdc94764abda4a107bc37dcd58e6f13 On Tue, Sep 10, 2013 at 3:26 PM, Dénes Vadász wrote: > Hello, > > according to valgrind the following Cython fragment causes a heap corruption > (with Python 2.7.5 and Cython 0.19

Re: [Cython] Improving compile times for Cython extensions with C sources

2013-09-16 Thread Robert Bradshaw
On Mon, Sep 16, 2013 at 11:48 AM, Wes McKinney wrote: > I haven't been able to find an easy answer to this question, but here is my > problem: > > Cython file: extension.pyx > Declarations / C imports: extension.pxd > C dependencies: > a.c > b.c > c.c > > These are all compiled together to produce

[Cython] Declaration syntax change

2013-10-02 Thread Robert Bradshaw
In thinking about 1.0, this would be a chance to make backwards-incompatible changes. One thing that has always bothered me is the C-delclarator decoration for specifying complex types. Specifically, cdef int *a, b, c, *d[3] is IMHO quite ugly but also adds a lot of complexity to the parser.

Re: [Cython] Declaration syntax change

2013-10-03 Thread Robert Bradshaw
On Thu, Oct 3, 2013 at 7:13 AM, Nathaniel Smith wrote: > On Thu, Oct 3, 2013 at 3:00 PM, Stefan Behnel wrote: >> Nathaniel Smith, 03.10.2013 14:35: >>> On Thu, Oct 3, 2013 at 1:23 PM, Stefan Behnel wrote: >>>> Greg Ewing, 03.10.2013 14:10: >>>>> Rob

Re: [Cython] Declaration syntax change

2013-10-03 Thread Robert Bradshaw
On Thu, Oct 3, 2013 at 10:21 AM, Nathaniel Smith wrote: > On Thu, Oct 3, 2013 at 5:03 PM, Robert Bradshaw wrote: >> On Thu, Oct 3, 2013 at 7:13 AM, Nathaniel Smith wrote: >>> On Thu, Oct 3, 2013 at 3:00 PM, Stefan Behnel wrote: >>>> Nathaniel Smith, 03.10.2013 14

Re: [Cython] Declaration syntax change

2013-10-03 Thread Robert Bradshaw
On Thu, Oct 3, 2013 at 9:30 AM, Chuck Blake wrote: > Greg Ewing wrote: >>What would be the benefit of this? You're proposing to change >>from something identical to C declaration syntax, which is >>second nature for a great many people, to something that >>looks deceptively like C syntax but isn't

Re: [Cython] Declaration syntax change

2013-10-03 Thread Robert Bradshaw
On Thu, Oct 3, 2013 at 3:06 PM, Chuck Blake wrote: > Robert Bradshaw [rober...@gmail.com] wrote: >>Yes, it still is. But it would be nice to get any such major changes >>out of the way ahead of time. > > I think the "compiling Python" goal is so orthogonal to t

Re: [Cython] Memory views: dereferencing pointer does break strict-aliasing rules

2013-10-11 Thread Robert Bradshaw
On Fri, Oct 11, 2013 at 2:15 AM, David Cournapeau wrote: > > On Tue, Jul 2, 2013 at 5:07 PM, Robert Bradshaw wrote: >> >> On Tue, Jul 2, 2013 at 4:54 AM, Yury V. Zaytsev wrote: >> > Hi, >> > >> > The simplest possible program using memory views comp

Re: [Cython] Memory views: dereferencing pointer does break strict-aliasing rules

2013-10-11 Thread Robert Bradshaw
On Fri, Oct 11, 2013 at 10:46 AM, Stefan Behnel wrote: > Robert Bradshaw, 11.10.2013 19:10: >> Python and Cython in >> general breaks pointer aliasing as objects are simultaneously generic >> PyObject* and PyListObject*, PyDictObject*, etc. As the set of >> possi

[Cython] Cython wiki

2013-10-16 Thread Robert Bradshaw
I've cleaned out the spam and moved the wiki to https://github.com/cython/cython/wiki Don't edit it just yet (as I have at lest one more round of force-pushing conversion from moinmoin files), but please let me know if something doesn't look right or it's missing pages you expect to see. (Yes, I kn

Re: [Cython] Files with executable bit on

2013-11-01 Thread Robert Bradshaw
Done. On Fri, Nov 1, 2013 at 6:16 AM, Lisandro Dalcin wrote: > This is in branch 0.19.x. These files should not have the executable > bit on. Can any of you please fix them? > > [dalcinl@macarena cython-dev]$ ls -al $(find Cython -name '*.py') | grep rwx > -rwxr-xr-x 1 dalcinl staff4286 Feb

Re: [Cython] "embedsignature" and "autotestdict" features in Py3.4

2013-12-02 Thread Robert Bradshaw
On Fri, Nov 29, 2013 at 8:03 AM, Stefan Behnel wrote: > Hi, > > recent changes in Py3.4 affect the functionality of the two directives > "embedsignature" and "autotestdict". > > The so-called "argument clinic" extracts any embedded signatures from > docstrings and moves them into a new property "_

[Cython] Cython 0.20 beta 1

2014-01-03 Thread Robert Bradshaw
I just uploaded the first beta release for Cython 0.20, it's tagged as 0.20b1 in the git repository or you can find it at http://cython.org/release/Cython-0.20b1.tar.gz . A summary of the changes can be found at https://github.com/cython/cython/blob/0.20b1/CHANGES.rst , please try it out and let us

Re: [Cython] "relaxed_strides" test broken with NumPy 1.8

2014-01-04 Thread Robert Bradshaw
Excellent, thanks. I'll make sure this gets into the release. On Sat, Jan 4, 2014 at 6:46 AM, Stefan Behnel wrote: > Stefan Behnel, 04.01.2014 12:53: >> mark florisson, 03.01.2014 23:28: >>> On 3 January 2014 18:22, Stefan Behnel wrote: I enabled the NumPy build for our Py3.3 test runs and w

Re: [Cython] "relaxed_strides" test broken with NumPy 1.8

2014-01-04 Thread Robert Bradshaw
Yes, that'd be good. Do you know how? I won't have time to look at this 'till next week. On Jan 4, 2014 9:54 AM, "Nathaniel Smith" wrote: > On 4 Jan 2014 11:53, "Stefan Behnel" wrote: > > > > mark florisson, 03.01.2014 23:28: > > > On 3 January 2014 18:22, Stefan Behnel wrote: > > >> I enabled t

[Cython] Cython 0.20 beta 2

2014-01-11 Thread Robert Bradshaw
There was a lot of bugfixes and other good stuff on master, so I pulled it in and am releasing another beta. You can find it at http://cython.org/release/Cython-0.20b2.tar.gz . I don't anticipate merging master again before the release, so this is nearly a release candidate, but please let us know

Re: [Cython] tp_alloc() vs. object.__new__() (was: Cython 0.20 beta 2)

2014-01-12 Thread Robert Bradshaw
On Sun, Jan 12, 2014 at 1:21 AM, Stefan Behnel wrote: > Stefan Behnel, 12.01.2014 09:20: >> The only thing that is still a bit unclear to me is whether calling >> object.__new__() from extension types was a good idea: >> >> https://github.com/cython/cython/commit/ddaffbe78c06e580ca0d9cd334c7a28a4d

Re: [Cython] remove timestamps from generated source files

2014-01-13 Thread Robert Bradshaw
The timestamp is in a comment which ccache can strip before looking up items in the cache; are you sure this is an issue? On Mon, Jan 13, 2014 at 10:39 AM, Julian Taylor wrote: > Hi, > Cython currently places timestamps into all its generated C source files. > This may be ok for developers who no

Re: [Cython] h5py build broken by 0.20b2

2014-01-13 Thread Robert Bradshaw
I've verified that Stefan's latest fix lets h5py compile. On Mon, Jan 13, 2014 at 10:49 AM, Julian Taylor wrote: > On 13.01.2014 09:26, Stefan Behnel wrote: >> Hi, >> ... >>> >>> it was introduced in cython around this commit: >>> b6b5152f386ddae503674cc26200a547f3b4c8b0 >>> properly handle expre

Re: [Cython] Cython 0.20 beta 2

2014-01-13 Thread Robert Bradshaw
I fixed one of the tests that was trying to test using symlink: https://github.com/cython/cython/commit/f236077786203f5f393dab3a707b82a62b4f4155 Is the list of failures notably worse than 0.19.x? - Robert On Mon, Jan 13, 2014 at 2:24 AM, Stefan Behnel wrote: > Hi Christoph, > > thanks for te

Re: [Cython] Cython 0.20 beta 2

2014-01-13 Thread Robert Bradshaw
On Sun, Jan 12, 2014 at 12:20 AM, Stefan Behnel wrote: > Robert Bradshaw, 12.01.2014 08:53: >> There was a lot of bugfixes and other good stuff on master, so I >> pulled it in and am releasing another beta. You can find it at >> http://cython.org/release/Cython-0.20b2.tar.gz

Re: [Cython] libimobiledevice build broken by 0.20b2

2014-01-14 Thread Robert Bradshaw
On Sun, Jan 12, 2014 at 11:35 AM, Julian Taylor wrote: > Hi, > libimobiledevice cython file fails to build with cython git head and 0.20b2. > It works with older versions, the bad commit in cython is: > commit db5d5a41b852fa32876688198e3d2d46f12de858 > Author: Robert Bradshaw &g

[Cython] Cython 0.20 release candidates

2014-01-16 Thread Robert Bradshaw
Up at http://cython.org/release/Cython-0.20rc1.tar.gz , to be released shortly. ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel

Re: [Cython] Cython 0.20 beta 2

2014-01-16 Thread Robert Bradshaw
On Thu, Jan 16, 2014 at 6:21 PM, Christoph Gohlke wrote: > On 1/13/2014 2:24 AM, Stefan Behnel wrote: >> >> Hi Christoph, >> >> thanks for testing! >> >> Christoph Gohlke, 13.01.2014 09:46: >>> >>> I have trouble running the tests (`runtests.py`) on Windows: >>> [...] >>> There are hundreds of tes

[Cython] Cython 0.20 release

2014-01-18 Thread Robert Bradshaw
I'm happy to announce the release of Cython 0.20. You can download it directly from the Cython site at http://cython.org/ or from PyPI at https://pypi.python.org/pypi/Cython/0.20 . There are a significant number of new features and bug fixes in this release, for a summary see https://github.com/c

Re: [Cython] Broken list multiplication

2014-01-29 Thread Robert Bradshaw
On Wed, Jan 29, 2014 at 9:03 AM, Stefan Behnel wrote: > R. Andrew Ohana, 28.01.2014 23:34: >> It seems like eaca39b00b1451fe6c846a0a670e4c8b39935525 broke some (very >> simple) instances of list multiplication when there are at least 3 terms in >> the product. e.g. on my system I'm getting these r

Re: [Cython] Broken list multiplication

2014-01-29 Thread Robert Bradshaw
On Wed, Jan 29, 2014 at 10:10 AM, Robert Bradshaw wrote: > On Wed, Jan 29, 2014 at 9:03 AM, Stefan Behnel wrote: >> R. Andrew Ohana, 28.01.2014 23:34: >>> It seems like eaca39b00b1451fe6c846a0a670e4c8b39935525 broke some (very >>> simple) instances of list multiplicat

Re: [Cython] 0.20.1 bug fix release (was: Broken list multiplication)

2014-02-03 Thread Robert Bradshaw
On Fri, Jan 31, 2014 at 3:49 AM, Stefan Behnel wrote: > Stefan Behnel, 30.01.2014 17:40: >> Robert Bradshaw, 29.01.2014 19:10: >>> Ouch. Between this and the other Sage issue, I feel a small point >>> release coming up. Any other bug fixes we should get in? >&

[Cython] Bugfix release 0.20.1 release candidate

2014-02-07 Thread Robert Bradshaw
Tarball up at http://cython.org/release/Cython-0.20.1rc1.tar.gz This is a bugfix only release, primarily to address the sequence literal multiplication bug, but the set of improvements since the last release looked relatively safe so I've pulled in everything from master (if that turns out to be a

[Cython] Cython 0.20.1 released

2014-02-11 Thread Robert Bradshaw
I just pushed the 0.20.1 bugfix release. The changelist can be found at https://github.com/cython/cython/blob/0.20.x/CHANGES.rst , but most notable is the first entry which corrects a bug optimizing literal sequence multiplication. - Robert ___ cython-de

Re: [Cython] Invalid C++ with Python and C++ iterators (not compiling CLang)

2014-02-21 Thread Robert Bradshaw
For reference, this has been fixed: https://groups.google.com/forum/#!topic/cython-users/2GO2_JRXr9s On Mon, Feb 17, 2014 at 3:46 AM, Gael Varoquaux wrote: > Hi, > > I'd like to enquire on the status of the problem raised last year: > https://mail.python.org/pipermail/cython-devel/2013-April/0036

Re: [Cython] Crash with freelist() and __slots__

2014-03-05 Thread Robert Bradshaw
On Mon, Mar 3, 2014 at 8:38 AM, Stefan Behnel wrote: > Hi, > > I was made aware of crashes in the last lxml release, which turned out to > be due to the use of freelists for types that could be subtyped from Python > code. I was able to work around them in lxml, however, the real problem is > in C

Re: [Cython] 0.20.2

2014-03-21 Thread Robert Bradshaw
On Fri, Mar 21, 2014 at 12:07 AM, Stefan Behnel wrote: > Stefan Behnel, 22.02.2014 10:02: >> there are a couple of nice additions and fixes in the current master that >> could go out as a 0.20.2 some time soon. I suggest waiting another couple >> of days for more bug reports to come in and then ju

Re: [Cython] Move IPython's cython extension to cython

2014-04-05 Thread Robert Bradshaw
On Fri, Apr 4, 2014 at 10:55 AM, Martín Gaitán wrote: > As you probably know, IPython has a "cython magic" [1], an extension to > interface ipython with cython, allowing to use cython code in the > interactive session. > > Originally, few of these "language specific magics" (R, cython, octave, etc

[Cython] Cython 0.20.2 beta

2014-05-29 Thread Robert Bradshaw
I've pushed a beta for the 0.20.2 can be found at http://cython.org/release/Cython-0.20rc1.tar.gz . This is a bugfix-only release, more development is going on for 0.21 which will also be released soon. Note, however, that the 0.20.x branch is the last to support older versions of Python (pre 2.6 o

Re: [Cython] Cython 0.20.2 beta

2014-06-04 Thread Robert Bradshaw
I'm going to take the lack of feedback as a good sign and release this in the next couple of days... On Thu, May 29, 2014 at 6:06 PM, Robert Bradshaw wrote: > I've pushed a beta for the 0.20.2 can be found at > http://cython.org/release/Cython-0.20rc1.tar.gz . This is a >

Re: [Cython] JyNI - C-API emulation for Jython

2014-06-16 Thread Robert Bradshaw
Cool. I find their motivation "Since Java is rather present in industry, while Python is more present in science, JyNI will be an important step to lower the cost of using scientific code in industrial environments" interesting. On the other hand, I think IronClad is pretty dead. On Mon, Jun 16,

Re: [Cython] any more changes for 0.21?

2014-06-16 Thread Robert Bradshaw
On Mon, Jun 16, 2014 at 1:07 AM, Stefan Behnel wrote: > Hi, > > I think the master branch is good enough for at least a 0.21 alpha. Are > there any pending changes that should go in before it can be released? Any > pull requests that should be considered? I started some work on support for static

[Cython] Cython bugfix release

2014-06-16 Thread Robert Bradshaw
nsion type attributes in .pxd files were rejected. == Contributors == Andreas van Cranenburgh Ian Bell Lars Buitinck Martin Quarda Mikhail Korobov Robert Bradshaw Stefan Behnel ___ cython-devel mailing list cython-devel@python.org https://mail.python.o

Re: [Cython] any more changes for 0.21?

2014-06-16 Thread Robert Bradshaw
On Mon, Jun 16, 2014 at 5:07 PM, Robert Bradshaw wrote: > On Mon, Jun 16, 2014 at 1:07 AM, Stefan Behnel wrote: >> Hi, >> >> I think the master branch is good enough for at least a 0.21 alpha. Are >> there any pending changes that should go in before it can be released

Re: [Cython] any more changes for 0.21?

2014-06-17 Thread Robert Bradshaw
On Mon, Jun 16, 2014 at 10:14 PM, Robert Bradshaw wrote: > On Mon, Jun 16, 2014 at 5:07 PM, Robert Bradshaw wrote: >> On Mon, Jun 16, 2014 at 1:07 AM, Stefan Behnel wrote: >>> Hi, >>> >>> I think the master branch is good enough for at least a 0.21 alpha. Ar

Re: [Cython] any more changes for 0.21?

2014-06-17 Thread Robert Bradshaw
On Tue, Jun 17, 2014 at 2:14 PM, Robert Bradshaw wrote: > On Mon, Jun 16, 2014 at 10:14 PM, Robert Bradshaw wrote: >> On Mon, Jun 16, 2014 at 5:07 PM, Robert Bradshaw wrote: >>> On Mon, Jun 16, 2014 at 1:07 AM, Stefan Behnel wrote: >>>> Hi, >>>> >

Re: [Cython] Travis-ci builds of OSX wheels

2014-07-03 Thread Robert Bradshaw
Sure! On Thu, Jul 3, 2014 at 3:49 AM, Matthew Brett wrote: > Hi, > > We just got scikit-image OSX wheel builds more or less fully automated > on travis-ci : > > https://travis-ci.org/scikit-image/scikit-image-wheels > https://github.com/scikit-image/scikit-image-wheels > > Any interest in getting

Re: [Cython] Travis-ci builds of OSX wheels

2014-07-05 Thread Robert Bradshaw
On Fri, Jul 4, 2014 at 3:04 PM, Matthew Brett wrote: > On Fri, Jul 4, 2014 at 5:51 AM, Robert Bradshaw wrote: >> Sure! >> >> On Thu, Jul 3, 2014 at 3:49 AM, Matthew Brett >> wrote: >>> Hi, >>> >>> We just got scikit-image OSX whee

Re: [Cython] Travis-ci builds of OSX wheels

2014-07-05 Thread Robert Bradshaw
On Sat, Jul 5, 2014 at 6:27 PM, Matthew Brett wrote: > Hi, > > On Sun, Jul 6, 2014 at 1:31 AM, Robert Bradshaw wrote: >> On Fri, Jul 4, 2014 at 3:04 PM, Matthew Brett >> wrote: >>> On Fri, Jul 4, 2014 at 5:51 AM, Robert Bradshaw wrote: >>>> Sure

Re: [Cython] heads-up on master branch status

2014-07-15 Thread Robert Bradshaw
Ironically, I noticed these BoolBinop failures and started working on a fix myself (including side diversions like making void* the spanning type of all pointers) before noticing that you were on it, so I have a bit of an idea what a long, twisty path this starts down and can only say thanks for ta

Re: [Cython] Automatic conversion with fixed-size C arrays

2014-07-16 Thread Robert Bradshaw
On Wed, Jul 16, 2014 at 10:01 AM, Kurt Smith wrote: > Hi devs, > > Being able to convert between simple C structs and Python dictionaries is > great, but it doesn't work if there is a fixed-size array field in the > struct. It seems like the following struct should be convertible safely: > > cdef

Re: [Cython] Automatic conversion with fixed-size C arrays

2014-07-18 Thread Robert Bradshaw
On Fri, Jul 18, 2014 at 12:08 PM, Kurt Smith wrote: > On Wed, Jul 16, 2014 at 1:02 PM, Robert Bradshaw wrote: >> >> >> Yes, this'd be nice to have. One difficulty with arrays is that they >> can't be returned by value, and so the ordinary from_py_fun

Re: [Cython] License information on each individual files

2014-07-18 Thread Robert Bradshaw
On Fri, Jul 18, 2014 at 2:28 PM, Nathaniel Smith wrote: > On Fri, Jul 18, 2014 at 10:13 PM, Sturla Molden > wrote: > > Benjamin Lerman wrote: > > > >> Would cython accept to add such a copyright header on its files? > > > > You want to display the Apache licence in every single file, even thos

Re: [Cython] License information on each individual files

2014-07-18 Thread Robert Bradshaw
On Fri, Jul 18, 2014 at 3:12 PM, Nathaniel Smith wrote: > On Fri, Jul 18, 2014 at 10:53 PM, Robert Bradshaw > wrote: > >> On Fri, Jul 18, 2014 at 2:28 PM, Nathaniel Smith wrote: >> >>> On Fri, Jul 18, 2014 at 10:13 PM, Sturla Molden >>> wrote: >>&g

Re: [Cython] Cython bugfix release

2014-07-21 Thread Robert Bradshaw
c can't encode characters in position > 18851-18854: ordinal not in range(128) > > > > on debian wheezy i386. it didn't happen on amd64 and on both > architectures > > > under debian jessie (testing) and it seemed to happen while testing > with > > >

Re: [Cython] License information on each individual files

2014-07-22 Thread Robert Bradshaw
On Sun, Jul 20, 2014 at 12:37 AM, Stefan Behnel wrote: > > Nathaniel Smith, 19.07.2014 19:42: > > On Sat, Jul 19, 2014 at 7:39 AM, Stefan Behnel wrote: > >> Sturla Molden, 19.07.2014 00:36: > >>> Robert Bradshaw wrote: > >>>> It's not ju

Re: [Cython] Compiler crash: forward declaration of cdef class with "public" attributes

2014-07-22 Thread Robert Bradshaw
On Tue, Jul 8, 2014 at 4:34 PM, Alok Singhal wrote: > Hi, > > I am getting a compiler crash with the following code: > > $ cat foo.pxd > cdef class Foo: > cdef public object x > $ cat foo.pyx > cdef class Foo > > cdef class Foo: > pass > $ ./cython.py foo.pyx > > Error compiling Cython fi

Re: [Cython] Compiler crash: forward declaration of cdef class with "public" attributes

2014-07-23 Thread Robert Bradshaw
On Wed, Jul 23, 2014 at 12:29 AM, Alok Singhal wrote: > On Tue, Jul 22, 2014 at 11:42 PM, Robert Bradshaw wrote: >> On Tue, Jul 8, 2014 at 4:34 PM, Alok Singhal wrote: >> >> Thanks. >> https://github.com/cython/cython/commit/967c8e11da94ddae1ea7f1524f6beef2e030

Re: [Cython] Automatic conversion with fixed-size C arrays

2014-07-24 Thread Robert Bradshaw
On Fri, Jul 18, 2014 at 12:44 PM, Robert Bradshaw wrote: > On Fri, Jul 18, 2014 at 12:08 PM, Kurt Smith wrote: >> On Wed, Jul 16, 2014 at 1:02 PM, Robert Bradshaw wrote: >>> >>> >>> Yes, this'd be nice to have. One difficulty with arrays is that they &

Re: [Cython] Automatic conversion with fixed-size C arrays

2014-07-24 Thread Robert Bradshaw
On Thu, Jul 24, 2014 at 7:13 PM, Kurt Smith wrote: > > On Thu, Jul 24, 2014 at 2:07 PM, Robert Bradshaw wrote: >> >> On Fri, Jul 18, 2014 at 12:44 PM, Robert Bradshaw >> wrote: >> > On Fri, Jul 18, 2014 at 12:08 PM, Kurt Smith wrote: >> >> On

Re: [Cython] Automatic conversion with fixed-size C arrays

2014-07-25 Thread Robert Bradshaw
On Fri, Jul 25, 2014 at 8:24 AM, Kurt Smith wrote: > > On Thu, Jul 24, 2014 at 11:16 PM, Robert Bradshaw > wrote: > >> On Thu, Jul 24, 2014 at 7:13 PM, Kurt Smith wrote: >> > >> > On Thu, Jul 24, 2014 at 2:07 PM, Robert Bradshaw >> wrote: >> &

Re: [Cython] Automatic conversion with fixed-size C arrays

2014-07-25 Thread Robert Bradshaw
On Fri, Jul 25, 2014 at 1:30 PM, Kurt Smith wrote: > > > On Fri, Jul 25, 2014 at 1:16 PM, Robert Bradshaw > wrote: >> >> On Fri, Jul 25, 2014 at 8:24 AM, Kurt Smith wrote: >>> >>> >>> On Thu, Jul 24, 2014 at 11:16 PM, Robert Bradshaw >>

Re: [Cython] Automatic conversion with fixed-size C arrays

2014-07-28 Thread Robert Bradshaw
On Sun, Jul 27, 2014 at 9:34 PM, Kurt Smith wrote: > On Thu, Jul 24, 2014 at 9:13 PM, Kurt Smith wrote: >> >> >> I'm working on getting the `to_py_function` and `from_py_function` >> infrastructure to take arguments by reference; right now I'm getting >> something hacked into place, and I'd appre

Re: [Cython] heads-up on master branch status

2014-07-28 Thread Robert Bradshaw
On Mon, Jul 28, 2014 at 11:15 AM, Stefan Behnel wrote: > Robert Bradshaw, 15.07.2014 23:13: > > On Mon, Jul 14, 2014 at 12:49 PM, Stefan Behnel wrote: > >> by applying some initially small but perpetually growing fixes, I pushed > >> myself into a corner where the

Re: [Cython] Automatic conversion with fixed-size C arrays

2014-07-31 Thread Robert Bradshaw
We can move to the PR, makes it easier to do line commenting. On Tue, Jul 29, 2014 at 9:54 PM, Kurt Smith wrote: > On Mon, Jul 28, 2014 at 11:29 PM, Kurt Smith wrote: >> >> On Mon, Jul 28, 2014 at 11:02 AM, Robert Bradshaw >> wrote: >>> >>> On Sun, Jul

Re: [Cython] Test/example for cpdef enum

2014-08-02 Thread Robert Bradshaw
On Sat, Aug 2, 2014 at 3:56 AM, Ian Bell wrote: > Are there any tests/docs/examples showing how to use the cpdef enum? This > is a feature I have been looking for for a long time and I am hoping to use > it very soon in my own project. https://github.com/cython/cython/blob/master/tests/run/cpdef

Re: [Cython] Test/example for cpdef enum

2014-08-04 Thread Robert Bradshaw
On Mon, Aug 4, 2014 at 4:14 PM, Ian Bell wrote: > > On Sat, Aug 2, 2014 at 7:08 PM, Robert Bradshaw wrote: >> >> On Sat, Aug 2, 2014 at 3:56 AM, Ian Bell wrote: >> > Are there any tests/docs/examples showing how to use the cpdef enum? >> > This >> &g

Re: [Cython] bug: constructor declarations not working

2014-08-16 Thread Robert Bradshaw
ample3, Cython runs through but trying to compile shows the actual >> problem (which you can also see in example2 if you shift things around a >> bit): >> >> $ g++ -fPIC -shared -o example3.so -I /usr/include/python2.7 example3.cpp >> example3.cpp: In function ‘vo

[Cython] Towards a formal Cython grammar

2014-08-23 Thread Robert Bradshaw
I've started playing around with writing a grammar for Cython. As well as formally defining the language (in particular, with respect to Python) this should allow us to eventually move to using parser-generators rather than ad-hoc hand written code and be useful to external tools (e.g. IDEs, linte

Re: [Cython] Bug: operator[] does not respect except +

2014-09-05 Thread Robert Bradshaw
Yes, this is a bug. On Fri, Sep 5, 2014 at 4:05 PM, J Robert Ray wrote: > I looked into at least adding a unit test to verify "except +" behavior for > all operators and I found that aside from operator(), it seems that all > operators ignore "except +". > > I have C++ code that can throw excepti

Re: [Cython] preparing a release candidate, pending issues

2014-09-06 Thread Robert Bradshaw
On Fri, Sep 5, 2014 at 12:39 PM, Stefan Behnel wrote: > Hi, > > current master looks good enough to plan for a release candidate next week. > There are only a couple of pending issues that I'm aware of that may or may > not get looked into for the release. > > One thing is cygdb and its tests - ar

Re: [Cython] Travis-ci builds of OSX wheels

2014-10-16 Thread Robert Bradshaw
Thanks. On Thu, Oct 16, 2014 at 1:46 PM, Matthew Brett wrote: > Hi, > > On Sat, Jul 5, 2014 at 6:37 PM, Robert Bradshaw > wrote: > > On Sat, Jul 5, 2014 at 6:27 PM, Matthew Brett > wrote: > >> Hi, > >> > >> On Sun, Jul 6, 2014 at 1:31 AM, Robert

Re: [Cython] [PATCH] explain how to compile C++ extensions up to Cython 0.21

2014-10-31 Thread Robert Bradshaw
On Oct 31, 2014 5:54 AM, "Daniele Nicolodi" wrote: > > On 31/10/14 13:44, Stefan Behnel wrote: > > Daniele Nicolodi schrieb am 31.10.2014 um 13:07: > >> Thanks for applying the patch. > >> I see that you applied it manually and not through git am or similar, > >> otherwise my identity would have b

[Cython] New function (pointer) syntax.

2014-11-05 Thread Robert Bradshaw
I'd like to propose a more pythonic way to declare function pointer types, namelye type0 (*[ident])(type1, type2, type3) would instead become (type1, type2, type3) -> type0 [ident] I have a pull request up at https://github.com/cython/cython/pull/333; what do people think? - Robert ___

Re: [Cython] New function (pointer) syntax.

2014-11-06 Thread Robert Bradshaw
On Thu, Nov 6, 2014 at 12:29 AM, Stefan Behnel wrote: > Robert Bradshaw schrieb am 06.11.2014 um 08:34: >> I'd like to propose a more pythonic way to declare function pointer >> types, namelye >> >> type0 (*[ident])(type1, type2, type3) >> >>

Re: [Cython] New function (pointer) syntax.

2014-11-06 Thread Robert Bradshaw
ally for the first. On Thu, Nov 6, 2014 at 9:59 AM, Stefan Behnel wrote: > Robert Bradshaw schrieb am 06.11.2014 um 18:15: >> On Thu, Nov 6, 2014 at 12:29 AM, Stefan Behnel wrote: >>> Robert Bradshaw schrieb am 06.11.2014 um 08:34: >>>> I'd like to propose

Re: [Cython] New function (pointer) syntax.

2014-11-06 Thread Robert Bradshaw
On Thu, Nov 6, 2014 at 11:56 AM, Stefan Behnel wrote: > Robert Bradshaw schrieb am 06.11.2014 um 19:56: >> On Thu, Nov 6, 2014 at 9:59 AM, Stefan Behnel wrote: >>> Robert Bradshaw schrieb am 06.11.2014 um 18:15: >>>> This becomes especially clear for return types, e

Re: [Cython] [cython-users] Re: New function (pointer) syntax.

2014-11-06 Thread Robert Bradshaw
On Thu, Nov 6, 2014 at 1:07 PM, Nils Bruin wrote: > On Thursday, November 6, 2014 10:57:23 AM UTC-8, Robert Bradshaw wrote: >> >> cdef float -> float F >> cdef (float -> float, float, float) -> float G >> cdef (char*) -> (float -> float,

Re: [Cython] [sage-devel] Re: New function (pointer) syntax.

2014-11-06 Thread Robert Bradshaw
Thanks for all the feedback! On Thu, Nov 6, 2014 at 7:13 PM, Travis Scrimshaw wrote: > Here's my 2 cents. >> >> >> cdef float (*F)(float) >> cdef float (*G)(float (*)(float), float, float) >> cdef float ((*H)(char*))(float (*)(float), float, float) > > > I prefer this one because it

Re: [Cython] New function (pointer) syntax.

2014-11-07 Thread Robert Bradshaw
On Thu, Nov 6, 2014 at 1:35 PM, C Blake wrote: > I think you should just use the C declarator syntax. Cython already > allows you to say "cdef int *foo[10]". Quick: is that a pointer to an array or 10 pointers to ints? Yes, I know what it is, but the thing is without knowing C (well) it's not im

Re: [Cython] [cython-users] Re: New function (pointer) syntax.

2014-11-07 Thread Robert Bradshaw
On Thu, Nov 6, 2014 at 11:30 PM, Ian Henriksen wrote: > On Thursday, November 6, 2014 9:48:53 PM UTC-7, 1989lzhh wrote: >> >> > 在 Nov 7, 2014,02:56,Robert Bradshaw 写道: >> > >> > [Cc'ing elsewhere for more feedback. Also top-posting for initi

Re: [Cython] New function (pointer) syntax.

2014-11-07 Thread Robert Bradshaw
On Fri, Nov 7, 2014 at 11:29 AM, C Blake wrote: > Robert Bradshaw robertwb at gmail.com wrote: >>Quick: is that a pointer to an array or 10 pointers to ints? Yes, I >>know what it is, but the thing is without knowing C (well) it's not >>immediately obvious what the pr

Re: [Cython] New function (pointer) syntax.

2014-11-08 Thread Robert Bradshaw
On Sat, Nov 8, 2014 at 3:19 PM, C Blake wrote: >>But I admit it's hard to come up with an objective measure for how >>good a syntax is...if it's natural to you than that's great. > > I think those queries you mention will mostly be biased by the squeakier > wheels being more beginning people and t

Re: [Cython] [cython-users] Re: New function (pointer) syntax.

2014-11-10 Thread Robert Bradshaw
On Sun, Nov 9, 2014 at 1:29 PM, Nils Bruin wrote: > On Saturday, November 8, 2014 12:15:02 PM UTC-8, Sturla Molden wrote: >> >> Presumably Cython >> needs C and C++ function and method pointer syntax for wrapping C and C++ >> libraries, so why add another one? > > > I think that's a valid point. T

Re: [Cython] New function (pointer) syntax.

2014-11-10 Thread Robert Bradshaw
On Mon, Nov 10, 2014 at 6:25 AM, Dima Pasechnik wrote: > On 2014-11-06, Robert Bradshaw wrote: >> I'd like to propose a more pythonic way to declare function pointer >> types, namelye >> >> type0 (*[ident])(type1, type2, type3) >> >> would i

Re: [Cython] New function (pointer) syntax.

2014-11-10 Thread Robert Bradshaw
On Mon, Nov 10, 2014 at 1:10 PM, Dima Pasechnik wrote: > On 10 November 2014 20:23, Robert Bradshaw wrote: >> On Mon, Nov 10, 2014 at 6:25 AM, Dima Pasechnik wrote: >>> On 2014-11-06, Robert Bradshaw wrote: >>>> I'd like to propose a more pythonic way to

Re: [Cython] Location where extern declarations are parsed

2014-11-15 Thread Robert Bradshaw
On Fri, Nov 14, 2014 at 4:46 AM, Favian Contreras wrote: > Hello all, > > Does anyone know where the (c++) external declarations are parsed? I am > specifically looking for where external function pointers are parsed by the > compiler. I noticed that all functions are parsed in some way in Symtab.

Re: [Cython] Cython <> pythran collaboration

2014-12-09 Thread Robert Bradshaw
On Mon, Dec 8, 2014 at 11:52 AM, serge Guelton wrote: > Hi Cython dev, > > I am one of the two core developers of the Pythran[0] compiler. > We are planning to start a project where Cython would delegate the > generation of optimized (i.e. parallel / vectorized / without temporary > arrays) numpy

Re: [Cython] Cythonize silently ignores nonexistent files

2015-01-08 Thread Robert Bradshaw
On Sat, Dec 20, 2014 at 1:01 AM, Stefan Behnel wrote: > Kevin Norris schrieb am 20.12.2014 um 01:47: >> Is this behavior intentional? >> >> >>> from Cython.Build import cythonize >> >>> cythonize('/this/file/doesnt/exist.pyx') >> [] > > Yes, it's intentional. The path you pass is actua

[Cython] Cython 0.22.alpha

2015-01-17 Thread Robert Bradshaw
It's been too long since we've done a release, and the features have started to pile up, so I'm getting the ball rolling with 0.22.alpha0. I've uploaded a tarball to http://cython.org/release/Cython-0.22.alpha0.tar.gz; you can also get it from github. Let me know what breaks/works for you, and if

[Cython] Cython 0.22 beta

2015-01-21 Thread Robert Bradshaw
I've posted a beta for Cython 0.22, please try it out and report any problems (and successes) you encounter. http://cython.org/release/Cython-0.22.beta0.tar.gz ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo

<    1   2   3   4   5   6   7   8   >