Ms-RL - Explanation needed [closed] - open-source

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I'm currently struggling to understand the Ms-RL (Microsoft Reciprocal License).
I read the license four times now, but still I am unsure of the following things:
(Regarding especially 3A and 3E of the license)
If I use the library, without ANY change, do I have to publish the source code of my application?
Is it enough to add the Ms-RL to my own license, mentioning its validity for the used library?
UPDATE:
Do I have to publish my whole application then under the Ms-RL?

A link to the full license text.
And to quote the requested paragraphs:
3(A) Reciprocal Grants- For any file you distribute that contains code from the software (in source code or binary format), you must provide recipients the source code to that file along with a copy of this license, which license will govern that file. You may license other files that are entirely your own work and do not contain code from the software under any terms you choose.
Translation: For each file that uses files under the Ms-RL, you need to provide the source and a copy of the license.
3(E) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
Translation: If you distribute any part of code (as source) under the Ms-RL, you can only do this with the Ms-RL. You need to include a copy of the license. If you distribute only compiled or object code, you can do that with any license that is compatible with the Ms-RL.

From Wikipedia:
This Microsoft license allows for distribution of derived code so long
as the modified source files are included and retain the Ms-RL. The
Ms-RL allows those files in the distribution that do not contain code
originally licensed under Ms-RL to be licensed according to the
copyright holder's choosing. This is equivalent to the CDDL, EPL or
LGPL (GPL with a typical "linking exception").
i would say this license is LGPL like.
For any file you distribute that contains code from the software (in
source code or binary format), you must provide recipients the source
code to that file along with a copy of this license, which license
will govern that file.
As long as your source files do not contain code from the software with this license, you don't have to apply the MS-RL to those files. The license is still attached to the "files" containing MS-RL code.
Typically you would license the entire software any way you wish, then add an exception for the files containing MS-RL code.
Disclaimer: I'm not a lawyer and i could be wrong.

Related

Choosing an open source license for a standard based on XSD [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
got a question about an open source project I'm planning to put in place (to be hosted either at Codeplex or Sourceforge).
In short, the project will consist of an XSD file to define a schema for XML files to adhere to, and some C# code to work with those XML files.
But I'm not sure what license I should give it, especially the XSD file. The project will be mostly a class library, so I'm tempted to go with LGPL, so it can be used by both free and proprietary software.
But the one thing is, I don't want the XSD file to be able to be changed, cause I'm trying to put up a standard for data-sharing of a specific problem domain, and imo there's no point in making a standard open source, or is it ?
Or should I release the XSD as a separate project ? Not sure what's the right way to go...
Thanks for any advise on the matter.
Mathieu
I think you are making a big mistake. In fact, I think that the XSD files should be released under a more liberal license.
If someone wants to create a proprietary version of HTML and fork Firefox to work with it they are only creating needless work for themselves. For the most part, it doesn't cause any problems for Mozilla or the W3C because nobody is going to care or use it. Granted, at one time, both Netscape and Microsoft tried to add proprietary HTML extensions. Microsoft eventually realized the value in browser interoperability. Netscape didn't last long enough for it to matter.
If you put a restrictive license on the schema, you will decrease the likelihood that anyone will adopt your standard. Many developers are constrained by the licenses of components they can use in their projects. What is the point of having a standard, unless it is open to all developers?
Keep in mind, and XSD file is not a standard or a schema. It is only a representation of a standard.
For example, if you have an XHTML XSD, changing the XSD does not change the XHTML schema. The XHTML schema is defined by an English document published by the W3C. The only way to change the XHTML schema is to get the W3C to publish and updated version of the document. If you change an XHMTL XSD, you have created a representation of different schema.
By putting the XSD file under a restrictive license doesn't do anything to protect your schema, it only forces someone to code from scratch a new XSD file for their proprietary extensions.
Have you considered that your standard might have flaws, or not cover certain use cases you haven't considered? If your standard can't meet all the needs of a developer they won't use it. You could promise to incorporate improvements in to the standards, but what happens if you get hit by a bus? If you are the only person who can legally change the standard it will eventually stagnate and become irrelevant.

How to programmatically convert HTML to epub? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Can I do this conversion with any programming language or library?
The short answer is yes, it can be done in any programming language.
Basic steps:
Convert your HTML to XHTML (+ CSS). This can be done in your program or through an XSLT file.
Copy your files (XHTML, CSS, any images and fonts) into a directory structure that follows the format.
Zip the directory structure up and name the archive with a ".epub" extension.
Some web sites to help you get started:
A good tutorial for what's in an epub file (and how to create one yourself) can be found here: http://www.jedisaber.com/eBooks/Introduction.shtml. I used this to get started myself.
Specs for the .epub standard are here: http://www.idpf.org/
A validator for .epubs can be downloaded from here: https://github.com/IDPF/epubcheck
June 2015 Note: The epubcheck validator has moved from google code to GitHub; note the new URL.
Calibre supports a wide variety of input formats, including HTML, and a wide variety of output formats, including EPUB, but it's not "a programming language or library". Are there specific reasons you desire a programming-based approach rather than a free-standing tool? If so, maybe Python and ebookmaker.py, for example, could help you.
A late reply, but I found the Python 3-based ebookmaker to be of value, at least after I contributed a pull request to remove a UTF-8 BOM. One problem with it appears to be that it uses brittle regular expressions to parse HTML, but I guess I'll have to report it there.
Here's pdf to epub, I know that's not what you're after, but it's a start.
The calibre package may have what you want
I am using the following library from Aspose - http://www.aspose.com/categories/.net-components/aspose.words-for-.net/default.aspx
In just two lines of code I am able to do html to epub conversions. Using this currently in a production system.
Document doc = new Document(_sourceFilePath);
doc.Save(_destinationFilePath, SaveFormat.Epub);
I just started to implement such a tool in Java (OpenJDK compatible): html2epub. In order to get rid of manually editing the config file, I'll probably start a separate tool to generate the config file from any given directory (however, it would still be necessary to determine the order of the XHTMLs in the EPUB - for non-programmatical use, developing a GUI helper tool could be considered, for a fully flexible programmatical solution, I haven't come up with an idea yet). Before that, I implemented shell script based converters for custom XML input (hag2epub tools) - in case you're interested, I would probably port them to XHTML input (with a config file for the EPUB metadata or obtaining metadata from the topmost index.html of a directory, if existing).
I have the same issue previously, necause I want to read some webpage content offline on my iPad. I have no idea and I am not a computer savvy. There are calibre or stanza blabla....
But for me they are just formats converters and I need a ePub book creator which will allows me to combine many desired documents together to read. Then I found a bookish html to ePub converter, I save the html page from web then convert with it. It's a quite good tool for me now.

