hpwNLUtility.DLL 1.0 released

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

hpwNLUtility.DLL 1.0 released

Post by HPW »

Just upload my first extension.DLL for newLISP.

Download:
http://www.hpwsoft.de/anmeldung/html1/n ... tility.zip


Exported functions:

hpwMimeEncodeFile,
hpwMimeDecodeFile,
hpwZlibCompressFile,
hpwZlibDeCompressFile,
hpwMimeEncodeString,
hpwMimeDecodeString,
hpwZlibCompressString,
hpwZlibDeCompressString;


Sample usage:

(import "hpwNLUtility.dll" "hpwMimeEncodeFile")
(import "hpwNLUtility.dll" "hpwMimeDecodeFile")
(import "hpwNLUtility.dll" "hpwZlibCompressFile")
(import "hpwNLUtility.dll" "hpwZlibDeCompressFile")
(import "hpwNLUtility.dll" "hpwMimeEncodeString")
(import "hpwNLUtility.dll" "hpwMimeDecodeString")
(import "hpwNLUtility.dll" "hpwZlibCompressString")
(import "hpwNLUtility.dll" "hpwZlibDeCompressString")

(get-string(hpwMimeEncodeFile "mySource.ext" "myTarget.ext"))
(get-string(hpwMimeDecodeFile "mySource.ext" "myTarget.ext"))
(get-string(hpwZlibCompressFile "mySource.ext" "myTarget.ext"))
(get-string(hpwZlibDeCompressFile "mySource.ext" "myTarget.ext"))

(setq mytest(get-string(hpwMimeEncodeString "This is a Teststring!This is a Teststring!This is a Teststring!")))
(setq mytest1(get-string(hpwMimeDecodeString mytest)))
(setq mytest(get-string(hpwZlibCompressString "This is a Teststring!This is a Teststring!This is a Teststring!")))
(setq mytest1(get-string(hpwZlibDeCompressString mytest)))

Enjoy!
Last edited by HPW on Thu Aug 18, 2005 1:46 pm, edited 2 times in total.
Hans-Peter

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

Hi,
I tried the string (not yet the file) versions of the functions with no problems (none expected!) and will keep the dll aside for future use.

As I'm new to issues of licenses I'd thought I'd use this opportunity to ask (throw reply into a new thread if you feel that's most appropriate) about some general license in's and out's.
Regrading this dll -
Does the Mozilla Public License (MPL) mentioned in the dll's license.txt require the release of the larger work's source code when the MPL code is incorporated into a larger work (the dll?)?

Regardsind Newlisp dll (maybe Lutz could answer this one)
As newlisp is GPL I presume that any program that specifically relies on the newlisp dll would also have to be released under GPL?
However, if a program just relies on a lispy dll which could be newlisp or could be some other lispy dll then that program would not have to be released under GPL?

Nigel

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

The newlisp.dll can be used and called from proprietary (not open) software without the necessity of that software to be published under the GPL. Most companies using GPL'd parts in their software distribute and install their own and the GPL'd parts separately to avoid licensing problems. See also http://www.gnu.org/licenses/licenses.html .

With newlisp.exe I have allowed distribution and installation together with commercial, proprietary (closed source) software and free of charge, as long as credit and pointers to the newlisp.org website are given. In any case I would like to be contacted. newlisp.dll would be treated the same way.

Lutz

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

Hi Lutz
Re: The newlisp.dll can be used and called from proprietary (not open) software without the necessity of that software to be published under the GPL.
Richard Stallman says (in http://www.gnu.org/licenses/why-not-lgpl.html):
"The choice of license makes a big difference: using the Library GPL permits use of the library in proprietary programs; using the ordinary GPL for a library makes it available only for free programs."
I can understand that as the copyright holder you can grant a non-GPL use of the newlisp code such as linking it to a proprietary program however, without that specific permission from you (which you refer to above) is it correct that a program that specially relies on newlisp and is linked (even if dynamically) to it would also have to be GPL'ed?

RE: Most companies using GPL'd parts in their software distribute and install their own and the GPL'd parts separately to avoid licensing problems.

Should they be using LGPL'ed parts?

Just trying to get the license ideas clear in my mind rather than planning any releases of anything myself.

Nigel

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

As I understand it, there is a difference between static linking a library into your product or using a dynamically at run-time linked DLL (or shared library on Linux).

I.e. most libraries on a Linux distribution are GPL'd (not LGPL'd) and there is closed source software sold for Linux using these shared libraries. The newlisp.dll is of the same kind. Statically linking code into your product is different and requires opening up that other software too.

Now, when packaging a shared library/DLL with a closed source product, we enter a shady area: one could argue that packaging and disributing together is in effect similar to statically linking. This is why companies prefer to distribute/install GPL'd parts separately.

Lutz

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

Re:
As I understand it, there is a difference between static linking a library into your product or using a dynamically at run-time linked DLL (or shared library on Linux).

The best summary I've found is at where Stallman (RMS) gives an answer:
<question>
Bruce: A more common problem is dynamic libraries that are distributed separately from the executable. You say that a court would hold those to be devices explicitly used to circumvent the license restrictions, but that's rather chancy, and no substitute for explicit language regarding what is, and what isn't, considered a derived work in the GPL.
<answer>
RMS: We have no say in what is considered a derivative work. That is a matter of copyright law, decided by courts. When copyright law holds that a certain thing is not a derivative of our work, then our license for that work does not apply to it. Whatever our licenses say, they are operative only for works that are derivative of our code.

A license can say that we will treat a certain kind of work as if it were not derivative, even if the courts think it is. The Lesser GPL does this in certain cases, in effect declining to use some of the power that the courts would give us. But we cannot tell the courts to treat a certain kind of work as if it were derivative, if the courts think it is not.

I think we have a pretty good argument that nontrivial dynamic linking creates a combined (i.e. derivative) work. I have an idea for how to change the GPL to make it clearer and more certain, but I need to see if we can work out the details in a way that our lawyer believes will really work.


This answer indicates that the courts have the defining say but that the spirit of the GPL is "that nontrivial dynamic linking creates a combined (i.e. derivative) work". This is why I believe that, without a specific exemption granted by you, a program that non-trivially depends on newlisp should be GPL'ed if distributed.

Nigel

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

The link for the Stallman answer is : http://slashdot.org/interviews/00/05/01/1052216_F.shtml - apologies for missing it out.
Nigel

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

I am not an advokat but I think you can use it where you want as long you make notice of the contained software.


So I used classes from project jedi:

http://sourceforge.net/projects/jcl/


Here is the used license:

http://www.opensource.org/licenses/mozilla1.1.php


My work on the DLL (and for the neobook-plugins) is complete freeware.
Hans-Peter

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Hans-Peter

nigelbrown
Posts: 429
Joined: Tue Nov 11, 2003 2:11 am
Location: Brisbane, Australia

Post by nigelbrown »

Again - thanks for doing the dll. Perhaps a 'contributed packages' directory could be set up to keep these sort of works together. See the CRAN Contributed Packages http://mirror.aarnet.edu.au/pub/CRAN/sr ... KAGES.html as one example I'm aware of. Perhaps the various utility functions (such as unread-char http://www.alh.net/newlisp/phpbb/viewtopic.php?t=143 ) that crop up here from time to time could also be collated somewhere.

Nigel

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

>>> Nigel >>>
This answer indicates that the courts have the defining say but that the spirit of the GPL is "that nontrivial dynamic linking creates a combined (i.e. derivative) work". This is why I believe that, without a specific exemption granted by you, a program that non-trivially depends on newlisp should be GPL'ed if distributed.
>>>

Yes, and that is pretty much how I see it too. People who want to distribute their software containng newlisp.exe or newlisp.dll should contact me to get permission.

About a contributions directory:
What I will do, is setup a page with pointers and short descriptions of contributed works. I do not have enough space at my ISP to physically store stuff there. A page with links also ensures that people allways find the latest versions of contributed software. I will start with a link to HPW's stuff and a link to http://www.gzip.org/zlib/ .

Hans-Peter! what is the URL/address you want me to put on that page?

Lutz

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

May be I should set up a similar sub-page for newLISP as I have for neobook. On the long run I will get also problems with my web-space. Ths current one comes with my telephon-contract and is free but limited. But my plugins are mostly small, so it will do it for some time.

I will post the URL as soon I have it setup.
Hans-Peter

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Last edited by HPW on Thu Aug 18, 2005 1:44 pm, edited 2 times in total.
Hans-Peter

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Just upload hpwNLUtility 1.01:

Download:
http://www.hpwsoft.de/anmeldung/html1/n ... tility.zip

New Exported functions:

hpwExeName
hpwExePath
hpwUtilityVersion

Sample usage:

(import "hpwNLUtility.dll" "hpwExeName")
(import "hpwNLUtility.dll" "hpwExePath")
(import "hpwNLUtility.dll" "hpwUtilityVersion")

(setq myexe(get-string(hpwExeName)))
(setq mypath(get-string(hpwExePath)))
(setq myversion(get-string(hpwUtilityVersion)))
Last edited by HPW on Thu Aug 18, 2005 1:44 pm, edited 2 times in total.
Hans-Peter

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Would the function 'main-args' nor work for this? The first member of the list returned from (main-args) contains the path/name of the executable.


Lutz

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Yes, you are right, but what is with newLISP.DLL?

With this I get my neobook compiled EXE.

:-)
Hans-Peter

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Just upload hpwNLUtility 1.02:

Download:
http://www.hpwsoft.de/anmeldung/html1/n ... tility.zip

New Exported functions:

hpwMimeEncodeFileNoCRLF

hpwMimeEncodeStringNoCRLF
Last edited by HPW on Thu Aug 18, 2005 1:45 pm, edited 1 time in total.
Hans-Peter

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Just upload hpwNLUtility 1.03:

Download:
http://www.hpwsoft.de/anmeldung/html1/n ... tility.zip

New Exported functions:

hpwZipString - Zip a string to standard zip-format.

hpwUnZipString - UnZip a string from standard zip-format.


Together with command 'source' this allows a kind of virtual file system for newLISP. This can keep things together.
Hans-Peter

Locked