Slashdot Mirror


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."

77 of 418 comments (clear)

  1. hrm.. by grub · · Score: 5, Funny


    Freedom to Tinker has written a 15 line P2P program in Python

    Does anyone have a .torrent link for it?

    --
    Trolling is a art,
    1. Re:hrm.. by Anonymous Coward · · Score: 5, Funny

      it's 9 lines in perl....

      #!/usr/bin/perl

      fjdohsb0y[tu34qtyjhq5ykl2yjh4u5iongvwy5iopy9uy7u 87 srthmn90;
      ps394b7-6vh0ae6se0n89789t75j890t67scj89 067j890e54t 890;
      5478n35890904hn907t85j90670w9-57-xfg90hjx;om nxrt9b n0ps54;
      s907n-679s-90xe54/6w547/7589vj0s9-78se-06 vw346hbn8 7n98i7eu6;
      463g3w6g6v6u45betyv4yc45y4y5s7n86uijy4 63q4awy;
      4w57ne568une5j7vc7uyh35xjh7z6jx5uj6ukdtm cdryjtu;
      68ne578iyjvyhdrc h6ug37eb64n84mw6m8 s4r6i4rt6;

      I was suprised it was so simple! i can not believe i did not think of it already!

    2. Re:hrm.. by Lord+Kano · · Score: 2, Insightful

      I disagree. They're trying to hold the people who write such apps liable for the criminal behavior of others. It's like suing Ford because a drunk driver killed your kid or suing Lorcin because some psychopath shot your wife.

      It's dishonest to pretend that they're only going after the people who actually infringe when they are going after software publishers for contributary infringement.

      LK

      --
      "Hi. This is my friend, Jack Shit, and you don't know him." - Lord Kano
    3. Re:hrm.. by forkazoo · · Score: 2, Funny

      Fermat apparently had proved a theorem for an N-line PERL script P2P app (n!=2), but in his famous "Treatise on the PERL language," he scrawled in the margin:

      I have found a single line of PERL to do this, but it is too long to fit in this margin.

  2. Not a good true complexity issue. by jellomizer · · Score: 2, Interesting

    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.
    1. Re:Not a good true complexity issue. by wwahammy · · Score: 5, Insightful

      The point is that a person/entity can create a P2P program with a very small amount of custom code. If someone is going to ban P2P for "inducing" copyright infringement, they'd look stupid for banning a program this small or they'd have to ban the libraries that are used too which is pretty unlikely.

    2. Re:Not a good true complexity issue. by grub · · Score: 5, Insightful


      A p2p app is pretty pointless without a network stack but no one counts that as part of the app or supporting code. Don't pick the nits too much.

      --
      Trolling is a art,
    3. Re:Not a good true complexity issue. by Abcd1234 · · Score: 5, Insightful

      Umm, you're missing the point. The fact is with commonly available tools, and I'd consider Perl and Python (or Java) with their massive stock libraries "commonly available", one can easily write a p2p app (heck, BitTorrent is written in Python, so I think it's a very valid example).

      Hell, by your logic, the following application:

      int main(int argc, char **argv)
      {
      printf("Hello World");
      }

      is cheating, since I'm using printf, and god knows how complicated that call is, not to mention all the code in the OS to make the text appear on stdout!

    4. Re:Not a good true complexity issue. by dtolton · · Score: 5, Insightful

      I think you are missing the point. The point isn't that you can write a library called p2p and write a a two line python program:

      import p2p

      p2p.run()

      the point is that using standard built in libaries of these languages you can build a fully working p2p system in a very short amount of code.

      I do agree though that 15 lines is a bit misleading, although the python program is not putting multiple statements on one line, you can't do that in python. Instead he has removed all whitespace, put all defs and the following body on one line etc.

      Again though, the point *isn't* trying to make a program that is highly "pythonic", it isn't. The point is that using basic libraries that have been in Python for years, you can roll a p2p server in 20 minutes.

      --

      Doug Tolton

      "The destruction of a value which is, will not bring value to that which isn't." -John Galt
    5. Re:Not a good true complexity issue. by Johnathon_Dough · · Score: 3, Insightful
      So? Are they going to have to also make illegal import sys, os, SimpleXMLRPCServer, xmlrpclib, re, and hmac? Or are those going to be on there because they have functions necessary to the OS not related to P2P apps?

      I think the point he was trying to make, is that it is too late to ban. Yeah, it would have been more impressive if he had coded it out of 15 lines of 1's and 0's, however, I think showing that you can take a bunch of embedded functions, and write a script that acts as a P2P app is a worthwhile example.

      --
      If you are one in a million, then there are six thousand people who are just like you.
    6. Re:Not a good true complexity issue. by SilentChris · · Score: 2, Insightful

      "they'd look stupid for banning a program this small or they'd have to ban the libraries that are used too which is pretty unlikely."

      Uh, why? If a person writes a virus in Visual Basic, no one blames Visual Basic (at least, no one outside techies). Yet the virus itself is clearly harmful. The libraries are just a framework for both good and bad apps.

    7. Re:Not a good true complexity issue. by Anonymous+Crowhead · · Score: 2, Funny

      Those are both cheating.

      Okay, here's p2p in two lines of perl:

      #!/usr/bin/perl
      `wget http://www.filefront.com/?filepath=/gnutelliums/gt k-gnutella/gtk-gnutella-0.92.1c.tar.gz`;

    8. Re:Not a good true complexity issue. by Smidge204 · · Score: 2, Insightful

      The problem with that comparison is that things like os.py are standard libraries that are used by a very wide selection of programs. The 15 lines here are actually unique, meaningful code specific to the application's task. The libraries are available to everyone. Nobody counts the code in header files as their own.

      Your "web browser" example is just invoking another program, and so it doesn't do anything unique or application specific.

      So when he says "done in 15 lines of code", it means that all the programmer has to do is type out 15 lines of code, and that using libraries for support functions is pretty much a given.

      Unless you're a pedantic shithead, of course.

      I will grant you that putting multiple commands on one line is cheating, though. However if the symantics of the language allow you to shorthand multiple actions in a single command then it'sa fair game!
      =Smidge=

    9. Re:Not a good true complexity issue. by CableModemSniper · · Score: 4, Insightful

      #!/UpperlevelProgrammingLanguage
      Import webserver
      Run Webserver
      ----
      What, like this?
      #!/usr/bin/env ruby
      require 'webrick'
      s = WEBrick::HTTPServer.new( :Port => 80, :DocumentRoot => File.join(Dir.pwd, "htdocs")
      trap("INT") { s.shutdown }
      s.start

      --
      Why not fork?
    10. Re:Not a good true complexity issue. by Rheagar · · Score: 5, Funny

      It also uses files, which is totally cheating. Without fi.write(), this guy would have to do a lot more work to have the computer convert a virtual address into the a device real address and accessing the filesystem implementation specific rules to carry out the necessary data and metadata operations to complete the task. And thats just the half of it.

    11. Re:Not a good true complexity issue. by Jerf · · Score: 5, Insightful

      While what you say is true, I think you are partially missing the point, because what you say is part of the point.

      None of the components included in the Python program are specifically P2P. But each of these components are common, powerful, and widely available; almost every, if not every, mainstream language you can think to name has each of these libraries easily available. This isn't news to Prof. Felten, it's an integral part of his point: These readily available libraries, for which no reasonable grounds can be come up with to eliminate them, are trivially combined into a P2P program.

      It is not the same as "import webserver; webserver.run()".

      Moreover, there is nothing XML-RPC or HMAC specific about the code, really, and you can't ban all RPC libraries, all hashing libraries, etc.

      This isn't really a demonstration of the power of Python or anything, and I think Molester sort of misses that point, though turning it into a Perl Golf contest is cool and nerdy and all. (Besides, Pythonistas like me are generally not impressed with such hyper-concision, since one of the reasons we use Python is readability and maintainablity; as a game it is great fun though.) Prof. Felten's point needs to be understood more like an academic proof that a problem is intractable; reduce the problem to something like the halting problem with a 1-to-1 mapping, and you're done. Here, Ed Felten reduces "P2P" to (taking it generically) a language and OS (absolutely vital, can't be banned without banning computers entirely), networking/communication, a bit of string processing (re is convenient but any turing complete language can do that), and a hashing algorithm which probably isn't even vital to the process.

      The point is to show that at the core, P2P can't be banned because there really isn't a "P2P" technology, it is an incredibly simple and straightforward application of the basic capabilities of a computer and a network connection. It has already been shown a rough equivalent can be written in Perl, and any number of others will probably pop up now. Languages like C++ or Java probably can't get down to 10 lines, but they will still be simple programs as programs in those languages go.

    12. Re:Not a good true complexity issue. by shura57 · · Score: 2, Insightful

      ...although the python program is not putting multiple statements on one line, you can't do that in python.

      A little off topic, but yes, you can -- just put the semicolon in between:

      $ python
      >>> import os; os.listdir(os.getcwd())

      Also, the following is nothing else but the multiple statements carefully hidden by the tuple packing/unpacking:

      a,b,c = (blah,lambda x:blah,blah-blah)

      I agree with the main point, though.

    13. Re:Not a good true complexity issue. by flumps · · Score: 5, Funny

      no one blames Visual Basic

      Believe me, VB has ALOT to answer for.. *shakes fist*

      --
      "So there he is, risen from the dead. Like that fella, E. T." - Father Ted Crilly
  3. P2P only works if there are other peers by xswl0931 · · Score: 2, Insightful

    Anyone can write a P2P client, but who will you network with? Not very useful with the other P.

    1. Re:P2P only works if there are other peers by dreamchaser · · Score: 4, Insightful

      Do the words 'proof of concept' mean anything to you?

  4. Size complex? by stevenbdjr · · Score: 5, Funny

    Do Perl developers have some kind of reverse size-compensation complex?

    Anything you can do I can do smaller?

    1. Re:Size complex? by shrubya · · Score: 2, Insightful

      "I'm not really a PERL developer."

      Obviously not. You think Perl is an acronym.

      BTW, even as a novice Perl developer, I can confirm that repeated use of <> and $_ will add several cm to your manhood.

    2. Re:Size complex? by gr8_phk · · Score: 2, Insightful

      The python one is suffering the same thing. He deliberately squashed it down at the expense of clarity.

    3. Re:Size complex? by Brendan+Byrd · · Score: 2, Insightful

      BTW, even as a novice Perl developer, I can confirm that repeated use of and $_ will add several cm to your manhood.

      In all seriousness, I hate the use of $_, implied or not. (Especially if it's omitted and used as the default variable.) Yes, it makes the code short, and maybe even use slightly less memory, but I prefer to just create a named variable and use those, instead of looking at:

      while (<>) {
      s/\D+//g;
      alarm;
      reverse log if (exp);
      select pop;
      foreach (split //) {
      print;
      s/\d+/ord.hex.oct/e;
      s/\A/-/g; s/\Z/\n/g;
      print;
      }
      }

      And trying to figure out exactly where $_ gets garbled, or to even figure out what it's doing. Named variables describe what it is. The more you subtract from that, the more unreadable the code becomes. For God's sake, the language was written by a linguist. It was designed to make programs somewhat English-readable. At least take the time to do that, instead of going off on some golfing powertrip.

  5. P2P Does Not Break the Law by phunster · · Score: 3, Insightful

    P2P Does Not Break the Law
    People Do

    1. Re:P2P Does Not Break the Law by Anonymous Coward · · Score: 5, Insightful

      The point is that when copyright holders attempt to take action against those people, you all start crying "They're suing children!" So they sue the P2P networks instead, and you start crying "Unfair! Go sue the users!" So they...

    2. Re:P2P Does Not Break the Law by ad0gg · · Score: 2, Insightful

      Nuclear bombs don't kill people, people do.

      --

      Have you ever been to a turkish prison?

    3. Re:P2P Does Not Break the Law by Stween · · Score: 2, Informative

      Of course P2P doesn't break the law. P2P has been around for years, long before illegal sharing of copyrighted content on P2P systems hit the limelight.

      Consider: Usenet, 1979.

    4. Re:P2P Does Not Break the Law by Anonymous Coward · · Score: 2, Interesting

      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.

    5. Re:P2P Does Not Break the Law by cmstremi · · Score: 2, Funny

      What I think you meant to say is:
      "Guns don't kill people. *I* kill people."

      Happy Gilmore's boss (the one Happy shot in the head with a nail) had that on his t-shirt if I remember correctly...

  6. I wrote a 7-line renderer with physics engine... by Anonymous Coward · · Score: 3, Funny

    ...but it only worked with 1 dimension. I'm working on scaling it up, but I'm worried it might get longer.

  7. When will this code be on a T-shirt? by QangMartoq · · Score: 5, Interesting
    As we saw when the courts tried to ban DeCSS, the code was printed onto t-shirts.

    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?

    1. Re:When will this code be on a T-shirt? by Anonymous Coward · · Score: 3, Funny
      What a lazy bastard you are! Not only do you think you're entitled to steal music, but you think you're guaranteed a shirt!

      It's too much effort to print a lousy t-shirt yourself, but artists shouldn't get paid for their lives' work?

  8. Slashdot editors strike again! by Anonymous Coward · · Score: 5, Funny

    I'm Matthew Skala, the author of MoleSter, and my name was spelled correctly in the item I submitted about this.

  9. I can beat that by Anonymous Coward · · Score: 5, Funny

    I have just created a zero line P2P program which I have entitled "Walking to the Neighbor's House to Borrow a Movie".

    I could be evil and patent it, but I have decided to release it under the GPL.

    1. Re:I can beat that by idontgno · · Score: 2, Funny
      I have discovered a truly marvelous demonstration of P2P that this margin is too narrow to contain.

      --Fermat's Second-to-Last Conjecture

      --
      Welcome to the Panopticon. Used to be a prison, now it's your home.
  10. I bet 13 of those lines... by Anonymous Coward · · Score: 5, Funny

    ...are dedicated to spyware if its anything like kazaa.

  11. MoleSter? by Mad_Rain · · Score: 5, Funny

    From the webpage: Every time I look at the word "molester" my brain tries to parse it as "mole-ster" instead of the agentive of "to molest", and now I have an excuse to name a piece of software MoleSter, so I'm going to use it.

    I think that the RIAA and MPAA are going to get a lot of positive spin when people start reading that they're going after all the MoleSters on the Internets.

    --
    "What do you think?" "I think 'What, do you think?!'"
    1. Re:MoleSter? by LiquidCoooled · · Score: 3, Funny

      9 line molesters at that.

      The most worrying part is on the site, he challenges people to make smaller molester clones.

      --
      liqbase :: faster than paper
    2. Re:MoleSter? by Webmonger · · Score: 2, Funny

      Maybe he can join forces with the author of EtheRape.

  12. Oh yeah, I got it in 2 lines of shell: by Anonymous Coward · · Score: 4, Funny

    #!/bin/bash
    ### ToDo: Write P2P app here

  13. He could be liable... by vivin · · Score: 4, Insightful

    But according to this article from a story that was posted on Slashdot yesterday:

    But if next July's anticipated Supreme Court ruling in the MPAA/RIAA vs Grokster/Streamcast goes in favour of the movie and music industries, the heat is going to be on any technology, no matter how benign the intentions of its developer, that nevertheless makes piracy possible.

    Which is rather stupid and obtuse. If you're trying to pioneer a novel way to transfer data, then it could be used for piracy. Anything that transfers bits and bytes around can be held liable. So setting this precedent is just PLAIN STUPID. How far will *AA go? Let's say this precedent had already been established... then they could go after Brian Cohen. They could hold him responsible for create an application "makes piracy possible, regardless of his benign intentions". This way the *AA could crush anything that they see as a potential threat.

    --
    Vivin Suresh Paliath
    http://vivin.net

    I like
    1. Re:He could be liable... by raehl · · Score: 4, Insightful

      This way the *AA could crush anything that they see as a potential threat.

      Hrm... like an operating system that enables file duplication and networking?

    2. Re:He could be liable... by Pax00 · · Score: 2, Insightful

      But if next July's anticipated Supreme Court ruling in the MPAA/RIAA vs Grokster/Streamcast goes in favour of the movie and music industries, the heat is going to be on any technology, no matter how benign the intentions of its developer, that nevertheless makes piracy possible.

      Which is rather stupid and obtuse. If you're trying to pioneer a novel way to transfer data, then it could be used for piracy. Anything that transfers bits and bytes around can be held liable. So setting this precedent is just PLAIN STUPID. How far will *AA go? Let's say this precedent had already been established... then they could go after Brian Cohen. They could hold him responsible for create an application "makes piracy possible, regardless of his benign intentions". This way the *AA could crush anything that they see as a potential threat.


      Well I am glad I didn't invent speach, written word, copy machines, printing presses, casset tapes, floppy disks, etc etc etc

  14. or in BASH: by Anonymous Coward · · Score: 4, Funny

    #! /bin/bash

    cd /src/mldonkey/distrib/

    # --- start mldonkey ---
    ./mlnet

  15. ThinkGeek by Lord_Dweomer · · Score: 4, Funny
    And cue ThinkGeek tshirt slashvertisement in 5...4...3...

    --
    Buy Steampunk Clothing Online!
  16. Baah...that's nothing by GillBates0 · · Score: 3, Funny
    Here's a one-line P2P application I wrote in whitespace:

    /*following code does p2p transfer*/

    --
    An Indian-American Hindu committed to non-violent thought/speech/action alarmed by the global explosion of radical Islam
  17. P2P tattoo by Lord_Dweomer · · Score: 3, Interesting
    So I know that you can encode entire programs on barcodes. Well, could someone have a tattoo with this barcode on it for the program and carry it with them wherever they go? Even a temporary tattoo would be cool. Wearable computing takes on a whole new meaning, plus, you'd never be without access to free media.

    --
    Buy Steampunk Clothing Online!
  18. Actually, yes. by Kozz · · Score: 5, Informative

    It's commonly referred to as "golf". ;) http://www.perlmonks.org/index.pl?node=golf

    --
    I only post comments when someone on the internet is wrong.
  19. Proof of concept... by d-man · · Score: 2, Funny

    ...that Perl is a true write-only language.

    --
    Unix: Where /sbin/init is still Job 1.
  20. Unlikely? by simpl3x · · Score: 4, Insightful

    Until it's required to have DRM in the OS... And, bans on malicious code... Perhaps a ban on compilers...

    Unlikely isn't the word I'd use when we have people who have no clue as to what they're talking about. They'd think they were banning viruses!

    Moderate funny ha ha.

  21. Nice Try, Mr. Felten! by smug_lisp_weenie · · Score: 5, Funny

    Our lawyers are currently perfecting a new TinyLawsuit specifically to defeat your invention. You will like it- Only _10_ lines of legalese!

    The ball is now in your court, Mr. Felten!

    Regards, The RIAA/MPAA

  22. Re:Code Size vs. Regulation... by Anonymous Coward · · Score: 2, Interesting

    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.

  23. Um, what point is this trying to make? by Dan+East · · Score: 2, Insightful

    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?

    I thought the real point of p2p, as in file sharing, was the ability to search many hosts for something, even though you do not know what hosts exist, ideally without even requiring a central server the hosts must register with.

    Dan East

    --
    Better known as 318230.
    1. Re:Um, what point is this trying to make? by twistedcubic · · Score: 2, Interesting


      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.

    2. Re:Um, what point is this trying to make? by Q2Serpent · · Score: 2, Insightful

      Go do some reading. Once you connect to one host, you can get files that any other connected host has on your "network". All of the connected peers share files. See? Peer to peer file sharing.

  24. ugh by ProfKyne · · Score: 4, Funny

    There goes my argument that Python promotes readable code....

    --
    "First you gotta do the truffle shuffle."
  25. Both these programs are full of BS by markdj · · Score: 3, Insightful

    Both these programs remind me of the obfuscated C program contest of years ago. They put multiple lines of code on one text line and use cryptic variable names to save space. They try to be cute to be small. Let's see how small a program can really be written if it is written in a decent style understandable by all. Not everyone knows the more arcane python and perl syntax. But a competent programmer could decipher it if written in a good style. The comment that "any moderately skilled programmer can write one" is BS if it has to be written so cryptically that only the interpreter/compiler can decipher it.

    1. Re:Both these programs are full of BS by swiftstream · · Score: 2, Informative

      Years ago?

      This year saw the 17th International Obfuscated C Code Contest. There's some fun stuff in there.

      --
      Be a PATRIOT--because the only thing we have to fear is the lack thereof.
    2. Re:Both these programs are full of BS by punxking · · Score: 2, Interesting

      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.
  26. P2P too efficient and useful to MPAA to destroy by cryptochrome · · Score: 2, Insightful

    Not only will they not go after Bram and BT because it's just shifting bits around (they might as well go after FTP), I wouldn't be surprised if someone tried to hire him or they built off of exisiting code. BT-style file transfer is just far too efficient and effective to stifle, and with a few modifications could make Video-On-Demand viable.

    Hell, the only reason I can see why Apple's iTunes/Quicktime division isn't all over him already is because they're probably cooking up their own software, service, and hardware on their own.

    --

    ---If you can't trust a nerd, who can you trust?

  27. Won't run by Saeger · · Score: 2, Funny
    My new computer won't run that python p2p app for some odd reason, even though Python is installed.

    I get the following error:

    TCPA ERROR #12: Unsigned script execution blocked; Trusted Computing violation sent to MS-Patriot Log Authority.

    Can anyone help?

    --
    Power to the Peaceful
  28. Re:Size shouldn't deter regulation by Anonymous Coward · · Score: 2, Insightful

    Because the laws that prohibit shoplifting DON'T prevent you from walking into a store on the theory that MAYBE you might shoplift. They also don't prevent stores from putting merchandise on display on tables near the entrance on the theory that MAYBE that might make it easier for shoplifters. It's the SHOPLIFTING that's the crime.

    The point is the RIAA's argument in the Grokster case isn't about the fact that people trading filed ILLEGALLY is against the law. Their argument is that P2P programs INDUCE people to break the law, and so should be banned--it's not an attack on the people acting illegally but the MEANS to possibly do so.

    To go back to your shoplifting argument, this would be the RIAA arguing that shopping malls have to be banned because they create an environment that makes shoplifting easier. See the problem?

  29. Surprize surprize! by bennomatic · · Score: 3, Insightful
    So programs are only actually "programs" if they can be executed from MS DOS? Wow. Tens of thousands of Mac apps are now not "programs". Some of the most popular software in the world are not "programs".

    I guess the people who wrote them are "appers" or "scripters" or "serverers" or "clienters". Certainly not "programmers", since they're not writing "programs".

    OK, I'll stop now. I'm sure you've had the error of your ways pointed out many times. It's OK to make a mistake; what I'm really amused by is the fact that your post has been modded "Interesting".

    --
    The CB App. What's your 20?
  30. Parent is -1, Redundant by miltimj · · Score: 4, Informative

    If you'd read Skala's website, you'd see he already addresses your weak argument:

    You're using Socket.pm, and it's huge, that's cheating!
    Read the fucking code. I'm only using Socket.pm for its defined constants (such as SOCK_STREAM). I could easily eliminate Socket.pm, and save probably another 20 bytes or so, by replacing those constants with the numbers they represent; I have not done so yet only for portability's sake - it might make my code Linux-specific and I'd like to avoid that.

    --
    "Truth is not decided by majority vote" consensus gentium -- Norman Geisler
    1. Re:Parent is -1, Redundant by sicking · · Score: 2, Funny

      You're using Socket.pm, and it's huge, that's cheating!
      Read the fucking code.


      How the hell am I supposed to be able read that code?

      --
      Failing to learn from history dooms you to repeat it.
  31. Guns don't kill people by electrichamster · · Score: 2, Funny

    Rappers do.

  32. I think you mean Bram by toby · · Score: 2, Funny

    Brian Cohen was, however, the eponymous hero of Monty Python's Life of Brian. Bloody Romans.

    --
    you had me at #!
  33. I perfer my by geekoid · · Score: 2, Funny

    "Friend Gives me movie to return to rental place and I forgot to go to the rental place" method.

    I get more movies that way.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  34. Release Candidate 2 by lxt · · Score: 2, Funny

    I've added some new features to your wonderful program, which I too am releasing under the GPL. I call it:

    "Breaking in to the Neighbor's House to steal a Movie".

  35. I hope he's got a good job. by SmittyTheBold · · Score: 3, Funny

    Matthew Scala, a reader of Freedom to Tinker, has responded with the 9 line MoleSter, written in Perl.

    There have been discussions recently about potential employers doing a Google search on job applicants, so the way I see it Mr. Scala's either very smart or very stupid.

    Very stupid, for the fact a lot of searches will put "Matthew Scala" and "molester" together on the same page.

    Very smart, because this tactic will bury any evidence of his pedophilia under a pile of MoleSter links and pages.

    =P

    --
    ± 29 dB
  36. That's perfect! by nazsco · · Score: 2, Insightful

    i never liked email anyway

  37. Can we really free P2P? by fccoelho · · Score: 2, Insightful

    Tinyp2p proves that software aspect of p2p networking is accessible to the vast majority of us and that means that the IP police will never have a single simple target to chase.

    But it is the hardware part of p2p that is scary. All p2p networks can come down if our broadband providers decide to block the ports normally used for it or to take any other restrictive measure.

    The right to digitally communicate and associate, is seriously at risk! I have wrote more extensively about it here: http://slashdot.org/~fccoelho/journal/

  38. This could be useful in China by ColGraff · · Score: 2, Insightful

    These mini-P2P programs may not be useful for serious media sharing, but I can think of a real-world application - distribution of banned text (articles, newspapers, etc.) in the PRC and other repressive states. The software's tiny - small enough that anyone with Python or Perl installed could just keep the program on a folded sheet of paper, type it in when they want to use it, and delete the program when they were done. If you got in trouble, just burn the paper.

    --
    I'm the stranger...posting to /.
  39. P2P is the marijuana of the 21st century by Simonetta · · Score: 2, Insightful

    P2P is the marijuana of the 21st century in the sense that it is an activity done by millions of people who don't think there is anything wrong with doing it. And it has been (actually in this case, will be) made illegal by clueless legislators prompted by outlandish claims by business groups.
    Now you have a classic situation where a vague law can be focused on a large group of people for political reasons. Individuals can be selected either randomly or because of their unrelated political activities or beliefs and be fed into the legal machinery for the 'criminal' activity of using P2P.
    Given the for-profit corporate prison industry in the USA and the oversupply of greedy lawyers, this looks like a new profit center focused on young people in the same way that the marijuana industry turned out to be extremely profitable for the lawyer-corporate prison coalition.
    Make P2P vaguely illegal.
    Make it incredibly easy to do.
    Select 100 young people at random.
    Check for P2P activity.
    If yes, offer them a deal:
    go to prison for your 'crime'
    (the corporate prison makes $30,000 per year)
    -or-
    pay a $10,000 fine to the RIAA and turn in several friends doing P2P. (keeps the chain going).
    -or-
    pay a lawyer $20,000 and get probation. ($10,000 goes to the lawyer and $10,000 goes to the judge), along with turning in several friends using P2P.

    You can see how this can become very profitable for the lawyers, RIAA, and prison corporations. Each will make sizable bribes (campaign contributions) to politicians to keep the laws against P2P quite strict, in the name of fairness to musicians and artists.

  40. A more legible version of tinyp2p.py by dstone · · Score: 5, Informative

    Code is left intact, but here is the whitespace massaged into a more widely-accepted (and readable) convention. You see, Python isn't -that- sensitive to whitespace! ;-)


    # tinyp2p.py 1.0 (documentation at http://freedom-to-tinker.com/tinyp2p.html)

    import sys, os, SimpleXMLRPCServer, xmlrpclib, re, hmac # (C) 2004, E.W. Felten

    ar, pw, res = (sys.argv, lambda u:hmac.new(sys.argv[1],u).hexdigest(), re.search)
    pxy, xs = (xmlrpclib.ServerProxy, SimpleXMLRPCServer.SimpleXMLRPCServer)

    def ls(p=""):
    return filter(
    lambda n: (p == "") or res(p, n),
    os.listdir(os.getcwd()))

    if ar[2] != "client": # license: http://creativecommons.org/licenses/by-nc-sa/2.0
    myU, prs, srv = ("http://"+ar[3]+":"+ar[4], ar[5:], lambda x:x.serve_forever())

    def pr(x=[]):
    return ([(y in prs) or prs.append(y) for y in x] or 1) and prs

    def c(n):
    return ((lambda f: (f.read(), f.close()))(file(n)))[0]

    f = lambda p, n, a: \
    (p == pw(myU)) and (((n == 0) and pr(a)) or ((n == 1) and [ls(a)]) or c(a))

    def aug(u):
    return ((u == myU) and pr()) or pr(pxy(u).f(pw(u), 0, pr([myU])))

    pr() and [aug(s) for s in aug(pr()[0])]

    (lambda sv: sv.register_function(f, "f") or srv(sv))(xs((ar[3],int(ar[4]))))

    for url in pxy(ar[3]).f(pw(ar[3]), 0, []):
    for fn in filter(lambda n: not n in ls(), (pxy(url).f(pw(url), 1, ar[4]))[0]):
    (lambda fi: fi.write(pxy(url).f(pw(url), 2, fn)) or fi.close())(file(fn, "wc"))

  41. P2P and getting payed by N3wsByt3 · · Score: 2, Interesting

    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." ---