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

34 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 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. 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?

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

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

  5. 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.
  6. I bet 13 of those lines... by Anonymous Coward · · Score: 5, Funny

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

  7. Oh yeah? by KillerDeathRobot · · Score: 1, Funny

    Well I can write "Pointless story" in one line.

    --
    Thinkin' Lincoln - a web comic of presidential proportions
  8. 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.

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

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

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

    #! /bin/bash

    cd /src/mldonkey/distrib/

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

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

    --
    Buy Steampunk Clothing Online!
  12. 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
  13. 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`;

  14. Duh factor (me, not you) by JCOTTON · · Score: 1, Funny
    Excuse me for asking, but this article implies that you need to have "python" running to use the 15 line code. Here is the command line:

    python tinyp2p.py password server hostname portnum [otherurl]

    I believe that the python interpreter (i am assuming that it runs like an interpreter) may be larger than 15 lines.
    It also assumes that you have a web server running on your box. What other assumptions are unique to this app? That you have a url defined as a domain?

    In other words, I really couldn't run this from a DOS prompt, could I? So, it doesn't really count as a "program". Does it compile into an exe? If not, then what is this article talking about?

  15. 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?

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

  17. 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.
  18. 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

    1. Re:Nice Try, Mr. Felten! by Anonymous Coward · · Score: 1, Funny

      I'll be happy to sign the TinyPaycheck their going to get. It only has one digit, and it's binary.

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

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

    --
    "First you gotta do the truffle shuffle."
  20. 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...

  21. 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
  22. Guns don't kill people by electrichamster · · Score: 2, Funny

    Rappers do.

  23. 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
  24. 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 #!
  25. 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
  26. 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".

  27. 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
  28. 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.