Re: [Numpy-discussion] C99
On Sat, Sep 8, 2018 at 12:02 AM Eric Wieser wrote: > Thanks for the first step on this! > > Should we allow // style comments > > I don’t think it matters too much. I think it might be a little messy to > have a mix of the two styles where // means “post py3” and /* */ means > pre-py3 - but at the same time, I do slightly prefer the C++-style. For C > contributors coming from python, I’d expect that it feels more natural to > only have to put a comment marker at the start of the line. We could > convert the /**/-style to //-style with a tool, but it’s probably not > worth the churn or time. > > Should we allow variable declarations after code > > I’d be very strongly in favor of this - it makes it much easier to extract > helper functions if variables are declared as late as they can be - plus it > make it easier to reason about early returns not needing goto fail. > > Related to this feature, I think allowing for(int i = 0; i < N; i++) is a > clear win. > > Eric > Thinking about this some more, a good argument for going to full C99 is that outside code written in that style can be brought in without a lot of work. Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] A minor milestone
On Fri, Sep 7, 2018 at 11:16 PM Andrew Nelson wrote: > > but on Travis I install it half a dozen times every day. > > Good point. I wonder if there's any way to take that into account when > considering whether to drop versions. > > On Sat, 8 Sep 2018 at 15:14, Nathaniel Smith wrote: > >> On Fri, Sep 7, 2018 at 6:33 PM, Charles R Harris >> wrote: >> > Thanks for the link. It would be nice to improve the Windows numbers, >> Linux >> > is still very dominant. I suppose that might be an artifact of the >> systems >> > used by developers as opposed to end users. It would be a different open >> > source world if Microsoft had always released their compilers for free >> and >> > kept them current with the evolving ISO specs. >> >> Well, keep in mind also that it's counting installs, not users... >> people destroy and reinstall Linux systems a *lot* more often than >> they do Windows/macOS systems, what with clouds and containers and CI >> systems and all. On my personal laptop I install numpy maybe once per >> release, but on Travis I install it half a dozen times every day. >> >> Would be interesting if the travisCI and appveyor downloads could be separated out. Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] C99
On Sat, Sep 8, 2018 at 6:07 AM Charles R Harris wrote: > > > On Sat, Sep 8, 2018 at 12:02 AM Eric Wieser > wrote: > >> Thanks for the first step on this! >> >> Should we allow // style comments >> >> I don’t think it matters too much. I think it might be a little messy to >> have a mix of the two styles where // means “post py3” and /* */ means >> pre-py3 - but at the same time, I do slightly prefer the C++-style. For C >> contributors coming from python, I’d expect that it feels more natural to >> only have to put a comment marker at the start of the line. We could >> convert the /**/-style to //-style with a tool, but it’s probably not >> worth the churn or time. >> >> Should we allow variable declarations after code >> >> I’d be very strongly in favor of this - it makes it much easier to >> extract helper functions if variables are declared as late as they can be - >> plus it make it easier to reason about early returns not needing goto >> fail. >> >> Related to this feature, I think allowing for(int i = 0; i < N; i++) is >> a clear win. >> >> Eric >> > > Thinking about this some more, a good argument for going to full C99 is > that outside code written in that style can be brought in without a lot of > work. > Agreed. And we already have the pocketfft PR to prove that. Ralf ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] A minor milestone
There are probably a LOT of Windows users getting numpy from conda as well. (I know my CI's and users do...) It'd be nice if there was some way to track real usage! -CHB On Sat, Sep 8, 2018 at 3:44 PM, Charles R Harris wrote: > > > On Fri, Sep 7, 2018 at 11:16 PM Andrew Nelson wrote: > >> > but on Travis I install it half a dozen times every day. >> >> Good point. I wonder if there's any way to take that into account when >> considering whether to drop versions. >> >> On Sat, 8 Sep 2018 at 15:14, Nathaniel Smith wrote: >> >>> On Fri, Sep 7, 2018 at 6:33 PM, Charles R Harris >>> wrote: >>> > Thanks for the link. It would be nice to improve the Windows numbers, >>> Linux >>> > is still very dominant. I suppose that might be an artifact of the >>> systems >>> > used by developers as opposed to end users. It would be a different >>> open >>> > source world if Microsoft had always released their compilers for free >>> and >>> > kept them current with the evolving ISO specs. >>> >>> Well, keep in mind also that it's counting installs, not users... >>> people destroy and reinstall Linux systems a *lot* more often than >>> they do Windows/macOS systems, what with clouds and containers and CI >>> systems and all. On my personal laptop I install numpy maybe once per >>> release, but on Travis I install it half a dozen times every day. >>> >>> > Would be interesting if the travisCI and appveyor downloads could be > separated out. > > Chuck > > ___ > NumPy-Discussion mailing list > NumPy-Discussion@python.org > https://mail.python.org/mailman/listinfo/numpy-discussion > > -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] A minor milestone
On Sat, Sep 8, 2018 at 12:03 PM Chris Barker wrote: > There are probably a LOT of Windows users getting numpy from conda as well. > > (I know my CI's and users do...) > > It'd be nice if there was some way to track real usage! > I wonder if the conda folks have some statistics? Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] C99
On Sat, Sep 8, 2018 at 11:02 AM Ralf Gommers wrote: > > > On Sat, Sep 8, 2018 at 6:07 AM Charles R Harris > wrote: > >> >> >> On Sat, Sep 8, 2018 at 12:02 AM Eric Wieser >> wrote: >> >>> Thanks for the first step on this! >>> >>> Should we allow // style comments >>> >>> I don’t think it matters too much. I think it might be a little messy to >>> have a mix of the two styles where // means “post py3” and /* */ means >>> pre-py3 - but at the same time, I do slightly prefer the C++-style. For C >>> contributors coming from python, I’d expect that it feels more natural to >>> only have to put a comment marker at the start of the line. We could >>> convert the /**/-style to //-style with a tool, but it’s probably not >>> worth the churn or time. >>> >>> Should we allow variable declarations after code >>> >>> I’d be very strongly in favor of this - it makes it much easier to >>> extract helper functions if variables are declared as late as they can be - >>> plus it make it easier to reason about early returns not needing goto >>> fail. >>> >>> Related to this feature, I think allowing for(int i = 0; i < N; i++) is >>> a clear win. >>> >>> Eric >>> >> >> Thinking about this some more, a good argument for going to full C99 is >> that outside code written in that style can be brought in without a lot of >> work. >> > > Agreed. And we already have the pocketfft PR to prove that. > Hmm, maybe C_STYLE_GUIDE.rst.txt should be an NEP? Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] C99
On Sat, Sep 8, 2018 at 12:24 PM Charles R Harris wrote: > > > On Sat, Sep 8, 2018 at 11:02 AM Ralf Gommers > wrote: > >> >> >> On Sat, Sep 8, 2018 at 6:07 AM Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> >>> >>> On Sat, Sep 8, 2018 at 12:02 AM Eric Wieser >>> wrote: >>> Thanks for the first step on this! Should we allow // style comments I don’t think it matters too much. I think it might be a little messy to have a mix of the two styles where // means “post py3” and /* */ means pre-py3 - but at the same time, I do slightly prefer the C++-style. For C contributors coming from python, I’d expect that it feels more natural to only have to put a comment marker at the start of the line. We could convert the /**/-style to //-style with a tool, but it’s probably not worth the churn or time. Should we allow variable declarations after code I’d be very strongly in favor of this - it makes it much easier to extract helper functions if variables are declared as late as they can be - plus it make it easier to reason about early returns not needing goto fail. Related to this feature, I think allowing for(int i = 0; i < N; i++) is a clear win. Eric >>> >>> Thinking about this some more, a good argument for going to full C99 is >>> that outside code written in that style can be brought in without a lot of >>> work. >>> >> >> Agreed. And we already have the pocketfft PR to prove that. >> > > Hmm, maybe C_STYLE_GUIDE.rst.txt should be an NEP? > +1 ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Proposal to accept NEP-18, __array_function__ protocol
On Wed, Aug 1, 2018 at 6:27 PM Stephan Hoyer wrote: > I propose to accept NEP-18, "A dispatch mechanism for NumPy’s high level > array functions": > http://www.numpy.org/neps/nep-0018-array-function-protocol.html > > Since the last round of discussion, we added a new section on "Callable > objects generated at runtime" clarifying that to handle such objects is out > of scope for the initial proposal in the NEP. > > If there are no substantive objections within 7 days from this email, then > the NEP will be accepted; see NEP 0 for more details. > > I've merged the PR. What next? Chuck ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion