As many JavaScript enthusiasts are aware, js1k is an amazing and often inspiring annual js coding golf competition that is frequently also quite educational (in the sense of "Wow, you can do that in js?!").
For those wanting to re-use any of this great code in their projects, however, there is a problem:
Demo content is subject to copyright of their respectful owners. Do not copy/mirror without their explicit consent.
While on a larger level it is of course disappointing that all js1k entries are not released with a free license, there are likely very good practical reasons for the organizers to leave copyright with the authors. That is not the problem.
The problem is that the contest rules do not require contestants to choose a license of some kind (any license! ...even a non-free one!) when submitting their entries. Thus, most of the hundreds of interesting and useful entries have no license information whatsoever, and some do not even list an author or (still) valid contact information.
Of course, if all entries were deliberately copyrighted by their authors that would be one thing, but it is difficult to escape the feeling that many (perhaps most?) authors do not license their work simply because they have never considered the possibility that their code might be useful to others outside of the context of the contest.
It doesn't help that, with the huge number of entries in every contest, even internal links on the js1k site often become broken (e.g., all of the details pages for the 2011 Oregon Trail competition), making it difficult or even impossible to check the license or even contact information for a given entry. For example, the top winning entry for 2011 links to this non-existing page: http://js1k.com/2011-trail/details/984
.
Of the relatively small proportion of js1k entries that include licensing information, the vast majority use the MIT license or assign to the public domain. This leads me to believe that, if asked, many authors would not have a problem with freely-licensing their work. They simply never thought it might be necessary, and furthermore, as noted above, the contest rules themselves do not require making a choice about a license.
There are many excellent reasons for licensing one's work when making it public, no matter how small or insignificant it may seem. Many of these are already outlined here and here. Without going into further depth, there are a couple of very practical considerations for both authors and the general public.
- For authors, choosing a license, even if only to assert "all rights reserved", allows them to preempt inquiries from those (such as the maintainer of this repo) who would like to know about the licensing status of their work. If an author has gone out of their way to put a © notice on their work, others will be unlikely to bother asking if it is ok to free license or reuse it.
- Someone else in the distant future might have a use for your code that you could never have anticipated beforehand. By that time you may be unreachable or your contact information may be out of date. Your snippet of code could make a huge difference to someone who might be unable to use it, because they have no idea whether you would approve its use, and may not even be able to contact you to find out.
If this last point seems farfetched, consider that much of the listed contact information for contest authors from the first contest in 2010 is already out of date. Quite a few entrants just leave a Twitter handle or website as author info, and -- unsurprisingly -- these can lead to Twitter accounts that have been deleted and websites that no longer exist. In many cases that means that it is already impossible to know if these authors would have been willing to open-license their work.
That is a loss for the whole community.
- To create a repository of as many freely-licensed js1k entries as possible
- To raise awareness among entrants of the importance of releasing code with a license (preferably free!)
- To encourage js1k organizers to consider requiring that entrants select a license before submitting to the contest
This list is being constantly expanded and revised. Going through the vast amount of entries is a time-consuming process. If you have the contact info for an author listed here (or for any entry not included in this repo), you can help by asking them to provide a free license for their entry.
The following js1k submissions are included in Github repos without license information. Authors should be contacted individually to request adding a license.
- Tron | https://github.com/alexturpin/js1k-tron | @alexturpin
- 2048@938 | https://github.com/npup/js1k-2014 | @npup
- Cloudy heart | https://github.com/tehmou/js1k-bubbling-heart | @tehmou
- Fuse | https://gist.github.com/aemkei/1989127 | @aemkei
- Conway's Game of Life | https://github.com/aaronm67/js1k | @aaronm67
The following js1k submissions are not included in any public Github repo but author contact information (or at least a name) is available. Authors should be contacted individually to request a free license.
- 1K Boing Ball | Nikola Fox | @juusu
- Have you ever tried to catch a firefly? | Carlos Nieto | @xiam
- GORILLAS.JS2K | [https://github.com/koenkivits](Koen Kivits) | @koenkivits
- Move the ball through the game using the mouse cursor | Romain Huet | @romainhuet
- YASS (yet another simple shmup) | Luis Toledo | @luistoledo
- Over The Hills | Joshua Koo | @zz85
- Color-Vision Simulation & Daltonization for Protanopic Observers | Michael Deal | @mudcube
- RGB color spectrum mixer | Michael Deal | @mudcube
- Hypotrochoid with dynamically changing color and diameter | Michael Deal | @mudcube
- Galaxies visualization | Michael Deal | @mudcube
- Psychedelic spectro-spirographs | Michael Deal | @mudcube
- Breath | Anton Khlynovskiy | @subzey
- 雨RAIN | Martin Kleppe | @aemkei
- Lorenz Attractor | Martin Kleppe | @aemkei
- 8-Bit RPG Battle! | Hugo Bonacci | @hugoware
- Canvas Grid | Vladimir Carrer | @vladocar
- updated 3d particle system | Paul Brunt | @supereggbert
These submissions include neither an unobfuscated source nor a license, but do have author contact information. Authors should be contacted individually to request releasing the source code under a free license.
- Pulsing 3d wires with volumetric beams | Steven Wittens | @unconed
- Synth Sphere | Noah Weninger | @nwoeanhinnogaehr
- js1k Poker | Martin Kleppe | @aemkei
All of the freely-licensed js1k entries included in this repository can be viewed using the js1k Competition Entry Browser, or by following the links to the original demos.
Many thanks to the folks at codegolf (@xem, @subzey, @p01, @aemkei, @mathias) for the inspiration!
And a very big thank you to all the authors who took the time to freely license their code.
The project itself is released under the MIT License (see LICENSE file for details). As the majority of entries that include a license use MIT, it seemed easiest to use that license here too. Individual entries retain their original license.
An overview of the included scripts and further details about individual entries can be found in the README.md file in the js/ directory. Please see the table in that file for full license and attribution information for all entries.
Additionally, each entry e.g. someentry.js
has a corresponding license file e.g. someentry_license.txt
with the full unaltered text of the orginal license under which it was released.