One Word.

Story: The Javascript TrapTotal Replies: 53
Author Content
DarrenR114

Mar 24, 2009
2:22 PM EDT
Wah.

Javascript isn't compiled - so what you get through your browser IS the source. RMS is seeing monsters where there are none. When you're talking about a Javascript that is 512K long, the reason that the functions are one letter long is probably for the sake of SPEED of transmission and not obfuscation. If the functions were named with more letters, then you'd have a script that is larger by 2 or more orders of magnitude. Instead of 512K, you could well end up with a script that is 5M, and even on broadband, that would slow things down considerably. RMS talks about obfuscation of code, using Google Docs as the example. I get the impression that he hasn't looked at the cascading style sheets used by Google's main search page.
moopst

Mar 24, 2009
4:32 PM EDT
It is obfuscation with a technically meritorious clover leaf but it's not free in the sense if being open for debugging / sharing or improving. File formats for office programs were straight memory dumps because 33 MHz 16 bit machines needed all the speed they could get, but today it's regarded as unacceptable for archivists and governments that want to share and preserve information.

To be sure, RMS is opening up a whole new bailiwick here, but I don't doubt that he's looked at this thoroughly with an eye on preserving our digital freedoms.
Sander_Marechal

Mar 24, 2009
5:39 PM EDT
DarrenR114: For RMS/FSF "the source" isn't just any old source code. It's "the preferred source for editing". The obfuscated version is clearly not that.

What RMS proposes here is simply a way of distinguishing between trivial javascript that merely serves as part of a document and javascript that is an application in it's own right. It tries to distinguish between a web site or web page and web applications. He them proposes a method to mark FOSS javascript applications so that authors can still send the low-bandwidth obfuscated version while allowing users to locate the preferred unobfuscated source.

Nothing too strange here, really.
tuxtom

Mar 25, 2009
3:46 AM EDT
Who is RMS to tell anyone HOW to write their code? Open doesn't mean is has to be simple to read and understand and easy for you to deploy on your own. It doesn't mean it isn't obfuscated. Heck, look at Perl!!! He would just like to see javascript served conveniently to his haughty old hippy table instead of learning how to use it to his advantage. (It's a distributed world now, RMS. Get with the times or retire, Old Timer.)

There are more important things to worry about. He should make himself more useful to the community instead of drumming up trouble where there is none. But that's not what dogmatic, self-righteous activists do, is it?

There ought to be limits on freedom...as RMS defines it.
Sander_Marechal

Mar 25, 2009
4:08 AM EDT
Tuxtom, it looks like you didn't understand a word of what I wrote in my last post.

1) JavaScript isn't open, even though you happen to be able to see the source.

2) If you want your JavaScript to be open and re-used but don't want to increase bandwidth usage, here's a way to send compressed javascript and let everyone know how to get the uncompressed version.
tuxtom

Mar 25, 2009
4:46 AM EDT
Sander, why do you say Javascript isn't open? Maybe I'm missing an obvious point.

Why should an author go through the trouble to offer an unobfuscated version? If they intend to distribute it as FOSS then they already do that so the whole point is moot. If they don't intend to distribute it that way the source is still available. You might not like to read it but it is available. I don't like to read a lot of languages but that doesn't mean anyone is obligated to provide their code in a format that is palatable to me.

Digital freedom also implies the freedom to keep my source code to myself and/or distribute it in any way I see fit. Once you start telling me how I can and should do it then you are telling me you wish to restrict my freedom.

You know, RMS/FSF can spin all they want, but the rest of the world is gonna write what they want they way they want and the masses will use and benefit from it.
caitlyn

Mar 25, 2009
8:41 AM EDT
Both Sander and tuxtom have points which are not mutually exclusive.

Javacript is not Free (as in the FSF/RMS definition) because it doesn't meet the four freedoms test. It isn't easily modifiable and it is difficult (if not impossible) to use your own modified version of Javascript. Since the source is available in some form this may be one of the examples where something meets the Open Source Definition (OSD) but isn't considered Free by FSF. I'm no expert on Javasrcipt hence the "may."

I have never been an advocate of RMS' positions and I agree with tuxtom that freedom, to me, includes the freedom to decide for myself how to release any code I create and how to license it. By definition that includes the right to decide to close my code and charge for it. Similarly, RMS and users who share his views have the right to boycott my code if I make it proprietary.

I think the issue here is the language RMS uses and his personal definitions of ethical and moral code. I don't believe that proprietary code is unethical or immoral. I don't believe it is evil per se. I do believe that FOSS is a better way to go from the users' perspective and also from a security perspective. I want to be able to look at the code, find problems, and fix them. I believe FOSS is the proverbial "better mousetrap" and that's why I choose it whenever possible.

