(type egg)
(signature "uuid egg")
(timestamp 1612269487)
(sxml ((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/uuid" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.")) (section 2 "UUID" (p "A native Chicken Scheme implementation for UUID generation. Primary development maintained on Github.") (p "Canonical Github Repo: " (link "http://github.com/dsosby/chicken-uuid")) (section 3 "Authors" (p (link "http://ramdump.com" "David Sosby"))) (section 3 "Requirements" (p "Just Chicken")) (section 3 "API" (def (sig (procedure "(uuid-v4 #!optional [randfn random])" (id uuid-v4))) (p "Generates a purely random UUID conforming to RFC 4122 4.4. Uniqueness is dependent on a good random function. The default uses (extras random) but can be overridden with any function conforming to the (extras random) signature.") (p "Returns a string."))) (section 3 "Examples" (highlight scheme "(use uuid)\n\n;; Generate a UUID based on (extras random)\n(define decent-uuid (uuid-v4))\n\n;; Generate a UUID based on other random number generator\n(define (worse-random n) 1)\n(define worse-uuid (uuid-v4 worse-random))\n\n;; Get a list of UUIDs\n(use srfi-1)\n(define uuids (list-tabulate 5 (lambda (_) (uuid-v4))))")) (section 3 "License" (p "BSD")) (section 3 "Version History" (table (tr (th "Version") (th "Comments")) "\n" (tr (td "0.1") (td "Initial release with random UUID generation")))))))
