Bootstrapping in banana
The banana program has a good use potential for bootstrapping itself. While it's possible to write banana as completely standalone and just throw a pile of code into it to handle everything without deferring to another library, it's also possible to write the whole thing in C instead of JS, but then it looses the ease of improvement aimed for in MonkeyScript. It's much more elegant if we allow banana to make use of it's own packages through a sort of bootstrapping.
While it's unlikely we can do this for IO (File and thus Sockets) optional YAML support and the protocol for banana's own communication can likely be handled by bootstrapping.
- Building of an initial standalone banana will be built without YAML support (only JSON will be supported; ie: YAML must first define it's banana using JSON) as well it will not know it's own protocol and so cannot communicate over the network right away.
- Thus initially banana will only be able to read JSON banana files from wherever defined, run them, build registries, and bootstrap.
A markup.data.yaml library supporting parsing and writing YAML will be written and initially given a banana.json to define it.
- This will be manually installed and a registry with it included will be built using banana.
At this point banana bootstrap yaml (we can probably allow yaml to be omitted and just bootstrap everything needed) and banana will then take the yaml library and build it into a special format (this format will lose the banananess of it and no longer be a proper module, but be more of a compacted light form meant purely for use internally). This specially formatted YAML library will be saved in a bootstrapped location specifically for banana to use.
- From this point on banana will have YAML support in it.
This also means that now markup.data.yaml can have a banana.yml instead of a banana.json if it wants. One would only need to bootstrap the old version of the YAML library that used a JSON and then they would be able to bootstrap any new versions from there.
Similar actions will be taken for protocol.banana
ie: It's possible to download a blank banana, download an old protocol.banana bootstrap it, use banana update protocol.banana to update the banana protocol then bootstrap the new protocol into banana.