RMS may see his definition of freedom as incompatible with freedom the way tuxtom and I define it. I see RMS as wanting to restrict my freedom based on his personal view of morality and software. In the real world the two don't have to be mutually exclusive. I don't want my freedom of choice restricted but I also don't want to restrict RMS' ability to expound different views or to make different choices.
Sander_Marechal

Mar 25, 2009
9:24 AM EDT
Quoting:Sander, why do you say Javascript isn't open? Maybe I'm missing an obvious point.


The JavaScript that is sent to your browser when you go to e.g. InfoWorld is just as closed as the article you're reading there. It's copyright InfoWorld. Do not copy. Hand off. It's not open (as in open source). Just because you can see the source does not make it open source or free software. It does not mean you can copy it and put it on your own website.

At other times, JavaScript is open source. For example, when someone uses jQuery. The jQuery library is open source. The obfuscated version is 55 KB and the unobfuscated version is 120 KB. So, everyone uses the obfuscated version because it saves over 50% bandwidth. So here you have the source, you are allowed to copy it and use it yourself but you get the obfuscated version which means you can't really edit it (because it's a total mess with no newlines and one-letter variables and functions).

What RMS simply proposes is that you add a comment to the obfuscated version that says "Hey! This is open source but obfuscated to save bandwidth. Here's the URL to the unobfuscated version if you want it".
tuxtom

Mar 26, 2009
5:03 AM EDT
Sander, that is like saying I should be able to freely re-use your bank account because the account number is printed on a check you wrote me. That account number is javascript. It is provided strictly to be used to perform one transaction. Why on earth would anyone think that number could be freely re-used by anyone who had a previous transaction with that account. That is insane.

Why doesn't RMS go after the ECMS spec and browser industry instead of the application developers? He has no control over what happens server-side in the same web app, but he is not complaining about that. Why not? Why separate it? The app won't work without either component. You can't separate the server side from the client side in a modern web app. That is a naive cop out. If the javascript is incidental to an app then why would someone arrogantly demand that it be formatted and licensed for free re-use? I am not specifically distributing my code as software for re-use. Why should I be bothered or obligated to distribute it any other format? You should be grateful that you are getting the source that is executing in your browser. You can learn from it even if you cannot copy and re-use it verbatim. However, you are obligated to do the work of learning yourself. If you want training or want to to reformat my code, I charge for that.

The JQuery library is a fine case-in-point. The library is distributed compressed and uncompressed (either way it is the same library). It is a library with an API. It is intentionally distributed as an open-source development tool to be freely used by anyone. However, it is NOT a web application. I can use tons of JQuery to build my web app but that doesn't mean my web app has to be open to anyone. Go write you own app with that library. If you want my source code in a format that appeals to you we can discuss a price, but you are nuts if you think it's gonna be free...unless I want it to be.

tracyanne

Mar 26, 2009
5:32 AM EDT
I wonder sometimes if other people are hard of reading. Sander makes perfect sense, and yet tuxtom you completely miss the point, so much so that I wonder if you aren't being deliberately obtuse.

To translate:

Paragraph 1 of Sanders comment talks about javascript code that is licensed under terms that don't legally allow anyone to copy it or reuse it anywhere, whether it's human readable or not is irrelevant.

Paragraph 2 talks about javascript code that is licensed under a Free Software license, it can legally be copied and reused, though sometimes it's obfuscated, to save bandwidth, and therefore unreadable by humans.

The point that RMS makes is that javascript code that is licensed under a Free Software license should have a human readable copy available for anyone who wants to access it. And in fact that is a requirement of any code licensed under the GPL.

Sander_Marechal

Mar 26, 2009
5:52 AM EDT
Thank you Tracyanne.
mortenalver

Mar 26, 2009
6:14 AM EDT
I think RMS has a further point: If you are adverse to running non-free software, your browser should let you avoid those non-free Javascript applications. However, even RMS thinks trivial Javascript in web pages is OK, so he wants to make it possible to separate the trivial from the nontrivial. If free Javascript applications can point to a location for its source, RMS and others will be able to run free Javascript and avoid non-free.

Noone is saying that application writers need to open their code, it's a question of the end user's ability to reject code that isn't licensed in a way they find acceptable.
KernelShepard

Mar 26, 2009
7:53 AM EDT
You guys seem to be forgetting that it's not difficult at all to inject your own javascript into a page using features like greasemonkey in Firefox. It's also still debugable via the Firefox plugin called Firebug.

