Thread: Source code translation

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489

    Source code translation

    Say you wrote a superb open source library called XXX in language YYY and share it on the net.

    Someday, some people notifiying you that they are translating (not porting) your great codes into language ZZZ.

    How do you feel about this?
    Just GET it OFF out my mind!!

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    "Cool beans" is what I would say (but not if anyone could actually hear me, of course). Are they the ones making the careful distinction between translating and porting or are you?

  3. #3
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Quote Originally Posted by tabstop View Post
    "Cool beans" is what I would say (but not if anyone could actually hear me, of course). Are they the ones making the careful distinction between translating and porting or are you?
    They are translating, not porting (a.k.a. wrapping).. In other words their program will always work without your original code.
    Just GET it OFF out my mind!!

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by audinue View Post
    They are translating, not porting (a.k.a. wrapping).. In other words their program will always work without your original code.
    Well, but that's what porting is too. I'm guessing translating vs. porting will have somewhat different connotations to different people, but to me porting just means that you do exactly the same things in exactly the same way, just in a different language, while translating means that you try to do the same things in whatever way works the best in the new language (for instance, going from C to C++, porting might mean turning malloc into new, while translating might mean turning that dynamic array into a vector).

    EDIT: Although, yes, you do more often hear people use "port" in the sense of moving from one machine to another, where you have to change all the system-specific stuff but the base code remains the same. Either way, if this (porting/translating/whatever) is a problem for you somehow, then why did you open-source it in the first place? This is the most natural form of "derived work" there is....
    Last edited by tabstop; 09-05-2009 at 12:30 PM.

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by tabstop View Post
    Well, but that's what porting is too.
    Porting is moving code from one architecture to another, usually while retaining the same code base, i.e. same language.

    Translating is taking it from one language to another.

  6. #6
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    If you're keeping it open-source then you're giving others the opportunity and right to do this. It's really part of embracing the open-source culture for other users to be able to take your ideas and develop them in their own fashion.

    You have to recognize that some languages may provide distinct advantages over another language... so if someone goes out and writes a program in Java and some user recognizes that they can overcome some of the application's issues by re-writing it in C# or perhaps a language that the original developer is not proficient in... then it is a logical advantage to do so and shouldn't be seen as different from any other adjustment of the code like if someone rewrote one of your algorithms to be more efficient.
    Sent from my iPadŽ

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    They concept here is that you shared it.

    Unless you clearly stated your desire for people not to do so by including the proper copyright, not only you can't do a thing about it, but you also encouraged and implicitly stated your desire for people to use your code as they see fit, including their ability to use your code and make money of it.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Mario F. View Post
    They concept here is that you shared it.

    Unless you clearly stated your desire for people not to do so by including the proper copyright, not only you can't do a thing about it, but you also encouraged and implicitly stated your desire for people to use your code as they see fit, including their ability to use your code and make money of it.
    That's not true in the United States at least. All creative works are copyrighted by the author even if the copyright is not spelled out explicitly. You don't have to "state your desire" that the work be under copyright -- it is under copyright automatically. In order for a work to be placed into the public domain without a copyright it must be explicitly placed in the public domain.

    I do not know the situation in other countries. The fact that laws differ from one country to another is reason enough to spell out your intent as clearly as possible.

    To answer the original question, I would not really be happy with somebody translating my code to another language. They could do it incorrectly, release something crappy, and give the wrong impression of my code. Then I'd have to deal with numerous "support calls" from users who aren't actually using my software but rather some shoddy translation of it.

    Depending on the circumstances, I'd be supportive of an effort to port my code to another language but I would want to be heavily involved in the project. Failing that, I would insist that the other party make a fork, change the name of the codebase, and state very clearly in the documentation that it is a derivative of my work unrelated to me and not supported by me.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  9. #9
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I would consider it an honour. Obviously if someone's going to all the trouble to port/translate/convert your code, whether to another machine or another language, they like it. Or find it useful. Or something.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  10. #10
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Nice responses.

    I love to read and examining people's codes in many languages nowadays, and just translate it into my current project's language, hell yeah, I'm just too lazy to learn the concepts behind it (especially something with ugly math symbols).

    I tought by doing so, I'll be called plagiarism or something.
    Just GET it OFF out my mind!!

  11. #11
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Quote Originally Posted by audinue View Post
    (especially something with ugly math symbols).
    ... but those are the most fun.

    Warning: Link contains strong language... yada yada yada...
    Sent from my iPadŽ

  12. #12
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    At least they are notifying you, and hopefully giving you credit. Note that opensource code can still have copyright. The BSD license, for example, says you need to credit the original project (I believe).

    I too would feel honoured.

    That is the point of open source projects. You can tweak everything to your liking (including porting it to a different language).

  13. #13
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by cyberfish View Post
    At least they are notifying you, and hopefully giving you credit. Note that opensource code can still have copyright. The BSD license, for example, says you need to credit the original project (I believe).
    The GPL also stipulates this *and* that the GPL must be applied to the derived work, ie, you can use the source, but you must release whatever you do with it as itself open source licensed by the GPL.

    I don't know how applicable this is to a translation, however, since that would not include any of the original source. I think people who copy a concept, even down to very fine details -- such as the linux kernel is a copy of the unix kernel concept -- are not, in fact, bound by you having copyrighted the code. Linux does not include any non-original source code, so it did not violate any copyrights.

    Quote Originally Posted by audinue View Post
    I tought by doing so, I'll be called plagiarism or something.
    This is a pretty straightforward distinction. If I am writing an essay, and during my research I find a similar essay and I decide to say:

    A similar perspective has been advanced by Dr. Smith, "notice the quotes"
    You do not need Dr. Smith's permission, but you do need to respect his/her authorship of public, copyrighted work. If you do this:

    A similar perspective could be that...
    Without mentioning Dr. Smith, etc., you are now plagiarizing.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  14. #14
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by cyberfish View Post
    At least they are notifying you, and hopefully giving you credit. Note that opensource code can still have copyright. The BSD license, for example, says you need to credit the original project (I believe).
    I think we need to distinguish between the copyright itself and the license agreement that comes with it. The copyright is simple and consists of the words "Copyright 2009 Foo M. Bar." The license agreement is basically a promise that you won't sue people for using your copyrighted work in some limited set of ways.

    Just because code is open source doesn't mean it isn't copyrighted. In fact, it MUST be copyrighted because without the underlying copyright there can be no license agreement since there is no legal force for it to operate on. The situation would then be "public domain" where the code has no legal owner at all.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  15. #15
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by audinue
    I tought by doing so, I'll be called plagiarism or something.
    It would be plagiarism if you claimed that the translated work was entirely your own original work. Additionally, it would be copyright infringement if you have no license to perform that translation yourself.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 'Type' Error on Build of Officially Released Source Code
    By Jedi_Mediator in forum C++ Programming
    Replies: 5
    Last Post: 07-07-2008, 05:28 PM
  2. starting linux's source code and kernel
    By sawer in forum Linux Programming
    Replies: 9
    Last Post: 08-01-2006, 07:46 AM
  3. DxEngine source code
    By Sang-drax in forum Game Programming
    Replies: 5
    Last Post: 06-26-2003, 05:50 PM
  4. Lines from Unix's source code have been copied into the heart of Linux????
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 05-19-2003, 03:50 PM
  5. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM