{"action":"created","issue":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/503","labels_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/503/labels{/name}","comments_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/503/comments","events_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/503/events","html_url":"https://github.com/Hammerspoon/hammerspoon/pull/503","id":101461447,"number":503,"title":"add hs.moses","user":{"login":"lowne","id":6718755,"avatar_url":"https://avatars.githubusercontent.com/u/6718755?v=3","gravatar_id":"","url":"https://api.github.com/users/lowne","html_url":"https://github.com/lowne","followers_url":"https://api.github.com/users/lowne/followers","following_url":"https://api.github.com/users/lowne/following{/other_user}","gists_url":"https://api.github.com/users/lowne/gists{/gist_id}","starred_url":"https://api.github.com/users/lowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowne/subscriptions","organizations_url":"https://api.github.com/users/lowne/orgs","repos_url":"https://api.github.com/users/lowne/repos","events_url":"https://api.github.com/users/lowne/events{/privacy}","received_events_url":"https://api.github.com/users/lowne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-08-17T16:38:48Z","updated_at":"2015-08-20T16:10:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/pulls/503","html_url":"https://github.com/Hammerspoon/hammerspoon/pull/503","diff_url":"https://github.com/Hammerspoon/hammerspoon/pull/503.diff","patch_url":"https://github.com/Hammerspoon/hammerspoon/pull/503.patch"},"body":null},"comment":{"url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/comments/133063086","html_url":"https://github.com/Hammerspoon/hammerspoon/pull/503#issuecomment-133063086","issue_url":"https://api.github.com/repos/Hammerspoon/hammerspoon/issues/503","id":133063086,"user":{"login":"lowne","id":6718755,"avatar_url":"https://avatars.githubusercontent.com/u/6718755?v=3","gravatar_id":"","url":"https://api.github.com/users/lowne","html_url":"https://github.com/lowne","followers_url":"https://api.github.com/users/lowne/followers","following_url":"https://api.github.com/users/lowne/following{/other_user}","gists_url":"https://api.github.com/users/lowne/gists{/gist_id}","starred_url":"https://api.github.com/users/lowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowne/subscriptions","organizations_url":"https://api.github.com/users/lowne/orgs","repos_url":"https://api.github.com/users/lowne/repos","events_url":"https://api.github.com/users/lowne/events{/privacy}","received_events_url":"https://api.github.com/users/lowne/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T16:10:54Z","updated_at":"2015-08-20T16:10:54Z","body":"Agreed; I finished removing moses (previously converted from fnutils) from window, and the resulting code (besides being sometimes *much* faster, details on the upcoming PR) is **a lot** more parseable without requiring to look stuff up elsewhere, primarily because there are no \"surprises\" in a for loop with pairs/ipairs - it's well-defined and anyone can see what it does at a glance, and furthermore it's much easier to reason about wasteful computations/calls and bring those out of the loop as required. (no, memoization is *not* the solution; after all it's Lua we're talking about.)\n\nSo in short I suggest we remove all this stuff *from our code* (as I said, I'm on it already), for easier maintainability/refactoring/expansion down the line.\n\nAs for shipping stuff for users' benefit: I agree with @cmsj there's no point in shipping moses (or anything else) if it's not used internally, when for users it's just a matter of dropping whatever they want onto their .hammerspoon folder. \n\nAs for fnutils, it's already there, but I still think we should avoid leading users into impossible-to-diagnose bugs (main culprit being silently out-of-order filtering, but there's a couple more there); this could be \"fixed\" by putting adequate warnings in the docs (there's no proper fixing fnutils with full backward compatibility as I didn't quite explain in #488 - just take my word for it), but then, in the user shoes, my immediate reaction would be \"ok, careful this, can't do that, *why* don't you guys just fix it?\" - so in the end I think it's better to deprecate and undocument it.\n\nAt this point I *might* argue again in favour of hs.func (or, better, hs.collection, since that's what it is in essence) as a proper (and more versatile to boot) fnutils replacement, but I'm now inclined to think that maybe it's better to just leave all this stuff out, as I bet the vast majority of users do not or (more importantly) should not care; for those who do, again, nothing's stopping them from dropping in moses/penlight/their own homemade collection library in their configs.\n"}}