Live data from Hacker News

Array Programming with NumPy

nature.com

101–110 of 114 posts

Re: Array Programming with NumPy

#101
post #31
post #23

Earlier quoted context omitted.

Interestingly, one of the Julia creators is one of the named reviewers.

Julia and the NumPy/SciPy community get along pretty well (or at least they did while I was still doing this stuff). In fact, I may have first heard of Julia when someone presented it at PyCon.

You can roughly divide people with strong opinions on Julia vis-a-vis Python into two groups: People who earnestly want them both to win, and people who are largely just watching from the sidelines.

Re: Array Programming with NumPy

#102
post #89

Earlier quoted context omitted.

> The scientific method is based on building on the shoulders of giants. > The whole of the process is science no. scientific research is proposing a useful model of an observable phenomenon. this is what you train for during a phd, at least in natural/life sciences: you learn how to test a hypothesis, not an easy skill. refactoring code or transforming bunch of C++ into a python library is useful, but it's not scien…

Maybe we should take all this "not science" software away from the scientists and see how much science they can do without it. If you write code that allows science to be done that couldn't be done otherwise then that is science. As a high profile example, a large amount of specialist software was developed for the LHC to allow it to process all the events coming from the detectors. It sounds like the refactoring her…

Since you brought up LHC, here is an anecdote.

I worked on software development tools used directly for LHC as part of an internship.

That experience was of zero use when I tried to apply for a PhD later. It did get me several $BIGN internships though.

Make what you want of this story.

Re: Array Programming with NumPy

#103
post #28

Don't underestimate the impact this has on getting funding or even just tenure/etc recognition for working on numpy. I'm in industry these days, but coming from the academic side, it's _really_ hard to get recognized for building the underlying infrastructure that tons of people use. I've built and maintained libraries that are used in a ton of publications, but was always told my work was "utterly and completely use…

props to your work and similar to numpy, i assume it has been immensely useful for loads of people. but 'building the underlying infrastructure that tons of people use' is not science. in my department we had to fail a phd student because 90% of his work was just implementing bunch of existing methods as a python library. useful, yes; science, no. wasn't his fault, had a shitty supervisor, but making useful tools is…

It's very true that it's not scientific research. (And I actually generally agree with the premise behind "methods shouldn't be publishable -- they're for appendixes, not papers".)

However, there's increasingly a role for folks focused more on the scientific computing and methods side. E.g. "how do we constrain X parameters given Y observations" (yes, I just described inverse theory -- that's deliberate). The science isn't solving the problem, it's figuring out what models to use and what the inverted parameters mean. However, solving the problem correctly requires a lot of rather novel work and is very easy to get wrong.

It's similar to many other research staff positions. It's standard to include the person who operated/designed/etc the instrument you're using as an author on papers. Is it that crazy to include the person who developed the numerical methods and implemented the solution as well? For example, I have quite a few friends that stayed on as staff to run the lab or key pieces of equipment. They have tons of "middle author" publications as a result.

However, numerical methods and computing infrastructure and work is much less frequently recognized. This is a step towards changing that.

Re: Array Programming with NumPy

#104
post #55

Earlier quoted context omitted.

Been there. A few years back I got a government scholarship for my PhD (which is still in progress, due to my follow up work). I basically built the foundation upon which to establish a new field for my university, and the region where I live. There are some professor who think that scholarship (and the little money it gave me) was wasted on my because I chose to build all of that from the ground up, instead of rushi…

For every story like this, I believe there are many more in which the student simply writes their own implementation due to not invented here syndrome or engineering as a form of procrastination.

