im.py: a python communications tool

J

Jake D

Hey Usenetites!
I have a horrible Python program to allow two people to chat with each
other. It has horribly any functionality, but it is meant for the
public to work on, not necessarily me. Anyways, here's a quick FAQ.

What does this do that IRC can't? What does this do that AIM can't?
--It allows direct communication between two computers, whereas IRC
doesn't. And AIM and similar services require a username, etc. This
is made specifically for two users on a network to chat.
What version of Python is this written in?
--Python 2.7.3.
What is the licence?
--It's released under a special FOSS licence. Here it is:
----You can do whatever you want with this program.

Alright, now, here's the code:

#!/usr/bin/python
#An instant messaging program implemented in Python.
#Created on Sunday, December 30, 2012 (long before it's Usenet
publication)

import socket
import sys
import threading

def server_listen():
while True:
r = c.recv(8192)

if r == "\quit":
c.close()
s.close()
sys.exit(0)

print con_addr[0], ": " + r

def client_listen():
while True:
r = s.recv(8192)

if r == "\quit":
s.close()
sys.exit(0)

print sys.argv[1], ": " + r

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

if sys.argv[1] == "-l":
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(('', 5067))
s.listen(5)
c, con_addr = s.accept()

while True:
r = c.recv(8192)

if r == "\quit":
c.close()
s.close()
sys.exit(0)

print con_addr[0], ": " + r
i = raw_input("You: ")

if i == "\quit":
c.send("\quit")
c.close()
s.close()
sys.exit(0)

c.send(i)

else:
s.connect((socket.gethostbyname(sys.argv[1]), 5067))
print "Chat initiated with " + sys.argv[1] + "!"

while True:
i = raw_input("You: ")

if i == "\quit":
s.send("\quit")
s.close()
sys.exit(0)

s.send(i)
r = s.recv(8192)

if r == "\quit":
s.close()
sys.exit(0)

print sys.argv[1] + ": " + r

I encourage people to modify this code, because really, it sucks.
Enjoy!
 
R

Roy Smith

Jake D said:
What is the licence?
--It's released under a special FOSS licence. Here it is:
----You can do whatever you want with this program.

I know this is off-topic, but I encourage people to NOT invent their own
licenses. Take your pick of any of the well-known (Berkeley, MIT, GPL,
etc) licenses, and use that.

I used to work for a very large corporation. The legal department was
(quite reasonably) concerned about use of FOSS, and all open source
software we used needed to pass legal review.

They were looking for two things. First, that the license didn't
obligate the company to anything it didn't want to be obligated to (i.e.
they wouldn't allow GPL3). Second, that YOU understood the terms of the
license and had a plan in place to comply with all the requirements.

The lawyers knew all the major licenses. If you showed up with
something that was known (and acceptable) to them, the process was quick
and (relatively) painless. If you showed up with some license they had
no experience with, they would go off into a huddle and not come out
until they were sure they understood it.

The usual result was that anything that came with a one-off license was
probably more trouble to get approved than it was worth.
 
J

Jake D

Thanks for sharing some of your work with the community. However...

Speaking to the sharing aspect: Why would you post a block of code in an
email? If you're looking for people to contribute, it would likely be a
much better idea to post it on github (which was built for collaborative
work).

As for the code itself, if you /know/ it sucks and are advertising it as
such, you're not really enticing people to work on it. In its current
state, it looks like a non-extensible prototype, just poking around to see
how you can achieve a p2p connectivity, without doing /any/ research
(supporting modules, etc) or design before just starting to throw something
together.

I'd venture to say that the chances of actually getting anyone to
contribute to this in its current state (especially purely over a mailing
list) would be slim to none. People generally tend to want to see that
there's actually effort and thought put into something before they put
/their/ own time into it.

Jeez, harsh. I __am__ putting this on github, and I __am__ coming
back to this program and working on it now.
 
J

jhunter.dunefsky

