World's Shortest P2P App: 15 Lines
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."
The 15 line P2P has been mentioned before by Slashdot - but the New Scientist article wasn't mentioned last time (as it hadn't yet been written).
The last article also mentioned the 9 line Molestar written in Perl - which is now 6 lines.
This was posted to Slashdot a couple of weeks back
dupe checker for slashdot
Wasn't there a Perl P2P app that was only 9 lines, or something?
Thanks for playing.
repost...
Duplicate.
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.
I Am My Own Worst Enemy
15 lines of code, but linking to libraries that do much of the hard work.
flossie
Write now. Defend liberty
what about the guy that wrote 9 line p2p
this is several months ago
I can't wait for all the dupe posts in this story.
Didn't we just see this? http://developers.slashdot.org/article.pl?sid=04/1 2/15/1953227&tid=95&tid=156&tid=1
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.
MoleSter
Your hair look like poop, Bob! - Wanker.
10 wget http://localhost/warez/\* 20 pause 10 30 goto 10
Seems /. is running out of new 'scoops'!
I've been waiting for a suprnova replacement for a while!
Øøøh, what's the problem of making a 1 line P2P app? The line might get a bit long, but that isn't a problem...
Why don't you guys just write a 15 line program that checks the first 50 replies to stories, and filter out 49 of them that say anything about it being a repost.
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.
Isn't it kind of ironic how many dupe "dupe story" posts there are?
Under the regime of the new red scare by the leader Bill Gates.. hes now a communist.
I apologize for blatant whoring.
Am I the only one who finds it ironic there are so many "dupe" posts? ... dupe dupes...?
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.
Go ahead and call me unreliable; reliable is just a synonym for predictable.
Shortest Time To Cease & Desist letter
And to go along with this the MPAA and RIAA will quickly hit the programmer with the world's shortest lawsuit. It will be written in English.
has mentioned that this story is a dupe?
The Kruger Dunning explains most post on
that's nothing, I can do the oldest program ever in 1!: print 'hello world!' beat that super smart scientist
Grease & Counterbalance
No, you did not, because althought the TinyP2P file was posted on slashdot earlier, the New Scientist article, the INDUCE ACT, and the other links were not posted before.
Please do not jump on the "ooh, i found a mistake" bandwagon and claim so when there isn't actually a mistake made.
Python? That code is so hard to read I thought it was Perl!
when all "It's a dupe!" posts are modded Redundant.
FP!! In you're face Slashdot!! USA! USA! USA!
Just because it can be done, doesn't mean you should.
Your hair look like poop, Bob! - Wanker.
heres some +5 comments for your viewing pleasure!
t k-gnutella/gtk-gnutella-0.92.1c.tar.gz`;
;) http://www.perlmonks.org/index.pl?node=golf [perlmonks.org]
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.
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.
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!
Those are both cheating.
Okay, here's p2p in two lines of perl:
#!/usr/bin/perl
`wget http://www.filefront.com/?filepath=/gnutelliums/g
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.
Do Perl developers have some kind of reverse size-compensation complex?
Anything you can do I can do smaller?
It's commonly referred to as "golf".
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.
I have discovered a truly marvelous demonstration of P2P that this margin is too narrow to contain.
--Fermat's Second-to-Last Conjecture
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".
Oh yeah, I got it in 2 lines of shell: (Score:5, Funny)
by Anonymous Coward on Wednesday December 15, @01:10PM (#11096822)
#!/bin/bash
### ToDo: Write P2P app here
There goes my argument that Python promotes readable code....
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
--
± 23 dB
I can kill someone with as much simplicity as a bullet to the head. Does that make murder laws silly?
You see? You see? Your stupid minds! Stupid! Stupid!
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
$/=$_;$,=shift;$w=$a=shift;$k{+shift}=1;socket S,2,1,6;bind S,for(listen
S,5;$SIG{ALRM}=\m! (\S+) ([e-i])([^/]*)/!s&&($k{$w=$1}=$,eq$`)&&&$2){alarm
9;(accept(C,S),alarm 0)?read C,$_,1e6:($_="$, $a f".shift)}sub i{}sub t{socket
C,2,1,6;$k{$w}&&=(connect C,&a)?print C"$, ".pop:0;close C}sub h{t"$_ i/"for
keys%k}sub a{$w=~/:/;pack'CxnC4x8',2,$',split'\.',$`}sub f{$w=$_,t"$1 $3/"for
keys%k}sub e{open C,'>',$3;print C $'}sub g{open(C,';&h}
http://ansuz.sooke.bc.ca/software/molester/
My question is, what is with this need for geeks to "prove" something is innocuous based on the number of lines of code? It's just so stupid. Viruses are easy to write, too (I'm sure someone can do it in 15 lines), but that doesn't mean we shouldn't make those illegal.
Makes me weep for the future when I see college professors being so blind to what the real issues are here.
Sometimes it's best to just let stupid people be stupid.
Can probably then make a dupe checker for slashdot even shorter!
http://www.immigrantornot.com/
and Repeat...
...that's just one of the multiple sources on the new SlashTorrent network.
The roots of education are bitter, but the fruit is sweet.
--Aristotle
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.
What is your penile percentile?
fuck slashdot and its clones of not-even-the-first-time-newsworthy fuck-topics.
fuck taco.
fuck mozilla.
fuck firefox.
fuck rathat and that crappy lunix-os of theirs.
Might as get ready for my trial when the RIAA sues everyone for fair use.
Murder hurts someone. Writing a program that is able to transfer data does not.
Can you even boot a modern OS with less than 1 MB ram these days ?
I have mod points and I am not afraid to use them
I wrote a 2 line p2p app in python:
import modified_tinyp2p, sys
modified_tinyp2p(sys.argv[1])
dependent libraries? what dependent libraries?!
Don't get me wrong, Python is a wonderful language. Add the size of the interpreter and libraries and you'll get quite a bit more "code" behind the P2P app. I could write a library with a single export and write a C program that could call "start_server()" and be within the confines of 5 or 6 lines. For that matter, write an app that reads a single byte config file for a function. Does that make the P2P application a single byte?
a t), open the file, insert malicious replicating content, close file, repeat
Also I have to ask why a program's ease of creation would have anything to do with banning it. How about a virus?
find (com/exe/bat/vbs/wsh/scr/vxd/sys/insert_file_form
Viruses are probably the simplest programs short of "Hello World" and "Guess my number". Before someone says that writing viruses isn't illegal, plenty of people are trying to make it as such and they are in the same boat as these people. If something as simple as a virus isn't illegal to code when it obviously has a much more malicious intent than p2p apps do, I don't think p2p authors have anything to worry about. What are the sizes on file infectors? I recall COM file overwriting ones being well under 1K. "OMGOMG TEH MAGIC STRING OF 28 HEX CHARS MAKES ALL DIE ILEGAL MUCH!"
This is MONTHS old! Who does the screening over there?
this was posted like 2 weeks ago
and thus banning them (a la the INDUCE Act) is pointless and silly.
:p
By this reasoning, you could also argue that manufacturing illegal drugs is also too easy and outlawing them is pointless and silly. Oh wait..it is
If only -1 Redundant could be applied to the articles, and not only the comments.
Yeah this a dupe
btw, why aren't they counting all the lines of code in the library? bit misleading don't you think? 6 libraries were used in Mr. Ed's code... hmm.. can anyone be bothered counting how many lines of code are used in each library. Coz I can't. All I'm saying is that it is actually more than just 15 lines of code. They're all in the libraries.
nuff said.
God, I wish that War On Drugs hadn't been so effective. I could really use some fucking marijuana right now.
It doesn't seem to work, but a working version by Richard Jones. Unfortunately, it's incompatible ;-).
More to the point, it seems to me that one of the big features of P2P programs is that they can use the response path to get around firewalls, home routers, and dynamic IP address problems by using a symmetric (or at least combined) protocol. (Of course, not everybody can be behind a firewall but at least some people can.)
TinyP2P appears to require that a server be able to accept incoming connections, rather than just make outgoing ones, in order to share bidirectionally. Fixing that would be a good project, but the XMLRPC libraries available might make it difficult; I don't know.
did I tell you?
/etc/init.d/httpd start
#!/bin/bash
I know I told you because I always post this when we get "in X lines!" stories... please believe me when I tell you that if you write anything at all in under 10 lines of code that is because it was already written and all you had to do was invoke the right tools. It's a testament to Python, which evidently has a peer to peer app more or less built in.
it may even be a sign of great skill to have seen how so few lines were required to invoke the behavior. BUT: it's still not really "writing XYZ in N lines of code".
yes yes... I'm just bitter because my Peer to Peer application is 25 lines long.
by the way, did I tell you about the animation program I wrote? It can only animate one thing but it works flawlessly, I wrote it in GIF.
I also wrote a word processor in Word Basic in zero lines! that's right... without altering the host environment at all... I achieve word processingness. Also... I ported this to Open Office macros with only zero lines.
I feel old and mean now... but in my day we liked being old and mean, hey... GET OFF MY LAWN!
-pyrrho
how many lines of code does python have???
since this depends on python then python is part of the program, (ya cant run it without python)...
bash> $PREFERRED_P2P_CLIENT
Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
would have been better like this
/etc/init.d/httpd start
#!/bin/bash
sorry for my formating evil.
-pyrrho
"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."
Similiar reasoning works for security. That's why Linux should just give up, and drop security.
Next time write an article AND the application that proves a point and has validaty in countermanding stupid legislation instead of trying to be a perl showoff...
"Seems /. is running out of new 'scoops'!"
NEWSFLASH!
Kelloggs Raisin Bran now come with four scoops.
I'm not sure I understand your theory about how proving P2P programs are easy to write will put and end to people trying to stop them. Case in point: murder. If you think about it, killing people doesn't take much effort at all, but people still try to stop it. (No, I'm not condoning murder; just making a point)
You were duped.
His rationale compelled legislation. I do like the "build the sidewalk where people walk" (gennerall) approach to legislation, as infrequently as it is follwed.
But...everyone smokes weed, it still illegal. Oral-sex was illegal and it wasn't even taking moola from anyone. Its only our naivate that makes us think that this sort of argument will influence any legislator beyond a few on the fringe.
In response to development of the World's shortest P2P Application, the RIAA has weighed-in with the World's shortest lawsuit, coming in at a mere 2 lines:
#1 You are fucked.
#2 See you in court.
Indy Media Watch-Proctologist of the Internet
The last article also mentioned the 9 line Molestar written in Perl - which is now 6 lines.
Of course, there are other interesting implementations out there. IIRC, there used to be a web server that was written entirely in Postscript. Although not written in Postscript, one of the early rivals to X - InterViews - used Postscript as the graphics language.
The winner of the 50th Anniversary of the Manchester Mk. 1 programming contest was a program written in something like 20 words of assembly a programmable timer for chicken soup. (When you consider that the assembly language for the MM1 had 8 instructions, no add operation, and no real-time clock, that's not bad going.)
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
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.
80 columns ought to be enough for anybody.
Solution: make theft legal
The point isn't how trivial (or not) a complete P2P solution is.
The point is that the DIFFERENCE between a networking application that has nothing to do with P2P and a P2P application is 15 lines. Thus, if you write a law that "bans something that allows peer-to-peer file sharing", you've probably just banned the standard distribution of Python since, being only 15 lines short of being a full P2P app, it pretty much allows peer to peer file sharing.
paintball
...are dedicated to spyware if its anything like kazaa.
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?
Machine language, the bytecode form of assembly language that microprocessors interpret, doesn't really have "lines" either. The point isn't that MoleSter is 6 lines as much as it is 466 bytes, and programming golf rules state that a lower score in bytes is better.
In Soviet Russia... tiny P2P apps write YOU!
#define editor
while(1) {
post slashdot_aricle(today - month)
}
Then wouldn't a web server be one peer, and the user's computer be another, and the relationship between them would be *gasp* Peer to Peer?
True, a distribution of Apache HTTP Server plus Mozilla Firefox would be a peer-to-peer system under the RFC definition. However, the essential feature of "p2p" that makes it different from Mozpache is that search on "p2p" is decentralized and thus resilient to censorship by governments, copyright owners, or other alleged holders of monopoly on a particular work. For example, if I wanted to publish a document describing how to dismantle an atomic bomb on Mozpache, the Department of Defense or Island Records could go after Google, MSN, and AllTheWeb to censor my work, but on a decentralized system, they wouldn't have such an easy target.
I could probably make a lethal weapon out of a jagged rock in 15 minutes or less and it would still be banned from commercial flights.
Disclaimer: I am a P2P supporter
Cheers,
Adolfo
The first to attack SMB networking would be Nintendo.
Essentially peer to peer creates a server on everyone's computer and allows you to search all of the other servers.
How is this any different than what google does? Its a harmless "application" that searches other computers on which there are files being served to the web. Large portions of the web are copyrighted. Universities, Companies, Enyclopedias, they're all copyrighted, and you search them with google/yahoo etc.
"Whoever intentionally induces any violation identified in subsection (a) of this section shall be liable as an infringer.
In subsection (g), "intentionally induces" means intentionally aids, abets, induces, counsels, or procures, and intent may be shown by acts from which a reasonable person would find intent to induce infringement based upon all relevant information about such acts then reasonably available to the actor, including whether the activity relies on infringement for its commercial viability."
Isn't the purpose of search engines to "intentionally aid" you in finding something, regardless of whether its copyrighted or not? Search engines, nor arguably Peer to Peer is created for the sole purpose of copyright infringement. Where is the line drawn between the two?
I'm anxious to find out how this holds up in court if it even passes both houses.
Seriously, isn't it time to look for a program that will more intelligently let you find what you're actually looking for, help you get it quickly, and then make it easy for you to share it with your friends? That's where P2P has started, but it seems like we're not making as much progress here as we could given the increased connectivity of our community and the increased performance of our computers.
Of course, considering the legal problems that P2P authors have run into, perhaps the problem is that anyone who comes up with the next best thing has been scared off of releasing? Who do we sue about that?
---
Yeah, I've been told I'm like that on my blog ;-)
come on, if you are going to invoke perl, you might as well invoke echo and pass the string directly.
is that tinyp2p is not actually a p2p app, or only if you see p2p very broadly.
just offering/transferring files is not really enough to satisfy the "p2p" demand, because then http and ftp would classify as "p2p" too. a real p2p app would make a distributed peer-to-peer network without central server possible.
If you have a rich enough library, any "program" can be itty-bitty.
Heck, if "rundll" counts, you can do a lot of stuff in a 1-line MS-Windows command file.
Assuming your hardware supports only "low-level" instructions as we know them today, the true test of program complexity is how much code is executed, not now many lines are on the printout.
Of course, if your hardware has "open a reliable network socket and send some data and receive some data then close the socket" as a single instruction:
SENDANDRECV OUTGOING_DATA, INCOMING_DATA, PORT, PROTOCOL
then er um well, "nevermind."
Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
Perhaps it should be mentioned that this 'outspoken supporter of the digital rights the Slashdot community holds so dear' is also the expert witness for Eolas, who has been awarded $565M for its web plug-in patent, which even Microsoft-loathing /.'ers have trouble stomaching.
Will someone please mod this as funny? It's both true and laughable at the same time!
Does anyone at Slashdot even read the f'n site? I'm not one to cry dupe but some are just bad. Must be smoking some heavy stuff there.. hook me up.
Thus, if you write a law that "bans something that allows peer-to-peer file sharing", you've probably just banned the standard distribution of Python ... even if it was banned the Pythonistas still wouldn't shut up about how great it is.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Does anyone want to enlighten me as to how a 15 line P2P app means that it is pointless and silly to ban them?
I have to assume he's going for the Whack-A-Mole argument.
Actually, this might be a good strategy. Setup a thousand shell companies each with their own 15-line P2P network, and let the RIAA litigate each one out of business. Death of a thousand legal bills.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Everyone seems to be saying that just because this app is small, it is unworthy of banning. Read the post. It did not say it was *unworthy* but rather that it is *pointless* and *silly*. And this makes sense-- he's saying if it's this easy to make a quick P2P app, banning it would be like trying to heal a chainsaw wound with a band-aid. Nizo said: 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. No it wouldn't be. But if you could find a simple way to produce crack that required nothing more than a few common household items and the IQ of a rabbit, it would be POINTLESS to try and make it illegal. It would be non-enforcable. THAT'S what Mr. Felton is saying.
Shouldn't the command line statements for launching or executing a program like this constitute a "line of code" for measurement purposes? It seems as much context goes into the launching of a program like this than goes into many of the lines of Python code.
Evan - needs to hit preview before submitting
Now if he had 20 000 lines of backdoor, spyware and malware it will be ready for release.
Murder-it's easy to commit, so making it illegal is silly.
every day http://en.wikipedia.org/wiki/Special:Random
This hacker is spreading "code", immoral behavior, and communism. He's a threat to America!
Maybe this is what we need: a program that looks at the topic ("windows", "handhelds", "games", etc) and shows the editor the last 15 or so stories that were posted in that topic. That could be written in 15 lines of python couldn't it?
Coder's Stone: The programming language quick ref for iPad
Has anybody actually gotten it to work?
When I run it in client mode I get:
File "tinyp2p.py", line 14, in ?
for url in pxy(ar[3]).f(pw(ar[3]),0,[]):
xmlrpclib.Fault: Fault 1: 'exceptions.TypeError:coercing to Unicode: need string or buffer, list found'
On OSX 10.3.7. Great proof of concept guys.
$/=$_;$,=shift;$w=$a=shift;$k{+shift}=1;socket S,2,1,6;bind S,for(listen S,5;$SIG{ALRM}=\m! (\S+) ([e-i])([^/]*)/!s&&($k{$w=$1}=$,eq$`)&&&$2){alarm 9;(accept(C,S),alarm 0)?read C,$_,1e6:($_="$, $a f".shift)}sub i{}sub t{socket C,2,1,6;$k{$w}&&=(connect C,&a)?print C"$, ".pop:0;close C}sub h{t"$_ i/"for keys%k}sub a{$w=~/:/;pack'CxnC4x8',2,$',split'\.',$`}sub f{$w=$_,t"$1 $3/"for keys%k}sub e{open C,'>',$3;print C $'}sub g{open(C,';&h}
retards.
valid point.
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."
Don't get me wrong, I'll be the first to defend legitimate P2P apps. Though using the uncomplicated process of building a P2P app as justification for not banning them (or as a basis for argument) is in itself silly however. Pipe bombs are easy to make and rifles can easily be modified to be automatic, should they not be illegal simply because someone can make them easily in their homes?
I remember my freshman year in college. I thought I was a hot shot computer guy and was seriously contemplating getting a CS degree. One of the first assignments was to write a program that displayed something in a pretty weird manner (I don't remember exactly). I tried and tried and tried to get it to work. I could get close, but not quite there. Then the professor showed the results of the contest--someone wrote a program that did it in 15 lines. I knew right then that there were a lot of people much more talented than I. So there went my CS thoughts.
import p2p ....:
def
???
x=p2p.get('profit!!!')
This might be pretty cool, though it was postet before and MoleSter is already down to 6 lines with 466 bytes, but is small code size really a reason why it must necessary be legal? Don't get me wrong, I don't think that code can be illegal at all. But stating that small code size implies that the resulting app and it's uses are legal sounds quite silly to me, considering SQL Slammer is only 376 bytes.
"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."
So by this logic... since a single command on a windows machine (format C: /y), which is just as bad as some virii out there, is fine and dandy and we shouldn't go after the people who wrote that virus that ate your grandmother's hard drive?
Listen, I'm as much for the free sharing of information as the next person, as long as the original author is OK with it. Also, I'd like to be sure that said author gets some cash for his work. The way P2P networks are used, primarily, is to trade MP3s and video files without the concent of the original author, or their getting some form of income from it. If you use it for something else, fine, but it's the primary use of it that bothers me.
Please, I encourage you to show me where I'm wrong in this. If you use the argument "the artists don't get any money or very little from the sale of their work" understand that that is not a valid excuse. If they feel cheated, they should have went with a better contract when they started, or been smarter during their negotiations with their label.
This is why I don't bother with offline magazines anymore, by the time you read them, they're already a month behind the internet!
It's also some bloody ugly Python code - which is quite an accomplishment seeing how beautiful Python code looks (when compared to Java/Perl).
#include <sig.h>
People like this guy are missing the point. This is not very different from a DCC file send on IRC. There is a reason the RIAA is going after suprnova and not bittorrent itself. They could care less if it's possible to connect to another system on the internet and send data two ways (who'd have thunk it?!). The term p2p has changed somewhat to imply a database and/or search functionality of shared content coupled with the ability to send that content to anyone who requests it. THAT is what the RIAA doesn't want. Unfortunately this 15 line Python program doesn't allow me to type "Radiohead" into an input box and press a search button, then have nearly instant access to hundreds of copies of radiohead songs from people accross the planet. This was never about sending files. It has always been about organized systems used almost exclusively to illegaly find and distribute copyrighted materials.
That's so short, if you cat through /dev/random for long enough you'll probably find it! Are they going to ban /dev/random next?
Yeah... you can strip the whitespace and newline characters from just about any program to make it fit in one line...
If that so-called genius application was written with any kind of decent coding standards, it would certainly be larger than just 15 lines.
programming languages are tools of the devil. Look at all these illegal purposes they can be used for! We'd better ban them now before those thieving pirates do worse. Arrr.
At least on my screen, the article is also only 15 lines long. It must be vying to be the world's shortest story about the world's smallest P2P app.
> What happens if the government decided to ban oral sex?
Funny you should mention it because until recently your government was doing just that.
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.
World's shortest hack attempt I fucking dare you to click this link!
...Because that's what making peer-to-peer completely illegal ultimately means, you know.
If the **AA (and US government) had any sense, they'd realize this is going over about as well as Prohibition (and the War on Drugs, for that matter) and give up.
"[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz
By "purchasing" a law that requires all ISP's within the country to firewall absolutely *ALL* residential customers so that they are behind a NAT with absolutely no port forwarding other than for ports where an outgoing packet was sent by the home PC, making it effectively impossible for a residential customer to host any server of any kind (they could, however, pay a higher fee to their ISP and get a corporate account with their ISP). This approach would _RADICALLY_ reduce the number of infringers, and maybe even make it viable to actually go after the "corporations" that are left still infringing.
This won't actually stop the infringement, but it would have the potential to reduce it radically, since most home users won't be interested in paying more money to their ISP just to download "free music".
File under 'M' for 'Manic ranting'
Famous episode with Penn and Teller.
"We say serious things in a silly way, and people laugh. The government says silly things in a serious way and people pay attention."
In my day, we wrote hundreeds of lines of C to precisely implement the RFC for TFTP--and we liked it!
Also, perhaps the better point here is that P2P apps aren't new, and we use them all the time, for much more than just file(shar|steal)ing. (Hey, are you net-booting that PC? You criminal, you!)
pb Reply or e-mail; don't vaguely moderate.
CassiniWebServer c:\ 80
It's a very high level language called DOS batch. (Hey, if it's okay to sweep stuff under the rug or into a library, why not?)
One line blog. I hear that they're called Twitters now.
Viruses are pretty easy to write in just a few lines too, so they should be legal as well.
Why the repost? This was cover a few weeks ago on Slashdot.
#1 urskrd
Well, here we are taking pride in who's got the bigger... err, smaller code. That's geeks for you.
i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
I think some people here are missing the point. This guy has coded this to emulate the DeCSS code that was put on t-shirts etc. It is a demonstration of the absurdity of banning a technology. Technology doesn't break the law, people use technology to break the law. When I was on IRC and running an FTP server to trade warez like it was "Garbage Pail Kids" cards from my dorm room in college no one ever thought IRC and FTP should be banned. Thats because people in power were to technologically stupid to understand how it worked/what it was/etc.
Now that it is trivially easy for anyone to share anyfile the same stupid people think "Hey that's not right people can use that to do something illegal". You can use a computer to do plenty of illegal stuff, but using the same tools you can do legal stuff too.
Writng a short implementation of P2P is just a way of demostrating that P2P is not some fancy magical thing. It is nothing new, merely the combination of existing technologies (i.e. fileservers and search engines).
All the people here saying "Just 'cause its short doesn't mean it should be legal" are missing the point.
LOL.
I am 30 and have been in and out of the warez scene for 15 years. There has always been warez in the world of computers be it: sneaker net (passing warez via some sort of media), ftp, irc, web links (direct downloads), news groups, zmodem, xmodem, whatever. Where there is a will, ther will always be a way. Until it got to be all the rage, no one really cared, (ok some dark mansion somewhere so guy thought man i could by gold toothpicks if not for those damned pirates!) The bigger picture of all this is who is losing money.... People who bootleg software, are either A) people who wouldn't, or couldn't buy the software (egads at the cost of some some software... add up photoshop, office 2003, XP pro, a couple games, cd buring software, etc... add in the price of the computer and now your talking some bucks. or B) people who want it to learn from to get jobs do better at jobs, use it at work, etc. In fact, I am sure there is a study that shows people learning the stuff requesting it or recomening it to there office who buys legit copies, or the fact that the more people whon know Product Whatever, the more companies choose to use Product Whatever... I know I have learned skill after skill from downloaded books, classes, and software. All of which got used on the job and ended up getting a lot of said software and books purchased. People who bootleg music and movies .... well p2p may have made it simple for the common man, but movies have been boot legged FOREVER ... personnally I have 450+ store bought dvd's and 5 music cd's :) cough (120gigs mp3s..) I had reall cd's once but when my case of 200 cd's got swiped and the insurance company wouldn't pay for it since i didn't have renters insurance, I downloaded my 200 albums ... this was 7 years ago... hmmmm I am pretty sure I used only ftp, or borrowed cd's to replenish them... Since then I only collect random songs from my lifetime (ack and some from my parents .. damn road trips) and occasionally i'll look up billboard hits and grab some.. but as for paying as much for a cd with 2 good songs on it as i do for a dvd, please spend some more time in the studio. and the cost for reproduction? I can make my own label case included (and what the hell wrap some Glad Wrap around it and Vola, one quarter later I have a nice bootlegged copy they want 15 bucks for. and Movies, a crappy ass movie I pay to see in a theater costs me 16 bucks (Have to bring the wife) and then if we like it i get to spring another 15 when it hits dvd ... so 31 dollars in total ... or i could grab a copy love it or hate and buy it or don't ... and with 450+ I do buy the occasional. How about if I go see it in theater I can joing a movie club and on the way out swipe my stub and my account card and soon as the dvd is out it hits my house at like 7.50 plus 1.50 for delivery or maybe each movie I go see adds some discount action twords dvd purchase by that production company ... something for crying out loud ... Oh what if I register my cd with the production company and if it's lost or stolen i can download a new copy. :) I guess I'll have to switch to digital downloads, ubtil they say you can only dload it once. :) One last thing, As for software, once we move to thin clients (hehehe full circle, can you say unix X terminals?) Then that pretty much does away with boot legging , mp3's, movies, etc ..... the people who host the apps, and storage, and stream you your stored stuff, will have the DRM action going, and won't allow you to bootleg, or install bootleg, or type the word bootleg, or fritters. and then bill can go sit on a stick.... The End.
MoleSter:TinyP2P:
It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
Its all theoretical to me at the moment.
I have a 24kb picture of the two ronnies I want to share.
How do i do it?
If it Didn't use any other library written in python it would be 15 lines of code, but since he is using XML Services, I would have to say it wasn't done in 15 lines.
If you can make a p2p app in 15 lines, how hard is it to make one with built-in encryption? This seems like a relatively easy additional layer to implement, but I honestly don't know all the various pitfalls. Could someone please enlighten me? (I realize WASTE already has this, but the development of WASTE appears to have hit a stand-still in beta implementation).
"The cost of freedom is eternal vigilance." -Thomas Jefferson
It's pronounced "Tiny PeePee" (it's a silent 2).
ôó
What is the point of bragging about lines of code for high level languages.
Ohh I can do it in 10 lines in Perl. Ohh I can do it in 5 lines in Python. But wait here is this guy who did it in 3 with Ruby!.
Sure there is some credit about making a small program but comparing them with other languages is just silly it is apples vs. oranges.
First off these are high level languages. Which take up at least a couple of megs of hard drive space. The languages sourcecode is in the thousands if not 10s of thousands lines of code if not greater. There primary design is to get work done as close to the psutocode design as possible without all the mucking about allocating memory, making search routiens. Basicly all the boring stuff in programming.
Secondly Each Language is specilized to do things differently, some things are quicker to code in one language and other are not.
Third. All this time used to make the shortest program doesn't nessarly make it faster (Quick to code often means large O(n^2) speed). As well it makes it hard to read and to fix, and change thus useless in real life.
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
For me a line must have at most 80 chars and should contain only one statment.
Now the problem becomes one of what is a statement. Python allows multiple assignments in one statement. C allows multiple expressions-with-side-effects in a statement, separated by commas.
In my days, when programming exercises were in OS360 assembler, on 80-character punchcards, with one assembly instruction per punchcard, the macho guys tried to minimize the number of punchcards. Of course this lead to impossible to understand code (if assmbler isnt hard enough). And the dangerous practice of "self-modifying code", i.e. the program may write new assembler instructions in existing location of execution memory. The latter is usually prohibited by modern OS loaders that sequester executables into read-only pages.
The "WOZ" was a legendary hacker in this regard. You should see how tight some of the monitor code is in the original Apple I & II. In those days a byte of ROM memory cost a couple cents, so every instruction counted.
You'll see that:
perl ~ 500 chars WITHOUT outside libraries (using only sockets)
python ~ 1500 chars USING outside libraries (XMLRPC)
and then you can think about the expressivity (is this a word?) of each language.
It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
1000's of lines of c code that make up the python interpereter.
Let's be more realistic here. All non-os, non network stack software required for the app to run should be counted.
http://www.google.com/search?q=netcat+win32
C:\> nc -l -p 1234 < File-to-serve
$ nc servermachine.local 1234 > my-copy-of-file
Ban netcat!? That's like banning notepad.
-- RDB
...and how many transistors to implement each assembly instruction? It's HUGE! HUGE I tell you!
and you didn't even flame my snark. You are a gentleman.
Yes. It means (1) Python has some great high level stuff built in for networking software, which my pythonophilic freinds have told me for (holy shit!) a decade. And (2) banning P2P will not happen unless python is banned, nor even if python is banned.
banning P2P would be to ban servers... for that's all it is, servers which are peers rather than the old ugly named "master-slave" setup.
Web Hosts that are not traditionally thought of as Peers are, in fact, with modern smart workstations rather than terminals, just Fat Peers. Though I would prefer to call them Phat Peers.
-pyrrho
That's because I open them in vim and type:
10000J:x!