I mean, it is possible to create application without source code - for example using HEX editor or some debugger that can assembly instructions (actually every decent debugger can).

Creating programs this way is of course hard, but possible for small applications.

I even can imagine cases, where it is the only possible way - for example, on some very old hardware where you simply does not have any development tools.

For another example - read the article "Programming in extreme conditions", published in Assembly programming journal, issue 9

So, what if the author of such application wants to distribute it under GNU GPL?

  • Off topic, but much of that article is flat out wrong... "CLI to disable interrupts... under windows" no, that's not how it works. Look up Virtual 8086 Mode which is where all of this guy's code will execute – Earlz Feb 3 '13 at 2:55
  • @Earlz: please keep the context of Win9x in mind - your DOS apps actually were permitted to clearing the physical EFLAGS.IF, for performance/compatibility reasons. You could crash Win9x usermode by "cli" followed by "jmp $" :-) – snemarch Feb 3 '13 at 11:52

I'm not a lawyer or anything, but I would think this should be possible. As Kilian said, you must distribute the "preferred form for editing". I think in this case though it would go a step further than just distributing the byte codes. I'd think that any thing that helped you to understand or create the source would also go under. Of course, your hex editor wouldn't be included. However, if you used drawn-out diagrams with flowcharts or some such to figure out the byte code that needed to be edited, those would probably also need to be included. And, if you wrote a program which generated the byte code, that would also have to be include.

After all, if you think about it, source code itself is a program which is just processed by a very complicated "CPU" called a compiler to get an expected output. Either way, at this point GPL becomes pretty pointless if you don't have anything written to help understand the byte codes you write

|improve this answer|||||
  • In most cases (as of my experience) the only source you actually have are several sheets of paper with instructions, diagrams and notes. They can be helpful for someone willing to change the program, but they does not exists in machine readable form. Are you state they have to be scanned and included in the project as images? – johnfound Feb 3 '13 at 5:35

The GPL requires a distributor to make the preferred form for editing of the program available. This usually means the source code, and it has to be machine-readable (no print-outs or narrations in haiku form). If you were on a platform where byte-patching executables is the only way of creating them, then that would have to count as the "preferred" form, but I can't think of a system where this would be the case.

It's arguable what it would mean for someone to create a program in a needlessly cumbersome way (e.g. writing hexadecimal machine language out of sheer bloody-mindedness, or to impress the community, etc.) and then put it under the GPL. Your preference may not be the same as my preference, and might be legally untenable to require someone to provide something that doesn't actually exist. The correct people to ask about this are the Free Software Foundation, and ultimately the courts.

|improve this answer|||||
  • This kind of programming is not unknown. For example, Assembly programmin journal, issue 9 has published the article "Programming in extreme conditions" where even more limited environment was described. – johnfound Feb 2 '13 at 19:35
  • I don't buy that. Sure, there can be circumstances under which you are forced to use primitive input methods for inputting something to recover a specific system. But that doesn't it make the "preferred" method for making changes - I would always want to download the thing rather than key it in, and use emacs's hexl-mode rather than the command line for changing it. But this is really a question of interpretation of contract law, and whatever the answer is, it isn't going to be decided in an internet forum. Not even StackExchange. – Kilian Foth Feb 2 '13 at 19:45
  • 1
    Preferred form, but preferred by who? IMO, this means preferred for the author. So, it is not good to make compilable, but obfuscated sources for distribution and keep the original sources for work. But in the discussed case, the author prefer to not have source at all. – johnfound Feb 2 '13 at 20:32
  • 1
    @johnfound: It is indeed the preferred form as preferred by the copyright holder. If that is identical to the finished product, then the source and the program are the same. This is, for example, quite common for images released under GPL. – Bart van Ingen Schenau Feb 3 '13 at 13:38
  • @BartvanIngenSchenau - The argument with the images is important. So, this way, it is possible to license such a work as GPL - the source is provided. IMHO, you have to make your opinion an answer. – johnfound Feb 3 '13 at 14:22

I believe that this is not possible. It violates freedoms two and four of free software. Access to source code is a precondition for distributing software under the GPL, and in this case what you define as source code (HEX) is not human-readable. I think that the lowest level of code that can be distributed with the GPL is assembly language of a specific architecture. Public domain or another license might be more suitable for the case that you describe.

|improve this answer|||||
  • I strongly disagree with this answer. For me, any language that is human-writable is human-readable. If I can (successfully) write directly x86 opcodes into the binary, that IS human-readable. Otherwise, extending your logic, I may request that C code be presented to me in C#, because "I can't read C". – K.Steff Feb 2 '13 at 20:15
  • I don't disagree. I just think that from a GPL point of view doing that is impractical. What's the benefit of distributing binary "source code" under the GPL? Just release it as public domain. – sakisk Feb 3 '13 at 0:34
  • Then we mostly agree, however my issue was with "It violates freedoms ...". In this case, there is no right taken away. This is all IMO. – K.Steff Feb 3 '13 at 1:12
  • GPL is strong copyleft, while public domain is not. – johnfound Feb 3 '13 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.