Maybe I wasn't clear enough. When I started my PhD, I was working on leading edge, basically 3 people in my country knew that we were talking about (and I was one of them). It certainly wasn't NIH-syndrome. Still, instead of "bailing out" on the easy path (present a paper here, work with that professor in That Other Thing That Doesn't Interest Me, etc) I chose to keep doing what I love.

End result so far? I'm quite respected, still one of the leading researchers in my country on my specific topic, but since I don't have a PhD (because of the aforementioned delays, and some grumpy professors actively pushing against me) I'm starting to lose access to grants and programs.

I'd still do it all again, but with a few tweaks here and there, you know hindsight always helping.

Re: Array Programming with NumPy

#105
post #91
post #55

Earlier quoted context omitted.

For every story like this, I believe there are many more in which the student simply writes their own implementation due to not invented here syndrome or engineering as a form of procrastination.

If you talked to me about my PhD for a few minutes you would surely put me into your "had to reinvent the wheel for no reason" category. As indeed, I wrote an analysis framework for my data (of a gaseous detector used for axion search) [0] instead of using an existing framework used by my predecessor. However, things are always more complicated than they seem. Many of those not talked about students who rewrite stuff…

I certainly have experienced similar things, particularly been acused of reinventing wheels. Flexibility and performance are two big reasons, but also "it's fun" or "I want to understand X" also have a good weight when we do this kind of "useless reinvention".

Re: Array Programming with NumPy

#106

Earlier quoted context omitted.

You can get a free DOI for and archive a tag of a Git repo with FigShare or Zenodo. If you have repo2docker REES dependency scripts (requirements.txt, environment.yml, postInstall,) in your repo, a BinderHub like https://mybinder.org can build and cache a container image and launch a (free) instance in a k8s cloud. Journals haven't yet integrated with BinderHub. Putting the suggested citation and DOI URI/URL in your…

The issue is that none of the citation count engines (Google scholar, scopus, Web of Science...) count citations on those DOIs. So for a researcher who needs to somehow demonstrate impact through citation counts, it does not really help unfortunately.

We could reason about sites that index https://schema.org/ScholarlyArticle according to our own and others' observations. Google Scholar, Semantic Scholar, and Meta all index Scholarly Articles: they copy the bibliographic metadata and the abstract for archival and schoarly purposes.

AFAIU, e.g. Zotero and Mendeley do not crawl and index articles or attempt to parse bibliographic citations from the astounding plethora of citation styles [citationstyles, citationstyles_stylerepo] into a citation graph suitable for representative metrics [zenodo_newmetrics].

bitcoin.org/bitcoin.pdf does not have a DOI, does not have an ORCID [orcid], and is not published in any journal but is indexed by e.g. Google Scholar; though there are apparently multiple records referring to a ScholarlyArticle with the same name and author. Something like "Hell's Angels" (1930)? No DOI, no ORCID, no parseable PDF structure: not indexed.

AFAIU, Google Scholar does not yet index ScholarlyArticle (or SoftwareApplication tags and also attempts to parse PDFs. [gscholar_inclusion]

Google Scholar is also not (yet?) integrated with Google Dataset Search (which indexes https://schema.org/Dataset metadata).

FigShare DOIs and Zenodo DOIs are DataCite DOIs [figshare_howtocite, zenodo_principles]; which apparently aren't (yet?) all indexed by Google Scholar [rescience_gscholar].

IIUC, all papers uploaded to https://arxiv.org are indexed by Google Scholar. In order for arxiv-vanity.org [arxiv_vanity] to render a mobile-ready, font-resizeable HTML5 version of a paper uploaded to ArXiV, the PostScript source must be uploaded. Arxiv hosts certain categories of ScholarlyArticles.

JOSS (Journal of Open Source Software) has managed to get articles indexed by Google Scholar [rescience_gscholar]. They publish their costs [joss_costs]: $275 Crossref membership, DOIs: $1/paper:

> Assuming a publication rate of 200 papers per year this works out at ~$4.75 per paper

[citationstyles]: https://citationstyles.org

[citationstyles_stylerepo]: https://github.com/citation-style-language/styles

[gscholar_inclusion]: https://scholar.google.com/intl/en/scholar/inclusion.html#in...

[figshare_howtocite]: https://knowledge.figshare.com/articles/item/how-to-share-ci...

[zenodo_principles]: https://about.zenodo.org/principles/

[zenodo_newmetrics]: https://www.frontiersin.org/articles/10.3389/frma.2017.00013...

[rescience_gscholar]: https://github.com/ReScience/ReScience/issues/38

[arxiv_vanity]: https://www.arxiv-vanity.com/

[joss_costs]: https://joss.theoj.org/about#costs

[orcid]: https://en.wikipedia.org/wiki/ORCID

Re: Array Programming with NumPy

#107
post #35

Let's not forget to give at least some credit to Perl Data Langauge (PDL). It pioneered a lot of these ideas 10 years before NumPy existed, and is still a pretty great tool today: http://pdl.perl.org/index.php?page=FirstSteps

Er... array programming and statistical programming languages pre-date both by decades. APL from 1966, I believe, is the key lang for array programming. And statistical languages like S from 1976 come to mind: https://en.wikipedia.org/wiki/S_(programming_language) At a quick glance, it seems PDL is just a variation on S.

I was referring to wrapping typed arrays in "normal" scripting languages, allowing integration with a larger eco-system, which is I believe why NumPy is more commonly used today than APL.

Re: Array Programming with NumPy

#108
post #35

Let's not forget to give at least some credit to Perl Data Langauge (PDL). It pioneered a lot of these ideas 10 years before NumPy existed, and is still a pretty great tool today: http://pdl.perl.org/index.php?page=FirstSteps

NumPy’s direct predecessor Numeric was released in 1995.

I didn't know that, thanks! It looks like these ideas were being tried in perl and python roughly in parallel.

Re: Array Programming with NumPy

#109
post #92

Earlier quoted context omitted.

> The scientific method is based on building on the shoulders of giants. > The whole of the process is science no. scientific research is proposing a useful model of an observable phenomenon. this is what you train for during a phd, at least in natural/life sciences: you learn how to test a hypothesis, not an easy skill. refactoring code or transforming bunch of C++ into a python library is useful, but it's not scien…

I'm trained as an economist so might have a different view. But what I think I know from physics is that, say, the people actively involved in engineering things like matter collidors do get authorship or at least appreciation for their role in furthering science. For me, our discussion is mainly in where to draw the line around "the process of science". The chair, laptop and coffee machines aren't science. The stati…

oh i completely agree that a binary distinction between 'tools' and 'science' is not useful. it's also extremely hard to be a good scientist without being very good at 'tools'. however, editors at peer-reviewed academic journals or people awarding degrees mainly need to ask whether the work has advanced our knowledge on X.

if X is e.g. microbiology then it's fair to ask whether (1) some python library proposes something in terms of microbiology, and (2) bunch of biologists should make that decision.

this is why refactoring code is mostly dismissed as 'doing science' by most phd supervisors. sure counts as 'developing skills', which certainly should feature prominently as part of your training, but it cannot be all there is to a project.

Re: Array Programming with NumPy

#110
post #64
post #15

Earlier quoted context omitted.

It would be nice if citing repositories were easier-- either for generating a reference for my own code or acknowledging when I've used someone else's code in my research. There's tons of math and physics blogs that contain useful results that the author wanted to make available but didn't manage to incorporate into a paper. I wonder if there'd be any interest in a sort of GitHub for proofs? It could even use git, si…

Owning to the distributed nature of git, and the properties of the hashes it uses, it is probably enough to put a full commit id in a paper to securely reference a software project, regardless of its hosting platform. We'd just need a dedicated search engine, and a way to automatically extract those from papers, to clone and archive repos.

> the properties of the hashes [g]it uses

Git uses SHA-1, a hardened version since 2017, and are now doing per-repo upgrades to SHA-256 [0]. Lots of repos are presumably still on SHA-1 (and users on older versions of git).

As of 2020, chosen-prefix attacks against SHA-1 are now practical. [verbatim from 1] But I don't think second preimage attacks are practical yet.

Linus Torvalds argued in 2006 basically that it's irrelevant whether git's hash function is second preimage resistant. Selective quoting:

> remember that the git model is that you should primarily trust only your _own_ repository [2]

> [a malicious] collision is entirely a non-issue: you'll get a "bad" repository that is different from what the attacker intended, but since you'll never actually use his colliding object, it's _literally_ no different from the attacker just not having found a collision at all [2]

All that is just to say: git originally chose its hashes for the above mentioned "git model", thus didn't 100 % care about second preimage resistance. For your suggested search engine, depending on how the database is collected you might not be able to trust "your own repository" (if it's crowdsourced I could register another codebase with the same hash as Linux). A second preimage resistant hash function would be a requirement for the suggested use case.

[0]: https://git-scm.com/docs/hash-function-transition/

[1]: https://en.wikipedia.org/wiki/SHA-1#cite_ref-8

[2]: https://marc.info/?l=git&m=115678778717621&w=2

Post reply on HN