Re: [Cython] Control flow graph

2011-02-14 Thread Dag Sverre Seljebotn
On 02/14/2011 08:40 AM, Vitja Makarov wrote: Hi! In order to implement "reaching definitions" algorithm. I'm now working on control-flow (or data-flow) graph. Here is funny picture made with graphviz ;) http://piccy.info/view3/1099337/ca29d7054d09bd0503cefa25f5f49420/1200/ Cool! This wi

Re: [Cython] Control flow graph

2011-02-15 Thread Dag Sverre Seljebotn
On 02/15/2011 08:21 AM, Robert Bradshaw wrote: On Mon, Feb 14, 2011 at 9:49 PM, Vitja Makarov wrote: 2011/2/15 Robert Bradshaw: On Sun, Feb 13, 2011 at 11:40 PM, Vitja Makarov wrote: Hi! In order to implement "reaching definitions" algorithm. I'm now working on control-flo

Re: [Cython] python 2.7/3.x and numpy-dev (Dag, I need a quick comment)

2011-02-18 Thread Dag Sverre Seljebotn
On 02/17/2011 07:11 PM, Lisandro Dalcin wrote: I'm working on a patch to get old, recent, and dev NumPy working in 2.7/3.x. So far, I had success, but I still have two failures like the one pasted below. Dag, could you elaborate a bit about the purpose of __Pyx_BufFmt_CheckString() ? It is just

[Cython] Multiple modules in one compilation unit

2011-03-02 Thread Dag Sverre Seljebotn
This has been raised earlier, but I don't think there was such a demonstrative use-case as what I have now. Fwrap is suppose to be able to wrap Fortran "modules", which is essentially a namespace mechanism. It makes sense to convert the namespace to Python by creating one Cython pyx file per F

Re: [Cython] Multiple modules in one compilation unit

2011-03-02 Thread Dag Sverre Seljebotn
On 03/02/2011 11:48 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 02.03.2011 11:20: c) Somehow provide more than one module in the same compilation unit. Again, this requires the build to work correctly, but seems less dangerous, and also has the advantage of *allowing* static linking of the

Re: [Cython] Multiple modules in one compilation unit

2011-03-02 Thread Dag Sverre Seljebotn
On 03/02/2011 04:11 PM, Lisandro Dalcin wrote: On 2 March 2011 08:35, Stefan Behnel wrote: Dag Sverre Seljebotn, 02.03.2011 11:54: Problem is that Fortran code often has...interesting...programming practices. Global variables abound, and are often initialised between modules. Imagine

Re: [Cython] Multiple modules in one compilation unit

2011-03-02 Thread Dag Sverre Seljebotn
On 03/02/2011 05:01 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 02.03.2011 16:37: On 03/02/2011 04:11 PM, Lisandro Dalcin wrote: On 2 March 2011 08:35, Stefan Behnel wrote: Dag Sverre Seljebotn, 02.03.2011 11:54: Problem is that Fortran code often has...interesting...programming practices

Re: [Cython] OpenMP support

2011-03-08 Thread Dag Sverre Seljebotn
On 03/08/2011 11:34 AM, mark florisson wrote: I'd like to implement OpenMP support for Cython. Looking at Great news! It looks like this will be a topic on the coming workshop, with Francesc coming as well (but nothing wrong with getting started before then). (And please speak up if you are

Re: [Cython] OpenMP support

2011-03-11 Thread Dag Sverre Seljebotn
On 03/11/2011 08:20 AM, Stefan Behnel wrote: Robert Bradshaw, 11.03.2011 01:46: On Tue, Mar 8, 2011 at 11:16 AM, Francesc Alted wrote: A Tuesday 08 March 2011 18:50:15 Stefan Behnel escrigué: mark florisson, 08.03.2011 18:00: What I meant was that the wrapper returned by the decorator would

Re: [Cython] OpenMP support

