Forgot your password?
typodupeerror
The Internet Software Your Rights Online

World's Shortest P2P App: 15 Lines 443

Posted by CowboyNeal
from the no-need-to-be-fancy dept.
soren.harward writes "The New Scientist has an article about TinyP2P, the world's smallest P2P app. It's 15 lines of Python code brought to us by Edward Felten, CS Professor at Princeton and outspoken supporter of the digital rights the Slashdot community holds so dear. He wrote the program as a proof-of-concept that P2P apps are really easy to write, don't have to be complicated, and thus banning them (a la the INDUCE Act) is pointless and silly."
This discussion has been archived. No new comments can be posted.

World's Shortest P2P App: 15 Lines

Comments Filter:
  • by nizo (81281) * on Thursday January 06, 2005 @07:40PM (#11283098) Homepage Journal
    P2P apps are really easy to write, don't have to be complicated, and thus banning them (a la the INDUCE Act) is pointless and silly.

    Umm, if I publish a recipe for crack that uses 2 less ingredients than the normal recipe and takes only half the time to make, why would that be a valid argument for making crack legal? Don't get me wrong I think the act is idiotic, but I don't follow Mr. Felton's reasoning here.

  • Libraries (Score:2, Insightful)

    by flossie (135232) on Thursday January 06, 2005 @07:41PM (#11283100) Homepage
    import sys, os, SimpleXMLRPCServer, xmlrpclib, re, hmac

    15 lines of code, but linking to libraries that do much of the hard work.

  • P2P (Score:3, Insightful)

    by tuxter (809927) on Thursday January 06, 2005 @07:42PM (#11283122) Journal
    NApster, kazaa, bittorrent, Whatever you use and they then ban will be replaced with another app. There is always someone smarter than the last guy, therefore you will never get rid of P2P altogether.
  • by Skepparn (838310) on Thursday January 06, 2005 @07:43PM (#11283139) Journal
    i follow your point, but i think that his point is that banning ONE program is pointless, since "anyone" (not me though) easily could program a new p2p app..
  • by nt7s (842196) on Thursday January 06, 2005 @07:44PM (#11283148) Homepage
    Does anyone want to enlighten me as to how a 15 line P2P app means that it is pointless and silly to ban them? TPTB are not going to care if you hack together a little P2P app that you and your buddies use. However, if that little app becomes as popular as Kazaa or BitTorrent, you can bet they will be gunning for your program; they won't care if it is 15 lines or 150000 lines.
  • by nurb432 (527695) on Thursday January 06, 2005 @07:45PM (#11283155) Homepage Journal
    But the act of publishing your recipe should remain legal. As should the existance P2P apps. I think is the point everyone is making, in their own way.

    Its the illegal use of your recipe, or the improper use of the p2p that should be dealt with, not the technology ( or information, in your example )..
  • by JustAnotherBob (811208) on Thursday January 06, 2005 @07:45PM (#11283162)
    The inherent ingredient in Crack, Cocaine, which egal to begin with. A P2P app inheriently is not illegal, but illegal acts can be commited by the use of the application though. The point of making the P2P app in 15 lines of code is to prove that legislation regulating and restricting the development/dissemination of P2P applications would be pointless.
  • Eh? (Score:4, Insightful)

    by ZSpade (812879) on Thursday January 06, 2005 @07:46PM (#11283171) Homepage
    How does the fact that they're simple to make have any ramifications on whether or not they should be banned? Meth is simple to make, but I don't see anyone using that as excuse to make it legal. "P2P can be simple and written very quickly, so to try to ban or prevent the technology is not feasible." What he fails to mention is that while they may be simple and quick to write, they take months to gather serious steam, giving ample time to stop them, at least from becoming mainstream like bit torrent, Kazaa, or edonkey. It honestly makes no sense. I don't agree that they should be made illegal, but this is not really a decent supporting argument as to why.
  • by maynard (3337) <j.maynard.gelinasNO@SPAMgmail.com> on Thursday January 06, 2005 @07:52PM (#11283228) Journal
    I don't understand this. Yeah, it's pretty cool to write a fifteen line P2P app, but just because the concept is simple to implement doesn't mean it's unworthy to ban. Not that I'm arguing for banning P2P apps, I'm just critiquing the logic used here. It's also fairly easy to write a simple virus or trojan. Should law enforcement give up pursuing computer criminals who write viruses and such as a result? Better put: shouldn't the amount of damage to society be the valuation for enacting a ban or chasing criminals, not the ease with which criminals obtain or create their tools of trade? Maybe his original statement was taken out of context or more nuanced than the quoted text... --M
  • Re:Libraries (Score:5, Insightful)

    by LnxAddct (679316) <sgk25@drexel.edu> on Thursday January 06, 2005 @07:53PM (#11283247)
    In that case, next time you write a hello world program, make sure you write a custom OS with it and don't forget the thousands of drivers you'll need. Sharing or reusing code is a common and necessary practice.
    Regards,
    Steve
  • by Class Act Dynamo (802223) on Thursday January 06, 2005 @07:54PM (#11283252) Homepage
    But simply using p2p should not be illegal. There are legitimate uses for it. Your argument is like saying crack houses are bad, so let's ban houses.
  • Re:Libraries (Score:5, Insightful)

    by flossie (135232) on Thursday January 06, 2005 @07:56PM (#11283261) Homepage
    of course you link in libraries doing lots of work for you. That's what allows modern apps to have many more features.

    Quite. But the implication of the article is that the code is trivial because it takes so few lines to write. I could easily write a fast fourier transform program in just a few lines by linking to FFTW, but that doesn't mean that FFT is trivial.

  • by dustinbarbour (721795) on Thursday January 06, 2005 @07:58PM (#11283290) Homepage
    It's about file size or byte count. That's it. Why there is such a hoopla over the number of lines I don't know.. It's an arbitray definition.
  • by anum (799950) on Thursday January 06, 2005 @08:02PM (#11283327)
    POOR ANALOGY ALERT:
    The nearest analogy I can think of is Prohibition. You can make alcohol illegal and you can punish people for making it or selling it or drinking it, but there are a lot of people who want to drink and alcohol is VERY easy to make. So every time you close down one source another pops up. There is a demand and you can't control the supply because anyone with enough time can create a new supply.

    Now feel free to argue the inappropriate nature of my analogy. Have fun!
  • by dcarey (321183) on Thursday January 06, 2005 @08:31PM (#11283593) Homepage
    The REALLY sad part is that I don't read slashdot but maybe twice a week on average and ever *I* remember the dupe story ... the link color is already darkened from where I visited precisly the same link the the very short past.

    No, I don't believe this is the "death of slashdot or anything silly like that." But it is conceivable that in that that glorious mound of slashdot web code there could be a way to check the relevant links in the current article against the laready existing articles within the past yada yada yada, such that the "TinyP2P" link would be automatically flagged since it was referenced a short while ago. That way, editors can double check for dupes. I bet you could even do it in 15 lines (har har, hardy har har, har).

    Or mebbe use teh "search feature."

    keke.
  • by Anonymous Coward on Thursday January 06, 2005 @08:33PM (#11283618)
    Sure, why not? It's a thought-crime situation... you have a pipe-bomb, therefore you will try and bomb someone/someplace.

    By that logic owning a gun should also be illegal, you have it because you want to kill someone, shoot someone...

    Let's make actually doing something a crime, not doing something or making something that could be used for bad purposes. It's all tactics to supress the populace anyway... keep the militia down and exert power.
  • Re:Python? (Score:3, Insightful)

    by Doppler00 (534739) on Thursday January 06, 2005 @08:38PM (#11283669) Homepage Journal
    This is the ugliest, hardest to read python code I've ever seen. How can someone abuse such a wonderful language like this?

    My guess is that most of the functionality of the code is in the standard libraries imported at the begining: SimpleXMLRPCServer, xmlrpclib

    They could have just as well imported "p2p_lib" if such a thing existed.
  • by blonde rser (253047) on Thursday January 06, 2005 @08:51PM (#11283782) Homepage
    I think the point is not that it's just easier but 15 lines impies that it is very easy in which case there might be an argument for making it legal. Your example happens to be the best example I can think of. What if crack could be made with a handful of household ingredients and the method was simple enough that an average person could not only implement it but think it up. Sure crack wouldn't become any less harmful but any law against would be a joke. It would be unenforcable since anyone could make it anytime they wanted in the privacy of their own homes.

    Once something becomes that easy society needs to change its focus to how to integrate it in the least harmful way. In that world crack would become a fact of life. In this world p2p programs are.
  • by Coryoth (254751) on Thursday January 06, 2005 @09:11PM (#11283942) Homepage Journal
    Umm, if I publish a recipe for crack that uses 2 less ingredients than the normal recipe and takes only half the time to make, why would that be a valid argument for making crack legal?

    Probably not. Then again, if you published a simple to follow recipe for making crack using nothing but commonly available household items one would have to question the point of banning crack - giving the difficulty in enforcing such a ban. Which is the point.

    Jedidiah.
  • by Ungrounded Lightning (62228) on Thursday January 06, 2005 @09:44PM (#11284176) Journal
    Umm, if I publish a recipe for crack that uses 2 less ingredients than the normal recipe and takes only half the time to make, why would that be a valid argument for making crack legal?

    Actually, yes, if the simplification of the method makes the law significantly less enforcable.

    Unenforcable laws should be removed from the books and moved from the province of laws to the province of morals. If you can't stop them when they do it, or have a good chance to catch them when they do, it's time to stop policing and start preaching voluntary behavior change.

    Leaving such laws on the books leads to selective enforcement (down the slippery slopes toward a police state and/or discrimination), massive civil disobedience, disrespect for laws in general (by both the population and the law enforcement perdonnel), more violation of IMPORTANT laws, and more strain on enforcement resources.

    The government should stick to trying to control only those things that meet three criteria:
    They CAN be controlled in a fair manner,
    the general population agrees they SHOULD be controlled, and
    the Constitution gives government the POWER to control them.
  • by mark-t (151149) <markt@l y n x . b c .ca> on Thursday January 06, 2005 @11:25PM (#11284749) Journal
    A virus is a program that is presumably unwanted by its recipient. A P2P program is unwanted by a small but wealthly and potentially controlling segment of our society that doesn't want _anyone_ to have them.

    Further, you might note that it's not a crime to teach someone how to write a virus, or even a crime to give people virus code, it is only criminal when the recipients of the virus are unwilling to receive it.

  • What-U-Ban (Score:4, Insightful)

    by tepples (727027) <<tepples> <at> <gmail.com>> on Thursday January 06, 2005 @11:59PM (#11284950) Homepage Journal

    Perl and python are both interpreted HLLs ... so your "466 bytes" of source code is no more intrinsically meaningful a measure than the number of lines in either program

    The existence of MoleSter proves that Perl is 466 bytes away from being a P2P program, that in order to ban decentralized search (the key point of P2P file sharing), you'd almost have to ban Perl itself.

  • by aichpvee (631243) on Friday January 07, 2005 @08:18AM (#11286584) Journal
    I know mine are!

    1. Molesting... over-18 consenting Asian girls.
    2. Molesting... over-18 consenting Asian girls in schoolgirl outfits.
    3. Molesting... over-18 consenting Asian girls dressed as Sailor Mars.

    See, now there's something EVERYONE can enjoy.

Per buck you get more computing action with the small computer. -- R.W. Hamming

Working...