uuid(3tcl)
π uuid β the manual, but make it cute π
okay so bestie, this is the uuid(3tcl) manual page, living in tcllib, and it's literally all about making and comparing UUIDs. it's short, it's sweet, it slays. let's get into it β¨
πΈ NAME πΈ
uuid β UUID generation and comparison. that's it, that's the whole vibe. generating them, comparing them, periodt.
β¨ SYNOPSIS β¨
the receipts, verbatim, no notes:
package require Tcl 8.5 9
package require uuid ?1.0.9?
::uuid::uuid generate
::uuid::uuid equal id1 id2
okay so you need Tcl 8.5 or 9, and the package uuid with an optional version 1.0.9. two commands. that's the whole API. iconic minimalism honestly π
π¦ DESCRIPTION π¦
this package is a generator of universally unique identifiers β UUIDs β also known as globally unique identifiers, aka GUIDs. yes bestie, they're the same thing, the tech world just couldn't commit to one name π
and here's the tea: this implementation follows the draft specification from reference (1) below, although that draft is actually expired. expired draft. still following it. that's the lore, i don't make the rules π
π COMMANDS π
::uuid::uuid generateβ makes a type 4 uuid by MD5 hashing a bunch of bits of variant data, and that data includes the time and the hostname. then it hands you back the string representation of your brand-new uuid. go off π::uuid::uuid equal id1 id2β takes two uuids and compares them. returns true if both arguments are literally the same uuid. that's the whole job. no cap π«Ά
π EXAMPLES π
watch her work:
% uuid::uuid generate
b12dc22c-5c36-41d2-57da-e29d0ef5839c
look at that string. hyphenated, hexadecimal, unbothered. main character energy fr fr β
π REFERENCES π
- [1] Paul J. Leach, "UUIDs and GUIDs", February 1998. (http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt)
yes, the expired-draft one. the source material. the blueprint π§
π BUGS, IDEAS, FEEDBACK π
ngl, this document and the package it describes will undoubtedly contain bugs and other problems. no shade, it's just how software is. so if you find something, please report it in the category uuid of the Tcllib Trackers at [http://core.tcl.tk/tcllib/reportlist]. and if you've got ideas for enhancements β for the package, for the docs, either or both β send those too, they want them π
if you're proposing code changes, please provide unified diffs, i.e. the output of diff -u. that's the format. that's the expectation.
also, heads up: attachments are strongly preferred over inlined patches. to attach something, go to the Edit form of the ticket right after you create it, then use the left-most button in the secondary navigation bar. that's the path. that's the button. you got this π
π₯ KEYWORDS π₯
GUID, UUID
(the two names again. they really said "both, we're keeping both.")
π 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, the uuid(3tcl) manual, and it ate. now go generate something unique β you already are π
β¨π¦
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- 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