Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have some questions and errors related to troop and tidalcycles. #62

Open
dyedahee opened this issue Apr 16, 2021 · 2 comments
Open

Comments

@dyedahee
Copy link

  1. BootTidal.hs error

When running client.py, the following error occurs and the TidalCycles do not work properly.

in Troop client.py

GHCi, version 8.8.4: https://www.haskell.org/ghc/ :? for help
Loaded package environment from /Users/mac/.ghc/x86_64-darwin-8.8.4/environments/default
Prelude> Prelude| Prelude| IO error: "BootTidal.hs" does not exist

and terminal

ghc-pkg: cannot find package tidal
Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/init.py", line 1892, in call
return self.func(*args)
File "/Applications/Troop/src/interface/interface.py", line 1512, in set_interpreter
self.lang=langtypesname
TypeError: init() missing 1 required positional argument: 'args'

So when I run client.py in the terminal with the following code, BootTidal.hs error message still pops up, but the sound is output normally. And the client terminal still says, 'ghc-pkg: cannot find package tidal.'
Can I ignore this?

python3 /Applications/Troop/run-client.py -H 192.168.219.102 -s tidalcycles -m $(which ghci) -a "-ghci-script /Users/mac/.atom/packages/tidalcycles/lib/BootTidal.hs"

In this situation, if I select TidalCycles in 'Troop - Code - Choose Mode', it won't work properly.
If i run TidalCycles with the code mentioned above, there is no check mark in Choose Mode.
Is it stable even if the menu is not marked with a check mark?
I'm planning a performance with this, just in case.

  1. Can I control SuperColider and TidalCycles at the same time in Troop?
    In my computer (OS), I can select several languages in Troop's 'Code - Choose Mode' at the same time.
    Can SuperCollider and TidalCycles be used in Troop at the same time?
    I tried it and I can't, but I'm asking if it's my own problem.

I have a lot of questions. Anyway, I'll be waiting for your answer. Thank you!

@Qirky
Copy link
Owner

Qirky commented Apr 22, 2021

Question 1)

So it might be useful to know how Troop boots up an interpreter, sprecifically Tidal, so you can find the best option for your own set up. So first it runs the command ghc-pkg field tidal data-dir to try and find out where the BootTidal.hs file is located. Troop should handle the exception if this fails e.g. ghc-pkg is not a known command. However it looks like it doesn't handle the case if tidal is not installed/not recognised by ghc-pkg which is what is happening here (hence the ghc-pkg: cannot find package tidal. error). The command doesn't raise but returns an empty string and ends up looking for BootTidal.hs in the current directory, but it isn't there (hence the Prelude> Prelude| Prelude| IO error: "BootTidal.hs" does not exist error).

So based on this it looks like you might have ghc-pkg and/or tidal set up in a way that Troop doesn't expect. If the issue is just that we can't find the BootTidal.hs file, you'll be pleased to know there is a config file for loading a bootfile from a custom path in Troop/src/conf/boot.json where you can set both the path to the interpreter (if it isn't just ghci) and the location of the BootTidal.hs.

I'm not 100% on what is causing the TypeError: init() missing 1 required positional argument: 'args' but might be related to how you are passing in the arguments via the cli using the -a flag but this might be resolved if the boot.json file configuration works for you. Let me know if it does/doesn't. As an aside: in the instance where you provide a -m flag with a path to Tidal, then TidalCycles won't be marked with a check mark as Troop sees this as a custom path i.e. a new interpreter

Question 2)

The issue must be OS related / the window library being used by Python to generate the widget for selecting an interpreter. It should be a drop down an only one value submitted (not sure which one will be used if you select multiple). If you want to use multiple languages simultaneously, have a look at my other project Polyglot

@razzeee
Copy link

razzeee commented Jun 15, 2021

For anyone else finding this, the ghc-pkg: cannot find package tidal is caused by this:
https://gitlab.haskell.org/ghc/ghc/-/issues/17341

And some more about it haskell/cabal#6262

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants