[prog] Converting definitions into 'on the fly' code... And GPL
query
Conor Daly
c.daly at met.ie
Fri May 14 10:26:25 EST 2004
On Fri, May 14, 2004 at 08:00:20PM +1000 or thereabouts, Rasjid Wilcox wrote:
> On Thursday 13 May 2004 23:51, Conor Daly wrote:
> >
> > I've spent the last 4 days hacking on this in an attempt to understand it
> > and I think I've got it now. Looks pretty damn good to me. I haven't
> > figured out yet how the self.equation bit works yet (it does, I just don't
> > know how...). I'm going off to present this as a sample to the project
> > leader now.
Who was mightily impressed...
> You are more than welcome to ask questions.
>
> Also, if you have not worked out how to read the index table only once (at
> class initialisation time) rather than for each record, let me know. It
> should only be around a 5 line change, and pretty simple.
Chances are we will end up using a temporary (or should I say non-permanent)
table containing a data 'heap'. This will likely end up with columns named
to correspond to the variable names in the equations.
> Lastly, did you note the change I made to allow the use of mutli-line tests
> that can utilise their own variables? It makes the system substantially more
> powerful and flexible, without making it any more complex for the current
> case. (Current style tests are just prefixed with 'result = '.)
I saw but wasn't quite clear on how it's used. In any case, this is
currently a prototype sample and will be significantly refined before
production.
One thing that came to mind was: "What if the minute data is missing?".
Currently the _sumOverDate() function returns 0 if there's no data. Can one
return NULL or some other something that will cause 'eval(self.equation)' to
return false? The instance could arise where 'rrr - _sumOverDate('r',
'minute'...)' will have a valid rrr=0 and _sumOverDate() return 0 'cos
there's no data so the eval() will return true which would be an error.
That lead to a discussion on whether the tests should know whether there
should be a particular data set (eg. some stations report only hourly
rainfall so there'll be no minute rain from them) and should return a 'pass'
instead of a 'fail'. My view is that the program should decide whether it's
appropriate for a particular test to run ("should we have minute rain?" "Do
we have minute rain?" ...) rather than the test itself.
> > On a side note, you've put your code in the public domain. Can I
> > subsequently incorporate that in a GPL application so that it now falls
> > under the GPL? I presume I can.
>
> Absolutely. You can do with it as you wish - there is not even any need for
> attribution (although I would not complain).
>
> It was meant as a code sample, and I wanted it to be able to be freely
> incorporated whereever it may be useful - even in a closed source
> application. You can certainly put it in a GPL application.
>
> I guess I could have put it under a BSD license and achieved more or less the
> same effect. But given the nature of the code I felt that putting it into
> the public domain was cleaner.
>
> Hmmm.... any license guru's out there that want to comment on the pro's and
> con's of public domain vs modified BSD?
The other interesting licensing question is in the other direction.
Assuming I have released a GPL application. Someone wants to use it but in
a proprietary application which the GPL won't allow. They contact me and
ask to license my application to them for proprietary use. Can I construct
a license that requires them to:
o Acknowledge the existence of code that is also available under GPL
o Provide the standard GPL 'offer of source' for my code
without having to GPL their proprietary extensions. Of course I can, but is
it in any way useful for me to do this?
Conor
--
Conor Daly, Please avoid sending me
Met Eireann, Glasnevin Hill, Word or PowerPoint attachments.
Dublin 9, Ireland http://www.fsf.org/philosophy/no-word-attachments.html
Ph +3531 8064276 Fax +3531 8064247
**********************************************************************
This e-mail and any files transmitted with it are confidential
and intended solely for the addressee. If you have received
this email in error please notify the sender.
This e-mail message has also been scanned for the
presence of computer viruses.
**********************************************************************
More information about the Programming
mailing list