Re: [Cython] Bug, or changed array assignment in 0.17beta1?

2012-07-25 Thread Robert Bradshaw
On Wed, Jul 25, 2012 at 4:24 AM, Greg Ewing wrote: > mark florisson wrote: > >> I'm wondering, what was the original motivation to reuse temporaries? > > It goes back to Pyrex, where I didn't really give it much > thought -- it just seemed like the tidiest thing to do. > Once you have the logic to

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Yaroslav Halchenko
On Wed, 25 Jul 2012, Robert Bradshaw wrote: > > ultimate suffix under assumption that it would not change (also removed > > unused > > _code_cache) (it came out a bit longer simply due to me adding helper > > function > > _get_build_extension() to avoid duplication): > Looks good. Thanks. File

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Robert Bradshaw
On Wed, Jul 25, 2012 at 7:08 PM, Yaroslav Halchenko wrote: > > On Wed, 25 Jul 2012, Robert Bradshaw wrote: > >> > module = imp.load_dynamic(module_name, module_path) >> > arg_list = [kwds[arg] for arg in arg_names] > >> Compiled modules can persist between sessions as well. > > yeah -- f

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Yaroslav Halchenko
On Wed, 25 Jul 2012, Robert Bradshaw wrote: > > module = imp.load_dynamic(module_name, module_path) > > arg_list = [kwds[arg] for arg in arg_names] > Compiled modules can persist between sessions as well. yeah -- figured it down also while working on another version of this trivial pa

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Robert Bradshaw
On Wed, Jul 25, 2012 at 6:12 PM, Yaroslav Halchenko wrote: > actually I have not stated alternative variant since I thought it would > not be wise to 'waste' memory : just store association between a > particular build and target module_name but now I have mentioned that > such code is pretty muc

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Yaroslav Halchenko
actually I have not stated alternative variant since I thought it would not be wise to 'waste' memory : just store association between a particular build and target module_name but now I have mentioned that such code is pretty much there ... but incorrect and not used: $> grep -e '\Wkey\W' -e '^d

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Yaroslav Halchenko
On Wed, 25 Jul 2012, Robert Bradshaw wrote: > One essential feature of cython.inline(...) is that if the code has > already been compiled (and loaded) it should return very fast. This > would seem to add significant overhead. that is what was my concern also with such an approach... I am not s

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Robert Bradshaw
Thanks for the report! On Wed, Jul 25, 2012 at 12:02 PM, Yaroslav Halchenko wrote: > So I wonder, wouldn't it be reasonable (i.e. more robust) in cython_inline to > instantiate first build_extension and seek full name for the resultant > extension from it? That should eliminate any possibility

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Yaroslav Halchenko
NB Sorry for a lengthy reply -- more like notes for myself I guess ;) Short story -- imp.get_suffixes()[0] != get_config_var('SO') on Debian multiarch sid Perspective patch is at the bottom. On Wed, 25 Jul 2012, Stefan Behnel wrote: > > anything familiar? (I see PY3 fix bf7981fb37b19f08a

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Stefan Behnel
Yaroslav Halchenko, 25.07.2012 18:50: > Congrats on the beta-release! While testing an updated debian package > for cython I have ran into failures with Python 3.2.3 (default, Jul 13 2012, > 21:02:37) [GCC 4.7.1] (complete log: > http://neuro.debian.net/_files/_buildlogs/cython/0.17~beta1/cython_0

Re: [Cython] Cython 0.17 beta 1 released

2012-07-25 Thread Yaroslav Halchenko
Congrats on the beta-release! While testing an updated debian package for cython I have ran into failures with Python 3.2.3 (default, Jul 13 2012, 21:02:37) [GCC 4.7.1] (complete log: http://neuro.debian.net/_files/_buildlogs/cython/0.17~beta1/cython_0.17~beta1-1_amd64.build) anything familiar? (

Re: [Cython] Bug, or changed array assignment in 0.17beta1?

2012-07-25 Thread Greg Ewing
mark florisson wrote: I'm wondering, what was the original motivation to reuse temporaries? It goes back to Pyrex, where I didn't really give it much thought -- it just seemed like the tidiest thing to do. Once you have the logic to release temp references as soon as it's safe to do so, it's n

Re: [Cython] Bug, or changed array assignment in 0.17beta1?

2012-07-25 Thread Stefan Behnel
mark florisson, 25.07.2012 12:18: > I'm wondering, what was the original motivation to reuse temporaries? Shorter C code. Then, at some point, also smaller closures. > I think it leads to more problems than benefits in most cases, all you > really care about is clearing up references. It's usua

Re: [Cython] Bug, or changed array assignment in 0.17beta1?

2012-07-25 Thread mark florisson
On 25 July 2012 07:29, Stefan Behnel wrote: > Stefan Behnel, 25.07.2012 07:40: >> Mike Zaletel, 25.07.2012 00:40: >>> bug.pyx-- >>> >>> def foo(): >>>cdef int i >>>cdef int* p1 = [4, 4] >>>cdef int* p2 = [5, 5] >>> >>>print "p1:", >>>for i in

Re: [Cython] Bug, or changed array assignment in 0.17beta1?

2012-07-25 Thread Stefan Behnel
Stefan Behnel, 25.07.2012 08:29: > Stefan Behnel, 25.07.2012 07:40: >> Mike Zaletel, 25.07.2012 00:40: >>> bug.pyx-- >>> >>> def foo(): >>>cdef int i >>>cdef int* p1 = [4, 4] >>>cdef int* p2 = [5, 5] >>> >>>print "p1:", >>>for i in range(2): >