Hacker News new | past | comments | ask | show | jobs | submit login

Apart from the political squabbling, the feasibility of implementing something that "detects" JavaScript released under a free-as-in-freedom license seems tricky and error prone.

The suggestion in the article that you put a license delimiter and then parse the text of the license seems error prone; not because the license is particular difficult text to parse, but because text parsing in general is a rather fussy and fragile enterprise. And someone could put after the licensing tag "Just kidding, here's the real license..." which the parser wouldn't catch, but someone litigating a case of copyright infringement would.

Maybe I'm not being imaginative enough, but I can't think of a way this is feasible with just the client attempting to glean licensing on its own.

Having a global registry of free JavaScripts wouldn't solve the problem, either. Assuring correct URL parsing in every case is a risky thing to rely on for such restrictive behavior, and nothing stops the web site owner from renaming the free script to something else, or renaming one of his non-free scripts to the same name as the free script. Verifying file hashes wouldn't really help, since the free script is allowed to be modified.

Regardless of the political ramifications, the feasibility of this seems really questionable. Are there ways of doing this I am not realizing?




Well, it could be treated similarly to version numbers in code. Once a given JS file is loaded, whatever __LICENSE__ evaluates to (e.g.), that's the program's stated license. If that global variable isn't set, then you know you can't assume anything about the code.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: