diff --git a/README.md b/README.md index fab023d7f..2f06a09b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Inform 7 -[Version](notes/versioning.md): 10.2.0-beta+6X53 'Krypton' (2 May 2024) +[Version](notes/versioning.md): 10.2.0-beta+6X54 'Krypton' (4 May 2024) ## About Inform diff --git a/build.txt b/build.txt index cf3ca9b4e..d13229f46 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ Prerelease: beta -Build Date: 2 May 2024 -Build Number: 6X53 +Build Date: 4 May 2024 +Build Number: 6X54 diff --git a/docs/assertions-module/3-ldr.html b/docs/assertions-module/3-ldr.html index 020700bd9..2aab754a8 100644 --- a/docs/assertions-module/3-ldr.html +++ b/docs/assertions-module/3-ldr.html @@ -378,7 +378,7 @@ function togglePopup(material_id) { inform_project *proj = Task::project(); inbuild_licence *L = proj->as_copy->licence; text_stream *mention = NULL; - int licences_cited = FALSE; + int licences_cited = FALSE, include_MIT = FALSE, include_MIT_0 = FALSE; if (format == HTML_LICENSESFORMAT) { WRITE("<html><body>\n"); @@ -409,7 +409,12 @@ function togglePopup(material_id) { LicenceDeclaration::link(OUT, I"https:spdx.org/licenses/", format); Close paragraph6.3; } - + if (format == HTML_LICENSESFORMAT) { + if (include_MIT) + TextFiles::write_file_contents(OUT, InstalledFiles::filename(MIT_LICENSE_IRES)); + if (include_MIT_0) + TextFiles::write_file_contents(OUT, InstalledFiles::filename(MIT_0_LICENSE_IRES)); + } if (format == HTML_LICENSESFORMAT) WRITE("</body></html>\n"); } @@ -417,7 +422,16 @@ function togglePopup(material_id) {

