" I'm run an implementation of the [Nano ID](https://github.com/ai/nanoid) tiny, secure URL-friendly unique string ID generator via its [Nim implementation](https://github.com/icyphox/nanoid.nim). The Nim script has hard coded: * a [base 58 encoding](https://medium.com/concerning-pharo/understanding-base58-encoding-23e673e37ff6) alphabet to avoid similar looking letter and the use of non-alphanumeric characters. * a 12 characters length output, which gives [a pretty low probability collision](https://zelark.github.io/nano-id-cc/) for the previous alphabet: ~616 years needed, in order to have a 1% probability of at least one collision at a speed of 1000 IDs per hour. This is more than enough for our unique IDs applications, mostly in the documentation context, which consists of hand crafted and/or programmatically produced notes , for example in data narratives, book(lets) and TiddlyWiki tiddlers of tens or hundreds of notes at most, unevenly produced between hours, days and/or weeks.. " Class { #name : #NanoID, #superclass : #Object, #category : #'MiniDocs-MiniDocs' } { #category : #accessing } NanoID class >> binaryFile [ ^ FileLocator userData / 'Mutabit' / 'MiniDocs' / self scriptSourceCode basenameWithoutExtension ] { #category : #accessing } NanoID class >> install [ "For the moment, only Gnu/Linux and Mac are supported. IMPORTANT: Nimble, Nim's package manager should be installed, as this process doesn't verify its proper installation." | binaryFileFolder | binaryFileFolder := self binaryFile parent. binaryFileFolder exists ifFalse: [ binaryFileFolder ensureCreateDirectory ]. self binaryFile exists ifTrue: [ ^ binaryFileFolder ]. Nimble install: 'nanoid'. OSSUnixSubprocess new command: 'nim'; arguments: {'c'. self scriptSourceCode fullName}; workingDirectory: binaryFileFolder; runAndWaitOnExitDo: [ :process :outString | ^ binaryFileFolder ] ] { #category : #accessing } NanoID class >> scriptSourceCode [ ^ FileLocator image parent / 'pharo-local/iceberg/Offray/MiniDocs/src/nanoIdGen.nim' ]