Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "uuid"

Title:Generating and parsing version 4 UUIDs
Rating:Not rated. Create the first rating!
Latest version:1.1.0
SHA1 sum:ba79b7da4c276b9e13869801cf8cb5593c6bd934
Author:James N. V. Cash <james.cash@occasionallycogent.com>
Home page:https://github.com/jamesnvc/uuid
Download URL:https://github.com/jamesnvc/uuid/releases/*.zip

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
1.0.03e28e9851cd70fb139a6e6b3a304174cd98bcd071https://github.com/jamesnvc/uuid/archive/v1.0.0.zip
1.0.153db5925f5187086f4581ae1998984ed37fccb4e1https://github.com/jamesnvc/uuid/archive/v1.0.1.zip
1.1.0ba79b7da4c276b9e13869801cf8cb5593c6bd93476https://github.com/jamesnvc/uuid/archive/v1.1.0.zip

UUID for Prolog

This library provides predicates for dealing with UUIDs in Prolog.

There is supposed to be a uuid library already provided, but it seems not to be provided in my distribution and seems to not be able to parse a uuid from a given string. Also, because the initial purpose of this library is to communicate via Transit, I wanted the canonical representation of the UUIDs to be two 64-bit signed integers (as that's how they're represented in Transit+MsgPack, which is what Braid uses). If neither of those things are important to you, you may as well use the one that comes with SWI-Prolog.

It can be installed in SWI-Prolog using pack_install(uuid).

Examples

?- random_uuid(UUID), uuid_atom(UUID, Atom).
UUID = uuid(7100215486400447724, 1339227574425780922),
Atom = '6289085d-c7a0-44ec-1295-e462270e82ba'.
?- uuid_atom(UUID, '9b5ee764-c1a2-4b23-9ed5-ca8644863c79').
UUID = uuid(-7251103930088535261, -7001467367653491591).

Contents of pack "uuid"

Pack contains 4 files holding a total of 5.1K bytes.