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

Package "pluuid"

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

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
2.0.060590585ca1c4b90f74a2c30dbe5b675aa548dee3https://github.com/jamesnvc/pluuid/archive/v2.0.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(pluuid).

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 "pluuid"

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