I think that tuxtom also has a point in that it doesn't matter if the code is "obfuscated" or not (most javascript I've seen isn't obfuscated much more than just the removal of all unnecessary whitespace), the source code is all still there. It's still modifiable by you too. I knew a developer in the past that used to use the most meaningless variable names and write the most annoyingly obfuscated c code just because it was his style. He rarely used variables with names longer than 1 or 2 characters and his function names were equally bad.

The only thing making most javascript non-Free Software (all javascript is "Open Source", but might not be Free Software) is the license on the code. Most javascript simply doesn't have a license header, sometimes the website its on doesn't even have a site-wide copyright license.

AFAICT there are 3 reasons for a lack of a license:

1. the author intends it as public domain (or simply doesn't care if other people borrow his code) 2. the author doesn't realize people will be able to read his code (doubt this is the case these days) 3. the author purposely stripped it out for compactness and intends for the user to assume the same license as the rest of his website

I suspect that most javascript authors simply don't mind other people borrowing their code, that's the way most of them have gotten a bunch of the code for most of their own sites.
Sander_Marechal

Mar 26, 2009
8:13 AM EDT
Quoting:all javascript is "Open Source", but might not be Free Software


False. Just because you can see the source does not mean it's open source. That's just as naive as saying that something is free software because it doesn't cost anything. And you know that perfectly well.

Come on. You're much smarter than that. You don't need these stupid stawmen to make your point.

Quoting:I suspect that most javascript authors simply don't mind other people borrowing their code, that's the way most of them have gotten a bunch of the code for most of their own sites.


You can suspect all you want. In absence of a license you must assume that you are not allowed to copy it.

Quoting:it doesn't matter if the code is "obfuscated" or not, the source code is all still there. It's still modifiable by you too.


Two things:

1) It's not easy to modify. I may be able to figure out your 10-line javascript but there's no way you're going to do that with something as complicated as the jQuery UI library for example. To give a better example: You could decompile the binary for Firefox and edit the assembler if you want to. It's technially possible. That doesn't make it feasible.

2) We're not talking about any old javascript here. RMS says how this can apply to GPL javascript. The GPL says you have to transfer (or point to) the *preferred* source code for editing. That's a *requirement*. Back to Firefox, what would you rather edit? The assembler or the C++ code? The Firefox developers say the C++ code, so thay's what they need to offer. Back to javascript. Would you rather have the obfuscated version or the unobfuscated version? The guy who wrote it will say the unobfuscated version, so that's what he should transer. Or at least point to using a comment header.
tuxtom

Mar 26, 2009
8:54 AM EDT
Why even have this discussion? Isn't this just an extreme far-right witch hunt? What will be accomplished here beyond pacifying one pundit's ideals? Who, specifically, is violating anything to anyone's detriment? How do you propose to play on the Internet and have your browser tell you what license your javascript is running? Every single website on the planet can run different javascript code. This is the exact point where any credibility the FOSS movement has breaks down. The decline of FOSS. This is insane. Literally insane.
KernelShepard

Mar 26, 2009
9:03 AM EDT
False. Just because you can see the source does not mean it's open source.

I'm pretty sure all that is needed to qualify for "open source" is to be able to see the source code, it doesn't require you to be able to modify it and redistribute. I was pretty sure that was the main difference between Open Source and Free Software. I accept that I could be wrong.

I wasn't intending to setup any sort of strawman.

You can suspect all you want. In absence of a license you must assume that you are not allowed to copy it.

I was under the impression that unlicensed material defaulted to Public Domain which means you'd be allowed to copy it. If I'm wrong, mind linking me to some legal documents that explain that I'm wrong in my assumption? Again, I accept that my understanding may be wrong.

1) It's not easy to modify. I may be able to figure out your 10-line javascript but there's no way you're going to do that with something as complicated as the jQuery UI library for example. To give a better example: You could decompile the binary for Firefox and edit the assembler if you want to. It's technially possible. That doesn't make it feasible.

I don't recall reading a clause that stated that software needed to be easily understandable to be considered Free Software.

Javascript is also not compiled into a binary for distribution, so I'm not sure what you are going on about as far as "You could decompile...". No decompilation required, just a good understanding of javascript and a lot of free time on your hands. I've actually personally done it before, it's a pita, yes, but it's feasable. I used to have a site bookmarked that could "beautify" a textbox of javascript code which is extremely helpful.

2) We're not talking about any old javascript here. RMS says how this can apply to GPL javascript.

