{"action":"created","issue":{"url":"https://api.github.com/repos/bevacqua/fuzzysearch/issues/2","labels_url":"https://api.github.com/repos/bevacqua/fuzzysearch/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/bevacqua/fuzzysearch/issues/2/comments","events_url":"https://api.github.com/repos/bevacqua/fuzzysearch/issues/2/events","html_url":"https://github.com/bevacqua/fuzzysearch/issues/2","id":59785561,"number":2,"title":"Interesing, and I got one too:","user":{"login":"jiyinyiyong","id":449224,"avatar_url":"https://avatars.githubusercontent.com/u/449224?v=3","gravatar_id":"","url":"https://api.github.com/users/jiyinyiyong","html_url":"https://github.com/jiyinyiyong","followers_url":"https://api.github.com/users/jiyinyiyong/followers","following_url":"https://api.github.com/users/jiyinyiyong/following{/other_user}","gists_url":"https://api.github.com/users/jiyinyiyong/gists{/gist_id}","starred_url":"https://api.github.com/users/jiyinyiyong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiyinyiyong/subscriptions","organizations_url":"https://api.github.com/users/jiyinyiyong/orgs","repos_url":"https://api.github.com/users/jiyinyiyong/repos","events_url":"https://api.github.com/users/jiyinyiyong/events{/privacy}","received_events_url":"https://api.github.com/users/jiyinyiyong/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-04T11:30:49Z","updated_at":"2015-03-04T12:57:36Z","closed_at":"2015-03-04T12:57:36Z","body":"Mine was in a functional one written in CirruScript(compiles with http://repo.cirru.org/script/):\r\n```cirru\r\n= generateSearch $ \\ (text query info index)\r\n  -- \"return if matches\"\r\n  if (is text query)\r\n    do $ return $ object (:match false) (:start 0)\r\n  -- \"reurn false if text is using up\"\r\n  if (and (is text.length 0) (> query.length 0))\r\n    do $ return $ object (:match false) (:start 0)\r\n  -- \"return true if query is using up\"\r\n  if (is query.length 0)\r\n    do $ return info\r\n\r\n  = nextIndex $ + index 1\r\n  -- \"first letter matches, keep going without first letters\"\r\n  if (is (. text 0) (. query 0))\r\n    do\r\n      if (< nextIndex info.start)\r\n        do $ = info.start nextIndex\r\n      return $ generateSearch (text.substr 1) (query.substr 1) info nextIndex\r\n  -- \"first letter does not match, but keep going without first letter of text\"\r\n  generateSearch (text.substr 1) query info nextIndex\r\n\r\n= exports.fuzzyStart $ \\ (list query)\r\n  = result $ list.map $ \\ (text)\r\n    = info $ object (:start 10) (:match true) (:text text)\r\n    generateSearch text query info 0\r\n  -- \"filter and sort\"\r\n  = result $ result.filter $ \\ (item) item.match\r\n\r\n  = result $ result.sort $ \\ (a b)\r\n    cond\r\n      (< a.start b.start) -1\r\n      (> a.start b.start) 1\r\n      else 0\r\n\r\n  return $ result.map $ \\ (item) item.text\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/bevacqua/fuzzysearch/issues/comments/77152932","html_url":"https://github.com/bevacqua/fuzzysearch/issues/2#issuecomment-77152932","issue_url":"https://api.github.com/repos/bevacqua/fuzzysearch/issues/2","id":77152932,"user":{"login":"bevacqua","id":934293,"avatar_url":"https://avatars.githubusercontent.com/u/934293?v=3","gravatar_id":"","url":"https://api.github.com/users/bevacqua","html_url":"https://github.com/bevacqua","followers_url":"https://api.github.com/users/bevacqua/followers","following_url":"https://api.github.com/users/bevacqua/following{/other_user}","gists_url":"https://api.github.com/users/bevacqua/gists{/gist_id}","starred_url":"https://api.github.com/users/bevacqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bevacqua/subscriptions","organizations_url":"https://api.github.com/users/bevacqua/orgs","repos_url":"https://api.github.com/users/bevacqua/repos","events_url":"https://api.github.com/users/bevacqua/events{/privacy}","received_events_url":"https://api.github.com/users/bevacqua/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T12:57:36Z","updated_at":"2015-03-04T12:57:36Z","body":"That language looks very strange.."}}