What are the benefits and drawbacks of using header files? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I had some experience on programming languages like Java, C#, Scala as well as some lower level programming language like C, C++, Objective - C.
My observation is that low level languages try separate out header files and implementation files while other higher level programming language never separate it out. Those languages use some identifiers like public, private, protected to try to do the jobs of header files. C++ also have both identifiers and header files as well
I saw one benefit of using header file (in some book like Code Complete), they talk about that using header files, people can never look at our implementation file and it helps with encapsulation.
A drawback is that it creates too many files for me. Sometimes, it looks like verbose.
It is just my thought and I don't know if there are any other benefits and drawbacks that people ever see and work with header file
This question may not relate directly to programming but I think that if I can understand better about programming to interface, design software.
They allow you to distribute the API of a library so the compiler can compile correct code.
As in C, rather than including the whole implementation, you just include the definition of what is in the library when linked.
In this sense, the benefits are mainly for the compiler. Hence you installing a binary library into say /lib and headers into your include search path. You are saying, at runtime, expect these symbols with this calling convention to be available.
When they are not required by the compiler/linker/interpreter then the convention for that language is the best way to do it because that's what other programmers expect to find. Conventional is expected.
Languages such as C# include the ability to inspect libraries for information from the binary blob, hence in many of these languages you don't require headers. Tools such as Cecil for C# also allow you to inspect a library yourself (and even modify it).
In short, some languages remove the benefits of headers and allow a library to be inspected for all the compile-time information required to ensure linking code meets the same interface/api specs.
I'm not sure exactly what question you are asking, so I will try to rephrase it:
What is the benefit of putting public information in a separate (header or interface) file, as opposed to simply marking information as public or private wherever it appears?
The main benefit of having a separate interface or header file is that it reduces the cognitive load on the reader. If you are a trying to understand a large system, you can tackle one implementation file at a time, and you need to read only the interfaces of the other implementations/classes/modules it depends on. This is a major benefit, and languages that do not require separate interface files (such as Java) or cannot even express interfaces in separate files (such as Haskell) often provide tools such as Doxygen or Haddock so that a separate interface, for people to read, is generated from the implementation.
I strongly prefer languages like Standard ML, Objective Caml, and Modula-2/3, where there is a separate interface file available for scrutiny. Having separate header files in C is also good, but not quite as good because in general, the header files cannot be checked independently by the compiler. (C++ header files are less good because they allow private information, such as private fields or the implementations of inline methods, to leak out into the header files, and so the public information becomes diluted.)
It's folklore in the language-design world that for typical statically typed languages, only about 10% of the information in a module is public (measured by lines of code). By putting this information in a separate header file, you reduce the reader's workload by roughly a factor of ten.
They use some identifiers like public, private, protected to do the jobs of header files.
I think you're wrong there: C++ for instance still has public private and protected, but it's common to split the implementation from the interface with a header file (although that doesn't go for function-templates).
I think it's in general a good idea to seperate interface from implementation when you're creating libraries, since you then never expose the inner workings of anything to the client and thus the client can never deliberately make code that depends on the implemenation. The choice if you want to split it is up to you. I must admit that for my own code (small programs I write for myself), I don't use it often.
In context of c The header file implementation brings lots of readability in our program and it becomes easy to understand. If it is the way to write our code systematically and header file brings abstraction,standardization and loose coupling between our main function file(.c) and other (.c) files which we are using.

What is the definition of an open source programming language? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Languages like Ruby and Python are usually referred-to as open source, but what makes them so?
Is it an open-source compiler?, or interpreter or execution virtual machine?
If we're talking about the compiler, then would C++ be open source?
At the core, as others have observed, there really is no such thing as an "open source language". Only code can be open source in the strictest sense. So there can be open source compilers, runtimes, libraries, etc.
With many languages, however, the implementation (compiler/runtime) is almost inseparable from the language itself. This is the case with Ruby, Python, etc., where the language is effectively defined by its primary/original implementation. While there are other implementations of these languages, the primary implementation and the language are virtually interchangable. In such cases where the primary implementation is also open source, it makes some sense to refer to it as an open source languages, especially since such languages tend to have a community that is also almost entirely built around and friendly to open source software.
I don't think languages are generally considered to be open source, but rather the software implementing the language (whether it's a compiler or a virtual machine or whatever). It follows that a given language can have both open-source and non-open-source implementations. For example, there are many closed-source C++ compilers, as well as open source ones.
Perhaps one could make a distinction between a language that is controlled by a single entity (eg. C#) versus a language that is grown through community contributions (eg. Python or even Java).
I usually hear "open source language" applied to languages which are modified according to the wishes of the community. For example, Python has the PEP process, which allows anybody interested to alter the syntax / semantics of the language itself.
C and C++ are community-driven as well, though due to their age and ubiquity any changes require an incredible standardization effort. C++0x has been under design for years, and C has seen only 3 major versions (K&R, C89, C99).
Languages which are controlled by a single entity with very little community input, such as Java or C#, are usually considered "closed" regardless of the available implementations. There are GPL'd implementations of both the Java and .NET VMs available, but the language's evolution isn't community-driven. For an example of the grief this can cause, see efforts to add closures to Java.
I must admit I've never heard of a language being referred to as open source but I guess one way of viewing it is that the two examples you have given, Ruby and Python, are (AFAIK and I'm not an expert at all in either) both non-compiled languages whereas C and C++ are compiled.
So for client-side Ruby and Python applications you have to make the code available to the user since it gets interpreted at run-time whereas for compiled languages this is optional since only the compiled executable is required.
Of course on the other hand many Ruby and Python applications will be server-side, as part of the implementation of a website for example, and so the code is interpreted on the server and therefore never visible by the end user.
People often use the term "language" synonymously with the entire programming environment encompassing IDE, actual language, runtime environment/architecture and code libraries/frameworks. So when you say "open" I immediately think of Sun Microsystems releasing the code for the Java framework and VM as open source.
Then you have the likes of C#/.Net where the language, the core framework classes and the CLR spec are submitted to ECMA as a standard. Third parties such as Mono can implement those open, standardized components without having to license the technology and it could therefore be described as being open to an extent even though Microsoft's implementation is closed source (or only partially open anyway) and a commercial product. In Mono's case they implement some of the periphery framework classes that aren't standardised/open which is potentially a legal grey area.
Can we consider Open source language mainly in terms of GNU licences? Or should that be only the entity [comunity, company, etc.] driven criteria?

