ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] question about module `basicexam`
@ 2026-02-23 18:17 Pablo Rodriguez via ntg-context
  2026-02-23 22:59 ` [NTG-context] " Max Chernoff via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2026-02-23 18:17 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

Dear list,

I have an issue installing a module (`basicexam') automatically, even
after modifying `mtx-install-imp-modules.lua`.

I tried to install it with the command:

  mtxrun --script install-modules --install basicexam

As error message, I get https://modules.contextgarden.net/dl/basicexam.zip.

Module info seems to be right
(https://modules.contextgarden.net/cgi-bin/module.cgi/ruid=4231344815/action=view/id=157),
but https://modules.contextgarden.net/dl/ sorts the `basicexam-*.zip`
files in a rather uncommon way:

    basicexam-2025.12.12.zip
    basicexam-2026.02.18.zip
    basicexam-20250102A.zip

At least, `ls -lh basicexam-*` in “Fedora 43” gives the more standard:

    basicexam-20250102A.zip
    basicexam-2025.12.12.zip
    basicexam-2026.02.18.zip

This prevents the symlink `basicexam.zip` from being generated and then
the `mtxrun` command cannot find it.

Is there any way to fix this? I wonder whether the symlink might need to
be generated manually.

Many thanks for your help,

Pablo

[-- Attachment #2: basicexam.diff --]
[-- Type: text/x-patch, Size: 1178 bytes --]

--- /mtx-install-imp-modules.lua	2026-02-10 18:10:21.836811208 +0100
+++ /mtx-install-imp-modules.lua	2026-02-11 18:32:14.089051256 +0100
@@ -17,10 +17,10 @@
         ["animation"]         = { url = "modules", zips = { "t-animation.zip" } },         -- probably obsolete
         ["annotation"]        = { url = "modules", zips = { "t-annotation.zip" } },
      -- ["aquamints"]         = { url = "modules", zips = { "aquamints.zip" } },           -- obsolete (fonts)
+        ["basicexam"]         = { url = "modules", zips = { "basicexam.zip" } },
         ["bibmod-doc"]        = { url = "modules", zips = { "bibmod-doc.zip" } },
      -- ["bnf-0.3"]           = { url = "modules", zips = { "t-bnf-0.3.zip" } },
         ["bnf"]               = { url = "modules", zips = { "t-bnf.zip" } },
-        ["chat"]              = { url = "modules", zips = { "chat.zip" } },
         ["chromato"]          = { url = "modules", zips = { "t-chromato.zip" } },
      -- ["cmscbf"]            = { url = "modules", zips = { "t-cmscbf.zip" } },            -- obsolete (fonts)
      -- ["cmttbf"]            = { url = "modules", zips = { "t-cmttbf.zip" } },            -- obsolete (fonts)


[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: question about module `basicexam`
  2026-02-23 18:17 [NTG-context] question about module `basicexam` Pablo Rodriguez via ntg-context
@ 2026-02-23 22:59 ` Max Chernoff via ntg-context
  2026-02-24  6:39   ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Max Chernoff via ntg-context @ 2026-02-23 22:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pablo Rodriguez, Max Chernoff

Hi Pablo,

On Mon, 2026-02-23 at 19:17 +0100, Pablo Rodriguez via ntg-context wrote:
> but https://modules.contextgarden.net/dl/ sorts the `basicexam-*.zip`
> files in a rather uncommon way:
>
>     basicexam-2025.12.12.zip
>     basicexam-2026.02.18.zip
>     basicexam-20250102A.zip
>
> At least, `ls -lh basicexam-*` in “Fedora 43” gives the more standard:
>
>     basicexam-20250102A.zip
>     basicexam-2025.12.12.zip
>     basicexam-2026.02.18.zip

The sorting order depends on the current locale:

    $ cat /etc/os-release | grep PRETTY_NAME
    PRETTY_NAME="Fedora Linux 43 (Workstation Edition)"
    $ touch basicexam-2025.12.12.zip basicexam-2026.02.18.zip basicexam-20250102A.zip

    $ locale | grep LC_COLLATE
    LC_COLLATE="en_CA.UTF-8"
    $ ls -1
    basicexam-20250102A.zip
    basicexam-2025.12.12.zip
    basicexam-2026.02.18.zip

    $ LC_COLLATE=C ls -1
    basicexam-2025.12.12.zip
    basicexam-20250102A.zip
    basicexam-2026.02.18.zip

    $ LC_COLLATE=es_ES.UTF-8 ls -1
    basicexam-20250102A.zip
    basicexam-2025.12.12.zip
    basicexam-2026.02.18.zip

And if you're using a program that doesn't sort the output, then the
order will be random (but usually based on the date the file was
created):

    $ rm 1 2 3; touch 1 2 3; find -type f
    ./3
    ./2
    ./1

    $ rm 1 2 3; touch 3 2 1; find -type f
    ./1
    ./2
    ./3

    $ rm 1 2 3; touch 2 1 3; find -type f
    ./3
    ./1
    ./2

So I don't think that it's really safe to assume that there is a single
correct way of sorting a list of files.

Thanks,
-- Max
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: question about module `basicexam`
  2026-02-23 22:59 ` [NTG-context] " Max Chernoff via ntg-context
@ 2026-02-24  6:39   ` Pablo Rodriguez via ntg-context
  2026-02-24  8:17     ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2026-02-24  6:39 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 2/23/26 23:59, Max Chernoff via ntg-context wrote:
> Hi Pablo,
> […]
> The sorting order depends on the current locale:
> […]

Many thanks for your reply, Max.

Yes, but in all your cases `2025` comes before `2026`.

> And if you're using a program that doesn't sort the output, then the
> order will be random (but usually based on the date the file was
> created):
> […]
> So I don't think that it's really safe to assume that there is a single
> correct way of sorting a list of files.

`Rather uncommon` (not wrong, since I don’t know which sorting criterium
is using) is to put `2025` both before and after `2026`.

Contents of https://modules.contextgarden.net/dl/ give the impression to
be alphabetically sorted (uppercase chars coming before lowercase ones).

In the end, this particular file sorting seems to be preventing the
creation of the `basicexam.zip` symlink, which also prevents its
automatic installation by `mtxrun`.

Many thanks for your help,

Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: question about module `basicexam`
  2026-02-24  6:39   ` Pablo Rodriguez via ntg-context
@ 2026-02-24  8:17     ` Taco Hoekwater
  2026-02-24  9:53       ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2026-02-24  8:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pablo Rodriguez

Hi,

> On 24 Feb 2026, at 07:39, Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> wrote:
> 
> On 2/23/26 23:59, Max Chernoff via ntg-context wrote:
> 
> Contents of https://modules.contextgarden.net/dl/ give the impression to
> be alphabetically sorted (uppercase chars coming before lowercase ones).

It is not the sort order as such that is the problem, the problem is the
construction of the version numbers. The code has to interpret these
numbers to figure out which is the latest, and that means it has to parse
the version strings. The code is not all that smart, so it tends to fail on 
version strings that change their internal logic over time.

I created basicexam.zip manually, linking to basicexam-2026.02.18.zip. 

As long as the future version numbers stick to YYYY.MM.DD as well, there will
be no more problems.

Best wishes,
Taco


— 
Taco Hoekwater              E: taco@bittext.nl
genderfluid (all pronouns)


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: question about module `basicexam`
  2026-02-24  8:17     ` Taco Hoekwater
@ 2026-02-24  9:53       ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2026-02-24  9:53 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 2/24/26 09:17, Taco Hoekwater wrote:
> Hi,
> 
>> On 24 Feb 2026, at 07:39, Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> wrote:
>>
>> On 2/23/26 23:59, Max Chernoff via ntg-context wrote:
>>
>> Contents of https://modules.contextgarden.net/dl/ give the impression to
>> be alphabetically sorted (uppercase chars coming before lowercase ones).
> 
> It is not the sort order as such that is the problem, the problem is the
> construction of the version numbers. The code has to interpret these
> numbers to figure out which is the latest, and that means it has to parse
> the version strings. The code is not all that smart, so it tends to fail on 
> version strings that change their internal logic over time.
> 
> I created basicexam.zip manually, linking to basicexam-2026.02.18.zip. 
> 
> As long as the future version numbers stick to YYYY.MM.DD as well, there will
> be no more problems.
Hi Taco,

many thanks for fixing the issue and explaining it.

Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-24  9:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 18:17 [NTG-context] question about module `basicexam` Pablo Rodriguez via ntg-context
2026-02-23 22:59 ` [NTG-context] " Max Chernoff via ntg-context
2026-02-24  6:39   ` Pablo Rodriguez via ntg-context
2026-02-24  8:17     ` Taco Hoekwater
2026-02-24  9:53       ` Pablo Rodriguez via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).