Er, I don't think the javascript sites he mentioned in his article contain a GPL license (Google Docs, for example is not GPL'd javascript), so I'm not sure where you get this idea. Also, if the web developer licensed his javascript under the GPL, I'm sure emailing him/her for a copy of the pre-obfuscated source code would get you a copy or a link to download it from another server (which is allowable, I just read the FAQ on gnu.org about the GPL to confirm it).

As you know, the GPL doesn't state that the code must be downloadable on the website, it just states that you must be able to request it. Email certainly qualifies.

But this is all irrelevant anyway since javascript is the source code, obfuscated or not.

The GPL says you have to transfer (or point to) the *preferred* source code for editing. That's a *requirement*.

Maybe the web master prefers that you make changes to the code already available?

Back to Firefox, what would you rather edit? The assembler or the C++ code?

Apples and Oranges. Javascript is the source code. Personally I find C++ ugly to read, does that mean I should be able to request the Firefox source code in C? No. I'm stuck with the C++ code. C would be my *preferred* source for editing (see what I did there?). Point is that you and I, as consumers of the product, do not get to decide what "preferred" means and the GPL doesn't define it either.

The Firefox developers say the C++ code, so thay's what they need to offer.

Exactly. They defined what is the preferred source form *for them*. You and I didn't get to define it, they did.

Back to javascript. Would you rather have the obfuscated version or the unobfuscated version? The guy who wrote it will say the unobfuscated version, so that's what he should transfer. Or at least point to using a comment header.

Maybe he would say that and maybe he wouldn't. Legally speaking, he could claim that he'd prefer the obfuscated version and then you'd be SOL.

It's pretty rare, however, that you'll find obfuscated javascript with a GPL header. I find that pretty laughable to be honest because if the author went to the trouble of obfuscating so that the source would be compact for sending over the wire, then I highly doubt he'd tack on a GPL header.

Obfuscaters also eat comments, in case you weren't aware.

I, personally, have never ever ever ever ever seen GPL licensed javascript that had been run thru an obfuscater. I have, however, seen websites who's javascript files had the GPL header (I've actually never seen any other license attached to javascript - I either see the GPL or I see no license at all).

From RMS's article: "in a compacted form that we could call Obfuscript because it has no comments and hardly any whitespace". No comments means no GPL license header. Without a GPL license header, the javascript cannot be assumed to be under the GPL.

RMS is not talking about GPL'd obfuscated javascript, he's talking about plain old obfuscated javascript.
KernelShepard

Mar 26, 2009
9:04 AM EDT
Doh, apparently comments don't accept <blockquote> tags. I should have previewed before submitting :-(

Apologies if my above comment is less readable because of my goof.
mortenalver

Mar 26, 2009
10:07 AM EDT
tuxtom: Witch hunt? Who's being hunted?
gus3

Mar 26, 2009
11:01 AM EDT
@KS:

Use

[ quote ] comment being quoted... [ /quote ]

minus the spaces in the bracketed tags. Also shown on the Preview page, immediately above your comment preview.
azerthoth

Mar 26, 2009
12:01 PM EDT
Kernel, 2 corrections for you.

Quoting:I'm pretty sure all that is needed to qualify for "open source" is to be able to see the source code, it doesn't require you to be able to modify it and redistribute. I was pretty sure that was the main difference between Open Source and Free Software. I accept that I could be wrong.
In actuality without an explicit statement of license, the most draconian use of copyright must be assumed. You can see the words in a book, but seeing does not free them from copyright.
Quoting:I was under the impression that unlicensed material defaulted to Public Domain which means you'd be allowed to copy it. If I'm wrong, mind linking me to some legal documents that explain that I'm wrong in my assumption? Again, I accept that my understanding may be wrong.
Under the Berne convention, anything and I mean anything that anyone publishes is automatically granted copyright regardless of a corresponding statement.

http://www.law.cornell.edu/treaties/berne/overview.html http://www.wipo.int/treaties/en/ip/berne/trtdocs_wo001.html http://www.copyright.gov/title17/92appii.html and finally an article by P.J. that touches on this http://www.groklaw.net/article.php?story=20070907195435565
Sander_Marechal

Mar 26, 2009
12:29 PM EDT
Quoting:I'm pretty sure all that is needed to qualify for "open source" is to be able to see the source code, it doesn't require you to be able to modify it and redistribute. I was pretty sure that was the main difference between Open Source and Free Software. I accept that I could be wrong.


Open source software is software under a license that meets the open source definition. You can find the definition here: http://opensource.org/docs/osd and a lengthy article on Wikipedia here: http://en.wikipedia.org/wiki/Open_source_software