-    WRITE("(c) %S %d", L->rights_owner, L->copyright_year);
+    text_stream *id = NULL;
+    if (L->standard_licence) id = L->standard_licence->SPDX_id;
+    if (Str::eq(id, I"MIT")) include_MIT = TRUE;
+    if (Str::eq(id, I"MIT-0")) include_MIT_0 = TRUE;
+    if ((Str::eq(id, I"Unlicense")) || (Str::eq(id, I"CC0-1.0"))) {
+        WRITE("placed in the public domain by ");
+    } else {
+        WRITE("(c) ");
+    }
+    WRITE("%S %d", L->rights_owner, L->copyright_year);
     if (L->revision_year >= L->copyright_year) WRITE("-%d", L->revision_year);
     if (L->standard_licence) {
         WRITE("%S under licence %S", mention, L->standard_licence->SPDX_id);
diff --git a/docs/html-module/2-if.html b/docs/html-module/2-if.html
index 4ac4214c0..6a32b988b 100644
--- a/docs/html-module/2-if.html
+++ b/docs/html-module/2-if.html
@@ -81,6 +81,8 @@ but they're just plain old files, and are not managed by Inbuild as "copies".
 enum REGISTRY_JSON_REQS_IRES
 enum INBUILD_JSON_REQS_IRES
 enum UNICODE_DATA_IRES
+enum MIT_LICENSE_IRES
+enum MIT_0_LICENSE_IRES
 
 filename *InstalledFiles::filename(int ires) {
@@ -106,6 +108,10 @@ but they're just plain old files, and are not managed by Inbuild as "copies".
                 return Filenames::in(misc, I"inbuild.jsonr");
         case UNICODE_DATA_IRES:
                 return Filenames::in(misc, I"UnicodeData.txt");
+        case MIT_LICENSE_IRES:
+                return Filenames::in(misc, I"MIT.html");
+        case MIT_0_LICENSE_IRES:
+                return Filenames::in(misc, I"MIT-0.html");
 
         case CBLORB_REPORT_MODEL_IRES:
                 return InstalledFiles::varied_by_platform(models, I"CblorbModel.html");
diff --git a/inform7/Figures/memory-diagnostics.txt b/inform7/Figures/memory-diagnostics.txt
index a40f7fc1b..d1fc21936 100644
--- a/inform7/Figures/memory-diagnostics.txt
+++ b/inform7/Figures/memory-diagnostics.txt
@@ -1,4 +1,4 @@
-Total memory consumption was 143646K = 140 MB
+Total memory consumption was 143647K = 140 MB
 
  ---- was used for 2172492 objects, in 383444 frames in 0 x 800K = 0K = 0 MB:
 
@@ -267,7 +267,7 @@ Total memory consumption was 143646K = 140 MB
 
 100.0% was used for memory not allocated for objects:
 
-    63.1%  text stream storage                      92831728 bytes in 541299 claims
+    63.1%  text stream storage                      92832184 bytes in 541303 claims
      3.9%  dictionary storage                       5776960 bytes in 7830 claims
      ----  sorting                                  6416 bytes in 1489 claims
      4.8%  source text                              7200000 bytes in 3 claims
diff --git a/inform7/Figures/timings-diagnostics.txt b/inform7/Figures/timings-diagnostics.txt
index ccf34a40b..33f77fbe8 100644
--- a/inform7/Figures/timings-diagnostics.txt
+++ b/inform7/Figures/timings-diagnostics.txt
@@ -1,21 +1,21 @@
 100.0% in inform7 run
-     67.4% in compilation to Inter
-         45.5% in //Sequence::undertake_queued_tasks//
+     67.1% in compilation to Inter
+         45.1% in //Sequence::undertake_queued_tasks//
           4.8% in //MajorNodes::pre_pass//
           3.3% in //MajorNodes::pass_1//
           1.8% in //ImperativeDefinitions::assess_all//
           1.4% in //RTKindConstructors::compile//
           1.4% in //RTPhrasebook::compile_entries//
           1.1% in //Sequence::lint_inter//
-          0.7% in //ImperativeDefinitions::compile_first_block//
           0.3% in //CompletionModule::compile//
+          0.3% in //ImperativeDefinitions::compile_first_block//
           0.3% in //MajorNodes::pass_2//
           0.3% in //Sequence::undertake_queued_tasks//
           0.3% in //Sequence::undertake_queued_tasks//
           0.3% in //World::stage_V//
-          5.2% not specifically accounted for
-     26.6% in running Inter pipeline
-          8.8% in step 14/15: generate inform6 -> auto.inf
+          5.6% not specifically accounted for
+     26.8% in running Inter pipeline
+          8.9% in step 14/15: generate inform6 -> auto.inf
           7.0% in step 5/15: load-binary-kits
           5.5% in step 6/15: make-synoptic-module
           1.8% in step 9/15: make-identifiers-unique
@@ -24,5 +24,5 @@
           0.3% in step 7/15: shorten-wiring
           0.3% in step 8/15: detect-indirect-calls
           1.8% not specifically accounted for
-      5.1% in supervisor
+      5.2% in supervisor
       0.8% not specifically accounted for
diff --git a/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json b/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json
index a8dacedb5..9982559a8 100644
--- a/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json
+++ b/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json
@@ -2,7 +2,7 @@
     "is": {
         "type": "kit",
         "title": "Architecture16Kit",
-        "version": "10.2.0-beta+6X53"
+        "version": "10.2.0-beta+6X54"
     },
     "compatibility": "16-bit",
     "kit-details": {
diff --git a/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json b/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json
index f6d1e892a..5d681a9eb 100644
--- a/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json
+++ b/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json
@@ -2,7 +2,7 @@
     "is": {
         "type": "kit",
         "title": "Architecture32Kit",
-        "version": "10.2.0-beta+6X53"
+        "version": "10.2.0-beta+6X54"
     },
     "compatibility": "32-bit",
     "kit-details": {
diff --git a/inform7/Internal/Inter/BasicInformKit/kit_metadata.json b/inform7/Internal/Inter/BasicInformKit/kit_metadata.json
index 8ccfbe5e7..58a44c1e5 100644
--- a/inform7/Internal/Inter/BasicInformKit/kit_metadata.json
+++ b/inform7/Internal/Inter/BasicInformKit/kit_metadata.json
@@ -2,7 +2,7 @@
     "is": {
         "type": "kit",
         "title": "BasicInformKit",
-        "version": "10.2.0-beta+6X53"
+        "version": "10.2.0-beta+6X54"
     },
     "needs": [ {
         "need": {
diff --git a/inform7/Internal/Inter/CommandParserKit/kit_metadata.json b/inform7/Internal/Inter/CommandParserKit/kit_metadata.json
index 301f98060..3ca7d550c 100644
--- a/inform7/Internal/Inter/CommandParserKit/kit_metadata.json
+++ b/inform7/Internal/Inter/CommandParserKit/kit_metadata.json
@@ -2,7 +2,7 @@
     "is": {
         "type": "kit",
         "title": "CommandParserKit",
-        "version": "10.2.0-beta+6X53"
+        "version": "10.2.0-beta+6X54"
     },
     "needs": [ {
         "need": {
diff --git a/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json b/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json
index 7ee1150ae..8a9e2f90f 100644
--- a/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json
+++ b/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json
@@ -2,7 +2,7 @@
     "is": {
         "type": "kit",
         "title": "EnglishLanguageKit",
-        "version": "10.2.0-beta+6X53"
+        "version": "10.2.0-beta+6X54"
     },
     "needs": [ {
         "need": {
diff --git a/inform7/Internal/Inter/WorldModelKit/kit_metadata.json b/inform7/Internal/Inter/WorldModelKit/kit_metadata.json
index ef666cc92..383102999 100644
--- a/inform7/Internal/Inter/WorldModelKit/kit_metadata.json
+++ b/inform7/Internal/Inter/WorldModelKit/kit_metadata.json
@@ -2,7 +2,7 @@
     "is": {
         "type": "kit",
         "title": "WorldModelKit",
-        "version": "10.2.0-beta+6X53"
+        "version": "10.2.0-beta+6X54"
     },
     "needs": [ {
         "need": {
diff --git a/inform7/Internal/Miscellany/MIT-0.html b/inform7/Internal/Miscellany/MIT-0.html
new file mode 100644
index 000000000..87de3c918
--- /dev/null
+++ b/inform7/Internal/Miscellany/MIT-0.html
@@ -0,0 +1,3 @@
+

MIT No Attribution (MIT-0)

+

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.

+

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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

diff --git a/inform7/Internal/Miscellany/MIT.html b/inform7/Internal/Miscellany/MIT.html new file mode 100644 index 000000000..4788dd3fc --- /dev/null +++ b/inform7/Internal/Miscellany/MIT.html @@ -0,0 +1,4 @@ +

MIT License (MIT)

+

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

+

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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

diff --git a/inform7/assertions-module/Chapter 3/Licence Declaration Requests.w b/inform7/assertions-module/Chapter 3/Licence Declaration Requests.w index 21cf7efd3..d995ca414 100644 --- a/inform7/assertions-module/Chapter 3/Licence Declaration Requests.w +++ b/inform7/assertions-module/Chapter 3/Licence Declaration Requests.w @@ -272,7 +272,7 @@ void LicenceDeclaration::describe(OUTPUT_STREAM, int format) { inform_project *proj = Task::project(); inbuild_licence *L = proj->as_copy->licence; text_stream *mention = NULL; - int licences_cited = FALSE; + int licences_cited = FALSE, include_MIT = FALSE, include_MIT_0 = FALSE; if (format == HTML_LICENSESFORMAT) { WRITE("\n"); @@ -303,12 +303,26 @@ void LicenceDeclaration::describe(OUTPUT_STREAM, int format) { LicenceDeclaration::link(OUT, I"https://spdx.org/licenses/", format); @; } - + if (format == HTML_LICENSESFORMAT) { + if (include_MIT) + TextFiles::write_file_contents(OUT, InstalledFiles::filename(MIT_LICENSE_IRES)); + if (include_MIT_0) + TextFiles::write_file_contents(OUT, InstalledFiles::filename(MIT_0_LICENSE_IRES)); + } if (format == HTML_LICENSESFORMAT) WRITE("\n"); } @ = - WRITE("(c) %S %d", L->rights_owner, L->copyright_year); + text_stream *id = NULL; + if (L->standard_licence) id = L->standard_licence->SPDX_id; + if (Str::eq(id, I"MIT")) include_MIT = TRUE; + if (Str::eq(id, I"MIT-0")) include_MIT_0 = TRUE; + if ((Str::eq(id, I"Unlicense")) || (Str::eq(id, I"CC0-1.0"))) { + WRITE("placed in the public domain by "); + } else { + WRITE("(c) "); + } + WRITE("%S %d", L->rights_owner, L->copyright_year); if (L->revision_year >= L->copyright_year) WRITE("-%d", L->revision_year); if (L->standard_licence) { WRITE("%S under licence %S", mention, L->standard_licence->SPDX_id); diff --git a/resources/Documentation/Writing with Inform.md b/resources/Documentation/Writing with Inform.md index ca9638884..232e07a4a 100644 --- a/resources/Documentation/Writing with Inform.md +++ b/resources/Documentation/Writing with Inform.md @@ -18012,30 +18012,33 @@ If one of the other four settings is made, but no `licence`, it defaults to `"Un The best way to share an Inform extension with the world may be to submit it to the Inform Public Library. This is a curated collection, rather than being a service anyone can publish on, and the curators are looking for generally useful extensions whose subject matter will be suitable for users of all ages, and will not run into legal difficulties. Inform is widely used in education, so the Public Library may be being browsed in classrooms by young children. -The Public Library also aims to host extensions which users can grab and make use of without legal worries, so it can only accept licenced extensions, and for policy reasons it will only accept a short list of simple, easily understood, popular and highly permissive licences — currently, 5 are allowed. +The Public Library also aims to host extensions which users can grab and make use of without legal worries, so it can only accept licenced extensions, and for policy reasons it will only accept a short list of simple, easily understood, popular and highly permissive licences — currently, six are allowed. This is many fewer than the full SPDX list, which currently includes some 617 non-deprecated open-source licences. But many of those are obscure enough that there's no case law on them, or else they are trying to achieve particular policy goals: the `BSD-3-Clause-No-Nuclear-Warranty`, for example. Not all are certified as "free" or "open" by the two bodies usually considered authoritative, the Free Software Foundation and the Open Source Initiative. And even those which are rated both "free" and "open", which are reasonably popular, and which have no obvious axe to grind, may not be sufficiently free for all of our users' needs. -First, we suggest the following as alternative ways to, essentially, put an extension into what is vaguely called "the public domain" — meaning, loosely speaking, "do what you like with this". It's not as easy to make that offer in a legally foolproof way in worldwide jurisdictions as non-lawyers expect, but here are three reliable ways: - -Licence code | Full name -------------- | --------- -`"CC0-1.0"` | Creative Commons Zero v1.0 Universal -`"Unlicense"` | The Unlicense -`"MIT-0"` | MIT No Attribution - -Second, these two licences are allowed as ways to make usage _almost_ completely free, but where there's still a requirement to acknowledge the original author, and not to remove the original author's name: +If we want to open-source an extension, leave users almost completely free to use it, but still keep the copyright and require users to acknowledge that, then the following can be used: Licence code | Full name ---------------- | --------- +`"MIT"` | MIT License `"CC-BY-4.0"` | Creative Commons Attribution 4.0 International `"Artistic-2.0"` | Artistic License 2.0 -Extensions licenced on these terms can safely be used since Inform automatically complies with the need to acknowledge in its handling of the ``COPYRIGHT`` and ``LICENCE`` commands, and also when releasing a project. For example, if it releases a story to a website, that website will include a page of copyright acknowledgements. +Extensions licenced on these terms can safely be used since Inform automatically complies with the need to acknowledge in its handling of the ``COPYRIGHT`` and ``LICENCE`` commands, and also when releasing a project. For example, if it releases a story to a website, that website will include a page of copyright acknowledgements. If the `MIT` licence is used, the text of that licence is included on this website page, which satisfies its only other requirement. -The source code to Inform itself is under `Artistic-2.0`, in fact, so the built-in Inform extensions — the Standard Rules, Basic Inform and English Language — are covered by that automatically. But there's no need for anyone else to make this choice. `CC-BY-4.0` is better known and more widely used, but some people feel it's better suited to pictures and text than to software, where the three "zero" licences above may be better choices. +`Artistic-2.0` only makes this list because it is the licence used for the source code to Inform itself, and so the built-in Inform extensions — the Standard Rules, Basic Inform and English Language — are covered by that automatically. It was designed for large pieces of software with a range of uses (it began as the licence for the Perl programming language), and is not a good fit for stand-alone extensions, since it has a relatively long and convoluted legal text. `CC-BY-4.0` is better known and more widely used, but some people feel it's better suited to pictures and text than to software, where `MIT` is much more widely used. -The down side of choosing `CC0-1.0`, `Unlicense` or `MIT-0` is that these do not even require the user to acknowledge our contribution: they can even remove our names and claim to have written the extension themselves. But of course it's not ethical to do that. Inform automatically acknowledges all extension contributors, even if the licence does not require it, and the Public Library will not host an extension if the curators think the author has been dishonest. So this concern is not much of a concern. The up side of choosing a "zero" licence is that it makes the legal position clear in a much more likely scenario — a situation where, twenty years from now, somebody wants to take over as the maintainer of the extension, and to rewrite it, but can't contact us to ask permission. A "zero" licence makes clear that this is completely legal. +The above all require attribution, and retain copyright. If we want to go further, the following are also available: + +Licence code | Full name +------------- | --------- +`"MIT-0"` | MIT No Attribution +`"CC0-1.0"` | Creative Commons Zero v1.0 Universal +`"Unlicense"` | The Unlicense + +Here `MIT-0` is a halfway-house: the author does still retain copyright, but the user doesn't have to acknowledge that. This would be a good fit for a `Use authorial modesty.` sort of extension. (As with `MIT`, Inform auto-includes a copy of this licence as part of any website release, since that is still required.) Under `CC0-1.0` and `Unlicense`, even copyright is donated to the public domain: this will affect how Inform prints the rights details — Inform will say ``Placed in the public domain by ...`` rather than ``(c) ...`` — but won't very much affect the freedom of users, which is almost complete for any of these licences. For real zealots, `CC0-1.0` is thought to relinquish all conceivable patent claims too, and has had more legal attention than the `Unlicense`, but both have their adherents. + +Some no-attribution licences are so free that users can even remove our names, fraudlently claim to be the author themselves, and so on. They certainly don't need to give us any credit. But just because this is legally allowed does not mean it's ethical, and Inform automatically acknowledges all extension contributors, even if the licence does not require it. The Public Library will not host an extension if the curators think the author has been dishonest. So this concern is not much of a concern. A more likely scenario to think about is: what if it's twenty years from now, and somebody wants to take over this extension as the new maintainer, but we're not around to be asked? The more free the licence, the more clear the position will be for that new maintainer. Note that the Public Library will _not_ accept `CC-BY-NC-4.0`, `CC-BY-NC-ND-4.0` and so on, and will not accept `GPL-2.0`, `GPL-3.0` or similar. We have made this policy choice because: @@ -18045,7 +18048,7 @@ Note that the Public Library will _not_ accept `CC-BY-NC-4.0`, `CC-BY-NC-ND-4.0` - Any story using an extension could, at a stretch, be considered a derivative work, and we don't want the legal safety of an extension to come down to delicate questions of law. So, no `-ND`, "no derivative works", clauses. -Extension authors are completely free to licence their extensions however they would like to, of course. This shortlist of five licences is simply a hosting-policy choice made by the Inform Public Library. Users are free to choose other licences and circulate extensions elsewhere. +Extension authors are completely free to licence their extensions however they would like to, of course. Our shortlist of six licences is simply a hosting-policy choice made by the Inform Public Library. Users are free to choose other licences and circulate extensions elsewhere. ## Compatibility with story file formats diff --git a/services/html-module/Chapter 2/Installed Files.w b/services/html-module/Chapter 2/Installed Files.w index 1d6a5b0f0..7f6392303 100644 --- a/services/html-module/Chapter 2/Installed Files.w +++ b/services/html-module/Chapter 2/Installed Files.w @@ -24,6 +24,8 @@ but they're just plain old files, and are not managed by Inbuild as "copies". @e REGISTRY_JSON_REQS_IRES @e INBUILD_JSON_REQS_IRES @e UNICODE_DATA_IRES +@e MIT_LICENSE_IRES +@e MIT_0_LICENSE_IRES = filename *InstalledFiles::filename(int ires) { @@ -49,6 +51,10 @@ filename *InstalledFiles::filename(int ires) { return Filenames::in(misc, I"inbuild.jsonr"); case UNICODE_DATA_IRES: return Filenames::in(misc, I"UnicodeData.txt"); + case MIT_LICENSE_IRES: + return Filenames::in(misc, I"MIT.html"); + case MIT_0_LICENSE_IRES: + return Filenames::in(misc, I"MIT-0.html"); case CBLORB_REPORT_MODEL_IRES: return InstalledFiles::varied_by_platform(models, I"CblorbModel.html");