Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Stéfan van der Walt
Hey, Mark On Feb 18, 2012 11:18 PM, Mark Wiebe mwwi...@gmail.com wrote: My experience has been that providing a C API from a C++ library is no harder than providing a C API from a C library. Interfacing to compiled C++ libs have been tricky, so can this concern be dismissed so easily? (Some

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Matthew Brett
Hi, Thanks for this - it's very helpful. On Sat, Feb 18, 2012 at 11:18 PM, Mark Wiebe mwwi...@gmail.com wrote: The suggestion of transitioning the NumPy core code from C to C++ has sparked a vigorous debate, and I thought I'd start a new thread to give my perspective on some of the issues

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Mark Wiebe
On Sun, Feb 19, 2012 at 2:24 AM, Stéfan van der Walt ste...@sun.ac.zawrote: Hey, Mark On Feb 18, 2012 11:18 PM, Mark Wiebe mwwi...@gmail.com wrote: My experience has been that providing a C API from a C++ library is no harder than providing a C API from a C library. Interfacing to

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Mark Wiebe
On Sun, Feb 19, 2012 at 2:32 AM, Matthew Brett matthew.br...@gmail.comwrote: Hi, Thanks for this - it's very helpful. On Sat, Feb 18, 2012 at 11:18 PM, Mark Wiebe mwwi...@gmail.com wrote: The suggestion of transitioning the NumPy core code from C to C++ has sparked a vigorous debate, and

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread David Cournapeau
Hi Mark, thank you for joining this discussion. On Sun, Feb 19, 2012 at 7:18 AM, Mark Wiebe mwwi...@gmail.com wrote: The suggestion of transitioning the NumPy core code from C to C++ has sparked a vigorous debate, and I thought I'd start a new thread to give my perspective on some of the

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Mark Wiebe
On Sun, Feb 19, 2012 at 2:51 AM, Stéfan van der Walt ste...@sun.ac.zawrote: On Feb 19, 2012 12:34 AM, Mark Wiebe mwwi...@gmail.com wrote: I'm speaking from personal experience having dealt with these types of issues extensively before. If people have more detailed examples of problems,

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Matthew Brett
Hi, On Sun, Feb 19, 2012 at 12:49 AM, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Feb 19, 2012 at 2:32 AM, Matthew Brett matthew.br...@gmail.com wrote: Hi, Thanks for this - it's very helpful. On Sat, Feb 18, 2012 at 11:18 PM, Mark Wiebe mwwi...@gmail.com wrote: The suggestion of

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Ben Walsh
Date: Sun, 19 Feb 2012 01:18:20 -0600 From: Mark Wiebe mwwi...@gmail.com Subject: [Numpy-discussion] How a transition to C++ could work To: Discussion of Numerical Python NumPy-Discussion@scipy.org Message-ID: CAMRnEmpVTmt=kdurpzktgui516oqtqd4vazm746hmpqgpfx...@mail.gmail.com

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Mark Wiebe
On Sun, Feb 19, 2012 at 2:56 AM, David Cournapeau courn...@gmail.comwrote: Hi Mark, thank you for joining this discussion. On Sun, Feb 19, 2012 at 7:18 AM, Mark Wiebe mwwi...@gmail.com wrote: The suggestion of transitioning the NumPy core code from C to C++ has sparked a vigorous debate,

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Mark Wiebe
On Sun, Feb 19, 2012 at 3:10 AM, Matthew Brett matthew.br...@gmail.comwrote: snip As you probably saw, I think the proposal was indeed to use Cython to provide the higher-level parts of the core, while refactoring the rest of the C code underneath it. Obviously one could also refactor the C

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread David Cournapeau
On Sun, Feb 19, 2012 at 9:19 AM, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Feb 19, 2012 at 2:56 AM, David Cournapeau courn...@gmail.com wrote: Hi Mark, thank you for joining this discussion. On Sun, Feb 19, 2012 at 7:18 AM, Mark Wiebe mwwi...@gmail.com wrote: The suggestion of

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Mark Wiebe
On Sun, Feb 19, 2012 at 3:10 AM, Ben Walsh ben_w_...@yahoo.co.uk wrote: Date: Sun, 19 Feb 2012 01:18:20 -0600 From: Mark Wiebe mwwi...@gmail.com Subject: [Numpy-discussion] How a transition to C++ could work To: Discussion of Numerical Python NumPy-Discussion@scipy.org Message-ID

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread David Cournapeau
On Sun, Feb 19, 2012 at 9:52 AM, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Feb 19, 2012 at 3:10 AM, Ben Walsh ben_w_...@yahoo.co.uk wrote: Date: Sun, 19 Feb 2012 01:18:20 -0600 From: Mark Wiebe mwwi...@gmail.com Subject: [Numpy-discussion] How a transition to C++ could work

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Mark Wiebe
On Sun, Feb 19, 2012 at 3:45 AM, David Cournapeau courn...@gmail.comwrote: On Sun, Feb 19, 2012 at 9:19 AM, Mark Wiebe mwwi...@gmail.com wrote: On Sun, Feb 19, 2012 at 2:56 AM, David Cournapeau courn...@gmail.com wrote: Hi Mark, thank you for joining this discussion. On Sun, Feb

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Christopher Jordan-Squire
Subject: [Numpy-discussion] How a transition to C++ could work To: Discussion of Numerical Python NumPy-Discussion@scipy.org Message-ID: CAMRnEmpVTmt=kdurpzktgui516oqtqd4vazm746hmpqgpfx...@mail.gmail.com Content-Type: text/plain; charset=utf-8 The suggestion of transitioning

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Mark Wiebe
...@gmail.com Subject: [Numpy-discussion] How a transition to C++ could work To: Discussion of Numerical Python NumPy-Discussion@scipy.org Message-ID: CAMRnEmpVTmt=kdurpzktgui516oqtqd4vazm746hmpqgpfx...@mail.gmail.com Content-Type: text/plain; charset=utf-8 The suggestion

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Mark Wiebe
wrote: Date: Sun, 19 Feb 2012 01:18:20 -0600 From: Mark Wiebe mwwi...@gmail.com Subject: [Numpy-discussion] How a transition to C++ could work To: Discussion of Numerical Python NumPy-Discussion@scipy.org Message-ID: CAMRnEmpVTmt=kdurpzktgui516oqtqd4vazm746hmpqgpfx

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Sturla Molden
Den 19. feb. 2012 kl. 09:51 skrev Stéfan van der Walt ste...@sun.ac.za: OK, so let's talk specifics: how do you dynamically grab a function pointer to a compiled C++ library, a la ctypes? Feel free to point me to StackOverflow or elsewhere. You declare the function with the signature

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Adam Klein
On Feb 19, 2012, at 2:18 AM, Mark Wiebe mwwi...@gmail.com wrote: The suggestion of transitioning the NumPy core code from C to C++ has sparked a vigorous debate, and I thought I'd start a new thread to give my perspective on some of the issues raised, and describe how such a transition could

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Sturla Molden
Den 19.02.2012 11:30, skrev Christopher Jordan-Squire: Can this possibly be extended to the following: How will Mark's (extensive) experience about performance and long-term consequences of design decisions be communicated to future developers? We not only want new numpy developers, we want

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Sturla Molden
Den 19.02.2012 10:52, skrev Mark Wiebe: C++ removes some of this advantage -- now there is extra code generated by the compiler to handle constructors, destructors, operators etc which can make a material difference to fast inner loops. So you end up just writing

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Adam Klein
On Feb 19, 2012, at 10:38 AM, Sturla Molden stu...@molden.no wrote: Den 19.02.2012 10:52, skrev Mark Wiebe: C++ removes some of this advantage -- now there is extra code generated by the compiler to handle constructors, destructors, operators etc which can make a material difference to fast

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Sturla Molden
Den 19.02.2012 16:45, skrev Adam Klein: Just to add, with respect to acceptable compilation times, a judicious choice of C++ features is critical. I use Python to avoid recompiling my code all the time. I don't recompile NumPy every time I use it. (I know you are thinking about

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Ralf Gommers
On Sun, Feb 19, 2012 at 4:53 PM, Sturla Molden stu...@molden.no wrote: Den 19.02.2012 16:45, skrev Adam Klein: Just to add, with respect to acceptable compilation times, a judicious choice of C++ features is critical. I use Python to avoid recompiling my code all the time. I don't

Re: [Numpy-discussion] How a transition to C++ could work

2012-02-19 Thread Stéfan van der Walt
On Feb 19, 2012 2:41 AM, Mark Wiebe mwwi...@gmail.com wrote: This is the role I see good coding standards and consistent code review playing. Programmers who don't know how to write good C++ code can be taught. There are also good books to read, like C++ Coding Standards, Effective C++, and

[Numpy-discussion] How a transition to C++ could work

2012-02-18 Thread Mark Wiebe
The suggestion of transitioning the NumPy core code from C to C++ has sparked a vigorous debate, and I thought I'd start a new thread to give my perspective on some of the issues raised, and describe how such a transition could occur. First, I'd like to reiterate the gcc rationale for their