The difference between free software and open source software are practically negligible. The open source definition is almost identical to the free software definition. There hardly exist any software that is open source but not free software and vice versa. The main difference is marketing. Free software people do it for the freedom. Open source people do it for the quality of the code and the development process which is caused by the source being freely available. Many people would say that free software is more ideological and open source more pragmatic.

Oh boy will I get flamed for these massive generalisations...

Quoting:I was under the impression that unlicensed material defaulted to Public Domain which means you'd be allowed to copy it. If I'm wrong, mind linking me to some legal documents that explain that I'm wrong in my assumption?


You'd have to read the official texts of the Berne Convention and WIPO agreements. It's quite dense legal text, but the kicker is in the Berne Convertion article 2 (http://www.wipo.int/treaties/en/ip/berne/trtdocs_wo001.html#...). That article states a list of things that copyright applies to when it is fixed to a medium (such as paper, a computer file, etcetera). After that come the articles describing exceptions, expiration, etcetera. Copyright is default. You automatically get it when you write something.

For a more easily readable summary, see Wikipedia on obtaining and enforcing copyright: http://en.wikipedia.org/wiki/Copyright#Obtaining_and_enforci...

You might wonder why there is such a thing as copyright registration then. Well, that's because in court you first have to prove that you own the copyright before you can accuse someone else of infringing on it. Registering your copyright makes it easy and cheap to prove you are the copyright holder. Note that registration is not the only way to prove this though. Proving it without a registration is just a tad harder and more expensive in court.

Quoting:Er, I don't think the javascript sites he mentioned in his article contain a GPL license (Google Docs, for example is not GPL'd javascript), so I'm not sure where you get this idea.


RMS made two different points in his article.

(1) How to differentiate between free and non-free javascript (in which he used Google Docs as an example). (2) Why you should add headers to your obfuscated free software licensed javascript

I my previous posts I was only adressing his second point, so I was only discussing GPLed javascript.

Quoting:Maybe the web master prefers that you make changes to the code already available?


Ah, but that's not what the GPL says. When the GPL refers to "preferred" source code it speaks about the developers that wrote the original. It doesn't matter that the website owner prefers. It matters what the original developer of the code prefers. If the original author of the javascript writes and edits the unobfuscated version of the javascript and licenses it under the GPL, then the unobfuscated code is what should be distributed (or pointed to).

It's not about what the webmaster prefers that I would do. It's what he (or the original developer) prefers himself. And when it's free software I am entitled to use whatever he prefers to use.

Quoting:Exactly. They defined what is the preferred source form *for them*. You and I didn't get to define it, they did.


Yes. But they have to distribute what they prefer to work on themselves. Not just what they like me to have instead.

Quoting:Maybe he would say that and maybe he wouldn't. Legally speaking, he could claim that he'd prefer the obfuscated version and then you'd be SOL.


Not really. If the webmaster is using code someone else wrote (e.g. he used a javascript library) then he must distribute what the original writers prefer. Unobfuscated javascript.

The situation changes when the webmaster is the one who wrote the code. But in this instance you can easily argue that the unobfuscated version is closed source and only the obfuscated version is released as free software.

Quoting:Obfuscaters also eat comments, in case you weren't aware. I, personally, have never ever ever ever ever seen GPL licensed javascript that had been run thru an obfuscater.


Obfuscaters are easily fixed to simply strip out all the comments except the one starting on the first line. As for an example, jQuery's obfuscated version has a header comment saying it's GPL/MIT licensed: http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js
DarrenR114

Mar 26, 2009
2:04 PM EDT
Using the logic of RMS, if you don't want to run "non-free" software on your computer (according to his tightened-sphincter definition of "freedom" which I don't necessarily agree with) then you better not use any site that sells things online, because you sure as heck aren't going to be given access to all of the source code and necessary data for the programs to run in making the sales.
tuxchick

Mar 26, 2009
2:08 PM EDT
Darren, given all the (incredibly lame in most cases) security breaches and compromise of customer data on banking sites and online stores, that just might be a good policy to follow.
KernelShepard

Mar 26, 2009
6:57 PM EDT
Sander_Marechal and azerthoth: thanks for the corrections
tuxtom

Mar 27, 2009
8:59 AM EDT
I think it comes down to the intent and the context under which the javascript is being used. If that javascript is not intended to be a redistributed app and it is being executed in the context of a larger application that the end user has no control over or access to, then any source code licensing does not apply. If you are distributing "AppWidget Web Factory" as a stane-alone application for someone to deploy on their own and it uses jQuery then it needs to be compliant.

