uuid(n)
π uuid(n) β the manual page, but make it cute π
okay bestie so you're reading the uuid(n) page, and honestly? it's giving "small package, huge main character energy." it lives in tcllib, it's version 1.0.9, and it's about to hand you unique IDs like it's nothing. let's get into it π«Ά
β¨ NAME β¨
uuid β UUID generation and comparison
likeβ¦ that's the whole name. short. iconic. no notes. π
πΈ SYNOPSIS πΈ
package require Tcl 8.5 9
package require uuid ?1.0.9?
::uuid::uuid generate
::uuid::uuid equal id1 id2
so yeah, you need Tcl 8.5 through 9 (fr fr, that's the range), and the package itself is uuid, optionally versioned as ?1.0.9?. then there's literally only two commands. two. and they ate. π
π« DESCRIPTION π«
okay so this package is a generator of universally unique identifiers β that's UUID for short β and they're also known as globally unique identifiers, aka GUID. two names, one vibe. π
and here's the tea: this implementation follows the draft specification from reference (1)β¦ although that's actually an expired draft document. yes bestie, expired. still slaying anyway. πβ¨
π COMMANDS π
::uuid::uuid generateβ creates a type 4 uuid by MD5 hashing a number of bits of variant data, including the time and the hostname. returns the string representation of the brand-new uuid. new uuid just dropped π::uuid::uuid equal id1 id2β compares two uuids and returns true if both arguments are the same uuid. basically a vibe check for IDs. π₯
π¦ EXAMPLES π¦
look at her go:
% uuid::uuid generate
b12dc22c-5c36-41d2-57da-e29d0ef5839c
one line in, one gorgeous hyphenated string out. no cap. ππ
π REFERENCES π
- [1] Paul J. Leach, "UUIDs and GUIDs", February 1998. (
http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt)
π BUGS, IDEAS, FEEDBACK π
ngl, this document β and the package it describes β will undoubtedly contain bugs and other problems. it's not a maybe, it's a fact. so if you find one, please report it in the category uuid of the Tcllib Trackers at http://core.tcl.tk/tcllib/reportlist. π«Ά
also please send any ideas for enhancements you may have for either the package and/or the documentation. we want them. we're listening. πβ¨
when proposing code changes, please provide unified diffs β i.e. the output of diff -u.
and one more thing bestie, super important: attachments are strongly preferred over inlined patches. to attach something, go to the Edit form of the ticket immediately after its creation, and then use the left-most button in the secondary navigation bar. iykyk. π
π KEYWORDS π
GUID, UUID
ποΈ CATEGORY ποΈ
Hashes, checksums, and encryption
Β©οΈ COPYRIGHT Β©οΈ
Copyright (c) 2004, Pat Thoyts <patthoyts@users.sourceforge.net>
and that's the whole page, bestie!! this was tcllib, version 1.0.9, and the manual page is uuid(n). thank you for coming to my ted talk, go generate some uuids, mwah ππ§πΈ
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms