Tidal-listener for windows

For yuks I managed to get tidal-listener running on Windows 10. The only tricky part was tracking down why O.recvFrom in Tempo.serverListen was hanging. Eventually found this gem

-- NOTE: blocking on Windows unless you compile with -threaded (see
-- GHC ticket #1129)
recvBufFrom :: SocketAddress sa => Socket -> Ptr a -> Int -> IO (Int, sa)
recvBufFrom s ptr nbytes

https://hackage.haskell.org/package/network-3.1.2.2/docs/src/Network.Socket.Buffer.html#recvBufFrom

All I ended up having to do was:

  • Add -threaded to the compile options for Tidal (library) and tidal-listener (library and executable), not really sure where it's needed but the big hammer approach worked.
  • Removed unix from tidal-listener library's buld-depends
  • Added a cabal.project for tidal-listener referencing a local tidal. (And a git clone of Tidal as a subdirectory of tidal-listener) Oh, figuring that out was probably harder than finding the blocking read.
packages: ./ Tidal

It all works. The Atom plugin doesn't seem too happy though. I'll comment there with specifics.

1 Like

Thanks @who-me, that's great to hear, we could add -threaded for everyone. Hope you resolve the issue with atom..

Perhaps we should move tidal-listener into a subfolder of the tidal repository like tidal-parse, then we can build them together without having to mess about with submodules, and have them automatically tested together too. Also using @polymorphic.engine's work we can have executables automatically built as well.. That'd be awesome.

Anyone fancy having a look at this?

1 Like

That would be really cool, in the meantime I opened an issue on tidal repository: https://github.com/tidalcycles/Tidal/issues/841

We should then move the issues too?