Quoting:If the webmaster is using code someone else wrote (e.g. he used a javascript library) then he must distribute what the original writers prefer. Unobfuscated javascript.
But you know, and I know and Stallman knows that it isn't going to go down that way. Ever. Not in a billion years. Not with a billion attorneys scrutinizing every line of javascript going across the backbone. The very notion goes beyond academic pointlessness into the realm of insanity. Why even bother making that point?

Sander_Marechal

Mar 27, 2009
9:14 AM EDT
Quoting:But you know, and I know and Stallman knows that it isn't going to go down that way. Ever.


Uh, yes it is. Already happening. You're still not getting the point I think.

Suppose you build a website and use jQuery on it, the obfuscated one of course because it is smaller. When I visit your website you distribute jQuery to me so the GPL applies. That means you have to give me the unobfuscated version. Or point me to where I can get the unobfuscated version.

jQuery does just that. Download the obfuscated jQuery source (http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js) and open it in a text editor. The header tells me where to get the unobfuscated jQuery.

To me it looks like your hatred and disdain for RMS and his opinions is clouding your rationale.
jacog

Mar 27, 2009
9:27 AM EDT
The jQuery stuff is obfuscated for purposes of making it smaller, not really to "obfuscate" it.

And no, I am not making a point of any sort, just saying. :)
azerthoth

Mar 27, 2009
11:48 AM EDT
Sander your point is unclear to me, are you suggesting that because someone uses an open platform to supply information/data that the structure must also fall into the same conditional license?

yes I know its a leading question ...
Sander_Marechal

Mar 27, 2009
12:15 PM EDT
azerthoth I don't understand your question.
azerthoth

Mar 27, 2009
1:08 PM EDT
Are you suggesting that because part of the content supply platform is open that the whole platform must also be open?
gus3

Mar 27, 2009
1:44 PM EDT
azerthoth, are you missing the point?

jQuery is licensed under the GPL. v2 or v3 doesn't matter. The form commonly delivered to the end user is obfuscated, meaning it cannot be examined or edited easily by the user. Obfuscated or compiled, makes no difference for source availability.

In order to comply with the source-visibility and -editability requirement of the GPL, the receiver can see in the jQuery header the location for obtaining the source code. It's just like typing "grep --help" and seeing the GNU grep home page URL, and typing "grep --version" to see the applicable license.

Content supply platform has nothing to do with it. It doesn't matter if it's Apache httpd, lighttpd, IIS, WebSphere, or some roll-your-own doodad. The code is executing on the user's computer, not the server. (If server and client are the same system, then license and source requirements are probably mooted automatically.)

Discussions like this are the reason ESR is wrong, and we still do need the GPL's.
azerthoth

Mar 27, 2009
2:23 PM EDT
egads .. gus and I agree on something ... quick mark the calender. The GPL is still relevant and in being so strong copyright laws are still it's greatest ally.

I would disagree on one point, obfuscated code is still the code, it may be difficult or awkward to read but its still there. I don't read russian either, that doesn't invalidate it's legitimate existence.

As to missing the point? no not a bit, the question remains.
Sander_Marechal

Mar 27, 2009
2:33 PM EDT
Quoting:obfuscated code is still the code


And that's why the GPL uses the term "preferred source" instead of just "the source".
gus3

Mar 27, 2009
5:03 PM EDT
From the GPLv3 (http://www.gnu.org/licenses/gpl.html):

Quoting:The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
This means obfuscated JavaScript would be considered "object code" under the GPLv3. However, the jQuery library is GPLv2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) which mentions, but does not define, "object code":

