{"action":"created","issue":{"url":"https://api.github.com/repos/NicMcPhee/pseudo-chess-puzzle/issues/10","labels_url":"https://api.github.com/repos/NicMcPhee/pseudo-chess-puzzle/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/NicMcPhee/pseudo-chess-puzzle/issues/10/comments","events_url":"https://api.github.com/repos/NicMcPhee/pseudo-chess-puzzle/issues/10/events","html_url":"https://github.com/NicMcPhee/pseudo-chess-puzzle/issues/10","id":58512055,"number":10,"title":"Get Quil code to run in a browser","user":{"login":"NicMcPhee","id":302297,"avatar_url":"https://avatars.githubusercontent.com/u/302297?v=3","gravatar_id":"","url":"https://api.github.com/users/NicMcPhee","html_url":"https://github.com/NicMcPhee","followers_url":"https://api.github.com/users/NicMcPhee/followers","following_url":"https://api.github.com/users/NicMcPhee/following{/other_user}","gists_url":"https://api.github.com/users/NicMcPhee/gists{/gist_id}","starred_url":"https://api.github.com/users/NicMcPhee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicMcPhee/subscriptions","organizations_url":"https://api.github.com/users/NicMcPhee/orgs","repos_url":"https://api.github.com/users/NicMcPhee/repos","events_url":"https://api.github.com/users/NicMcPhee/events{/privacy}","received_events_url":"https://api.github.com/users/NicMcPhee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NicMcPhee/pseudo-chess-puzzle/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"NicMcPhee","id":302297,"avatar_url":"https://avatars.githubusercontent.com/u/302297?v=3","gravatar_id":"","url":"https://api.github.com/users/NicMcPhee","html_url":"https://github.com/NicMcPhee","followers_url":"https://api.github.com/users/NicMcPhee/followers","following_url":"https://api.github.com/users/NicMcPhee/following{/other_user}","gists_url":"https://api.github.com/users/NicMcPhee/gists{/gist_id}","starred_url":"https://api.github.com/users/NicMcPhee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicMcPhee/subscriptions","organizations_url":"https://api.github.com/users/NicMcPhee/orgs","repos_url":"https://api.github.com/users/NicMcPhee/repos","events_url":"https://api.github.com/users/NicMcPhee/events{/privacy}","received_events_url":"https://api.github.com/users/NicMcPhee/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-02-22T18:16:16Z","updated_at":"2015-02-22T21:56:42Z","closed_at":null,"body":"I think I may be able to get the existing Clojure/Quil code to run in the browser via ClojureScript. A potentially major downside is that ClojureScript doesn't handle threads (because JS doesn't handle threads), so I'm not sure that this will run well, if it runs at all."},"comment":{"url":"https://api.github.com/repos/NicMcPhee/pseudo-chess-puzzle/issues/comments/75465101","html_url":"https://github.com/NicMcPhee/pseudo-chess-puzzle/issues/10#issuecomment-75465101","issue_url":"https://api.github.com/repos/NicMcPhee/pseudo-chess-puzzle/issues/10","id":75465101,"user":{"login":"NicMcPhee","id":302297,"avatar_url":"https://avatars.githubusercontent.com/u/302297?v=3","gravatar_id":"","url":"https://api.github.com/users/NicMcPhee","html_url":"https://github.com/NicMcPhee","followers_url":"https://api.github.com/users/NicMcPhee/followers","following_url":"https://api.github.com/users/NicMcPhee/following{/other_user}","gists_url":"https://api.github.com/users/NicMcPhee/gists{/gist_id}","starred_url":"https://api.github.com/users/NicMcPhee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicMcPhee/subscriptions","organizations_url":"https://api.github.com/users/NicMcPhee/orgs","repos_url":"https://api.github.com/users/NicMcPhee/repos","events_url":"https://api.github.com/users/NicMcPhee/events{/privacy}","received_events_url":"https://api.github.com/users/NicMcPhee/received_events","type":"User","site_admin":false},"created_at":"2015-02-22T21:56:42Z","updated_at":"2015-02-22T21:56:42Z","body":"It wasn't hard to get the code to compile and run, but indeed the threading problem is fatal.\r\n\r\nThe only interesting thing I had to change in the code itself is to provide an implementation of `index-of` to replace my use of Java's `.indexOf`, since that didn't seem to compile properly in ClojureScript land.\r\n\r\nThe page then loads and displays the board, etc., but nothing ever changes. I think this is because either (a) the search just isn't happening or (b) somehow the search and the GUI aren't interacting well via the atom. There are ClojureScript examples out there with atoms, so I'm pretty sure the search isn't happening because `main` isn't being called, and I can't call it in something like `setup` without creating an icky threading problem.\r\n\r\nI could \"fix\" this by bringing the search back into the Quil/GUI code, but that merges concerns in an icky way. I'm suspecting that the \"real\" fix is to generate a full client/server model, where the search is running on the server, and the client asks the server for updates and displays them. But that's more complicated than I have time for at the moment, so I'm probably going to wander away for now.\r\n\r\nSigh."}}