Best practices for version information?

I am currently working on automating/improving the release process for packaging my shop's entire product. Currently the product is a combination of:
Java server-side codebase
XML configuration and application files
Shell and batch scripts for administrators
Statically served HTML pages
and some other stuff, but that's most of it
All or most of which have various versioning information contained in them, used for varying purposes. Part of the release packaging process involves doing a lot of finding, grep'ing and sed'ing (in scripts) to update the information. This glue that packages the product seems to have been cobbled together in an organic, just-in-time manner, and is pretty horrible to maintain. For example, some Java methods create Date objects for the time of release, the arguments for which are updated by a textual replacement, without compiler validation... just, urgh.
I'm trying avoid giving examples of actual software used (i.e. CVS, SVN, ant, etc.) because I'd like to avoid the "use xyz's feature to do this" and concentrate more on general practices. I'd like to blame shoddy design for the problem, but if I had to start again, still using varying technologies, I'd be unsure how best to go about handling this, beyond laying down conventions.
My questions is, are there any best practices or hints and tips for maintaining and updating versioning information across different technologies, filetypes, platforms and version control systems?
Create a properties file that contains the version number and have all of the different components reference the properties file
Java files can reference the properties through
XML can use includes?
HTML can use a JavaScript to write the version number from the properties in the HTML
Shell scripts can read in the file
Indeed, to complete Craig Angus's answer, the rule of thumb here should be to not include any meta-informations in your normal delivery files, but to report those meta-data (version number, release date, and so on) into one special file -- included in the release --.
That helps when you use one VCS (Version Control System) tool from the development to homologation to pre-production.
That means whenever you load a workspace (either for developing, or for testing or for preparing a release into production), it is the versionning tool which gives you all the details.
When you prepare a delivery (a set of packaged files), you should ask that VCS tool about every meta-information you want to keep, and write them in a special file itself included into the said set of files.
That delivery should be packaged in an external directory (outside any workspace) and:
copied to a shared directory (or a maven repository) if it is a non-official release (but just a quick packaging for helping the team next door who is waiting for your delivery). That way you can make 10 or 20 delivers a day, it does not matter: they are easily disposable.
imported into the VCS in order to serve as official deliveries, and in order to be deployed easily since all you need is to ask the versionning tool for the right version of the right deliver, and you can begin to deploy it.
Note: I just described a release management process mostly used for many inter-dependant projects. For one small single project, you can skip the import in the VCS tool and store your deliveries elsewhere.
In addition to Craig Angus' ones include the version of tools used.