Re: Abandoning Python

2011-05-22 Thread Ed Keith
Have you looked at Falcon (http://www.falconpl.org/)? It seems to have a lot of 
what you are looking for. I do not have much experience with it but I like what 
I've seen so far, except that there are not any third party tools or libraries 
libraries. Which is where Python shines.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Kind of OT - Books on software development?

2011-05-25 Thread Ed Keith
I do not have my library with me, but I remember a book that fits the bill 
exactly, is was from Microsoft Press, I think it was called "Writing Solid Code"

Hope this helps,

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


--- On Wed, 5/25/11, Matty Sarro  wrote:

> From: Matty Sarro 
> Subject: Kind of OT - Books on software development?
> To: "Python list" 
> Date: Wednesday, May 25, 2011, 11:40 AM
> Hey everyone,
> I am looking at some projects coming up, which may or may
> not involve
> python. So I figured I would throw the question out there
> and see what
> everyone thinks.
> I am looking for some books on software
> engineering/development...
> something that discusses techniques from ideation, up
> through testing,
> QA, production, and then maintenance. Is there such a
> book?
> -Matthew
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Kind of OT - Books on software development?

2011-05-25 Thread Ed Keith
--- On Wed, 5/25/11, Ed Keith  wrote:

> I do not have my library with me, but
> I remember a book that fits the bill exactly, is was from
> Microsoft Press, I think it was called "Writing Solid Code"

I have done some research at amazon.com, and while "Writing Solid Code" is an 
excellent book that I would also recommend highly, the book I was thinking of 
was "Code Complete".

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


-- 
http://mail.python.org/mailman/listinfo/python-list


a list/re problem

2009-12-11 Thread Ed Keith
I have a problem and I am trying to find a solution to it that is both 
efficient and elegant.

I have a list call it 'l':

l = ['asc', '*nbh*', 'jlsdjfdk', 'ikjh', '*jkjsdfjasd*', 'rewr']

Notice that some of the items in the list start and end with an '*'. I wish to 
construct a new list, call it 'n' which is all the members of l that start and 
end with '*', with the '*'s removed.

So in the case above n would be ['nbh', 'jkjsdfjasd']

the following works:

r = re.compile('\*(.+)\*')

def f(s):
m = r.match(s)
if m:
return m.group(1)
else:
return ''

n =  [f(x) for x in l if r.match(x)]



But it is inefficient, because it is matching the regex twice for each item, 
and it is a bit ugly.

I could use:


n = []
for x in keys:
m = r.match(x)
    if m:
n.append(m.group(1))


It is more efficient, but much uglier.

Does anyone have a better solution?

Thank,

-EdK


Ed Keith
[email protected]

Blog: edkeith.blogspot.com


  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: a list/re problem

2009-12-11 Thread Ed Keith
--- On Fri, 12/11/09, Peter Otten <[email protected]> wrote:

> From: Peter Otten <[email protected]>
> Subject: Re: a list/re problem
> To: [email protected]
> Date: Friday, December 11, 2009, 4:24 PM
> Ed Keith wrote:
> 
> > I have a problem and I am trying to find a solution to
> it that is both
> > efficient and elegant.
> > 
> > I have a list call it 'l':
> > 
> > l = ['asc', '*nbh*', 'jlsdjfdk', 'ikjh',
> '*jkjsdfjasd*', 'rewr']
> > 
> > Notice that some of the items in the list start and
> end with an '*'. I
> > wish to construct a new list, call it 'n' which is all
> the members of l
> > that start and end with '*', with the '*'s removed.
> > 
> > So in the case above n would be ['nbh', 'jkjsdfjasd']
> > 
> > the following works:
> > 
> > r = re.compile('\*(.+)\*')
> > 
> > def f(s):
> >     m = r.match(s)
> >     if m:
> >         return
> m.group(1)
> >     else:
> >         return ''
> > 
> > n =  [f(x) for x in l if r.match(x)]
> > 
> > 
> > 
> > But it is inefficient, because it is matching the
> regex twice for each
> > item, and it is a bit ugly.
> > 
> > I could use:
> > 
> > 
> > n = []
> > for x in keys:
> >     m = r.match(x)
> >         if m:
> >         
>    n.append(m.group(1))
> > 
> > 
> > It is more efficient, but much uglier.
> 
> It's efficient and easy to understand; maybe you have to
> readjust your 
> taste.
> 
> > Does anyone have a better solution?
> 
> In this case an approach based on string slicing is
> probably best. When the 
> regular expression gets more complex you can use a nested a
> generator 
> expression:
> 
> >>> items = ['asc', '*nbh*', 'jlsdjfdk', 'ikjh',
> '*jkjsdfjasd*', 'rewr']
> >>> match = re.compile(r"\*(.+)\*").match
> >>> [m.group(1) for m in (match(s) for s in items)
> if m is not None]
> ['nbh', 'jkjsdfjasd']
> 

I am going to use string slicing, re is the wrong tool for the job. But this is 
what I was looking for when I posted. Simple, elegant and efficient.

Thanks all,

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Raw string substitution problem

2009-12-16 Thread Ed Keith
I am having a problem when substituting a raw string. When I do the following:

re.sub('abc', r'a\nb\nc', '123abcdefg')

I get

"""
123a
b
cdefg
"""

what I want is 

r'123a\nb\ncdefg'

How do I get what I want?

Thanks,

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Raw string substitution problem

2009-12-16 Thread Ed Keith
--- On Wed, 12/16/09, Gabriel Genellina  wrote:

> From: Gabriel Genellina 
> Subject: Re: Raw string substitution problem
> To: [email protected]
> Date: Wednesday, December 16, 2009, 9:35 AM
> En Wed, 16 Dec 2009 11:09:32 -0300,
> Ed Keith 
> escribió:
> 
> > I am having a problem when substituting a raw string.
> When I do the following:
> > 
> > re.sub('abc', r'a\nb\nc', '123abcdefg')
> > 
> > I get
> > 
> > """
> > 123a
> > b
> > cdefg
> > """
> > 
> > what I want is
> > 
> > r'123a\nb\ncdefg'
> 
> From http://docs.python.org/library/re.html#re.sub
> 
>     re.sub(pattern, repl, string[, count])
> 
>     ...repl can be a string or a function;
> if
>     it is a string, any backslash escapes
> in
>     it are processed. That is, \n is
> converted
>     to a single newline character, \r is
>     converted to a linefeed, and so forth.
> 
> So you'll have to double your backslashes:
> 
> py> re.sub('abc', r'a\\nb\\nc', '123abcdefg')
> '123a\\nb\\ncdefg'
> 
> --Gabriel Genellina
> 
> --http://mail.python.org/mailman/listinfo/python-list
> 

That is going to be a nontrivial exercise. I have control over the pattern, but 
the texts to be substituted and substituted into will be read from user 
supplied files. I need to reproduce the exact text the is read from the file. 

Maybe what I should do is use re to break the string into two pieces, the part 
before the pattern to be replaces and the part after it, then splice the 
replacement text in between them. Seems like doing it the hard way, but it 
should work. 

Thanks,

   -EdK



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Raw string substitution problem

2009-12-16 Thread Ed Keith
--- On Wed, 12/16/09, Peter Otten <[email protected]> wrote:

> Another possibility:
> 
> >>> print re.sub('abc', lambda m: r'a\nb\n.c\a',
> '123abcdefg')
> 123a\nb\n.c\adefg

I'm not sure whether that is clever, ugly, or just plain strange! 

I think I'll stick with:

>>> m = re.match('^(.*)abc(.*)$', '123abcdefg')
>>> print m.group(1) + r'a\nb\n.c\a' + m.group(2)
123a\nb\n.c\adefg

It's much less likely to fry the poor maintenance programmer's mind.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python and Ruby

2010-01-30 Thread Ed Keith
--- On Sat, 1/30/10, Nobody  wrote:

> From: Nobody 
> > Python is much, much cleaner. I don't know how anyone
> can honestly say
> > Ruby is cleaner than Python.
> 
> I'm not familiar with Ruby, but most languages are cleaner
> than Python
> once you get beyond the "10-minute introduction" stage.

You need to be clear about what you mean by "clean". Is Python scoping "clean"? 
I suspect lots of people would argue either side.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python and Ruby

2010-01-31 Thread Ed Keith
--- On Sun, 1/31/10, Steven D'Aprano  
wrote:

> From: Steven D'Aprano 
> Subject: Re: Python and Ruby
> To: [email protected]
> Date: Sunday, January 31, 2010, 6:35 AM
> On Sun, 31 Jan 2010 03:01:51 -0800,
> rantingrick wrote:
> 
> > On Jan 30, 10:43 am, Nobody 
> wrote:
> > 
> >> That's also true for most functional languages,
> e.g. Haskell and ML, as
> >> well as e.g. Tcl and most shells. Why require
> "f(x)" or "(f x)" if "f
> >> x" will suffice?
> > 
> > yuck! wrapping the arg list with parenthesis (python
> way) makes the most
> > sense. Its to easy to misread somthing like this
> > 
> > onetwothree four five six
> > 
> > onetwothree(four, five, six) #ahhh... plain english.
> 
> I think the readability factor is mostly down to what
> you're familiar 
> with. But consistency is also important: in Python, you
> always refer to 
> an object the same way. Given an object called x, you
> ALWAYS refer to the 
> object itself as x. In languages that don't use
> parentheses, x refers to 
> the object, unless the object is a function, in which case
> x refers to 
> the result of calling the object with no arguments.
> 
> Other languages need special syntax to get access to the
> function object 
> itself. Because it's hard to do, people don't do it often.
> But in Python, 
> getting the function object is easy, and so treating
> functions as first-
> class objects is easy.
> 

In most functional languages you just name a function to access it and you do 
it ALL the time.

for example, in if you have a function 'f' which takes two parameters to call 
the function and get the result you use:

 f 2 3

If you want the function itself you use:

   f

The reason no parentheses are used is to support Currying 
(http://en.wikipedia.org/wiki/Currying). To get a new function which is 
equivalent to f with the first parameter set to a constant 2 you use:

   f 2

this give you a function which take only one parameter. Using parenthesis make 
currying more complicated, so most functional languages do not use them. It did 
take me a LONG time to get used to this, but it is only syntax, I do not let 
syntax bother me. Semantics on the other hand, are a big deal. 

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


> 


  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python and Ruby

2010-01-31 Thread Ed Keith
--- On Sun, 1/31/10, Steven D'Aprano  
wrote:

> From: Steven D'Aprano 
> Subject: Re: Python and Ruby
> To: [email protected]
> Date: Sunday, January 31, 2010, 5:36 PM
> On Sun, 31 Jan 2010 04:28:41 -0800,
> Ed Keith wrote:
> 
> > In most functional languages you just name a function
> to access it and
> > you do it ALL the time.
> > 
> > for example, in if you have a function 'f' which takes
> two parameters to
> > call the function and get the result you use:
> > 
> >  f 2 3
> > 
> > If you want the function itself you use:
> > 
> >    f
> 
> How do you call a function of no arguments?
> 
> 

In a 'pure' functional language a function with no arguments is, by definition, 
a constant. This is because a 'pure' function will always return the same 
result whenever given the same arguments. so if it has no argument it always 
returns a constant value.

  -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python and Ruby

2010-01-31 Thread Ed Keith
--- On Sun, 1/31/10, Steven D'Aprano  
wrote:

> From: Steven D'Aprano 
> Subject: Re: Python and Ruby
> To: [email protected]
> Date: Sunday, January 31, 2010, 8:22 PM
> On Sun, 31 Jan 2010 16:50:50 -0800,
> Chris Rebert wrote:
> 
> >>>> How do you call a function of no
> arguments?
> >>>
> >>> It's not really a function in that case, it's
> just a named constant.
> >>> (Recall that functions don't/can't have
> side-effects.)
> >>
> >>
> >>>>> time.time(), random.random()
> >> (1264983502.7505889, 0.29974255140479633)
> >>>>> time.time(), random.random()
> >> (1264983505.9283719, 0.74207867411026329)
> >>
> >>
> >> They don't look terribly constant to me.
> > 
> > Those aren't functions in the pure functional
> programming sense; which
> > is unsurprising since Python isn't a [pure] functional
> language. They
> > both involve side-effects. time() does I/O to the
> clock chip to see what
> > time it is, and random() uses and changes a global
> seed value variable
> > (which, in a double-whammy, takes its initial value
> from time()).
> 
> Yes, but these tasks -- get the time, get a (pseudo) random
> number -- are 
> not unique to Python. Surely even Lisp and Haskell code
> will sometimes 
> need to know the time. Whether they are "pure functions"
> (functions in 
> the mathematical sense) or impure, they're still functions
> in some sense. 
> How do you deal with such impure functions?
> 
> 
> 

You pass it a monad 
(http://en.wikipedia.org/wiki/Monad_(functional_programming)).

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Writing an assembler in Python

2010-02-22 Thread Ed Keith
> Subject: Re: Writing an assembler in Python
> Giorgos 
> Tzampanakis wrote:
> 
> > I'm implementing a CPU that will run on an FPGA. I
> want to have a
> > (dead) simple assembler that will generate the machine
> code for
> > me.
> 
> Let me suggest an alternative approach: use Python itself
> as the assembler. 
> Call routines in your library to output the code. That way
> you have a 
> language more powerful than any assembler.
> 
> See <http://github.com/ldo/crosscode8> for
> an example.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Not a bad idea, has anyone tried this for x86 machine code?

   -EdK 

Ed Keith
[email protected]

Blog: edkeith.blogspot.com






  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Docstrings considered too complicated

2010-03-03 Thread Ed Keith
--- On Wed, 3/3/10, D'Arcy J.M. Cain  wrote:

> They needed a way to tell where the end of the information
> was.  Why
> they used ^Z (SUB - Substitute) instead of ^C (ETX - End of
> TeXt) or
> even ^D (EOT - End Of Transmission) is anyone's guess.

That has always puzzled me to. ETX and EOT were well established, why no use 
one of them? I'd love to know what they were thinking.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


 


  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Docstrings considered too complicated

2010-03-03 Thread Ed Keith
--- On Wed, 3/3/10, David Robinow  wrote:

> From: David Robinow 
> Subject: Re: Docstrings considered too complicated
> To: [email protected]
> Date: Wednesday, March 3, 2010, 2:54 PM
> On Wed, Mar 3, 2010 at 1:01 PM, Ed
> Keith 
> wrote:
> > --- On Wed, 3/3/10, D'Arcy J.M. Cain  wrote:
> >
> >> They needed a way to tell where the end of the
> information
> >> was.  Why
> >> they used ^Z (SUB - Substitute) instead of ^C (ETX
> - End of
> >> TeXt) or
> >> even ^D (EOT - End Of Transmission) is anyone's
> guess.
> >
> > That has always puzzled me to. ETX and EOT were well
> established, why no use one of them? I'd love to know what
> they were thinking.
> 
> There were numerous incompatible and primitive transfer
> protocols in
> those days. They probably wanted to pick something that was
> NOT well
> established so it would pass through without, for example,
> causing End
> Of Transmission.

That makes a lot of sense.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Modifying an existing excel spreadsheet

2010-12-20 Thread Ed Keith
I have a user supplied 'template' Excel spreadsheet. I need to create a new 
excel spreadsheet based on the supplied template, with data filled in. 

I found the tools here http://www.python-excel.org/,  and 
http://sourceforge.net/projects/pyexcelerator/. I have been trying to use the 
former, since the latter seems to be devoid of documentation (not even any 
docstrings).


My first thought was to copy the template, open the copy, modify it and save 
the modifications. But it looks like if I open an existing spreadsheet it must 
be read only. So I tried to  open the template, copy it to a new spreadsheet 
and write the new spreadsheet, but I can't seem to copy the images, and it 
looks like copying the formatting is going to be difficult.

Can anyone give me any tips or advice?

Thanks in advance,

   -EdK

Ed Keith

[email protected]



Blog: edkeith.blogspot.com


  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Recommend Commercial graphing library

2010-04-06 Thread Ed Keith
--- On Tue, 4/6/10, AlienBaby  wrote:

> From: AlienBaby 
> Subject: Re: Recommend Commercial graphing library
> To: [email protected]
> Date: Tuesday, April 6, 2010, 12:05 PM
> On Apr 6, 4:24 pm, Jean-Michel
> Pichavant 
> wrote:
> > Pablo Recio Quijano wrote:
> > > Why must be commercial, when there is open and
> free alternatives? Like
> > > GNU Plot.
> >
> > Gnuplot is ugly. I'm using it because I don't care if
> it's ugly but it
> > clearly lacks of look & feel for presentations, as
> requested by the OP.
> >
> > You havehttp://matplotlib.sourceforge.net/
> >
> > which is free and looks better than gnuplot. I'm not
> sure it's well
> > suited for presentation though.
> >
> > JM
> 
> Hi,
> 
> The requirement for a commercial license comes down to
> being
> restricted to not using any open source code. If it's an
> open source
> license it can't be used in our context.
> 
> Until now I have actually been using matplotlib, but now
> that has to
> change.
> -- 
> http://mail.python.org/mailman/listinfo/python-list

>From The Matplotlib documentation: "Matplotlib only uses BSD compatible code, 
>and its license is based on the PSF license."

BSD and PSF both allow commercial use. There is no "copyleft" restriction.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Teaching Programming

2010-05-04 Thread Ed Keith
--- On Tue, 5/4/10, Stefan Behnel  wrote:

> From: Stefan Behnel 
> Subject: Re: Teaching Programming
> To: [email protected]
> Date: Tuesday, May 4, 2010, 7:43 AM
> superpollo, 04.05.2010 13:23:
> > Stefan Behnel ha scritto:
> >> the main reason why this problem doesn't hurt much
> in Python
> >> is that Python is a dynamic language that can get
> you extremely far
> >> without generating code. It's simply not necessary
> in most cases, so
> >> people don't run into problems with it.
> >
> > Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45)
> > [GCC 4.3.3] on linux2
> > Type "help", "copyright", "credits" or "license" for
> more information.
> >  >>> A,B=2,3
> >  >>> if A>B:
> > ... print A+B
> > ... else:
> > ... print A**B-B**2
> > ...
> > -1
> >  >>> A,B=3,2
> >  >>> if A>B:
> > ... print A+B
> > ... else:
> > ... print A**B-B**2
> > ...
> > 5
> >
> > tell me please: how can generate the same output
> (depending on A and B)
> > without control structure? i mean in a natural
> "pythonic" way...
> 
> The question is: why do you have to generate the above code
> in the first 
> place? Isn't a function enough that does the above?
> 
> Stefan
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Just thought I'd add my $0.02 here.

I wrote AsciiLitProg (http://asciilitprog.berlios.de/) in Python. It is a 
literate programming tool. It generates code from a document. It can generate 
code in any language the author wants. It would have been a LOT easier to write 
if it did not generate Python code.

Python is a great language to write in (although I do wish it did a better job 
with closures). But it is a PITA to generate code for!

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Teaching Programming

2010-05-04 Thread Ed Keith
--- On Tue, 5/4/10, Stefan Behnel  wrote:

> From: Stefan Behnel 
> Subject: Re: Teaching Programming
> To: [email protected]
> Date: Tuesday, May 4, 2010, 8:40 AM
> Ed Keith, 04.05.2010 14:15:
> > I wrote AsciiLitProg (http://asciilitprog.berlios.de/) in Python. It is
> > a literate programming tool. It generates code from a
> document. It can
> > generate code in any language the author wants. It
> would have been a LOT
> > easier to write if it did not generate Python code.
> > 
> > Python is a great language to write in (although I do
> wish it did a
> > better job with closures). But it is a PITA to
> generate code for!
> 
> Interesting. Could you elaborate a bit? Could you give a
> short example of what kind of document text you translate
> into what kind of Python code, and what the problems were
> that you faced in doing so?
> 
> Stefan
> 
> -- http://mail.python.org/mailman/listinfo/python-list
> 

The program is written using itself. If you click on the link above you will 
see an HTML file that fully describes the program. That HTML is generated from 
an AcsiiDoc (http://www.methods.co.nz/asciidoc/) document. The same document is 
used to generate the python code that it describes.
The source document, and the generated HTML and Python code are all avalable at 
BerliOS (http://developer.berlios.de/projects/asciilitprog/).

For more information on Literate Programming in general see the following links.

http://www.literateprogramming.com/
http://en.wikipedia.org/wiki/Literate_programming
http://en.literateprograms.org/LiteratePrograms:Welcome


   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Teaching Programming

2010-05-04 Thread Ed Keith
--- On Tue, 5/4/10, alex23  wrote:

> From: alex23 
> Subject: Re: Teaching Programming
> To: [email protected]
> Date: Tuesday, May 4, 2010, 10:06 AM
> Ed Keith 
> wrote:
> > For more information on Literate Programming in
> general see the following links.
> 
> None of which address the question of what you found
> problematic about
> generating Python code. Was it issues with indentation?
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Yes, the problem was indentation.

To deal with indentation I had to 

   1) keep track of indentation of all chunks of code embedded in the 
  document and indent inserted chunks to the sum of all the 
  indentation of the enclosing chunks.

and

   2) expand all tabls to spaces and allow the user to set the tab 
  expansion size from the command line. Fortunately Python provides 
  good support for this.

Neither of these problems exist in languages that are not indention sensitive.

Tabs are always a problem when writing Python. I get around this problem by 
setting my text editor to expand all tabs with spaces when editing Python, but 
I have had problems when coworkers have not done this.

Don't get me wrong, I love working in Python. It is one of my favorite 
languages, but it, like all other languages, is not perfect.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Teaching Programming

2010-05-04 Thread Ed Keith
--- On Tue, 5/4/10, James Mills  wrote:

> From: James Mills 
> Subject: Re: Teaching Programming
> To: "python list" 
> Date: Tuesday, May 4, 2010, 10:35 AM
> On Wed, May 5, 2010 at 12:21 AM, Ed
> Keith 
> wrote:
> > To deal with indentation I had to
> >
> >   1) keep track of indentation of all chunks of code
> embedded in the
> >      document and indent inserted chunks to the sum
> of all the
> >      indentation of the enclosing chunks.
> 
> In my experience of non-indentation sensitive languages
> such as C-class (curly braces) it's just as hard to keep
> track
> of opening and closing braces.
> 
> --James
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Not in this case, because the user is required to include all text of the 
program in the chunks, the tools does not generate any text, It only needs to 
generate white space if the language is white space sensitive. 

I can see how it could be a problem in other cases.

In the interest of completeness, I should mention that I had to take care not 
to introduce extraneous line breaks for languages that are sensitive to them. 
It is much easier to generate code for languages that are completely white 
space agnostic. 

I actually find the fact that I need to think about where I can, and where I 
can not, break a line to be a bigger problem when write code, than keeping 
track of indentation level. And Python is not the only language that has this 
problem.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Teaching Programming

2010-05-04 Thread Ed Keith
--- On Tue, 5/4/10, Andre Engels  wrote:

> From: Andre Engels 
> Subject: Re: Teaching Programming
> To: "James Mills" 
> Cc: "python list" 
> Date: Tuesday, May 4, 2010, 11:00 AM
> On Tue, May 4, 2010 at 4:35 PM, James
> Mills
> 
> wrote:
> > On Wed, May 5, 2010 at 12:21 AM, Ed Keith 
> wrote:
> >> To deal with indentation I had to
> >>
> >>   1) keep track of indentation of all chunks of
> code embedded in the
> >>      document and indent inserted chunks to the
> sum of all the
> >>      indentation of the enclosing chunks.
> >
> > In my experience of non-indentation sensitive
> languages
> > such as C-class (curly braces) it's just as hard to
> keep track
> > of opening and closing braces.
> 
> Although I have little or no experience with this, I still
> dare to say
> that I don't agree. The difference is that in C you do not
> _need_ to
> know where in the braces-defined hierarchy you are. You
> just embed or
> change a piece of code at the right location. In Python
> however you
> _do_ need to know how far your code is to be indented.
> 
> 

For a programmer, it is harder to keep track of braced.

For a code generator, it is harder to keep track of indentation.

It is a matter of which you are more interested in catering to. Python is 
easier to write, C is easier to generate.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Teaching Programming

2010-05-04 Thread Ed Keith
--- On Tue, 5/4/10, Stefan Behnel  wrote:

> From: Stefan Behnel 
> Subject: Re: Teaching Programming
> To: [email protected]
> Date: Tuesday, May 4, 2010, 11:33 AM
> Ed Keith, 04.05.2010 15:19:
> > --- On Tue, 5/4/10, Stefan Behnel wrote:
> >> Ed Keith, 04.05.2010 14:15:
> >>> Python is a great language to write in
> (although I do
> >>> wish it did a better job with closures). But
> it is a PITA to
> >>> generate code for!
> >> 
> >> Interesting. Could you elaborate a bit? Could you
> give a
> >> short example of what kind of document text you
> translate
> >> into what kind of Python code, and what the
> problems were
> >> that you faced in doing so?
> > 
> > The program is written using itself. If you click on
> the link above you
> > will see an HTML file that fully describes the
> program.
> 
> I did. I find it a bit hard to read due to the block
> splitting (basically like 'include' based spaghetti
> programming), but so far, the actual code that does the code
> merging looks pretty simple and I can't figure out where the
> "PITA" bit is on that page. That's why I asked.
> 
> Stefan
> 
> -- http://mail.python.org/mailman/listinfo/python-list
> 

The PITA is having to keep track of the indentation of each embedded chunk and 
summing it for each level of indentation. This requires a fair amount of 
bookkeeping that would not otherwise be necessary. 

The original prototype simply replaced each embedded chunk with the text from 
the chunk definition, all indenting information was lost. It worked for most 
languages, but not Python.

In testing the program I used two languages, Python and J. I figured if I could 
make both of them work I would not have any problem with anything else.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Teaching Programming

2010-05-04 Thread Ed Keith
--- On Tue, 5/4/10, Stefan Behnel  wrote:

> From: Stefan Behnel 
> Subject: Re: Teaching Programming
> To: [email protected]
> Date: Tuesday, May 4, 2010, 11:52 AM
> Ed Keith, 04.05.2010 17:43:
> > The PITA is having to keep track of the indentation of
> each embedded
> > chunk and summing it for each level of indentation.
> This requires a fair
> > amount of bookkeeping that would not otherwise be
> necessary.
> > 
> > The original prototype simply replaced each embedded
> chunk with the text
> > from the chunk definition, all indenting information
> was lost. It worked
> > for most languages, but not Python.
> > 
> > In testing the program I used two languages, Python
> and J.
> 
> Well, then both of the language generators have benefited
> from your effort because the generated complete code is
> properly indented and therefore much more readable during
> debugging. I'd say it was worth it.
> 
> Stefan
> 
> -- http://mail.python.org/mailman/listinfo/python-list
> 

I agree, but some propellants of literate programming would not. 

Knuth wanted the generated source to be unreadable, so people would not be 
tempted to edit the generated code.

 -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Sharing a program I wrote

2010-05-04 Thread Ed Keith
--- On Tue, 5/4/10, Scott  wrote:

> From: Scott 
> Subject: Sharing a program I wrote
> To: [email protected]
> Date: Tuesday, May 4, 2010, 5:40 PM
> I'm looking for suggestions on what
> to do (and how to do it) if I want
> to share a program that I wrote in Python. There seem to be
> quite a
> few places to post code and I don't know how to choose.
> 
> I wrote a program (script?) that takes a text file
> containing the
> output of  the "show access-list" command on a Cisco
> PIX/ASA/FWSM
> firewall and any number of text files containing syslog
> output from
> the same firewall and creates a report showing which
> access-list rules
> allowed which actual connections. It is written in Python
> 2.6 and runs
> on Windows.
> 
> Since this is obviously something mankind has long been
> waiting for I
> am thinking about sharing it - but since I am new to Python
> and
> programming in general I am not at all familiar with
> dealing with
> source code.
> 
> I'm sure that improvements and additions could be made if
> it was
> reviewed by "actual programmers" but I wouldn't exactly
> call it a
> "project" either. Of course I'd love to add a gui
> interface...
> 
> I've seen pypi. It seems to index code that is posted on
> all sorts of
> sites - including pypi itself? And what is a "package"
> anyway? I've
> seen sourceforge. It looks like a good home for big
> applications or
> multi-developer projects. Freshmeat? Google code? My own
> website? Your
> blog?
> 
> Another detail is that my program uses a library that was
> written by
> someone else. It is the most excellent netaddr written by
> David P. D.
> Moss and it lives at code.google.com. It uses the New BSD
> License.
> Since this library is required would I simply provide a
> link to it?
> Would I post the actual library? Do I have to post a copy
> of his
> copyright info anywhere? Please don't tell me I have to
> write some
> kind of installer that takes care of providing that.
> 
> I really just want anyone who might need a little
> networking/security
> tool like this to be able to find it. Any advice?
> 
> Thanks,
> Scott
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


It depends on exactly what you want to do. I'd suggest you look at the 
following sites:

http://developer.berlios.de/
http://codepad.org/
http://pastebin.com/
http://ideone.com/

One of them might be what your looking for.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Teaching Programming

2010-05-05 Thread Ed Keith
--- On Tue, 5/4/10, alex23  wrote:

> From: alex23 
> Subject: Re: Teaching Programming
> To: [email protected]
> Date: Tuesday, May 4, 2010, 8:47 PM
> Ed Keith 
> wrote:
> > Knuth wanted the generated source to be unreadable, so
> people would not be tempted to edit the generated code.
> 
> This is my biggest issue with Knuth's view of literate
> programming. If
> the generated source isn't readable, am I just supposed to
> trust it?
> How can I tell if an error lies in my expression of the
> algorithm or
> in the code generation itself?
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

My feelings exactly. I can see an argument for an option to emit obstructed 
code, but the default should be readable.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license (an atempt to give real advice)

2010-05-09 Thread Ed Keith
Stepping back from the political/philosophical/religious arguments, I'd like to 
give some real advice based on my own perspective.

How you license your software should be based on how you want it to be used.

If you are releasing an end user application I do not care how you license it. 
If it is useful I will use it. If you believe some of the code is of commercial 
value, and that you hope to profit from it you should use the GPL, so you can 
license it separately to someone who wants to use it in a closed source 
product. 

If, on the other hand you are releasing a library, to be incorporated into 
other products, if you release it under the GPL I will not take the time to 
learn it. I do not want to have to think about what took I can legally use for 
what job. Libraries with permissive licenses can be used in any project. I can 
not use GPL or LGPL code in many contracts. So I do not waist my time learning 
to use libraries covered by restrictive licenses. So if you want me to even 
consider using your library do not use GPL, or LGPL. I favor the Boost license 
in this case. Again, if you want to also offer other licenses, for a fee, you 
should use GPL, I will not use it, but others might, and you may get paid for 
your work.

The bottom line is: if you want the largest possible user base, go with a less 
restrictive license; If you hope to profit financially from your work, use the 
GPL.

Just my $0.02, I hope it is helpful.

   -EdK

Ed Keith
[email protected]
 
Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-09 Thread Ed Keith
Stepping back from the political/philosophical/religious arguments, I'd like to 
give some adjectival advice based on my own perspective.

How you license your software should be based on how you want it to be used.

If you are releasing an end user application I do not care how you license it. 
If it is useful I will use it. If you believe some of the code is of commercial 
value, and that you hope to profit from it you should use the GPL, so you can 
license it separately to someone who wants to use it in a closed source 
product. 

If, on the other hand you are releasing a library, to be incorporated into 
other products, If you release it under the GPL I will not take the time to 
learn it. I do not want to have to think about what took I can legally use for 
what job. Libraries with permissive licenses can be used in any project. Many 
contracts prohibit the use of GPL or LGPL code. So I do not waist my time 
learning to use libraries covered by restrictive licenses. So if you want me to 
even consider using your library do not use GPL, or LGPL. I favor the Boost 
license in this case.

I hope this is useful.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-12 Thread Ed Keith
--- On Mon, 5/10/10, Ben Finney  wrote:

> So I object to muddying the issue by misrepresenting the
> source of that
> force. Whatever force there is in copyright comes from law,
> not any free
> software license.


You are the one muddying the waters. It does not mater whether you break my 
kneecaps, or hire someone else to break my kneecaps, either way my kneecaps are 
broken. 

You can use any license you want, but the simple fact is that if there are 
fewer restrictions in the license then the user has more freedom in how he uses 
the licensed code. If there are more restrictions he/she has less freedom in 
how he/she uses the licensed code. We can debate which is better (whether a man 
should be free to sell himself into slavery) but to claim that putting more 
restrictions on someone give them more freedom is pure Orwellian double speak. 

Sophistry is the last resort of those who have run out of good arguments. The 
more you engage in it the weaker you make your position.

This thread is generating more heat than light, and probably should be dropped.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Thu, 5/13/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 8:38 AM
> In message ,
> Ed Keith 
> wrote:
> 
> > If, on the other hand you are releasing a library, to
> be incorporated into
> > other products, If you release it under the GPL I will
> not take the time
> > to learn it. I do not want to have to think about what
> took I can legally
> > use for what job. Libraries with permissive licenses
> can be used in any
> > project. Many contracts prohibit the use of GPL or
> LGPL code. So I do not
> > waist my time learning to use libraries covered by
> restrictive licenses.
> > So if you want me to even consider using your library
> do not use GPL, or
> > LGPL.
> 
> What have you got against LGPL for this purpose?
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Most of my clients would not know how to relink a program if their life 
depended on it. And I do not want to put then in DLL hell. So I avoid the LGPL.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Ed Keith
Consider the following scenario:

Three programmers, call them A, B & C, independently develop three different 
algorithms to perform a O(ln(n)) search. Each decide to release it for 'free'.

A decides to make it 'free', by publishing compiled object code for all major 
platforms and putting them in the public domain.

B decides to make it 'free' by publishing the source code under the GPL.

C decides to make it 'free' by publishing the source code under the Boost 
license.

Which library should be incorporated into the next Python release?, and why?

I vote for C, but would like to hear any arguments for another position.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Wed, 5/12/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Wednesday, May 12, 2010, 11:48 PM
> In message ,
> Ed Keith 
> wrote:
> 
> > ... but to claim that putting more restrictions on
> someone give them more
> > freedom is pure Orwellian double speak.
> 
> What about the freedom to take away other people’s
> freedom? What tuple of 
> speak would that be?
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Assertion I:
   If person A is free to do more than person B, then person A has 
   more freedom then person B.

Assertion II:
   If person A is free do perform an action person B is not free to 
   perform then person A is free to do more than person B.

Assertion III:
  If person B is restricted in some way that person A is not them Person A 
  is free to do something Person B is not free to do.

Conclusion:
  If person B is more resticted than Peston A, Person A has mor freedom
  than person B.

Which step in this reasoning do you disagree with?

 -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Thu, 5/13/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 8:25 AM
> In message
> <155f1683-9bfd-4a83-b63f-7fb0fc2f5...@g21g2000yqk.googlegroups.com>,
> Patrick 
> Maupin wrote:
> 
> > On May 12, 10:48 pm, Lawrence D'Oliveiro
> > 
> wrote:
> >
> >> In message ,
> Ed
> >> Keith wrote:
> >>
> >> > ... but to claim that putting more
> restrictions on someone give them
> >> > more freedom is pure Orwellian double speak.
> >>
> >> What about the freedom to take away other
> people’s freedom?
> > 
> > The freedom to take away other people's freedom is a
> very serious
> > power that should only be used sparingly.
> 
> Given that the GPL restricts that power, then it must be
> all right.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

I do not think anyone is claiming it is not 'all right'. The claim is being 
made that it restricts freedom.

You are free to put any restrictions you want on your software. If you use the 
GPL on a library I will not use it because I need to make a living. I do not 
dispute your right to use the GPL. I just dispute your claim that you use it to 
give me 'more freedom'.

I do not know what your reason for using the GPL is, but most of the people I 
know who use it do so so that can charge a license fee to people who want to 
use the code with out the restrictions of the GPL. They do this so they can 
make a living, which is their right, and I do not hold it against them. If I 
ever develop a library I think people would be willing to pay to license, I'd 
to the same.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Thu, 5/13/10, Carl Banks  wrote:

> 
> The thing you GPL fanbois refuse to understand or accept is
> that, in
> the real world, a person or company who doesn't want to
> open source
> their "derivative work" will only rarely be forced to by
> the GPL.
> They'll work around it instead, vast majority of the
> time.  They
> could:
> 
> 1. Derive their work from a project with a license that
> grants the
> user more freedom
> 2. Reimplment the functionality seperately (*cough*
> PySide)
> 3. Ignore the license

I think you have over looked the most common, keep the software in house and 
not let anyone else use it. This way you are in full compliance with the GPL. 
If you let someone else use the software that you need to talk to a lawyer, or 
GPL your software.

> 
> And no, a small number of anecdotal counterexamples is not
> any strong
> evidence to the contrary.
> 
> On the other hand, those who intended to release their work
> as open
> source are going to do it even if the license is
> permissive.  The way
> some of you GPL fanbois talk you'd think the MIT license
> prohibitied
> open source derivatives.

If I use MIT licensed code, I can give someone else access to the program with 
out binding them to the legal restrictions of the GPL. 

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


 


  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-13 Thread Ed Keith
--- On Thu, 5/13/10, Brendan Abel <[email protected]> wrote:

> From: Brendan Abel <[email protected]>
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 7:30 PM
> While I think most of the
> disagreement in this long thread results
> from different beliefs in what "freedom" means, I wanted to
> add, that
> most of the responses that argue that the MIT license
> permits the user
> more freedom than the GPL, suffer from the broken window
> fallacy.
> This fallacy results from the short-sided-ness of the user
> base, as it
> is only considering the first generation of derivative
> works.
> 
> I agree, that under an MIT license, the first generation of
> derivative
> works have more freedom.  But any extra freedom gained
> here comes at
> the direct expense of all future generations of derivative
> software.
> 
> Under a GPL license, it is true that the first generation
> will have
> less freedom to distribute their software as they would
> like.  But it
> also ensures that all subsequent generations of derivative
> works have
> the freedom to access all previous derivative works.
> 
> I also want to add that I think the GPL v3 has exceeded
> this
> fundamental concept.  GPL v2 really embodies this
> meaning of "freedom".
> -- 
> http://mail.python.org/mailman/listinfo/python-list

I ALWAYS give my client my source code. But I do not want to bind them to the 
requirements of the GPL, I want them to be free do do what they want with the 
program, so I never incorporate any GPLed code in my projects.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Thu, 5/13/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 11:06 PM
> In message ,
> Ed Keith 
> wrote:
> 
> > Assertion I:
> >    If person A is free to do more than
> person B, then person A has
> >    more freedom then person B.
> > 
> > Assertion II:
> >    If person A is free do perform an action
> person B is not free to
> >    perform then person A is free to do more
> than person B.
> > 
> > Assertion III:
> >   If person B is restricted in some way
> that person A is not them Person A
> >   is free to do something Person B is
> not free to do.
> > 
> > Conclusion:
> >   If person B is more resticted than
> Peston A, Person A has mor freedom
> >   than person B.
> > 
> > Which step in this reasoning do you disagree with?
> 
> Under the GPL, everybody has exactly the same freedoms. So
> which of your 
> assertions is supposedly a criticism of the GPL?
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Yes, under the GPL every one has one set of freedoms, under the MIT or Boost 
license every one has more freedoms. Under other licenses they have fewer 
freedoms. 

None of my point criticize the GPL, they merely defend my claim that a more 
permissive license grants more freedom. You claimed the contrary. 

Are you withdrawing your previous claim, or will you directly refute my 
arguments?

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Thu, 5/13/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 11:07 PM
> In message ,
> Ed Keith 
> wrote:
> 
> > On Thu, 5/13/10, Lawrence D'Oliveiro
> > 
> wrote:
> > 
> >> In message ,
> >> Ed Keith wrote:
> >> 
> >>> So if you want me to even consider using your
> library
> >>> do not use GPL, or LGPL.
> >> 
> >> What have you got against LGPL for this purpose?
> > 
> > Most of my clients would not know how to relink a
> program if their life
> > depended on it. And I do not want to put then in DLL
> hell. So I avoid the
> > LGPL.
> 
> How exactly does the LGPL lead to a requirement to
> “relink”?
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

I am not a lawyer, but as I understand the LGPL, If I give someone something 
that used any LGPLed code I must give them the ability to relink it with any 
future releases of the LGPLed code. I think that means that I need to give them 
a linker and teach them how to use it, and I do not want to go there.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Thu, 5/13/10, Patrick Maupin  wrote:

> From: Patrick Maupin 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 11:45 PM
> On May 13, 10:06 pm, Lawrence
> D'Oliveiro  central.gen.new_zealand> wrote:
> > In message ,
> Ed Keith
> > wrote:
> >
> >
> >
> > > Assertion I:
> > >    If person A is free to do more than person
> B, then person A has
> > >    more freedom then person B.
> >
> > > Assertion II:
> > >    If person A is free do perform an action
> person B is not free to
> > >    perform then person A is free to do more
> than person B.
> >
> > > Assertion III:
> > >   If person B is restricted in some way that
> person A is not them Person A
> > >   is free to do something Person B is not free
> to do.
> >
> > > Conclusion:
> > >   If person B is more resticted than Peston A,
> Person A has mor freedom
> > >   than person B.
> >
> > > Which step in this reasoning do you disagree
> with?
> >
> > Under the GPL, everybody has exactly the same
> freedoms. So which of your
> > assertions is supposedly a criticism of the GPL?
> 
> That's absolutely not true.  For a start, the original
> author can dual-
> license.  This is not a theoretical issue -- it is a
> multi-million
> dollar issue.
> 
> Regards,
> Pat
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Everyone I personally know who has released code under the GPL either 
dual-licenses, or hopes to.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Steven D'Aprano  
wrote:
> 
> The GPL ensures that once software has entered the commons
> (and therefore 
> available for all), it can never be removed from the
> commons. The MIT 
> licence does not. Now, you might argue that in practice
> once software is 
> released under an MIT licence, it is unlikely to ever
> disappear from the 
> commons. Well, perhaps, but if so, that's despite and not
> because of the 
> licence.

Why is MIT licensed code any more likely to dispersal from the common that 
GPLed code? Does using the GPL somehow grantee that my server will never crash?


> 
> In practice, I believe most MIT-licenced code never even
> makes it into 
> the commons in the first place. I'm willing to predict that
> the majority 
> of code you've written for paying customers (as opposed to
> specifically 
> for open source projects) has disappeared into their code
> base, never to 
> be seen by anyone outside of the company. Am I right?

Yes, but it was licensed to the client, and never enter into the commons, That 
which never enters into the commons can never be removed.

Any MIT licensed code that I may have used is still in the common. My using it 
did not reomove it from the common. 

Has the fact that Python has been used for many commercial/propitiatory 
projects reduced your ability to make use of it? If so how?

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Thu, 5/13/10, Patrick Maupin  wrote:

> From: Patrick Maupin 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 11:35 PM
> On May 13, 10:07 pm, Lawrence
> D'Oliveiro  central.gen.new_zealand> wrote:
> 
> > How exactly does the LGPL lead to a requirement to
> “relink”?
> 
> I think this might be a misconception, but I'm not 100%
> sure.  Since
> Ed gives his customers full source code, there may not be
> the
> requirement to directly provide the ability to relink,
> because "The
> “Corresponding Application Code” for a Combined Work
> means the object
> code and/or source code for the Application." and section
> 4d0 requires
> you to "permit the user to recombine or relink" where
> "recombine"
> isn't defined directly (perhaps in the underlying GPL?)

But if my client give someone else a copy of the binary I gave them, they are 
now in violation. I do not want to put my client in this position. 

When using the GPL or LGPL you can do anything you want as long as you do not 
let anyone else use your work, but if you let someone else have a copy of you 
work you are putting them in a position where that can easily/inadvertently 
violate the law. I do not want to put clients in legal jeopardy, so I do not 
use GPL, or LGPLed code.

I do not claim that using the GLP is immoral, nor deny others right to use it. 
I just feel the risks out way the benefits for me.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Steven D'Aprano  
wrote:

> The GPL ensures that once software has entered the commons
> (and therefore 
> available for all), it can never be removed from the
> commons. The MIT 
> licence does not. Now, you might argue that in practice
> once software is 
> released under an MIT licence, it is unlikely to ever
> disappear from the 
> commons. Well, perhaps, but if so, that's despite and not
> because of the 
> licence.


Several years ago I released a C++ library under the Boost license. I put it up 
on a small free server. Later my hard drive crashed, both my backup copies were 
corrupted, and when I went to retrieve it from the site I found it no longer 
existed.

I am recreating the code, and it will be MUCH better this time, and it is on 
three web sites, but are you telling me that of I have used the GPL instead of 
Boost I would not have had this problem?

I use the Boost Libraries (http://www.boost.org/) in most of my code. Do you 
believe they are likely to disappear because they are not covered by the GPL?

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Patrick Maupin  wrote:

> From: Patrick Maupin 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Friday, May 14, 2010, 11:47 AM
> On May 14, 6:13 am, Lawrence
> D'Oliveiro  central.gen.new_zealand> wrote:
> > In message
> > <2b17ee77-0e49-4a97-994c-7582f86c0...@r34g2000yqj.googlegroups.com>,
> Patrick
> >
> > Maupin wrote:
> > > On May 13, 10:06 pm, Lawrence D'Oliveiro
> > > 
> wrote:
> >
> > >> Under the GPL, everybody has exactly the same
> freedoms.
> >
> > > That's absolutely not true.  For a start, the
> original author can dual-
> > > license.
> >
> > That’s nothing to do with the GPL.
> 
> If you mean "that's out of the control of the GPL" I
> agree.  But the
> whole point of the discussion has been about how people
> can't take GPL
> licensed code proprietary, making enhancements, etc. and
> I'm just
> pointing out that this doesn't apply to the original
> author.  Someone
> can decide they aren't making enough money under the GPL
> and stop
> distributing that way, and make all their enhancements
> proprietary, if
> they are the original author.
> 

That is one good reason for choosing to use the GPL, instead of a less 
restrictive license. You can license it, for a fee, to someone who wants to use 
it in some way that is not allowed under the GPL. If you use a less 
restrictive license that is not an option. Of course you still could put 
restrictions on future enhancements, but the the original code cannot have 
new restrictions put on it, only taken off. If I release code under the GPL 
today, I can change my mind and release the same code under the Boost 
license tomorrow. But if I release it with the Boost license, while 
technically I can release it with the GPL tomorrow, in practice everyone 
will use the previously released Boost licensed version.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Tobiah  wrote:

> From: Tobiah 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Friday, May 14, 2010, 11:59 AM
> 
> > Assertion II:
> >    If person A is free do perform an action
> person B is not free to
> >    perform then person A is free to do more
> than person B.
> 
> This does not hold water.  Let's say there are only 10
> activities
> available.  Person A can do number 1 and person B can
> not.  Person
> B can do activities 2 through 10, while person A can
> not.  Therefore,
> Person A is indeed free to perform an action that person B
> is not
> free to perform, but person a is *not* free to do more than
> person B.

THat argument is valid if and only if the rights of B are not a strict subset 
of the rights of A. As far as I can tell, the rights granted by the GPL are a 
strict subset of the right granted by the Boost license. So your argument does 
not work.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Albert van der Horst  wrote:
 
> This is a big reason for me to release everything (see my
> website,
> it is a *lot*) under GPL. If someone wants to use it they
> can,
> if someone wants to use it commercially, they can too, as
> long
> as they pay me a little bit too. Really, I'm reasonable.

I have no problem with that. 

I have played with your forth assembler a bit. It is good work, and the 
best part is that I can read the source and learn from it. Putting it out 
under GPL allows me to learn from it, and you to profit from it, a real 
win/win. Thank you very much for making it available.

I'm working on an assembler myself. I may steal your ideas, but I will not 
steal your code. I'm writing it in ocaml, your forth code would not be 
easy to translate. When/if I finish I'll publish it under a less restrictive 
open source license, because I do not think I would be able to 
persuade anyone else to pay for a commercial license. But I do not fault 
you if you think you can. 

If I did use your code I would either publish under the GPL or not publish 
at all depending on the exact circumstances. I have been know, on rare 
occasions, to use GPLed code in my own work (mostly plug-ins for GPLed 
applications). I just refuse to use it in any code for a client, because I do 
not want to require someone who does not know source code from Morse code code 
to figure out what they need to do to avoid violating the license. When I 
deliver my code to the client they are always free to do whatever they want 
with it. 

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Paul Boddie  wrote:


<<< lots of stuff snipped >>>

> > > Like I said, if you really have a problem with
> Ubuntu shipping CDs and
> > > exposing others to copyright infringement
> litigation.


<<< A lot more stuff snipped >>>

Everyone is assuming a certain degree of computer savvy.

I have not installed Ubuntu, but I understand that they strive for ease of 
use, so I assume that if ant now, at some time in the near future, my 
farther, who knows very little about computers, could install it if I gave 
him a CD with it on it (He would never be able to burn it himself).

Supposes download the ISO image and burn a CD and give it to my father. 
(As I understand it I am now in violation of the GPL, but I may not be). 
My father installs it. He likes it, he gives it to a friend. 

Now suppose, just for the sake of argument, that Ubuntu forgets to renew 
their domain name and it gets taken over by a porn site (It happens to Web 
mechanic, it could happen to anyone). If my father's friend's teenage son 
wants the source code, he can not get it from his father, who does not 
even know what source code is. He does not know that I exist, because his 
father forgot where he got the disk. He can not get the source from the 
porn site. 

Clearly someone has violated the GPL, but I'm not sure who, I think it was me, 
but I may be wrong. If not me who? My father for giving the disk I gave him to 
a friend? My father's friend for not keeping track of who gave him the disk? 
Ubuntu, for not including the source in the ISO image I downloaded? or for 
allowing a porn site to take over their domain name?

It is questions like this that make me steer clear of the GPL. If I give 
my father a CD of Microsoft software, I know I'm breaking the law. If I 
give my father a CD of BSD software licensed software I'm on firm legal 
ground. If I give my father a CD of GPLed software, I'm on shaky ground 
unless I include all the source, which he has no use for, on a second 
disk. And if he give his friend the binary disk, but not the source disk 
(which is of no value to him or his friend), then he is in violation of 
the law, and he cannot even understand why.

The GPL is fine when all parties concern understand what source code is 
and what to do with it. But when you add people like my father to the loop 
if gets very ugly very fast.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Paul Boddie  wrote:


<<<>>
> 
> No, PySide is about permitting the development of
> proprietary
> applications by providing a solution to the all-important
> "ISVs" which
> lets them develop and deploy proprietary software. Do you
> really think
> a platform vendor whose "ISVs" routinely ship proprietary
> software on
> their platform and on other platforms, and who will demand
> the ability
> to continue to do so, now expects all these "ISVs" to
> provide their
> applications under the modified BSD licence? Sure, other
> developers
> can use the software - even people releasing GPL-licensed
> software -
> but that is highly unlikely to be the primary business
> motivation. If
> you think the mobile telephony vendors are a bunch of
> fluffy bunny
> rabbits playing with each other in sugary meadows of
> niceness, I don't
> want to be present when someone directly and finally
> disabuses you of
> this belief. It's all about people selling stuff to
> "consumers" over
> and over again, preferably with the "consumers" rarely if
> ever being
> able to opt-out and do things their own way.

Do you feel the same way about Python? It is released under a 
nonrestrictive license, since you are on this list I assume you use it.

If you want, I think you could use the existing Python code base to create 
a GPLed version of Python, I think the license is permissive enough to 
allow that. If you did, do you think more people would use the GPLed 
version? 

Personally, I would use the version with the more permissive license, unless 
the GPLed version offered a significant advantage of some kind.

 -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Friday, May 14, 2010, 9:58 PM
> In message ,
> Ed Keith 
> wrote:
> 
> > Yes, under the GPL every one has one set of freedoms,
> under the MIT or
> > Boost license every one has more freedoms. Under other
> licenses they have
> > fewer freedoms.
> 
> But what about the “freedom” to take away other
> people’s freedom? Is that 
> really “freedom”?
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Yes.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Friday, May 14, 2010, 10:07 PM
> In message ,
> Ed Keith 
> wrote:
> 
> > That is one good reason for choosing to use the GPL,
> instead of a less
> > restrictive license. You can license it, for a fee, to
> someone who wants
> > to use it in some way that is not allowed under the
> GPL.
> 
> Replace “GPL” with “” and your
> statement is no less (or more) 
> true.
> 
> Funny how a lot of the arguments people keep trying to put
> forward about the 
> GPL really have nothing to do with the GPL.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

I can not imagine anyone being stupid enough to pay me for rights to use code I 
had already published under the Boost License, which grants then the rights to 
do anything they want with it without paying me anything.

  -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-14 Thread Ed Keith
--- On Fri, 5/14/10, Paul Boddie  wrote:

> From: Paul Boddie 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Friday, May 14, 2010, 8:12 PM
> On 14 Mai, 21:18, Ed Keith 
> wrote:
> >
> > The GPL is fine when all parties concern understand
> what source code is
> > and what to do with it. But when you add people like
> my father to the loop
> > if gets very ugly very fast.
> 
> Sure, and when I'm not otherwise being accused of pushing
> one
> apparently rather unpopular man's agenda, I am interested
> in knowing
> what the best practices should be and how they can be
> followed more
> widely.
> 
> Although Bill Gates once apparently claimed that no-one
> needs the
> source code for their word processor or office suite, there
> are still
> benefits in people like your father having access to the
> sources, even
> if this obviously means that he isn't going to recompile it
> himself:
> he can get others to fix things, particularly if his
> favourite version
> is no longer widely supported; if you were from a part of
> the planet
> where you were comfortable with a widely-spoken "global"
> language but
> your father could only converse in a less widely-spoken
> "minority"
> language not generally supported by such software, someone
> (perhaps
> you) could undertake the task of translating that
> software.
> 
> Whether or not one is comfortable with copyleft-style
> licences, there
> clearly is a benefit in providing access to software
> governed by those
> licences. Being able to do so responsibly is obviously a
> prerequisite
> to feeling comfortable about it.
> 
> Paul
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

But if I license my software with a less restrictive license, like MIT, Boost 
or Apache, programmers can access the source code, and people like my father 
can give the executable to their friends without violating the law. IMHO that 
is better for everybody.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-15 Thread Ed Keith
--- On Fri, 5/14/10, Steven D'Aprano  
wrote:

> From: Steven D'Aprano 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Friday, May 14, 2010, 10:59 PM
> On Fri, 14 May 2010 06:39:05 -0700,
> Ed Keith wrote:
> 
> > Yes, under the GPL every one has one set of freedoms,
> under the MIT or
> > Boost license every one has more freedoms. Under other
> licenses they
> > have fewer freedoms.
> 
> I think this talk about freedoms is dangerously incomplete,
> and is 
> confusing the issue rather than shedding more light. Both
> licences grant 
> the same positive freedoms (freedom to do something).
> MIT-style licences 
> grant permission to:
> 
> * make copies of the work;
> * make derivative works based on the work; and
> * distribute those derivative works to others.
> 
> The GPL grants precisely the same three rights. There is no
> difference in 
> the rights granted.
> 
> The MIT licence imposes an obligation on the licencee:
> 
> * you must include a copy of the licence and copyright
> notice with the 
> work and/or any derivative works.
> 
> 
> The GPL adds a further obligation:
> 
> * any derivative works must also be licenced under the
> GPL.
> 
> 

That is why I prefer Boost, which adds very few obligations.



> If we want to talk about "freedoms", rather than rights and
> obligations, 
> we need to distinguish between positive freedoms (freedom
> to do 
> something) and negative freedoms (freedoms from something)
> and not just 
> blithely mix them up.
> 

Good point.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-15 Thread Ed Keith
--- On Thu, 5/13/10, Steven D'Aprano  
wrote:

> From: Steven D'Aprano 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Thursday, May 13, 2010, 7:41 PM
> On Thu, 13 May 2010 06:24:04 -0700,
> Ed Keith wrote:
> 
> > --- On Thu, 5/13/10, Lawrence D'Oliveiro
> > 
> wrote:
> >>
> >> What have you got against LGPL for this purpose?
> --
> >> 
> > Most of my clients would not know how to relink a
> program if their life
> > depended on it. And I do not want to put then in DLL
> hell. So I avoid
> > the LGPL.
> 
> 
> Are you implying that by distributing your libraries under
> the MIT or 
> Apache licence, no linking is required? That's a cool
> trick, can you 
> explain how it works please?
> 
> 
> 
> -- 
> Steven
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Normally I link it for them. As I read the LGPL, if I use any LGPLed code I 
need to teach the client how to link the software against any possible future 
version of the LGPLed library. 

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-16 Thread Ed Keith
--- On Sat, 5/15/10, Robert Kern  wrote:

> From: Robert Kern 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Saturday, May 15, 2010, 1:10 PM
> On 2010-05-14 21:37 , Steven D'Aprano
> wrote:
> > On Fri, 14 May 2010 06:42:31 -0700, Ed Keith wrote:
> > 
> >> I am not a lawyer, but as I understand the LGPL,
> If I give someone
> >> something that used any LGPLed code I must give
> them the ability to
> >> relink it with any future releases of the LGPLed
> code. I think that
> >> means that I need to give them a linker and teach
> them how to use it,
> >> and I do not want to go there.
> > 
> > Surely you're joking?
> > 
> > Does this mean that if they lose their hands in an
> accident, you have to
> > come sit at their computer and do their typing?
> > 
> > The LGPL and GPL don't grant people "the ability" to
> do anything, since
> > that's not within our power to grant. Some people
> don't want to, or
> > can't, program, or don't have time. It's not like the
> LGPL is the bite of
> > a radioactive spider that can grant superpowers. It is
> a licence which
> > grants *permissions*.
> 
> No, the LGPL requires you to do something extra to enable
> your users to be able to relink your program. You need to
> provide the ability to do this, up to some unspecified and
> untested limit of reasonableness (your example is obviously
> beyond the limit of reasonableness). You can't just give
> them, say, a statically linked program and nothing else. You
> can't require for-fee, proprietary linkers. This is usually
> not hard to do (just give them unlinked .o or .obj files and
> a Makefile or project file), but it is *not* just a matter
> of granting permissions.
> 
> But you're right, you don't have to teach them how to do
> it.
> 
> -- Robert Kern
> 
> "I have come to believe that the whole world is an enigma,
> a harmless enigma
>  that is made terrible by our own mad attempt to interpret
> it as though it had
>  an underlying truth."
>   -- Umberto Eco
> 
> -- http://mail.python.org/mailman/listinfo/python-list
> 

But most of my clients run MS-Windows, and I do most of my development in C++, 
so they would need to use a proprietary linker.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-16 Thread Ed Keith
--- On Sat, 5/15/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Saturday, May 15, 2010, 11:06 PM
> In message ,
> Ed Keith 
> wrote:
> 
> > On Fri, 5/14/10, Lawrence D'Oliveiro
> > 
> wrote:
> > 
> >> In message ,
> >> Ed Keith wrote:
> >> 
> >>> Yes, under the GPL every one has one set of
> freedoms,
> >>> under the MIT or Boost license every one has
> more freedoms. Under other
> >>> licenses they have fewer freedoms.
> >> 
> >> But what about the “freedom” to take away
> other
> >> people’s freedom? Is that really “freedom”?
> > 
> > Yes.
> 
> But that’s a “freedom” that non-GPL licences do not
> give you, that the GPL 
> does. So which licence gives you more “freedoms”,
> again?
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


? You just answered your own question. The The GPL does not give you the 
freedoms to take away other people freedom, so the the less restrictive license 
have less restrictions (which is why they are called "less restrictive" by the 
way) "Less restrictions" is a synonym for "more freedoms". To the extent that 
something is "restricted" it is not "free". To the extent which something if 
"free" it is not "restricted". 

There is clearly some kind of communication problem here. Either were are 
speaking different languages with some faulty transaction program interviewing, 
or one of is is either stupid or senile (seems a bit early for me, but it is 
possible); or you are being disingenuous. 

If you type the word 'restrict' into thesaurus.com you will get the following 
antonyms: enlarge, expand, free, let go, release, Note the second word on the 
list. Please do not take my word for it, try it yourself. Try other sites, if 
you think I may have rigged this one.

 -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-18 Thread Ed Keith
--- On Sat, 5/15/10, Ben Finney  wrote:

> From: Ben Finney 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Saturday, May 15, 2010, 12:57 AM
> [email protected]
> (Aahz) writes:
> 
> > You can't really sell Open Source software in any
> practical way;
> > someone will always undercut you once it's out in the
> wild. You can
> > only sell support for the software, which is entirely
> different.
> 
> Not at all. I've been selling all the software I write for
> clients for
> the past ten years, and it's all free software. It's been
> very practical
> for me and those I've worked with.
> 
> You can't sell free software like selling loaves of bread,
> but that's a
> much more limited case and a far cry from your claim.
> Selling free
> software is quite practical and a good way to fund
> development of
> software that otherwise wouldn't be written as free
> software.
> 
> -- 
>  \     “Why am I an atheist? I ask
> you: Why is anybody not an atheist? |
>   `\      Everyone starts out being an
> atheist.” —Andy Rooney, _Boston |
> _o__)             
>                
>                
>   Globe_ 1982-05-30 |
> Ben Finney
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Why don't your own customers under cut you? If you sell someone GPLed 
software they have the right to redistribute it for less than you are 
distributing it for. That dose not strike me as a viable business model.

How do you make it work?

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-18 Thread Ed Keith
--- On Sat, 5/15/10, Duncan Booth  wrote:

> From: Duncan Booth 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Saturday, May 15, 2010, 8:52 AM
> Ed Keith 
> wrote:
> 
> > I can not imagine anyone being stupid enough to pay me
> for rights to
> > use code I had already published under the Boost
> License, which grants
> > then the rights to do anything they want with it
> without paying me
> > anything. 
> >   -EdK
> > 
> Really?
> 
> The Boost License says, amongst other things:
> 
> > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
> ANY KIND,
> > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
> WARRANTIES OF
> > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
> TITLE AND
> > NON-INFRINGEMENT. 
> 
> Are you sure you can't imagine anyone offering to pay you
> for an 
> alternative license that came with some kind of warranty or
> support?
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

Would that be a license or a support contract?

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-18 Thread Ed Keith

--- On Sat, 5/15/10, Lawrence D'Oliveiro  
wrote:

> From: Lawrence D'Oliveiro 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Saturday, May 15, 2010, 11:09 PM
> In message ,
> Ed Keith 
> wrote:
> 
> > But if my client give someone else a copy of the
> binary I gave them, they
> > are now in violation.
> 
> Why would they be in violation? It seems to me a violation
> would only occur 
> if someone asked them for the source, and they refused.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

No, the GPL makes it clear that the responsibly is on the distributor to either 
supply the source or written notice, Caveat venditor. The violation exists 
regardless of whether or not the recipient makes a request.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Picking a license

2010-05-18 Thread Ed Keith
--- On Tue, 5/18/10, Robert Kern  wrote:

> From: Robert Kern 
> Subject: Re: Picking a license
> To: [email protected]
> Date: Tuesday, May 18, 2010, 12:03 PM
> On 2010-05-16 09:25 , Ed Keith
> wrote:
> >
> > --- On Sat, 5/15/10, Lawrence D'Oliveiro 
> wrote:
> >
> >> From: Lawrence D'Oliveiro
> >> Subject: Re: Picking a license
> >> To: [email protected]
> >> Date: Saturday, May 15, 2010, 11:09 PM
> >> In message,
> >> Ed Keith
> >> wrote:
> >>
> >>> But if my client give someone else a copy of
> the
> >> binary I gave them, they
> >>> are now in violation.
> >>
> >> Why would they be in violation? It seems to me a
> violation
> >> would only occur
> >> if someone asked them for the source, and they
> refused.
> >> --
> >> http://mail.python.org/mailman/listinfo/python-list
> >>
> >
> > No, the GPL makes it clear that the responsibly is on
> the distributor to either supply the source or written
> notice, Caveat venditor. The violation exists regardless of
> whether or not the recipient makes a request.
> 
> No, one of the options for you is that you make the source
> available upon request.
> 

But I am required to give written notice to that effect.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: GUIs - A Modest Proposal

2010-06-14 Thread Ed Keith

--- On Mon, 6/14/10, AD.  wrote:

> From: AD. 
> Subject: Re: GUIs - A Modest Proposal
> To: [email protected]
> Date: Monday, June 14, 2010, 7:51 PM
> On Jun 14, 2:34 am, Stephen Hansen
> 
> wrote:
> > HTML+CSS have some very strong advantages. Simplicity
> is not one of
> > them. Precision web design these days is a dark art.
> (Go center an image
> > vertically and horizontally in an arbitrary sized
> field!)
> 
> I agree, and I know that's a rhetorical question, but here
> goes
> 
> (I have no idea whether this works in IE though)
> 
>  "DTD/xhtml1-
> strict.dtd">
> 
> 
> 
> div {
>     position: absolute;
>     border: 1px solid blue;
>     margin: 10px;
>     }
> #one {
>     top: 50px;
>     width: 300px;
>     height: 300px;
>     }
> #two {
>     top: 400px;
>     width: 200px;
>     height: 200px;
>     }
> img {
>     position: absolute;
>     width:100px;
>     height: 100px;
>     margin: auto;
>     top: 0;
>     bottom: 0;
>     left: 0;
>     right: 0;
>     border: 1px solid red;
>     }
> 
> 
> 
>  />
>  />
> 
> 
> 
> 
> --
> Cheers
> Anton
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

But that is in a fixed size field, can you make the height change based on the 
height of the browser window, and still keep it centered?

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: GUIs - A Modest Proposal

2010-06-14 Thread Ed Keith
Nice! I've been looking for that trick for some time.

Thank you,

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


--- On Mon, 6/14/10, AD.  wrote:

> From: AD. 
> Subject: Re: GUIs - A Modest Proposal
> To: [email protected]
> Date: Monday, June 14, 2010, 8:56 PM
> On Jun 15, 11:59 am, Ed Keith 
> wrote:
> > But that is in a fixed size field,
> 
> That's why I used the same image definition in two
> different sized
> divs to show that the images position wasn't determined by
> the divs
> size.
> 
> > can you make the height change based on the height of
> the browser window, and still keep it centered?
> 
> Like this? The div is sized according to the browser window
> and
> centered. The image is a fixed size, but still centered
> within the
> div.
> 
>  "DTD/xhtml1-
> strict.dtd">
> 
> 
> 
> 
> div {
>     position: absolute;
>     border: 1px solid blue;
>     margin: auto;
>     top: 10%;
>     bottom: 10%;
>     left: 10%;
>     right: 10%;
>     }
> 
> img {
>     position: absolute;
>     width:100px;
>     height: 100px;
>     margin: auto;
>     top: 0;
>     bottom: 0;
>     left: 0;
>     right: 0;
>     border: 1px solid red;
>     }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> Cheers
> Anton
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Ed Keith
--- On Wed, 6/23/10, Stephen Hansen  wrote:

> From: Stephen Hansen 
> Subject: Re: Should I Learn Python or Ruby next?
> To: [email protected]
> Date: Wednesday, June 23, 2010, 1:51 AM
> On 6/22/10 10:39 PM, Dennis Lee
> Bieber wrote:
> > On Tue, 22 Jun 2010 15:55:51 -0700, Stephen Hansen
> > 
> declaimed the following in
> > gmane.comp.python.general:
> > 
> >> I second Forth. Learning and using that was --
> slightly painful, but
> > 
> >     Just pick up any advanced HP
> programmable calculator... RPL is a
> > close substitute 
> 
> That's just a start. The reverse and stack-oriented nature
> of the
> language makes you have to start thinking in an interesting
> way, and
> sure, a RPL/stack-calculator can get that for you.
> 
> But then going on and doing real programming with it,
> making your own
> words (functions), ... its fun.
> 
> -- 
> 
>    Stephen Hansen
>    ... Also: Ixokai
>    ... Mail: me+list/python (AT) ixokai
> (DOT) io
>    ... Blog: http://meh.ixokai.io/
> 
> 
> -Inline Attachment Follows-
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 

I agree you should learn a DIFFERENT programming language. Perl, Python, & Ruby 
are all quite similar. If you want to expand your horizons, learn one of the 
following:

  Forth -lots of fun.

  Assembler - give you a much better understanding of what is really happening 
under the hood.

  Prolog - a very different way of thinking.

Give one of them a try.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Ed Keith

--- On Wed, 6/23/10, Dennis Lee Bieber  wrote:

> From: Dennis Lee Bieber 
> Subject: Re: Should I Learn Python or Ruby next?
> To: [email protected]
> Date: Wednesday, June 23, 2010, 1:39 AM
> On Tue, 22 Jun 2010 15:55:51 -0700,
> Stephen Hansen
> 
> declaimed the following in
> gmane.comp.python.general:
> 
> > I second Forth. Learning and using that was --
> slightly painful, but
> 
>     Just pick up any advanced HP
> programmable calculator... RPL is a
> close substitute 
> 
> > really invigorating. And I also second learning a
> functional language
> > (though I don't know if I'd inflict Haskell on
> anyone).
> >
> 
>     Is APL still available?
>         4 5 $rho 20 ? 52
> (using a common means for lack of greek keyboard)
> -- 
>     Wulfraed       
>          Dennis Lee
> Bieber         AF6VN
>         [email protected] 
>   HTTP://wlfraed.home.netcom.com/
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 
Try J. It does not require a special keyboard.

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com




  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Ed Keith
I downloaded the ISO, but it seems to be just a bit too big to fit on a CD!

This seems odd to me, has anyone else had this problem?

  -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


--- On Tue, 7/6/10, sturlamolden  wrote:

> From: sturlamolden 
> Subject: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP
> To: [email protected]
> Date: Tuesday, July 6, 2010, 11:50 AM
> 
> Just a little reminder:
> 
> Microsoft has withdrawn VS2008 in favor of VS2010. The
> express version
> is also unavailable for download. >:((
> 
> We can still get a VC++ 2008 compiler required to build
> extensions for
> the official Python 2.6 and 2.7 binary installers here
> (Windows 7 SDK
> for .NET 3.5 SP1):
> 
> http://www.microsoft.com/downloads/details.aspx?familyid=71DEB800-C591-4F97-A900-BEA146E4FAE1&displaylang=en
> 
> Download today, before it goes away!
> 
> Microsoft has now published a download for Windows 7 SDK
> for .NET 4.
> It has the VC++ 2010 compiler. It can be a matter of days
> before the VC
> ++ 2008 compiler is totally unavailable.
> 
> It is possible to build C and Fortran extensions for
> official Python
> 2.6/2.7 binaries on x86 using mingw. AFAIK, Microsoft's
> compiler is
> required for C++ or amd64 though. (Intel's compiler
> requires VS2008,
> which has now perished.)
> 
> Remember Python on Windows will still require VS2008 for a
> long time.
> Just take a look at the recent Python 3 loath threads.
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python instructor

2010-07-09 Thread Ed Keith
Where are you located?

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com


--- On Fri, 7/9/10, Greg  wrote:

> From: Greg 
> Subject: python instructor
> To: [email protected]
> Date: Friday, July 9, 2010, 10:09 AM
> We're looking for a first-rate python
> trainer to come to our
> organization for a day or two.  We are a small group
> of geospatial/
> remote sensing scientists whose research spans the gap
> between
> environmental accounting/monitoring and policy and human
> interaction.
> We have about 5-10 (or so) python users (and potential
> python users)
> who could potentially apply new skills to several in-house
> projects.
> The difficulty for the teacher would be covering breadth of
> experience
> we have currently.
> 
> Any thoughts or advice would be greatly appreciated. 
> Thanks very
> much,
> 
> Greg
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Help choosing license for new projects

2010-07-13 Thread Ed Keith
--- On Mon, 7/12/10, Jake b  wrote:

> I'm starting a new python code
> project. What license do you suggest? I
> am searching, but I'm not finding a simple comparison of
> licenses. So
> I don't know which to use. Maybe MIT or Apache or LGPL or
> BSD?
> 
> Are there certain licenses to avoid using because of
> interaction
> problems between libraries using GPL2 / GPL3 / MIT / LGPL.
> / BSD with
> my own?

I generally avoid GPL, one of the reasons in interaction with other licenses.

> 
> I want:
> 1] Pretty much let anyone use it. Users do not have to
> include source
> code, as long as I get credit. (which I think normallly is
> a textfile
> with project url + name?)

This rules out GPL.

> 
> 2] (if it matters) I will be using different combinations
> of pyglet,
> pygame, wxPython, etc.

You will need to look at the individual licenses to see is they have iterations 
with other licenses.

> 
> 3] I want the option to use my own code in something
> commercial at a later date.
> 
> Does #3 complicate things, or is fine when including author
> info?

You can always re-license i, as long as you have the copyright to all the code. 
If other people have made contributions you will need to get their permission 
before you can re-license.


> 
> The choices for google code projects are:
>   Apache License 2.0

I do not use it, but it is good.

>   Eclipse license 1.0

I have not read this one, so I can not comment.

>   GPLv2
>   GPLv3

Incomparable with point one.

>   GNU lesser GPL

You would need to decide whether this is comparable with your first 
requirement. 

LGPL requires that users be able to relink with new versions of the library.  
This has always bothered me because relinking without recompiling (even when 
dynamic linking) in C/C++ is a good way to crash a program. But this should not 
be a problem with Python.

>   MIT license

This one is good.

>   Mozilla Public license 1.1

I avoid this one.

>   New BSD License

This one is good.

I personalty like the Boost License, it has very few restrictions. 

I hope this helps,

-EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Static typing, Python, D, DbC

2010-09-12 Thread Ed Keith
--- On Sun, 9/12/10, Paul Rubin  wrote:

> From: Paul Rubin 
> Subject: Re: Static typing, Python, D, DbC
> To: [email protected]
> Date: Sunday, September 12, 2010, 4:28 PM
> Bearophile 
> writes:
> > I see DbC for Python as a way to avoid or fix some of
> the bugs of the
> > program, and not to perform proof of correctness of
> the code. Even if
> > you can't be certain, you are able reduce the
> probabilities of some
> > bugs to happen.
> 
> I think DbC as envisioned by the Eiffel guy who coined (and
> trademarked)
> the term is that it's a static verification technique,
> marketing-speak
> annotating subroutines with pre- and post- conditions that
> can be
> checked with Hoare logic.  Runtime checks wouldn't
> qualify as that.


Eiffel throws an exception when a contract is violated. That is run time 
behavior, not static verification.

   -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com





  
-- 
http://mail.python.org/mailman/listinfo/python-list


Generating PDF file in Python

2010-10-26 Thread Ed Keith
I need to generate PDF files and I'm exploring what tools to use. I was planing 
on using ReportLab, but recently found some references to pango 
(http://www.pango.org/) and ciaro (http://cairographics.org/) being able to 
generate PDF files. But am having difficulty finding details.

The program must be cross platform, it needs to run on both windows and Mac and 
might need to run on Linux in the future. It needs to generate both reports and 
tables and I would like to make the layout as user configurable as practical. 

Can pango - ciaro do  this. How do they compare to ReportLab? Are there other 
options I have overlooked?

 -EdK

Ed Keith
[email protected]

Blog: edkeith.blogspot.com



  
-- 
http://mail.python.org/mailman/listinfo/python-list