Be warned, that code is GPLv3. I don't know the specific legal issues with using it or porting it to another language, but if you're going to use it you should check.
Less than 200 lines of code, only a couple of which aren't basically boilerplate stuff specific to ObjC/Cocoa/iOS. So who cares what the license is? Just rewrite it. I assure you:
x = (p1.x + p2.x) * 0.5;
y = (p1.y + p2.y) * 0.5;
is not now only allowed in GPLv3 code just because it appeared in this larger body of code which is GPLv3.
You can do whatever you want, really, you just need to keep it open source. I can give permission for pieces of that project in any license you need, just not the whole project. Just list the files you need and will grant you a license (no questions asked :D)
(except code not written by me, like the dropbox integration, etc)
Right. Like, for instance, I need some line smoothing code, but I don't want to use that in my closed source project because I don't know how far GPLv3 infects my project.
GPL pretty much kills closed source. But because I'm the copyright owner I can grant people any license:
======
Me, J Eduardo Mourao hereby grant any reader of this comment the full rights to any source needed for line smoothing and hand drawing included in the WireframeApp project (https://github.com/eduardordm/wireframeapp/). To receive a copy of this grant just send me an email (optional)
This does not include code not written by me (which should have a header with the original authors license and contact info)
It's no more dangerous than proprietary software in that regard. Proprietary software virally infects any project that uses it, as well as even people who merely look at it, which is why "clean-room" implementations require such careful hygiene to avoid being infected. Should we have an "MIT/BSD only" policy for HN links, and call out any links to dangerous proprietary code?
What do you mean by "proprietary software virally infects any project that uses it"? You're saying nonsense.
And yes, the GPLv3 is extremely dangerous, with its patent crap, and it's anti-tivoing clause. Moreso than any other attribute of software, proprietary or free, that I can think of. For example, just imagine how devastating it would be if one bit of GPLv3 software made its way onto iOS.
Edit: Thanks for the downvotes, guys. Yes, big shock, not everybody loves GPLv3, and some of us actually have legitimate reasons to do so.
>For example, just imagine how devastating it would be if one bit of GPLv3 software made its way onto iOS.
If that happens, I imagine Apple would simply commit copyright infringement on the GPLv3`ed code. The same way that they would commit copyright infringment if they include any code which they do not have the rights to.
If one bit of gpl3 code made it into iOS, it would be removed and minor damages would be paid. This is one case where the legal system is far more sane than the breathless nightmares of coders.
That's not even remotely true. Go look up what the anti-tivoing clause in the GPLv3 actually means, and think about what effect that would have on iOS.
Proprietary code has the EXACT same copyright protection as gpl3. The licensing differences are wholly irrelevant if the user never agrees to the license.
Distribution in any fashion of any GPLv3 code counts as implicit acceptance of the license, which kicks in all the nasty stuff in there, including the virality of it (so the rest of your code now must be GPLv3), the anti-tivoing clause, the patent crap, etc.
Licenses are not contracts. Although it is not nessasary for the GPL to make that point explicitly clear, it does:
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
In other words, if they violate the anti-tivoing clause, then they loose the rights granted to them by the GPL, so they no longer have the right to use the software in their produce. In other words, the worst a license agreement can do is make you break copyright law.
Judging from the demos, it feels like this code is treating each point with an equal weight, regardless of velocity. My mouse is configured to send 500 events per second, so the smoothing doesn't smooth all that much.
Depending on the latency limitations of the application in question, it seems like it would be better to use a curve simplifying algorithm similar to the one used by Inkscape, or maybe just dividing the curve into equally spaced points on the plane (instead of equally spaced points in time), taking care to preserve obvious changes in direction (perhaps by adding a point anywhere the locally smoothed first or second derivative crosses zero).
Just tested it with my mouse & graphics tablet. The unsmoothed version clearly works better for the stylus vs. mouse. What's interesting is the smoothed version ~equally improving both input methods.
That's an interesting manner of averaging. The end result is an exponential filter, but he displays the results online. It is fun to draw lines with high frequency components (wiggles) and watch them straighten out over half a second or so. It is aesthetically quite pleasing!
Example: x = (p1.x + p2.x) * 0.5; y = (p1.y + p2.y) * 0.5;
Implementation (easily portable to html5):
https://github.com/eduardordm/wireframeapp/blob/master/wiref...