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" 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 others that ca

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 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 > recompil

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 developm

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 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 inner loops. S

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 "C-s

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 wa

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 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 occur. First, I'd lik

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 : > > 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 extern "C".

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

2012-02-19 Thread Mark Wiebe
;> > >>> > >>> > Date: Sun, 19 Feb 2012 01:18:20 -0600 > >>> > From: Mark Wiebe > >>> > Subject: [Numpy-discussion] How a transition to C++ could work > >>> > To: Discussion of Numerical Python > >>> > Messag

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

2012-02-19 Thread Mark Wiebe
> From: Mark Wiebe > >> > Subject: [Numpy-discussion] How a transition to C++ could work > >> > To: Discussion of Numerical Python > >> > Message-ID: > >> > > >> > > >> > Content-Type: text/plain; charset="utf-8" &g

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

2012-02-19 Thread Christopher Jordan-Squire
On Sun, Feb 19, 2012 at 2:14 AM, David Cournapeau wrote: > On Sun, Feb 19, 2012 at 9:52 AM, Mark Wiebe wrote: >> On Sun, Feb 19, 2012 at 3:10 AM, Ben Walsh wrote: >>> >>> >>> >>> > Date: Sun, 19 Feb 2012 01:18:20 -0600 >>> > From: Ma

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 wrote: > On Sun, Feb 19, 2012 at 9:19 AM, Mark Wiebe wrote: > > On Sun, Feb 19, 2012 at 2:56 AM, David Cournapeau > > wrote: > >> > >> Hi Mark, > >> > >> thank you for joining this discussion. > >> > >> On Sun, Feb 19, 2012 at 7:18 AM, Mark Wiebe

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 wrote: > On Sun, Feb 19, 2012 at 3:10 AM, Ben Walsh wrote: >> >> >> >> > Date: Sun, 19 Feb 2012 01:18:20 -0600 >> > From: Mark Wiebe >> > Subject: [Numpy-discussion] How a transition to C++ co

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 wrote: > > > > Date: Sun, 19 Feb 2012 01:18:20 -0600 > > From: Mark Wiebe > > Subject: [Numpy-discussion] How a transition to C++ could work > > To: Discussion of Numerical Python > > 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:19 AM, Mark Wiebe wrote: > On Sun, Feb 19, 2012 at 2:56 AM, David Cournapeau > wrote: >> >> Hi Mark, >> >> thank you for joining this discussion. >> >> On Sun, Feb 19, 2012 at 7:18 AM, Mark Wiebe wrote: >> > The suggestion of transitioning the NumPy core code from C to

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 wrote: > > 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 > into C++, so the propo

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 wrote: > Hi Mark, > > thank you for joining this discussion. > > On Sun, Feb 19, 2012 at 7:18 AM, Mark Wiebe 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

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 > Subject: [Numpy-discussion] How a transition to C++ could work > To: Discussion of Numerical Python > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > The suggestion of transi

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 wrote: > On Sun, Feb 19, 2012 at 2:32 AM, Matthew Brett > wrote: >> >> Hi, >> >> Thanks for this - it's very helpful. >> >> On Sat, Feb 18, 2012 at 11:18 PM, Mark Wiebe wrote: >> > The suggestion of transitioning the NumPy core code from C to C++

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 wrote: > > On Feb 19, 2012 12:34 AM, "Mark Wiebe" wrote: > > > > I'm speaking from personal experience having dealt with these types of > issues extensively before. If people have more detailed examples of > problems, possibly links to discussi

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 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

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

2012-02-19 Thread Stéfan van der Walt
On Feb 19, 2012 12:34 AM, "Mark Wiebe" wrote: > > I'm speaking from personal experience having dealt with these types of issues extensively before. If people have more detailed examples of problems, possibly links to discussions where one of these problems has occurred, that would be helpful. This

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 wrote: > Hi, > > Thanks for this - it's very helpful. > > On Sat, Feb 18, 2012 at 11:18 PM, Mark Wiebe 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 threa

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 wrote: > Hey, Mark > > On Feb 18, 2012 11:18 PM, "Mark Wiebe" 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 tri

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 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 descri

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" 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 examples that came

[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 choice