Chatting with @HighHarmonics (about the mac tidal-bootstrap installer), I was wondering if the various automatic tidal install methods could standardise on a location for a script for starting tidal, at ~/.tidal/bin/tidal for linux and mac, and the equivalent for windows (what would that be?).
Then the various editors and editor plugins could default to running that to start tidal.
Then that ~/.tidal folder could be a place that an installer (like tidal-bootstrap) could keep its own managed version of haskell (ghcup) and supercollider etc, so that things are less likely to break, are easier to diagnose problems with, or at least easy to remove and reinstall everything.
I'm also thinking that startup script could run cabal repl --build-depends tidal rather than ghci, it seems more reliable.
I was first hesitant to duplicating all of these tools. But I realise that the advanced users that already have Haskell or Supercollider might as well install from scratch. The advantage for the rest would be tremendous as this concept simplifies a lot.
from a linux desktop point of view, there is the xdg spec for this sort of thing. ~/.local is like a profile/user writable mirror of the directory format in /usr/local/, so it would make sense from that spec to put the various pieces in each of: ~/.local/share/tidal/ ~/.local/bin/tidal ~/.config/tidal/
I don't know what OSX or windows does with regard to this sort of thing, though I imagine there are similar guidelines
Ignoring the spec for the moment, I don't have a particular problem with making a ~/.tidal/ catch all
I had some questions sticking about how to handle upgrades and backports (in case of failed upgrades), or holding versions for performance artists who require a stable platform, so I ran some tests to see if I could work around these scenarios:
I did the following testing on linux with cabal >= 3.0.0.0 (earlier versions don't recognise the repl directive)
Can I upgrade tidal with it?
Yes - run a cabal update before running, and the latest tidal is downloaded and built
Can I specify a version?
Yes - cabal repl -b tidal --constraint 'tidal == 1.9.2' constrains the environment to the rule provided
Can I downgrade a version? ie having upgraded to 1.9.3, can I then run 1.9.2 if I want/need to?
Yes - both versions now exist as a package in the environment, and the constraint argument can be used to force the package you want to use
This raises the next question: what's the best way to tell the editors what version I want to run? An optional version number config item in the settings would probably suffice
All in all, that covered all the basic functions I'm looking for, and did it nicely! You can even run multiple versions of tidal side-by-side ... big improvements, no more nuking environments to get an upgrade in (I hope!)
Now that it's installed as a lib, there seems to be some trickery surrounding what cabal deems is "visible" ... or something. There's a whole lot of complexity I'm discovering that is resulting in a lot of unexpected output like on this working tidal system, that returns:
* tidal
Synopsis: Pattern language for improvised music
Default available version: 1.9.3
Installed versions: [ Not installed ]
Homepage: http://tidalcycles.org/
License: GPL-3