1. 11
  1.  

  2. 4

    Nayuki has some awesome stuff on that blog, and the fast fibs algorithms are no exception.

    The one thing that scares me off is the licensing system:

    If you wish to use any of my content (such as program code, pictures), please contact me to ask for permission. I will give a speedy response to your inquiry, typically in under 24 hours. If possible please show me a prototype of how you intend to use my work, so I can better understand your needs.

    Generally speaking, my licensing agreement will require you to cite a link to the relevant Project Nayuki article page. Licensing for student/academic/research purposes is usually free (but please contact me beforehand); licensing for commercial use is available for a modest fee. Please explain your intended purpose clearly, and all reasonable requests will be approved.

    Note that some of my program source code is available under an open-source license (often MIT), whereas others are all rights reserved. Please carefully check the license for the specific project before using it or asking me. If my particular project is open source, you don’t need to ask for my permission beforehand – but please do retain the Project Nayuki page URL and send me a very brief courtesy note. Thank you for understanding.

    E.g., the Fast Fibs algorithm in this article is licensed as “All Rights Reserved”, so you need to contact Nayuki to get a license if one will be granted at all.

    Please do not misunderstand, I completely understand the want to be compensated for work and the wish to have credit given where it is due, but “All Rights Reserved” is more than a “code smell” to me at this point; it’s more like a giant warning sign.

    There is an overview of the licenses on the projects you can find here.

    1. 5

      The algorithms themselves aren’t copyrightable, so that just applies to the example Java/C#/etc. implementations.

      For software of this length I personally don’t see any reason not to just MIT-license, but I don’t think it’s particularly unusual, beyond perhaps devoting space to being explicit about it. Most example code on blogs has no license attached, which means it’s All Rights Reserved by default. Even when they do, it’s often not a permissive license. For example the biggest repository of short code snippets on the internet is probably StackOverflow, which is licensed under a viral copyleft license (cc-by-sa).

      1. 2

        For example the biggest repository of short code snippets on the internet is probably StackOverflow, which is licensed under a viral copyleft license (cc-by-sa).

        Starting Feb 1, 2016, all new code contributions to Stack Overflow and Stack Exchange will be covered by the MIT License.

      2. 4

        These algorithms can be found in Knuth’s TAOCP Volume 1 and also Stepanov’s Elements of Programming, among others. So maybe the implementations are copyrighted, but not the algorithms.

      3. 2

        I love these algorithm articles on lobste.rs!

        As a consolidation, also mentioned in the article are

        • Exponentiation by squaring - wikipedia
        • Karatsuba multiplication - A previous lobste.rs post)