P2P In 15 Lines of Code
nile_list writes "Edward Felten of the very fine Freedom to Tinker has written a 15 line P2P program in Python. From the post on Freedom to Tinker, "I wrote TinyP2P to illustrate the difficulty of regulating peer-to-peer applications. Peer-to-peer apps can be very simple, and any moderately skilled programmer can write one, so attempts to ban their creation would be fruitless." Matthew Scala, a reader of Freedom to Tinker, has responded with the 9 line MoleSter, written in Perl."
15 Lines? 9 Lines.
The python code has
import sys, os, SimpleXMLRPCServer, xmlrpclib, re, hmac
The perl code puts multiple commands in one line.
Those are both cheating. And not really 15 or 9 lines of code. How many lines of code are just os.py alone? Using these upper level languages is not a good way to prove how simple these activates are because they use many complicated libraries preinstalled in the language. It is like saying I can write a webserver in 3 lines of code.
#!/UpperlevelProgrammingLanguage
Import webserver
Run Webserver
Version in lower level language like C with just say the <includes> are better but still a bit of cheating. If you did in in assembly then that is even fairer. The true test is how many lines of code in assembly without an OS.
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
I can see P2P becoming the next DeCSS in the eyes of the courts and receiving similar treatment.
So when can I expect my shirt?
wtf why did you pick "molester' as the name for your product. how about michaeljacksonster?
Buy Steampunk Clothing Online!
The link is intent. The notion that the RIAA/MPAA have is that makers of P2P applications are doing something complex and difficult, and so banning P2P applications isn't a big deal--it's a specialized activity that's hard to do, and it's relatively easy to police, and to demonstrate intent on behalf of the programmer.
The goal of showing tha P2P applications are easy to write and can be extremely small is to say that you really can't ban P2P without banning the ability to transfer data over the internet in general. The idea here is that what's "core" to a P2P ap isn't all the fancy bells and whistles--it's a pretty simple and straightforward concept.
The idea here is that if someone wanted to ban text editors, since they could potentially be used to copy down copyrighted information. They may say that their war is with Microsoft, and specifically Word. But the point is that you don't have to be Microsoft to write a text editor, and all those bells and whistles Microsoft writes aren't what makes it a word processor--it's the really simple concept of modifying text in a file. "edit" isn't nearly as complex, but does the same thing. The problem isn't with the big pieces of software but with the underlying concept.
I love how Orrin Hatch, a huge proponent of the NRA and the belief that "guns don't kill people, people kill people" (which I agree with), is the biggest pusher of the Induce Act, which implies that people don't violate copyright, software does. I want to puke.
TinyP2P requires you specify the server address and port. Um, how is this different then FTPing to a server? Or sending a file over some IM service? Or copying a file over a network share?
But, does there exist an ftp server you can trust? Seems like all of them have a root exploit discovered periodically. Likewise with the IM programs. However, 15 lines of code is pretty easy to audit.
I'ts all very insteresting to read about this, but I'm wondering... seems creating P2P is very simple, yet why takes it so long for people to take up the chalenge of making a 'small social network' P2P-system?
Wasn't it on this veryè same slashdot, that not too long ago an article was mentioned about a site who was willing to pay a considerable amount of money to any coder willing to work on a OSS P2P system annex IM which was meant to be used in a small network of friends, and thus, below the radar of RIAA and co.
I gather the author in question isn't very interested in money, at least compared to 'status among peers' (something that seems to be typical of good coders working on OSS projects, like Linus). But I can't imagine that NO coder (at least the last time I checked) has taken that offer up for 1000 bucks, while this one makes a simple P2P prog in a matter of days, just to prove a point, or even just for the fun of it.
I'm not sure how it was called again, but some probably will remember and maybe post a link to it...now, the only thing to find are skala-type dudes - and getting a nice bonus on top. Volunteers?
--- "To pee or not to pee, that is the question." ---
With all due respect, can we mod the parent obtuse? I'm honestly not trying to troll or flame, but the self-righteousness of the parent post is a bit much considering the whole point was how quickly and easily a p2p app could be created (and by extension then discarded when need be). Whether or not the code is elegant is entirely beside the point. It could even be argued, given that something of this nature is potentially being created to circumvent certain rules or regulations, that the whole point is to make it such that only the interpreter/compiler can decipher it.
You can have my cynical agnosticism when you pry it from my cold, dead logic.