I like the Python Powered Logo license by Just van Rossum (Guido's

brother, in case someone doesn't know..)



http://mail.python.org/pipermail/python-list/1999-December/013413.html



--

-----------------------------------------------------------

| Radovan Garab?k http://kassiopeia.juls.savba.sk/~garabik/ |

| __..--^^^--..__ garabik @ kassiopeia.juls.savba.sk |

-----------------------------------------------------------

Antivirus alert: file .signature infected by signature virus.

Hi! I'm a signature virus! Copy me into your signature file to help me spread!

Actually, my current licence can be found here: https://github.com/jhunter-d/im.py/blob/master/LICENCE. Whaddaya think about this, Useneters?
 
S

Steven D'Aprano

Actually, my current licence can be found here:
https://github.com/jhunter-d/im.py/blob/master/LICENCE. Whaddaya think
about this, Useneters?


I think you're looking for a world of pain, when somebody uses your
software, it breaks something, and they sue you. Your licence currently
means that you are responsible for the performance of your software.

Why don't you use a recognised, tested, legally-correct licence, like the
MIT licence, instead of trying to be clever and/or lazy with a one-liner?

E.g. http://opensource.org/licenses/MIT


Software licencing is a solved problem. Do you really think that people
write three or four paragraph licences because they *like* legal
boilerplate? Did you imagine that you were the first person to think, "I
know! I'll write a one-liner telling people they can do whatever they
want with my software! Nothing can possibly go wrong!"?

Use a known, tested, working solution, and save yourself the pain.
 
C

Chris Angelico

I think you're looking for a world of pain, when somebody uses your
software, it breaks something, and they sue you. Your licence currently
means that you are responsible for the performance of your software.

Why don't you use a recognised, tested, legally-correct licence, like the
MIT licence, instead of trying to be clever and/or lazy with a one-liner?

E.g. http://opensource.org/licenses/MIT

Plus there's the whole brevity thing. If I see something that says
"MIT license", I don't need to read the details. Compare the README
for one of my projects:

https://github.com/Rosuav/Gypsum/blob/master/README

(Actually, I need to update that; there are a few solved problems
listed there as still open.) You read "Licensed under the BSD Open
Source license" and then you can stop reading - you know what your
rights are. The lawyers at Roy Smith's company would have no trouble
comprehending this, and no trouble deciding whether or not it's
allowed - they either do or do not (there is no try).

License proliferation is actually a major problem. If I were to lift
code from your program and incorporate it into something GPL3, am I
violating either's terms? What if I want to put that code into
something BSD 2-clause? Am I allowed? At least if you use a well-known
license, I can do a quick web search, coming up with something like
[1], but a custom or unusual license would require careful analysis of
terms.

[1] http://www.dwheeler.com/essays/floss-license-slide.html

ChrisA
 
J

Jake D

I think you're looking for a world of pain, when somebody uses your
software, it breaks something, and they sue you. Your licence currently
means that you are responsible for the performance of your software.

Why don't you use a recognised, tested, legally-correct licence, like the
MIT licence, instead of trying to be clever and/or lazy with a one-liner?

E.g.http://opensource.org/licenses/MIT

Software licencing is a solved problem. Do you really think that people
write three or four paragraph licences because they *like* legal
boilerplate? Did you imagine that you were the first person to think, "I
know! I'll write a one-liner telling people they can do whatever they
want with my software! Nothing can possibly go wrong!"?

Use a known, tested, working solution, and save yourself the pain.

MIT is actually the best one I've seen so far. I'm updating LICENCE.
 
M

Mark Janssen

I think you're looking for a world of pain, when somebody uses your
software, it breaks something, and they sue you. Your licence currently
means that you are responsible for the performance of your software.

Steven, they can't sue you for something they didn't pay for, because
they never entered into an agreement, not did you.

Mark Janssen
Tacoma, Washington.
 
D

Dave Angel

Steven, they can't sue you for something they didn't pay for, because
they never entered into an agreement, not did you.

That's a common misconception. No prior agreement is necessary to
institute a lawsuit, at least in the United States. I'm not a lawyer,
but I've been advised that the best you can hope for is to minimize the
likelihood that a lawsuit will be successful, not to somehow guarantee
that a lawsuit cannot be filed and prosecuted.

Besides, an open-ended license might be acted on anywhere in the world,
and who knows what some other jurisdictions might permit/require.
 
M

Mark Janssen

That's a common misconception. No prior agreement is necessary to institute
a lawsuit, at least in the United States. I'm not a lawyer, but I've been
advised that the best you can hope for is to minimize the likelihood that a
lawsuit will be successful, not to somehow guarantee that a lawsuit cannot
be filed and prosecuted.

Clearly anyone can file a lawsuit, I could file one against you for
offending me, for example. The issue I was poorly raising is whether
such a case would have merit. In the case of free (libre) open source
software, such a case would have no merit, because such software never
promises anyone *anything*. But someone would have to make the case
and "train" the court. The court simply has not become appraised of
what free, libre, open source software is. Really, one shouldn't be
so afraid of such things and intimidated of our own system of law --
this is why the republic has degraded to lawyers, not representatives
of the People. If a hospital takes your open source code and someone
dies, the hospital must be held responsible, because the open source
developer is not posing as an expert of anything, nor has she made it
for some explicit purpose for you like in a commercial agreement.

Mark
 
D

Dave Angel

Clearly anyone can file a lawsuit, I could file one against you for
offending me, for example. The issue I was poorly raising is whether
such a case would have merit. In the case of free (libre) open source
software, such a case would have no merit, because such software never
promises anyone *anything*.

I'm not a lawyer, and I suspect you're not either. If a burglar climbs
up my trellis to try to attain a second floor window, and comes crashing
to the ground, he may very well successfully sue me for not having a
warning sign. Especially if "I" am a company. And especially if I have
an "attractive nuisance" around. There are lots of implied agreements
that have been successfully used by the opposing lawyers.

But someone would have to make the case
and "train" the court. The court simply has not become appraised of
what free, libre, open source software is.

Now you're assuming that there is such a definition, and that the court
could be convinced to follow your interpretation. I claim that no
amateur should try to word his own agreement. Either get an expert to
help, or refer to an agreement that was prepared by such experts. Don't
make the assumption that because something is free, it's somehow immune
from liability.

I expect it's safer to have no agreement at all, than to have one that
gives away privileges without explicitly declaring or disclaiming any
responsibilities.
Really, one shouldn't be
so afraid of such things and intimidated of our own system of law --
this is why the republic has degraded to lawyers, not representatives
of the People. If a hospital takes your open source code and someone
dies, the hospital must be

No, *should* *be*
 
M

Mark Janssen

I'm not a lawyer, and I suspect you're not either. If a burglar climbs up
my trellis to try to attain a second floor window, and comes crashing to the
ground, he may very well successfully sue me for not having a warning sign.

No, I understand these cases are common lore, but it's this bullshit
which is ruining everything that was balanced by the Constitution. By
propagating such ideas, it continues the idea that we're all victims
to our own system of law, but we are the tacit *creators* of it by our
own negligence, and frankly, pessimism.

This is a system of, by and for the People -- those are the words of
the Constitution of the United States which is the highest law of the
land. People need to fight this "enabler" creep, that allows it to
continually be co-opted by fear-story, like the one that was being
propagated earlier. We're not victims here. The story of a burglar
suing a homeowner is either urban myth and a hoax, or a gross default
somewhere in the judicial system. It should not be considered case
history or "de facto" law and left at that.
No, *should* *be*

(re: must vs. should) Legally, you are right, but I was speaking from
the point of view of a judge, rather than a lawyer. Like the sheriff
says: "I make the law around here!" lol.

Mark
 
D

Dave Angel

No, I understand these cases are common lore, but it's this bullshit
which is ruining everything that was balanced by the Constitution. By
propagating such ideas, it continues the idea that we're all victims
to our own system of law, but we are the tacit *creators* of it by our
own negligence, and frankly, pessimism.

I like to be pessimistic when signing the documents that might ruin my
own future. In my last job, I told the company lawyers I would not
accept the NDA as they supplied it, and they claimed I was the first one
to successfully force a new version. As HR put it, most people don't
even read it, they figure it's a requirement to work.
This is a system of, by and for the People -- those are the words of
the Constitution of the United States which is the highest law of the
land. People need to fight this "enabler" creep, that allows it to
continually be co-opted by fear-story, like the one that was being
propagated earlier. We're not victims here. The story of a burglar
suing a homeowner is either urban myth and a hoax, or a gross default
somewhere in the judicial system. It should not be considered case
history or "de facto" law and left at that.


(re: must vs. should) Legally, you are right, but I was speaking from
the point of view of a judge, rather than a lawyer. Like the sheriff
says: "I make the law around here!" lol.

I can't really argue your points, and once a challenge is made, I'm
thoroughly in agreement. But it's much easier to keep things clear from
the beginning, and I've been assuming our job here was to advise the OP
on whether his plan for a license agreement is good. Years ago I
managed to get our company lawyers to approve the use of "free" software
for internal use, but getting the custom license agreement past them was
like pulling teeth.
 
S

Steven D'Aprano

No, I understand these cases are common lore, but it's this bullshit
which is ruining everything that was balanced by the Constitution.

Which Constitution is that? The Russian Constitution? Italian? Japanese?
Brazilian? New Zealand? Serbian? South African?

By
propagating such ideas, it continues the idea that we're all victims to
our own system of law, but we are the tacit *creators* of it by our own
negligence, and frankly, pessimism.

This is a system of, by and for the People -- those are the words of the
Constitution of the United States which is the highest law of the land.

Speak for yourself. Not everyone here is a Yankie.

People need to fight this "enabler" creep, that allows it to continually
be co-opted by fear-story, like the one that was being propagated
earlier. We're not victims here. The story of a burglar suing a
homeowner is either urban myth and a hoax,

Maybe, maybe not, but it's irrelevant. We're not talking about somebody
breaking into your home to steal your DVD, and on the way in, being
injured by your software. We're talking about somebody using your
software, *with your explicit permission*, and then having it cause them
harm by being unfit for the purpose advertised.

If you don't disclaim warranty, and even sometimes if you do, there is an
implicit warranty that your goods will be fit for their purpose in many
jurisdictions. In some places that may only apply if money changes hands;
in other places it will apply regardless.
 
M

Mark Janssen

If that is the case, it's because the software license explicitly says
so - which is the reason for all those uppercase words in those
licenses. Which brings us right back to where we started.

It doesn't have to say so, if it's not charging any money -- there's
no expectation that you're getting anything at all! Where does
everyone come up with these bullshit ideas? And them let them stand
as de facto law?

Mark
 
C

Chris Angelico

It doesn't have to say so, if it's not charging any money -- there's
no expectation that you're getting anything at all! Where does
everyone come up with these bullshit ideas? And them let them stand
as de facto law?

Where do YOU come up with the idea that you can't be sued if money
didn't change hands? In what jurisdiction is that true? Unless it's
true in every jurisdiction that the internet touches, I wouldn't trust
it to protect me.

ChrisA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top