{"action":"created","issue":{"url":"https://api.github.com/repos/orthecreedence/cl-async/issues/132","labels_url":"https://api.github.com/repos/orthecreedence/cl-async/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/orthecreedence/cl-async/issues/132/comments","events_url":"https://api.github.com/repos/orthecreedence/cl-async/issues/132/events","html_url":"https://github.com/orthecreedence/cl-async/issues/132","id":99820352,"number":132,"title":"Standard input event?","user":{"login":"adolenc","id":9569399,"avatar_url":"https://avatars.githubusercontent.com/u/9569399?v=3","gravatar_id":"","url":"https://api.github.com/users/adolenc","html_url":"https://github.com/adolenc","followers_url":"https://api.github.com/users/adolenc/followers","following_url":"https://api.github.com/users/adolenc/following{/other_user}","gists_url":"https://api.github.com/users/adolenc/gists{/gist_id}","starred_url":"https://api.github.com/users/adolenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adolenc/subscriptions","organizations_url":"https://api.github.com/users/adolenc/orgs","repos_url":"https://api.github.com/users/adolenc/repos","events_url":"https://api.github.com/users/adolenc/events{/privacy}","received_events_url":"https://api.github.com/users/adolenc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-08T17:39:35Z","updated_at":"2015-08-08T17:57:54Z","closed_at":null,"body":"Could you please provide an example (or at least point me in the right direction) of using cl-async to write a simplified `cat` program which just listens for user input on stdin and echoes received data to stdout?\r\n\r\nIt seems that in libuv this can be done by using [uv_pipe_open](http://docs.libuv.org/en/latest/pipe.html#c.uv_pipe_open) and providing a file descriptor for input/output streams but I can't seem to be able to figure out how to do it with cl-async.\r\n\r\nThe reason I need this is that a program (namely [neovim](https://github.com/neovim/neovim)) spawns my script as a subprocess and uses stdin/stdout for communication."},"comment":{"url":"https://api.github.com/repos/orthecreedence/cl-async/issues/comments/129023464","html_url":"https://github.com/orthecreedence/cl-async/issues/132#issuecomment-129023464","issue_url":"https://api.github.com/repos/orthecreedence/cl-async/issues/132","id":129023464,"user":{"login":"orthecreedence","id":220134,"avatar_url":"https://avatars.githubusercontent.com/u/220134?v=3","gravatar_id":"","url":"https://api.github.com/users/orthecreedence","html_url":"https://github.com/orthecreedence","followers_url":"https://api.github.com/users/orthecreedence/followers","following_url":"https://api.github.com/users/orthecreedence/following{/other_user}","gists_url":"https://api.github.com/users/orthecreedence/gists{/gist_id}","starred_url":"https://api.github.com/users/orthecreedence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orthecreedence/subscriptions","organizations_url":"https://api.github.com/users/orthecreedence/orgs","repos_url":"https://api.github.com/users/orthecreedence/repos","events_url":"https://api.github.com/users/orthecreedence/events{/privacy}","received_events_url":"https://api.github.com/users/orthecreedence/received_events","type":"User","site_admin":false},"created_at":"2015-08-08T17:57:54Z","updated_at":"2015-08-08T17:57:54Z","body":"This is an interesting use-case. I think we'd want a pipe.lisp file that extends the streamish object with the custom pipe commands (much like TCP does). Unfortunately, I have a lot on my plate right now and have no time for any new features on cl-async for probably a few months.\r\n\r\nIn the meantime, one possible solution would be to use [cl-async's threading capabilities](http://orthecreedence.github.io/cl-async/threading) and have a thread that loops `(read-line)` in the background, sending any data it gets to the cl-async loop via a notifier.\r\n\r\nThis seems to work:\r\n\r\n```bash\r\necho \"andrew\" | ccl -e '(format t \"hello, ~a~%\" (read-line))'\r\n```\r\n\r\nSo doing something in a background thread should work equally well.\r\n\r\nHope this helps! Going to leave this open until I get the time to add pipes to cl-async."}}