2011-03-11 Thread Dag Sverre Seljebotn
On 03/11/2011 12:37 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 11.03.2011 08:56: Basically, I'm +1 to anything that can make me pretend the GIL doesn't exist, even if it comes with a 2x performance hit: Because that will make me write parallell code (which I can't be bot

Re: [Cython] 'with gil:' statement

2011-03-16 Thread Dag Sverre Seljebotn
On 03/16/2011 11:28 AM, mark florisson wrote: I implemented the 'with gil:' statement, and have added error checking for nested 'with gil' or 'with nogil' statements. For instance, with the patch applied Cython wil issue an error when you have e.g. with nogil: with nogil: ... (or

Re: [Cython] 'with gil:' statement

2011-03-16 Thread Dag Sverre Seljebotn
On 03/16/2011 12:54 PM, mark florisson wrote: On 16 March 2011 11:58, Dag Sverre Seljebotn wrote: On 03/16/2011 11:28 AM, mark florisson wrote: I implemented the 'with gil:' statement, and have added error checking for nested 'with gil' or 'with nogil' statements

Re: [Cython] 'with gil:' statement

2011-03-16 Thread Dag Sverre Seljebotn
On 03/16/2011 01:55 PM, mark florisson wrote: On 16 March 2011 13:37, Dag Sverre Seljebotn wrote: On 03/16/2011 12:54 PM, mark florisson wrote: On 16 March 2011 11:58, Dag Sverre Seljebotn wrote: On 03/16/2011 11:28 AM, mark florisson wrote: I implemented the 'with gil:' stat

Re: [Cython] 'with gil:' statement

2011-03-16 Thread Dag Sverre Seljebotn
On 03/16/2011 02:17 PM, Pauli Virtanen wrote: Wed, 16 Mar 2011 14:10:29 +0100, Dag Sverre Seljebotn wrote: Ah, right. I guess I agree with disallowing nested "with nogil" statements for the time being then. Could you make the inner nested "with nogil" statements no-ops in

Re: [Cython] 'with gil:' statement

2011-03-17 Thread Dag Sverre Seljebotn
On 03/17/2011 12:24 AM, Greg Ewing wrote: Stefan Behnel wrote: I'm not sure if this is a good idea. "nogil" blocks don't have a way to handle exceptions, so simply jumping out of them because an inner 'with gil' block raised an exception can have unexpected side effects. Seems to me that the

Re: [Cython] 'with gil:' statement

2011-03-17 Thread Dag Sverre Seljebotn
On 03/17/2011 08:38 AM, Dag Sverre Seljebotn wrote: On 03/17/2011 12:24 AM, Greg Ewing wrote: Stefan Behnel wrote: I'm not sure if this is a good idea. "nogil" blocks don't have a way to handle exceptions, so simply jumping out of them because an inner 'with gil&#

Re: [Cython] 'with gil:' statement

2011-03-17 Thread Dag Sverre Seljebotn
On 03/17/2011 09:27 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 17.03.2011 08:38: On 03/17/2011 12:24 AM, Greg Ewing wrote: Stefan Behnel wrote: I'm not sure if this is a good idea. "nogil" blocks don't have a way to handle exceptions, so simply jumping out of them bec

Re: [Cython] 'with gil:' statement

2011-03-17 Thread Dag Sverre Seljebotn
On 03/17/2011 11:16 AM, mark florisson wrote: On 17 March 2011 10:08, Dag Sverre Seljebotn wrote: How about this compromise: We balk on the code you wrote with: Error line 345: Exceptions propagating from "with gil" block cannot be propagated out of function, please insert try/

Re: [Cython] 'with gil:' statement

2011-03-18 Thread Dag Sverre Seljebotn
On 03/18/2011 11:10 AM, Stefan Behnel wrote: mark florisson, 18.03.2011 10:52: On 18 March 2011 07:07, Stefan Behnel wrote: Greg Ewing, 18.03.2011 01:18: mark florisson wrote: I think we could support it without having to acquire the GIL in the finally clause. That was the intention -- th

Re: [Cython] Message system refactoring

2011-03-21 Thread Dag Sverre Seljebotn
On 03/21/2011 11:45 AM, Vitja Makarov wrote: Now error/warning messages are stored in global variables at Cython.Compiler.Errors I think it's much better to move error handling into some object, Main.Context for example. Some benefits: - reduce use of global variables - allow more then one

[Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
CEP up at http://wiki.cython.org/enhancements/prange """ This spec is the result of a number of discussions at Cython workshop 1. Quite a few different ways of expressing parallelism was looked at, and finally we decided to split the problem in two: * A simple and friendly solution that cove

[Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
CEP up at http://wiki.cython.org/enhancements/prange """ This spec is the result of a number of discussions at Cython workshop 1. Quite a few different ways of expressing parallelism was looked at, and finally we decided to split the problem in two: * A simple and friendly solution that cove

Re: [Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
On 04/04/2011 11:43 AM, Dag Sverre Seljebotn wrote: CEP up at http://wiki.cython.org/enhancements/prange """ This spec is the result of a number of discussions at Cython workshop 1. Quite a few different ways of expressing parallelism was looked at, and finally we decided to sp

Re: [Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
On 04/04/2011 01:23 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.04.2011 12:17: CEP up at http://wiki.cython.org/enhancements/prange """ Variable handling Rather than explicit declaration of shared/private variables we rely on conventions: * Thread-shared: Variable

Re: [Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
On 04/04/2011 03:04 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.04.2011 13:53: On 04/04/2011 01:23 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.04.2011 12:17: CEP up at http://wiki.cython.org/enhancements/prange """ Variable handling Rather than explicit declar

Re: [Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
On 04/04/2011 03:27 PM, Nathaniel Smith wrote: On Mon, Apr 4, 2011 at 3:17 AM, Dag Sverre Seljebotn wrote: * A simple and friendly solution that covers, perhaps, 80% of the cases, based on simply replacing range with prange. This is a "merely" aesthetic objection, while remainin

Re: [Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
On 04/04/2011 03:04 PM, Stefan Behnel wrote: That's what I thought, yes. It looks unexpected, sure. That's the clear advantage of using inner functions, which do not add anything new at all. But if we want to add something that looks more like a loop, we should at least make it behave like so

Re: [Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
On 04/04/2011 05:22 PM, mark florisson wrote: On 4 April 2011 13:53, Dag Sverre Seljebotn wrote: On 04/04/2011 01:23 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.04.2011 12:17: CEP up at http://wiki.cython.org/enhancements/prange """ Variable handling Rather than expli

Re: [Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
On 04/04/2011 09:26 PM, mark florisson wrote: On 4 April 2011 19:18, Dag Sverre Seljebotn wrote: On 04/04/2011 05:22 PM, mark florisson wrote: On 4 April 2011 13:53, Dag Sverre Seljebotn wrote: On 04/04/2011 01:23 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.04.2011 12:17: CEP up at

Re: [Cython] CEP: prange for parallel loops

2011-04-04 Thread Dag Sverre Seljebotn
On 04/05/2011 07:05 AM, Robert Bradshaw wrote: On Mon, Apr 4, 2011 at 6:04 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.04.2011 13:53: On 04/04/2011 01:23 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 04.04.2011 12:17: CEP up at http://wiki.cython.org/enhancements/prange ""

[Cython] Another CEP: Parallel block

2011-04-05 Thread Dag Sverre Seljebotn
There's a (much shorter) proposal for a more explicit parallelism construct at http://wiki.cython.org/enhancements/parallelblock This is a little more verbose for the simplest case, but makes the medium-cases that needs work buffers much simpler, and is also more explicit and difficult to get

Re: [Cython] Another CEP: Parallel block

2011-04-05 Thread Dag Sverre Seljebotn
On 04/05/2011 11:01 AM, Stefan Behnel wrote: mark florisson, 05.04.2011 10:44: On 5 April 2011 10:34, Stefan Behnel wrote: mark florisson, 05.04.2011 10:26: On 5 April 2011 09:21, Dag Sverre Seljebotn wrote: Justification for Cython-specific syntax: This is something that is really only

Re: [Cython] CEP: prange for parallel loops

2011-04-05 Thread Dag Sverre Seljebotn
On 04/05/2011 04:53 PM, Robert Bradshaw wrote: On Tue, Apr 5, 2011 at 3:51 AM, Stefan Behnel wrote: mark florisson, 04.04.2011 21:26: For clarity, I'll add an example: def f(np.ndarray[double] x, double alpha): cdef double s = 0 cdef double tmp = 2 cdef double other = 6.6

Re: [Cython] CEP: prange for parallel loops

2011-04-05 Thread Dag Sverre Seljebotn
On 04/05/2011 04:58 PM, Dag Sverre Seljebotn wrote: On 04/05/2011 04:53 PM, Robert Bradshaw wrote: On Tue, Apr 5, 2011 at 3:51 AM, Stefan Behnel wrote: mark florisson, 04.04.2011 21:26: For clarity, I'll add an example: def f(np.ndarray[double] x, double alpha): cdef double

Re: [Cython] CEP: prange for parallel loops

2011-04-05 Thread Dag Sverre Seljebotn
On 04/05/2011 05:26 PM, Robert Bradshaw wrote: On Tue, Apr 5, 2011 at 8:02 AM, Dag Sverre Seljebotn wrote: On 04/05/2011 04:58 PM, Dag Sverre Seljebotn wrote: On 04/05/2011 04:53 PM, Robert Bradshaw wrote: On Tue, Apr 5, 2011 at 3:51 AM, Stefan Behnel wrote: mark florisson, 04.04.2011 21

[Cython] prange CEP updated

2011-04-05 Thread Dag Sverre Seljebotn
I've done a pretty major revision to the prange CEP, bringing in a lot of the feedback. Thread-private variables are now split in two cases: i) The safe cases, which really require very little technical knowledge -> automatically inferred ii) As an advanced feature, unsafe cases that requi

Re: [Cython] prange CEP updated

2011-04-05 Thread Dag Sverre Seljebotn
On 04/05/2011 10:29 PM, Dag Sverre Seljebotn wrote: I've done a pretty major revision to the prange CEP, bringing in a lot of the feedback. Thread-private variables are now split in two cases: i) The safe cases, which really require very little technical knowledge -> automatically

[Cython] Cython paper in Computing in Science & Engineering

2011-04-06 Thread Dag Sverre Seljebotn
I just wanted to make everybody aware that there's a paper on Cython in this month's CiSE (http://cise.aip.org/). http://dx.doi.org/10.1109/MCSE.2010.118 (paywall) Researchers: Please consider citing this paper if Cython helps your research in non-trivial ways. Dag Sverre ___

Re: [Cython] Cython paper in Computing in Science & Engineering

2011-04-06 Thread Dag Sverre Seljebotn
On 04/07/2011 02:12 AM, Robert Bradshaw wrote: On Wed, Apr 6, 2011 at 4:40 PM, Zak Stone wrote: Researchers: Please consider citing this paper if Cython helps your research in non-trivial ways. Is this the canonical citation reference for Cython now? If so, can this be mentioned on the Cython

[Cython] CiSE Cython paper: Preprint up

2011-04-07 Thread Dag Sverre Seljebotn
I should have put up this right away, sorry: http://folk.uio.no/dagss/cython_cise.pdf It is actually post-review, so it contains most things but some stylistic improvements and layout. Not sure about posting this on cython.org, but we could perhaps link to my webpage (http://folk.uio.no/dagss

Re: [Cython] Cython paper in Computing in Science & Engineering

2011-04-07 Thread Dag Sverre Seljebotn
On 04/07/2011 10:00 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.04.2011 07:54: On 04/07/2011 02:12 AM, Robert Bradshaw wrote: On Wed, Apr 6, 2011 at 4:40 PM, Zak Stone wrote: Researchers: Please consider citing this paper if Cython helps your research in non-trivial ways. Is this the

Re: [Cython] Cython paper in Computing in Science & Engineering

2011-04-07 Thread Dag Sverre Seljebotn
On 04/07/2011 10:01 AM, Robert Bradshaw wrote: On Wed, Apr 6, 2011 at 10:54 PM, Dag Sverre Seljebotn wrote: On 04/07/2011 02:12 AM, Robert Bradshaw wrote: On Wed, Apr 6, 2011 at 4:40 PM, Zak Stonewrote: Researchers: Please consider citing this paper if Cython helps your research in non

Re: [Cython] [cython-users] CiSE Cython paper: Preprint up

2011-04-07 Thread Dag Sverre Seljebotn
On 04/07/2011 11:37 AM, René Rex wrote: Any more keywords to add? What about "Python"? ;) Done and done. Thanks for the patches. DS ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel

Re: [Cython] Cython paper in Computing in Science & Engineering

2011-04-07 Thread Dag Sverre Seljebotn
On 04/07/2011 10:01 AM, Robert Bradshaw wrote: On Wed, Apr 6, 2011 at 10:54 PM, Dag Sverre Seljebotn wrote: On 04/07/2011 02:12 AM, Robert Bradshaw wrote: On Wed, Apr 6, 2011 at 4:40 PM, Zak Stonewrote: Researchers: Please consider citing this paper if Cython helps your research in non

Re: [Cython] [GSoC] Python backend for Cython using PyPy's FFI

2011-04-07 Thread Dag Sverre Seljebotn
On 04/07/2011 05:01 PM, Romain Guillebert wrote: Hi I proposed the Summer of Code project regarding the Python backend for Cython. As I said in my proposal this would translate Cython code to Python + FFI code (I don't know yet if it will use ctypes or something specific to PyPy). PyPy's ctypes

Re: [Cython] prange CEP updated

2011-04-11 Thread Dag Sverre Seljebotn
On 04/11/2011 10:45 AM, mark florisson wrote: On 5 April 2011 22:29, Dag Sverre Seljebotn wrote: I've done a pretty major revision to the prange CEP, bringing in a lot of the feedback. Thread-private variables are now split in two cases: i) The safe cases, which really require very l

Re: [Cython] prange CEP updated

2011-04-11 Thread Dag Sverre Seljebotn
On 04/11/2011 11:41 AM, mark florisson wrote: On 11 April 2011 11:10, Dag Sverre Seljebotn wrote: On 04/11/2011 10:45 AM, mark florisson wrote: On 5 April 2011 22:29, Dag Sverre Seljebotn wrote: I've done a pretty major revision to the prange CEP, bringing in a lot of the fee

Re: [Cython] prange CEP updated

2011-04-11 Thread Dag Sverre Seljebotn
On 04/11/2011 12:14 PM, mark florisson wrote: On 11 April 2011 12:08, Dag Sverre Seljebotn wrote: On 04/11/2011 11:41 AM, mark florisson wrote: On 11 April 2011 11:10, Dag Sverre Seljebotn wrote: On 04/11/2011 10:45 AM, mark florisson wrote: On 5 April 2011 22:29, Dag Sverre Seljebotn

Re: [Cython] prange CEP updated

2011-04-11 Thread Dag Sverre Seljebotn
On 04/11/2011 01:02 PM, Dag Sverre Seljebotn wrote: On 04/11/2011 12:14 PM, mark florisson wrote: On 11 April 2011 12:08, Dag Sverre Seljebotn wrote: On 04/11/2011 11:41 AM, mark florisson wrote: On 11 April 2011 11:10, Dag Sverre Seljebotn wrote: On 04/11/2011 10:45 AM, mark florisson

Re: [Cython] prange CEP updated

2011-04-11 Thread Dag Sverre Seljebotn
On 04/11/2011 01:12 PM, mark florisson wrote: On 11 April 2011 13:03, Dag Sverre Seljebotn wrote: On 04/11/2011 01:02 PM, Dag Sverre Seljebotn wrote: On 04/11/2011 12:14 PM, mark florisson wrote: On 11 April 2011 12:08, Dag Sverre Seljebotn wrote: On 04/11/2011 11:41 AM, mark florisson

Re: [Cython] prange CEP updated

2011-04-13 Thread Dag Sverre Seljebotn
On 04/13/2011 09:31 PM, mark florisson wrote: On 5 April 2011 22:29, Dag Sverre Seljebotn wrote: I've done a pretty major revision to the prange CEP, bringing in a lot of the feedback. Thread-private variables are now split in two cases: i) The safe cases, which really require very l

Re: [Cython] prange CEP updated

2011-04-14 Thread Dag Sverre Seljebotn
On 04/13/2011 11:13 PM, mark florisson wrote: Although there is omp_get_max_threads(): "The omp_get_max_threads routine returns an upper bound on the number of threads that could be used to form a new team if a parallel region without a num_threads clause were encountered after execution return

Re: [Cython] prange CEP updated

2011-04-14 Thread Dag Sverre Seljebotn
On 04/14/2011 08:39 PM, mark florisson wrote: On 14 April 2011 20:29, Dag Sverre Seljebotn wrote: On 04/13/2011 11:13 PM, mark florisson wrote: Although there is omp_get_max_threads(): "The omp_get_max_threads routine returns an upper bound on the number of threads that could be us

Re: [Cython] prange CEP updated

2011-04-14 Thread Dag Sverre Seljebotn
On 04/14/2011 08:42 PM, mark florisson wrote: On 14 April 2011 20:29, Dag Sverre Seljebotn wrote: On 04/13/2011 11:13 PM, mark florisson wrote: Although there is omp_get_max_threads(): "The omp_get_max_threads routine returns an upper bound on the number of threads that could be us

Re: [Cython] prange CEP updated

2011-04-14 Thread Dag Sverre Seljebotn
On 04/14/2011 09:08 PM, mark florisson wrote: On 14 April 2011 20:58, Dag Sverre Seljebotn wrote: On 04/14/2011 08:42 PM, mark florisson wrote: On 14 April 2011 20:29, Dag Sverre Seljebotn wrote: On 04/13/2011 11:13 PM, mark florisson wrote: Although there is omp_get_max_threads

Re: [Cython] Incompatibility with numpy-1.5.1 - fixed in master?!

2011-04-15 Thread Dag Sverre Seljebotn
On 04/15/2011 06:45 PM, Lisandro Dalcin wrote: On 15 April 2011 11:20, Yury V. Zaytsev wrote: Hi folks! I have just ran into buffer protocol incompatibility problem with numpy-1.5.1, which lead me to discover the following ticket (discussed back in December 2010 on this list): http://trac.cyt

Re: [Cython] Incompatibility with numpy-1.5.1 - fixed in master?!

2011-04-15 Thread Dag Sverre Seljebotn
On 04/15/2011 07:57 PM, Dag Sverre Seljebotn wrote: On 04/15/2011 06:45 PM, Lisandro Dalcin wrote: On 15 April 2011 11:20, Yury V. Zaytsev wrote: Hi folks! I have just ran into buffer protocol incompatibility problem with numpy-1.5.1, which lead me to discover the following ticket (discussed

Re: [Cython] prange CEP updated

2011-04-16 Thread Dag Sverre Seljebotn
(Moving discussion from http://markflorisson.wordpress.com/, where Mark said:) """ Started a new branch https://github.com/markflorisson88/cython/tree/openmp . Now the question is whether sharing attributes should be propagated outwards. e.g. if you do for i in prange(m): for j in prange

Re: [Cython] prange CEP updated

2011-04-18 Thread Dag Sverre Seljebotn
Sent from my Android phone with K-9 Mail. Please excuse my brevity. mark florisson wrote: On 16 April 2011 18:42, Dag Sverre Seljebotn wrote: > (Moving discussion from http://markflorisson.wordpress.com/, where Mark > said:) Ok, sure, it was just an issue I was wondering about at th

Re: [Cython] prange CEP updated

2011-04-18 Thread Dag Sverre Seljebotn
risson wrote: On 18 April 2011 13:06, mark florisson wrote: > On 16 April 2011 18:42, Dag Sverre Seljebotn wrote: >> (Moving discussion from http://markflorisson.wordpress.com/, where Mark >> said:) > > Ok, sure, it was just an issue I was wondering about at that moment, &

Re: [Cython] prange CEP updated

2011-04-21 Thread Dag Sverre Seljebotn
On 04/21/2011 10:37 AM, Robert Bradshaw wrote: On Mon, Apr 18, 2011 at 7:51 AM, mark florisson wrote: On 18 April 2011 16:41, Dag Sverre Seljebotn wrote: Excellent! Sounds great! (as I won't have my laptop for some days I can't have a look yet but I will later) You're r

Re: [Cython] Fused Types

2011-04-29 Thread Dag Sverre Seljebotn
On 04/29/2011 12:53 PM, mark florisson wrote: On 29 April 2011 12:28, Pauli Virtanen wrote: Fri, 29 Apr 2011 11:30:19 +0200, mark florisson wrote: On 29 April 2011 11:03, Pauli Virtanen wrote: [clip] Are you planning to special-case the "real_t complex" syntax? Shooting from the sidelines,

Re: [Cython] Fused Types

2011-04-30 Thread Dag Sverre Seljebotn
On 04/30/2011 08:39 AM, Robert Bradshaw wrote: On Fri, Apr 29, 2011 at 3:53 AM, mark florisson wrote: On 29 April 2011 12:28, Pauli Virtanen wrote: No, just that real_t is specialized to float whenever struct_t is specialized to A and to double when B. Or a more realistic example, c

[Cython] Pull request emails

2011-04-30 Thread Dag Sverre Seljebotn
Finally think I figured out how to get pull request emails (thanks to Gael V). From https://github.com/organizations/cython/teams/24445: """ Owners do not receive notifications for the organization's repos by default. To receive notifications, create a team and add the owners and repos for whi

Re: [Cython] Fused Types

2011-05-02 Thread Dag Sverre Seljebotn
On 05/01/2011 06:25 PM, Sturla Molden wrote: Den 01.05.2011 16:36, skrev Stefan Behnel: Not everyone uses C++. And the C++ compiler cannot adapt the code to specific Python object types. Ok, that makes sence. Second question: Why not stay with the current square-bracket syntax? Does Cython n

Re: [Cython] Fused Types

2011-05-02 Thread Dag Sverre Seljebotn
On 05/02/2011 03:00 PM, Sturla Molden wrote: Den 02.05.2011 11:15, skrev Dag Sverre Seljebotn: I.e., your question is very vague. Ok, what I wanted to ask was "why have one syntax for interfacing C++ templates and another for generics?" It seems like syntax bloat to me. But we do

Re: [Cython] Fused Types

2011-05-02 Thread Dag Sverre Seljebotn
On 05/02/2011 03:00 PM, Sturla Molden wrote: Den 02.05.2011 11:15, skrev Dag Sverre Seljebotn: I.e., your question is very vague. Ok, what I wanted to ask was "why have one syntax for interfacing C++ templates and another for generics?" It seems like syntax bloat to me. You

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 09:59 AM, mark florisson wrote: On 3 May 2011 00:21, Robert Bradshaw wrote: On Mon, May 2, 2011 at 1:56 PM, mark florisson wrote: On 2 May 2011 18:24, Robert Bradshaw wrote: On Sun, May 1, 2011 at 2:38 AM, mark florisson wrote: A remaining issue which I'm not quite certain

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 10:42 AM, mark florisson wrote: On 3 May 2011 10:07, Dag Sverre Seljebotn wrote: On 05/03/2011 09:59 AM, mark florisson wrote: On 3 May 2011 00:21, Robert Bradshawwrote: On Mon, May 2, 2011 at 1:56 PM, mark florisson wrote: On 2 May 2011 18:24, Robert Bradshaw

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 10:49 AM, mark florisson wrote: On 3 May 2011 10:44, Dag Sverre Seljebotn wrote: On 05/03/2011 10:42 AM, mark florisson wrote: On 3 May 2011 10:07, Dag Sverre Seljebotn wrote: On 05/03/2011 09:59 AM, mark florisson wrote: On 3 May 2011 00:21, Robert Bradshaw wrote: On

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 03:51 PM, Stefan Behnel wrote: mark florisson, 03.05.2011 15:17: if you have cdef func(floating x, floating y): ... you get a "float, float" version, and a "double, double" version, but not "float, double" or "double, float". So, what would you have to do in order to get a "flo

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
I was wrong. We need cdef f(floating x, floating_p y) ...to get 2 specializations, not 4. And the rest follows from there. So I'm with Robert's real stance :-) I don't think we want flexibility, we want simplicity over all. You can always use a templating language. Btw we shouldn't count on p

Re: [Cython] Fused Types

2011-05-03 Thread Dag Sverre Seljebotn
On 05/03/2011 08:19 PM, Robert Bradshaw wrote: Btw we shouldn't count on pruning for the design of this, I think this will for a large part be used with def functions. And if you use a cdef function from another module through a pxd, you also need all versions. Well, we'll want to avoid compil

Re: [Cython] Fused Types

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 01:07 AM, Greg Ewing wrote: mark florisson wrote: cdef func(floating x, floating y): ... you get a "float, float" version, and a "double, double" version, but not "float, double" or "double, float". It's hard to draw conclusions from this example because it's degenerate. You do

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 12:00 PM, mark florisson wrote: On 21 April 2011 20:13, Dag Sverre Seljebotn wrote: On 04/21/2011 10:37 AM, Robert Bradshaw wrote: On Mon, Apr 18, 2011 at 7:51 AM, mark florisson wrote: On 18 April 2011 16:41, Dag Sverre Seljebotn wrote: Excellent! Sounds great! (as I

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 12:59 PM, mark florisson wrote: On 4 May 2011 12:45, Dag Sverre Seljebotn wrote: On 05/04/2011 12:00 PM, mark florisson wrote: There are two remaining issue. The first is warnings for potentially uninitialized variables for prange(). When you do for i in prange(start, stop

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 01:30 PM, mark florisson wrote: On 4 May 2011 13:15, Dag Sverre Seljebotn wrote: On 05/04/2011 12:59 PM, mark florisson wrote: On 4 May 2011 12:45, Dag Sverre Seljebotn wrote: On 05/04/2011 12:00 PM, mark florisson wrote: There are two remaining issue. The first is

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 01:41 PM, mark florisson wrote: On 4 May 2011 13:39, Dag Sverre Seljebotn wrote: On 05/04/2011 01:30 PM, mark florisson wrote: On 4 May 2011 13:15, Dag Sverre Seljebotn wrote: On 05/04/2011 12:59 PM, mark florisson wrote: On 4 May 2011 12:45, Dag Sverre Seljebotn wrote

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 01:48 PM, mark florisson wrote: On 4 May 2011 13:47, mark florisson wrote: On 4 May 2011 13:45, Dag Sverre Seljebotn wrote: Look. i = 42 for i in prange(n): f(i) print i # want 42 whenever n == 0 Now, translate this to: i = 42; #pragma omp parallel for firstprivate(i

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 01:59 PM, mark florisson wrote: On 4 May 2011 13:54, Dag Sverre Seljebotn wrote: On 05/04/2011 01:48 PM, mark florisson wrote: On 4 May 2011 13:47, mark florissonwrote: On 4 May 2011 13:45, Dag Sverre Seljebotn wrote: Look. i = 42 for i in prange(n): f(i) print

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 02:17 PM, mark florisson wrote: On 4 May 2011 14:10, Dag Sverre Seljebotn wrote: On 05/04/2011 01:59 PM, mark florisson wrote: On 4 May 2011 13:54, Dag Sverre Seljebotn wrote: On 05/04/2011 01:48 PM, mark florisson wrote: On 4 May 2011 13:47, mark florisson wrote

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
Moving pull requestion discussion (https://github.com/cython/cython/pull/28) over here: First, I got curious why you'd have a strip off "-pthread" from CC. I'd think you could just execute with it with "-pthread", which seems simpler. Second: If parallel.parallel is not callable, how are sche

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 07:03 PM, mark florisson wrote: On 4 May 2011 18:35, Dag Sverre Seljebotn wrote: Moving pull requestion discussion (https://github.com/cython/cython/pull/28) over here: First, I got curious why you'd have a strip off "-pthread" from CC. I'd think you could

Re: [Cython] prange CEP updated

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 08:07 PM, mark florisson wrote: On 4 May 2011 19:44, Dag Sverre Seljebotn wrote: On 05/04/2011 07:03 PM, mark florisson wrote: On 4 May 2011 18:35, Dag Sverre Seljebotn wrote: Moving pull requestion discussion (https://github.com/cython/cython/pull/28) over here: First, I

Re: [Cython] Fused Types

2011-05-04 Thread Dag Sverre Seljebotn
On 05/04/2011 08:13 PM, Robert Bradshaw wrote: On Wed, May 4, 2011 at 1:47 AM, mark florisson wrote: On 4 May 2011 10:24, Dag Sverre Seljebotn wrote: On 05/04/2011 01:07 AM, Greg Ewing wrote: mark florisson wrote: cdef func(floating x, floating y): ... you get a "float, float&quo

Re: [Cython] [SciPy-User] Scikits.sparse build issue

2011-05-05 Thread Dag Sverre Seljebotn
On 05/05/2011 08:42 PM, Nathaniel Smith wrote: On Thu, May 5, 2011 at 3:03 AM, Anand Patil wrote: On May 4, 8:16 pm, Nathaniel Smith wrote: On Tue, May 3, 2011 at 10:10 AM, Nathaniel Smith wrote: On Tue, May 3, 2011 at 5:51 AM, Anand Patil wrote: scikits/sparse/cholmod.c: In function ‘

[Cython] Git workflow, branches, pull requests

2011-05-05 Thread Dag Sverre Seljebotn
There was just a messup in git history: Mark's OpenMP pull request got merged twice; all commits show up two times. It doesn't matter, since the two openmp branches with the same changes merged OK, but we shouldn't make this a habit. For instance, the openMP commits also show up as part of vit

Re: [Cython] Git workflow, branches, pull requests

2011-05-05 Thread Dag Sverre Seljebotn
On 05/05/2011 10:09 PM, mark florisson wrote: On 5 May 2011 21:52, Dag Sverre Seljebotn wrote: There was just a messup in git history: Mark's OpenMP pull request got merged twice; all commits show up two times. It doesn't matter, since the two openmp branches with the same changes

Re: [Cython] Git workflow, branches, pull requests

2011-05-05 Thread Dag Sverre Seljebotn
PM, Stefan Behnel wrote: > Dag Sverre Seljebotn, 05.05.2011 21:52: >> >> There was just a messup in git history: Mark's OpenMP pull request got >> merged twice; all commits show up two times. > > What (I think) happened, was that Vitja pulled in Mark's

Re: [Cython] Git workflow, branches, pull requests

2011-05-05 Thread Dag Sverre Seljebotn
hat. On Thu, May 5, 2011 at 2:03 PM, Dag Sverre Seljebotn wrote: Yes, that is the only time it happens. Do we agree on a) ask before you pull anything that is not in cython/* (ie in private repos), b) document it in hackerguide? DS -- Sent from my Android phone with K-9 Mail. Please e

Re: [Cython] Git workflow, branches, pull requests

2011-05-06 Thread Dag Sverre Seljebotn
On 05/05/2011 11:07 PM, Robert Bradshaw wrote: I don't like the default to be "don't pull from me"--I'd rather there be some convention to indicate a branch is being used as a queue. Maybe even foo-queue, or a leading underscore if people like that. I've seen leading underscore being used by ot

Re: [Cython] Git workflow, branches, pull requests

2011-05-06 Thread Dag Sverre Seljebotn
On 05/06/2011 09:14 AM, Dag Sverre Seljebotn wrote: On 05/05/2011 11:07 PM, Robert Bradshaw wrote: I don't like the default to be "don't pull from me"--I'd rather there be some convention to indicate a branch is being used as a queue. Maybe even foo-queue, or a leading

Re: [Cython] Git workflow, branches, pull requests

2011-05-06 Thread Dag Sverre Seljebotn
On 05/06/2011 09:24 AM, Vitja Makarov wrote: 2011/5/6 Dag Sverre Seljebotn: On 05/06/2011 08:20 AM, Vitja Makarov wrote: 2011/5/6 Robert Bradshaw: I don't like the default to be "don't pull from me"--I'd rather there be some convention to indicate a branch is bei

Re: [Cython] buffers and flow-control

2011-05-09 Thread Dag Sverre Seljebotn
On 05/09/2011 09:29 AM, Vitja Makarov wrote: I've never been using buffers so my question is: Should uninitialized buffer access raise UnboundLocalVariable error? Like this: def foo(): cdef object bar print bar "object[int]" should behave exactly the same way as "object" does d

Re: [Cython] Git workflow, branches, pull requests

2011-05-12 Thread Dag Sverre Seljebotn
On 05/13/2011 12:36 AM, Ondrej Certik wrote: Hi, On Thu, May 5, 2011 at 12:52 PM, Dag Sverre Seljebotn wrote: There was just a messup in git history: Mark's OpenMP pull request got merged twice; all commits show up two times. It doesn't matter, since the two openmp branches wit

Re: [Cython] Git workflow, branches, pull requests

2011-05-13 Thread Dag Sverre Seljebotn
On 05/13/2011 09:05 AM, Ondrej Certik wrote: On Thu, May 12, 2011 at 11:34 PM, Dag Sverre Seljebotn wrote: On 05/13/2011 12:36 AM, Ondrej Certik wrote: Hi, On Thu, May 5, 2011 at 12:52 PM, Dag Sverre Seljebotn wrote: There was just a messup in git history: Mark's OpenMP pull re

Re: [Cython] nonecheck directive

2011-05-21 Thread Dag Sverre Seljebotn
On 05/21/2011 07:57 AM, Stefan Behnel wrote: Robert Bradshaw, 20.05.2011 17:33: On Fri, May 20, 2011 at 8:13 AM, Stefan Behnel wrote: why is the "nonecheck" directive set to False by default? Shouldn't it rather be a "I know what I'm doing" option that allows advanced users to trade speed for s

Re: [Cython] local variable handling in generators

2011-05-22 Thread Dag Sverre Seljebotn
On 05/22/2011 02:33 PM, Stefan Behnel wrote: Hi, I've been looking at the nqueens benchmark for a while, and I think it's actually not that a bad benchmark for generators. http://hg.python.org/benchmarks/file/tip/performance/bm_nqueens.py A better implementation only for Py2.7/Py3 is here: ht

Re: [Cython] local variable handling in generators

2011-05-23 Thread Dag Sverre Seljebotn
On 05/23/2011 10:50 AM, Vitja Makarov wrote: 2011/5/23 Stefan Behnel: Vitja Makarov, 23.05.2011 10:13: With live variable analysis that should be easy to save/restore only active variables at the yield point. "Active" in the sense of "modified", I suppose? That's what I was expecting. Act

Re: [Cython] [cython] Initial startswith / endswith optimization (#35)

2011-05-26 Thread Dag Sverre Seljebotn
On 05/26/2011 10:12 AM, Stefan Behnel wrote: Robert Bradshaw, 26.05.2011 09:40: the pattern of swapping out builtin methods (and perhaps functions) with more optimized C versions is something that perhaps it would be good to be able to do more generally, rather than hard coding the list into Opt

  1   2   3   4   >