4 ms·
why would you publish that on npm? i'm not familiar with the ecosystem, is there a precedent for publishing non-js source files on npm?
by arrakeen 12y ago
why would you publish that on npm? i'm not familiar with the ecosystem, is there a precedent for publishing non-js source files on npm?
- awda 12y agoAnd why would you claim MIT license on the code which you didn't write and has no license listed?
- seanewest 12y agoI think it is good practice to license packages on npm, even when you are not the original author (which is very common on npm).
- Alupis 12y agoWell... technically something with no license is the most restrictive form of a license; as-in nobody has the right to use it nor republish it nor modify it. Not being the copyright holder forbids you from assigning a license. However, for a trivial piece of code as this... it could be argued it's not copyright-able and therefore you are OK... but just be careful in the future.
- bradleyjg 12y agoIf it's not copyrightable it's deceptive to add a purported copyright license. If it is, he has no right to relicense it. Either way not a good move.
- seanewest 12y agoActually I just looked the copyright issue up: http://stackoverflow.com/questions/4007674/whats-the-default-license-of-code-published-at-github http://stackoverflow.com/questions/4007674/whats-the-default.... Unpublishing!
- Alupis 12y agoAgain, I dont think a snippet this trivial is subject to copyright... I just wanted to point out you should mind these matters in the future. Besides offending a developer, you could get into some trouble. Many times I've emailed devs on Github regarding some code they have that I'd like to use part of but they've failed to assign a license. A few time's I've been turned away... but usually the dev just forgot or was not aware others couldn't freely use it.
- seanewest 12y agoThere is precedence for publishing non-js code on npm: https://github.com/substack/dotc https://github.com/substack/dotc
- Alupis 12y agosomeone said there is already quicksort in the standard lib... so this code snippet is really only academic...
- Jtsummers 12y agoThat looks to be JS code that implements a C preprocessor. And the C code present in it seems to be for demonstrating/testing the preprocessor.
- seanewest 12y agoScroll down to the section "publishing c modules". It advocates publishing dotc modules on npm. "npm? Isn't that for javascript? Yes, but: native node modules are written in c++ npm already exists npm installs packages in a way that avoids dependency hell"