Quoting:The source code for a work means the preferred form of the work for making modifications to it.
GPLv1 (http://www.gnu.org/licenses/old-licenses/gpl-1.0.html):

Quoting:Source code for a work means the preferred form of the work for making modifications to it.
In all cases, the definition of "source code" is clear. It's what you keep backups of, so that if anything drastic happens to your source repository, you can restore it and resume work with minimal effort. It is the language which will be used for making edits and patches. You won't be editing assembler, or object code, or any other machine-translated output; you will be editing the originally-composed form, be it C, or Java, or C++, or Perl, or Python, or human-readable JavaScript.

In no case is obfuscated code "the code." The whole point of obfuscation in the world of proprietary software is to hide symbol names, thereby making end-user modifications difficult or downright impossible. This is specifically what the GPL's counteract, to give the same development tools to the end-users as the original developer(s). Given that two different runs of the obfuscator program can yield two different names for the same original symbol, the obfuscated version cannot be human-editable, and to put the obfuscated version into a source repository would be downright foolish.
azerthoth

Mar 27, 2009
6:31 PM EDT
uncompiled code is source code, no matter how you massage the definition of it. Obfuscated code is just that, plain uncompiled code that is meant to run lean and mean. Doesnt mean you cant edit it, just means that it wont be painfully obvious and that you will have to work for your living.
gus3

Mar 27, 2009
7:11 PM EDT
Consider the two scenarios:

1. You start out with some simple code, you run it through a one-time transformation with "sed" and "awk" to find and clean up some screw-ups, and "cb" to make the indentation more consistent.

2. In preparation for a release, you run your code through a transformation as part of the build process.

In the first case, you are still left with "source code," because the result of the transformation is what you continue using in your project development.

In the second case, the result of the transformation does not meet the GPLv[123] definition of "source code", because your development efforts are still focused on the untransformed version. You are required to grant other users access to the pre-build code.

Your preferences regarding other parties are immaterial. No amount of wishful thinking on your part will change that. If you don't think you can live with those requirements, then choose a different license.
azerthoth

Mar 27, 2009
7:51 PM EDT
consider this, in all cases mentioned the code is human readable and editable ... your points 1 through 100 just failed on a simple logic test.
Sander_Marechal

Mar 27, 2009
8:16 PM EDT
azerthoth, that doesn't matter. The developer has to distribute what he himself works on. The GPL is worded specifically to that effect.
azerthoth

Mar 27, 2009
8:38 PM EDT
Neither 2 nor 3 lays it out with specificity, truth be told from the way it is stated ... if someone does their work in assembly without an interpreter then that is the source code. Point of fact Linus original kernel was done that way.
Sander_Marechal

Mar 27, 2009
8:45 PM EDT
azerthoth: They do. Gus3 quoted them above. The kicker is in the word "preferred".
gus3

Mar 27, 2009
9:53 PM EDT
azerthoth: Only if assembly code is the original, human-created and -edited form, does it become the "preferred" form for editing. As you state, "without an interpreter." If the assembly code is the output of "gcc -S file.c", it is not the "preferred" form, because it has been interpreted/translated from some other original form. Human readability of the translated result does not matter, and in no way figures into the GPL requirements.

The same restriction applies to original vs. obfuscated JavaScript.

Either you're grasping at straws, or you're trolling. I'm starting to wonder which.
azerthoth

Mar 27, 2009
10:49 PM EDT
Neither, in the case of the GPL, it does not clearly define preferred. Without that specificity it is nearly a meaningless phrase, and only wishful thinking will take it past human readable and editable. Neither license states definitively that it must be human readable or human editable, I am however willing to grant those points at the minimum.

They state that there is source code and that there is object code, they infer (not state) that the source code is the fashion in which the programmer wrote it, and that object code is the executable form of that code. Depending on language used those can be one and the same. Nowhere do they state specifically that the code in question can not be cleaned up to meet the authors needs, and if those needs happen to be tight fast and lean then so be it. You are allowed, under the GPL the publicly released code to make it work ... nowhere are you granted rights to the authors development notes.

Are either of you tracking yet? It may suck, but one of the things I learned a long time ago, if it doesn't say it specifically, it doesn't say it at all. Don't read what you think it says ... read what it actually says. Your arguments so far on this have been based on reading between the lines, when there is nothing there to read.
gus3

Mar 27, 2009
10:59 PM EDT
az:

Actually, had you read my comment above, the GPLv3 does define the relationship of object code to source code. As to the GPLv{ANY}, the source code is still defined as "the preferred form" for editing, so if that's what you're editing (including your embedded comments), then you have to give that form (untranslated, uninterpreted, unobfuscated) to any user requesting it. Anything else is a violation of the license.
azerthoth

Mar 27, 2009
11:10 PM EDT
I did read your comments, and then went to the licenses again. You are putting your own interpenetration on preferred, it is vague enough to be meaningless in any context. Preferred by whom? It doesn't say. One can infer either the author or recipient.

As to what is GPL'd, only the released published code is. Anything prior to the release, i.e, development notes, failed glitches, and dead ends, prior to publishing are the authors own works, and being prior to release are not under the GPL, but rather any form of copyright that the author chooses to hold them under. Remember only published and distributed code can fall under the mandatory rules for production of code on request under either GPL. If it isn't transmitted or conveyed it is not and does not have to be included or produced.
gus3

Mar 27, 2009
11:46 PM EDT
When another user receives the program/code, assuming you gave it to them voluntarily, then it's released.

As for "preferred by whom," when you are editing your original code, then obviously that's the form you prefer to edit, independently of what you prefer to give away. Asked and answered.

And if it's "vague enough to be meaningless," how have so many corporate lawyers not seen what your brilliant mind and sharp eyes have so astutely observed? If you really believe that, I suggest a trip to Groklaw.net.
gus3

Mar 27, 2009
11:57 PM EDT
An additional point: In order to satisfy the recipient's preferences for "original" or "obfuscated", by your definition, you must make your own original source code available. Only then can the recipient decide which form he/she prefers.
azerthoth

Mar 28, 2009
1:22 AM EDT
original published source code ... you keep missing that little tidbit. In this case as source code and object code are the same thing, the obfuscated meets the letter of the license.

It is time however to remove myself from this conversation as you have decided not only to maintain a steadfast refusal to use logic, but have now taken to maligning my intelligence because I have failed to cede to a wholly unsubstantiated position. For the record though, that part of the GPL has never faced a challenge in the court room, only that the code wasn't provided as it is detailed that it must be. Not that it has been provided in an unacceptable form.
gus3

Mar 28, 2009
1:40 AM EDT
"Published"? Where does any form of the GPL say anything about "publishing" w.r.t. "preferred"?

Publication, as in making a work available to the public, is optional; the only term appearing in the GPL regarding users receiving the work is "distribute or publish", as in many self-selected recipients, or pertaining to two-party transactions. It's in v1 and v2 of the License. All other occurrences of "publish" concern the License itself, not the work licensed.

In no case does the meaning of "preferred" change upon "publishing" a work.

Get over yourself. You're obfuscating your own words and moving goal-posts, rather than admit you don't have a leg to stand on.
KernelShepard

Mar 30, 2009
10:15 AM EDT
azerthoth's point is very similar to the point I was trying to make above until I gave up caring.

The problem with the way the GPL is worded (and I concede that Sander et all are likely right in what the spirit of those statements are meant to infer) is that all anyone has to do (if dragged to court, for example) is say that his preferred source code for editing is the obfuscated code and since no one will be able to prove him wrong, he wins the court battle end of story.

As we saw with Tivoization and the Microsoft-Novell deal, if it's not worded explicitly, it isn't there at all (just as azerthoth said).

There's no such thing (to a room full of bloodsucking lawyers) as "spirit of the license".

What the FSF needs to do is clarify that "Object code" can also simply be the obfuscated form of the original source code and it would likely be better protection (I'm not a lawyer, so it might need even more clarification than that, I don't know).
KernelShepard

Mar 30, 2009
10:17 AM EDT
Oh, and you'd need to define what obfuscated means, since some people write really horrendous code to begin with that I would consider to be "obfuscated" :-)
gus3

Mar 30, 2009
1:48 PM EDT
Sigh...

Find any programmer who prefers to read and edit obfuscated code, not merely as an academic exercise, and I might concede your point. But if code obfuscation is part of the build-release process, then by the definitions above, the resulting obfuscated code is not "source code."
KernelShepard

Mar 30, 2009
7:03 PM EDT
gus3: I think you misunderstand what I'm saying.

I'm not saying that any developer actually prefers editing obfuscated javascript. I'm saying that if ever someone should accuse a web developer of not distributing the "preferred source for editing" that it would boil down to his word against the developer's, and the legal system will favor the developer simply because the accuser cannot prove that the obfuscated source isn't the preferred source code.
bigg

Mar 30, 2009
7:15 PM EDT
@KS

I don't know anything about the details of this part of the GPL. Nonetheless, in my experience, it is difficult to predict what the ruling would be. A court would (my guess) ask whether a typical programmer would prefer the obfuscated source. You could have a computer science professor and a few experienced programmers explain why one version is better, and make a strong case that one version is preferred. I don't think it would be as difficult as having to disprove claims made by the programmer about his own preferences.
Sander_Marechal

Mar 30, 2009
7:42 PM EDT
@KernelShepard: A couple of things.

We were talking about e.g. using third party libraries on your website. jQuery is an excellent example because it's licensed GPL (and MIT, but let's stick with GPL in this duscussion). The people who create jQuery work on the unobfuscated code, so that's the code that you on your website should distribute (or point to with a header).

As for obfuscated code being "object code" I suggest you read this article by Joel Spolsky on compiling ASP/VBScript to PHP. He has a great explanation on why this is "compiling" and why PHP is "object code" even though it's fully readable (albeit ugly. Just like obfuscated JavaScript!)

http://www.joelonsoftware.com/articles/FogBugzIII.html

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!