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

bring tidal-listener option back #200

Open
polymorphicengine opened this issue Jan 31, 2023 · 9 comments
Open

bring tidal-listener option back #200

polymorphicengine opened this issue Jan 31, 2023 · 9 comments

Comments

@polymorphicengine
Copy link

hey! I just updated the tidal listener (tidalcycles/Tidal#996) and it is now much more like ghci, i think it would be great to be able to choose it as an interpreter (hopefully in the future it will be runnable without an installed haskell environment).

currently you can send it haskell statements to evaluate, ask for types and load haskell files containing definitions. to do this you send it messages like /eval <code> or /type <code>.

what i am wondering is if i should make it even more ghci like and just have it receiv one type of message that is either an expression to evaluate or starts with :t or :load.

on the other hand this could also be handled on the editor side of things, which do you think would be better?

@ndr-brt
Copy link
Collaborator

ndr-brt commented Jan 31, 2023

Hey, that's great to hear!
In fact tidal-listener option is still available on the plugin, but it needs to be updated to the new behavior.
The problem is that currently we're not able to release a new plugin version because of this: pulsar-edit/package-backend#63

But in general can't wait for this!

@rlafuente
Copy link

rlafuente commented Mar 14, 2023

I was trying to get the tidal-listener mode to work (i need flashing numbers!), but after updating everything and reinstalling tidal + tidal-listener, I get this when evaluating a block in Pulsar:

Unhandled message: Message {messageAddress = "/code", messageDatum = [AsciiString {d_ascii_string = "d0"},AsciiString {d_ascii_string = "jux rev $\nn (scale \"minor\" (\n struct \"t([9|13]*16,16,[1|3])\"\n $ rot \"<[5|4|3] 2 [1|2|3] 0>\"\n $ \"[0 2 3 4 [6|9] 7 6 [8|10]]*2\")\n |+ \"[-12|-12|0|12]*16\"\n |+ \"<3 -2 1 1 0 0 0 0>\"\n )\n# sound \"superpiano\"\n# velocity \"[0.5|0.55]*16\"\n# sustain \"[4|7]*16\"\nhush"}]}

(this appears in the tidal-listener prompt, btw, not Pulsar)

Is this expected? I remember asking @ndr-brt about this on Discord and hearing tidal-listener should be working, but I'm a bit lost after reading this issue and the comments :)

@polymorphicengine
Copy link
Author

it will take some time to reintegrate the current updated version of the listener with the editor plugins since the API slightly changed, it shouldn't be much work though since the listener is now quite ghci-like

@rlafuente
Copy link

Thank you for such a quick reply -- I was hoping I could use this on a showcase tomorrow, and it's useful to know I shouldn't try further for now :) and thank you for being on top of this

@ndr-brt
Copy link
Collaborator

ndr-brt commented Aug 23, 2023

hey @polymorphicengine is the new api described somewhere? I looked at the tidal-listener readme but it seems not changed

@polymorphicengine
Copy link
Author

yes, it should be exactly how it is described in the link you posted. /code messages are deprecated and replaced with /eval

@rlafuente
Copy link

Ok I really really want this feature to happen and want to help make it real.

I have some experience building pulsar plugins, but need some hand-holding on what needs changing. I expect it's more than replacing /code calls with /eval?

@ndr-brt
Copy link
Collaborator

ndr-brt commented Nov 8, 2023

Ok I really really want this feature to happen and want to help make it real.

I have some experience building pulsar plugins, but need some hand-holding on what needs changing. I expect it's more than replacing /code calls with /eval?

hey! all the logic for handling tidal-listener should be located in the tidal-listener-repl.js file, IIRC there still was some duplication with the repl.js (the standard one), but it worked with the old tidal-listener version.
Last time I tried I wasn't able to make tidal-listener work but I guess it was something on my side

@yaxu
Copy link
Member

yaxu commented Nov 8, 2023

Hey just to add that I'm not sure if anyone has got highlighting working via tidal-listener yet! The mechanics are there but it might need a bit more work.

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

No branches or pull requests

4 participants