Urbit, Hifi and Script Dependency Management


Out of curiosity, anyone muddled through some of the ideas present in Urbit? Dark enlightenment politics aside, the distributed computation features are neato: run scripts on any VM connected to the network. What if every hifi user had personal script hosting so that importing functionality would be as simple as referencing a global namespace:

import { GenericAi } from 'hifi/<username>/public/ai/lib/generic';

Though if that’s a little too crazy, some kind of integrated package manager would be great for enabling easy object hierarchy and dependency management. The average user isn’t going to use version control and prepare a package for npm, bower, jspm, etc.


The main drawback to having a single central personal script hosting given to you as part of being on HiFi is… if that central server goes away, it takes all your scripts along with it. HiFi ultimately is meant to be decentralized in the same way the WWW is. It would make more sense for each user to be able to set a personal scripts place in his own prefs to somewhere, like, say a dir on his own rented server machine, or somewhere on his LAN, or on his Dropbox account, as he or she sees fit.


My OP was not incredibly detailed nor did I mention that by global namespace I really meant a URL (Exactly as you suggest, @Nathan_Adored .) Urbit goes a step beyond referencing remote resources by providing immutability in order to address conflicts. You may get the most up to date version of a file from a connected machine by reading :address/path/to/file or a reference to that file at a specific point in time :address/path/to/file@:timestamp_or_hash.


The current implementation allows this - includes with relative paths in scripts are relative to the executing script’s path. You can also add a local script directory in preferences, which will then be listed in the Running Scripts window. I think eventually the list of external scripts could also change to not be hard-coded to the hifi s3 script list.

If you are talking about includes always being relative to a path of your choosing, I think that may cause issues due to incompatible changes across scripts.