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

Flok assumes the location of binaries? #67

Closed
pl-gauthier opened this issue Apr 17, 2020 · 5 comments
Closed

Flok assumes the location of binaries? #67

pl-gauthier opened this issue Apr 17, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@pl-gauthier
Copy link

So I tried :

flok-repl -H ws://localhost:3000 -s YmUwNjhjNTYtNDRlYi00ZGNjLTk2NTgtNTJhZDFmMWI1ZmMz -t sclang

but got :

[unknown err] /bin/sh: /usr/local/bin/sclang: No such file or directory

because on my machine the command which sclang returns /usr/bin/sclang.

So I tried for the fun :

flok-repl -H ws://localhost:3000 -s YmUwNjhjNTYtNDRlYi00ZGNjLTk2NTgtNTJhZDFmMWI1ZmMz -t /usr/bin/sclang

which of course replied promptly with :

Unknown type /usr/bin/sclang. Must be one of: [ 'tidal', 'sclang', 'remote_sclang', 'foxdot' ]

@munshkr munshkr added the bug Something isn't working label Apr 17, 2020
@munshkr
Copy link
Owner

munshkr commented Apr 17, 2020

Hi! I'm afraid the path is hardcoded to /usr/local/bin/sclang right now. Sorry! I'll try to fix this soon.

To run a custom REPL, skip the -t option, just pass the name of the command at the end, like this:

flok-repl -H ws://localhost:3000 -s YmUwNjhjNTYtNDRlYi00ZGNjLTk2NTgtNTJhZDFmMWI1ZmMz -n sclang -- /usr/bin/sclang

In this case I'm also setting the name of the target as sclang with the -n option.
Unfortunately, this won't work right with sclang because of some weird behaviors of the interpreter.

You can also try to use the remote_sclang target if you want. You will have to install this quark and then run the repl with -t remote_sclang -n sclang.

@jwaldmann
Copy link

jwaldmann commented Apr 17, 2020

Please document this way of calling an executable. -- <exec> is not listed in the output of flok-repl -h. Also, --list-types does suggest that -t must be one of those four types listed, while here it must be skipped. So there is an extra type none?

I can write such a text but I'm not confident about the details.

@munshkr
Copy link
Owner

munshkr commented Apr 17, 2020

Please document this way of calling an executable. -- <exec> is not listed in the output of flok-repl -h. Also, --list-types does suggest that -t must be one of those four types listed, while here it must be skipped. So there is an extra type none?

I can write such a text but I'm not confident about the details.

Right. I took that suggestion to issue #68

@munshkr
Copy link
Owner

munshkr commented Apr 19, 2020

Fixed on 2e0f620
Now it runs sclang by default. You can specify a custom path as an extra option, like this:

flok-repl -t sclang --extra '{ "sclang": "/my/path/to/sclang" }'

Let me know if it works for you now @pl-gauthier

@munshkr munshkr closed this as completed Apr 19, 2020
@pl-gauthier
Copy link
Author

Let me know if it works

Yep it do.
Thanks ! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants