sdiehl / numpile

A tiny 1000 line LLVM-based numeric specializer for scientific Python code.
http://dev.stephendiehl.com/numpile/
MIT License
404 stars 52 forks source link

List of numpile forks #14

Open pfalcon opened 4 years ago

pfalcon commented 4 years ago

For information of people who may be interested in doing further work on numpile, already known forks (in the order of appearance):

Both of these forks are problematic from copyright/licensing point of view - they are clearly based on numpile, and include substantial portions of it, but violate the following clause from numpile's license:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

pfalcon commented 4 years ago

I went to port numpile to Pycopy-the-unbloated-Python, result is here: https://github.com/pfalcon/numpile/tree/pycopy . It uses https://github.com/pfalcon/ullvmlite , which is in turn uses https://github.com/pfalcon/ullvm_c , which is pure-Python bindings for LLVM C API. It's all somewhat WIP now of course.

pfalcon commented 4 years ago

OK, my turn with factoring-out fork of numpile: https://github.com/pfalcon/picompile/ . The original LICENSE file is there, the code is split into 10 modules. Intended also to be perfectilized, without useless fix-up commits, so likely will be rebased.

pfalcon commented 4 years ago

Somewhat related: I personally feel some reservations on hacking too deep into numpile, because I'm not sure how unification-based type inference (as employed by numpile) compares to other well-known type inferencing algorithms, like Hindley-Milner (aka algorithm W). The paper "Generalizing Hindley-Milner Type Inference Algorithms" (http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.18.9348&rep=rep1&type=pdf) answers this, by arguing that algo W is just an adhoc optimization of a general unification algorithm. Discussion in more detail here: https://github.com/alehander92/Airtight/issues/2#issuecomment-597902078

sdiehl commented 4 years ago

While the license violation is probably true, this is just based on a educational talk I gave at Harvard so if a bunch of students are forking it then that's the purpose. It's just a toy for people to play with.

pfalcon commented 4 years ago

Sure, this ticket and list is kinda intended to be a guide for people who liked numpile and want to hack on it further. Then after some looking around (if they do looking around! many don't), they may learn/figure out:

  1. This bright idea (hack on numpile further) came to other people before.
  2. It makes sense to not just hack on the same things again and again, but see if there can actually be made progress across different people's work.
  3. But then given that a few people already hacked on numpile, one should consider which fork is the best to continue hacking on.

Then, I'd consider it a good idea to start a fork survey based on the licensing/copyright compliance matters, ahead even of technical matters. Because if there's some technical advanceness of a particular fork, but muddy situation with licensing/copyright, then chances are, only frustration will come out of somebody further working on it.

Following thru all this stuff, I decided to start my own humble fork on the original numpile, effectively repeating work done by other folks, instead of making further progress (and indeed, I didn't have much further progress so far). At least I'm trying to not make mistakes mentioned above. (I definitely still may make goofs, so I'm open to suggestions or criticism).