<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/gl/modules/randperm, branch master</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=master</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2025-09-14T12:44:56Z</updated>
<entry>
<title>maint: randperm: remove stale dependency</title>
<updated>2025-09-14T12:44:56Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-09-12T15:23:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b96cdc66d90245ae6bd714f757252f522dc34f33'/>
<id>urn:sha1:b96cdc66d90245ae6bd714f757252f522dc34f33</id>
<content type='text'>
* gl/modules/randperm: Remove assert-h dependency
not required since commit v9.5-34-g26ba82015
</content>
</entry>
<entry>
<title>maint: adjust to Gnulib module renaming</title>
<updated>2024-12-30T19:53:18Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-12-30T19:51:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=36e656390d25a094209032c9588bcf3df6736c94'/>
<id>urn:sha1:36e656390d25a094209032c9588bcf3df6736c94</id>
<content type='text'>
* bootstrap.conf, gl/modules/buffer-lcm, gl/modules/randperm:
* gl/modules/randread, gl/modules/strnumcmp, gl/modules/targetdir:
* gl/modules/xdectoint, gl/modules/xfts:
Adjust to recent renaming of Gnulib modules, e.g., stdbool → bool,
inttypes → inttypes-h.
</content>
</entry>
<entry>
<title>maint: prefer stdbit.h to count-leading-zeros.h</title>
<updated>2024-05-17T06:09:32Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-05-17T04:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=26ba820157bf3a6c5eee8cd57fff472d045c3d8c'/>
<id>urn:sha1:26ba820157bf3a6c5eee8cd57fff472d045c3d8c</id>
<content type='text'>
&lt;stdbit.h&gt; is in C23 and should be more portable in the long run,
now that Gnulib supports it.
* bootstrap.conf (gnulib_modules): Remove count-leading-zeros.
Add stdc_leading_zeros.
* gl/lib/randperm.c, src/ioblksize.h:
Include stdbit.h instead of count-leading-zeros.h.
* gl/lib/randperm.c (floor_lg): Remove; no longer needed.
(randperm_bound): Use stdc_bit_width instead of floor_lg;
* gl/modules/randperm (Depends-on): Remove count-leading-zeros.
Add stdc_bit_width.
* src/ioblksize.h (io_blksize): Use stdc_leading_zeros_ull
instead of count_leading_zeros_ll.
</content>
</entry>
<entry>
<title>maint: prefer static_assert to verify</title>
<updated>2022-09-15T06:16:31Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2022-09-15T05:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9a777a44b31b253c8909c09bdb83fbc62c46ef3e'/>
<id>urn:sha1:9a777a44b31b253c8909c09bdb83fbc62c46ef3e</id>
<content type='text'>
* bootstrap.conf: Add assert-h.
* gl/lib/randperm.c: Do not include verify.h.
* gl/lib/randperm.c, src/basenc.c, src/dd.c, src/digest.c:
* src/dircolors.c, src/expr.c, src/factor.c, src/ls.c, src/numfmt.c:
* src/od.c, src/seq.c, src/shred.c, src/sort.c, src/stat.c:
Prefer C23’s static_assert to nonstandard verify.
* gl/modules/randperm (Depends-on): Add assert-h.
</content>
</entry>
<entry>
<title>shuf: improve randperm overflow checking</title>
<updated>2019-10-22T22:04:43Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2019-10-22T19:58:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=74163ea677b6daf129b8bc03f8a9058a77ef3702'/>
<id>urn:sha1:74163ea677b6daf129b8bc03f8a9058a77ef3702</id>
<content type='text'>
* gl/lib/randperm.c: Include randperm.h first, since it’s the API.
Include stdint.h, count-leading-zeros.h, verify.h.
(floor_lg): Rename from ceil_log (which was not actually
implementing the ceiling!) and implement the floor using
count_leading_zeros.
(randperm_bound): Use floor_lg, not ceil_log.  Use uintmax_t
instead of size_t in case the size gets large on a 32-bit host.
* gl/modules/randperm (Depends-on): Add count-leading-zeros, stdint.
</content>
</entry>
<entry>
<title>maint: add missing ":" after "License" in local gnulib module files</title>
<updated>2011-12-03T13:04:23Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2011-12-03T13:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=79c5fcc681b823a4e5fbb8fd1baa47db4eccd86c'/>
<id>urn:sha1:79c5fcc681b823a4e5fbb8fd1baa47db4eccd86c</id>
<content type='text'>
This avoids spurious diagnostics when running our "bootstrap" script.
* gl/modules/heap: Append colon after "License".
* gl/modules/randint: Likewise.
* gl/modules/randperm: Likewise.
* gl/modules/randread: Likewise.
Reported by Stefano Lattarini.  Diagnosed by Bruno Haible.
</content>
</entry>
<entry>
<title>shuf: use memory more efficiently when returning a subset</title>
<updated>2011-05-14T09:30:12Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2011-05-13T17:41:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=27873f1deb69745c79d403bbb8e1145bc18f55b8'/>
<id>urn:sha1:27873f1deb69745c79d403bbb8e1145bc18f55b8</id>
<content type='text'>
* gl/lib/randperm.c (randperm_new): When the number of items
to return H, is much smaller than the total number of items N,
use a hash to represent the sparse permutations of the set N.
This is currently enabled for N &gt; 128K and N/H &gt; 32.
* tests/misc/shuf: Ensure shuf can quickly return 2 numbers
from a large range.
* gl/modules/randperm: Depend on hash.
* NEWS: Mention the change.
</content>
</entry>
<entry>
<title>Convert coreutils' rand*.{c,h,m4} into modules.</title>
<updated>2007-10-07T17:43:35Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2007-09-01T07:54:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=58a7ead41d056909784bfab9323c5f44f577d3d0'/>
<id>urn:sha1:58a7ead41d056909784bfab9323c5f44f577d3d0</id>
<content type='text'>
First step: move these files to gl/lib:
* lib/rand-isaac.c, lib/rand-isaac.h
* lib/randint.c, lib/randint.h
* lib/randperm.c, lib/randperm.h
* lib/randread.c, lib/randread.h

Step 2: add modules/rand* and remove now-unneeded .m4 files.
* gl/modules/randint: New file.
* gl/modules/randperm: New file.
* gl/modules/randread: New file.
* m4/randint.m4: Remove file.
* m4/randperm.m4: Remove file.
* m4/randread.m4: Remove file.

Step 3: use the new modules
* bootstrap.conf (gnulib_modules): Add randint and randperm.
* m4/prereq.m4 (gl_RANDINT, gl_RANDREAD, gl_RANDPERM): Don't require;
These have been removed.
(gl_ROOT_DEV_INO): Don't require; already handled via bootstrap.conf.
</content>
</entry>
</feed>
