{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/rfcs/issues/37","repository_url":"https://api.github.com/repos/nim-lang/rfcs","labels_url":"https://api.github.com/repos/nim-lang/rfcs/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/rfcs/issues/37/comments","events_url":"https://api.github.com/repos/nim-lang/rfcs/issues/37/events","html_url":"https://github.com/nim-lang/rfcs/issues/37","id":370167000,"node_id":"MDU6SXNzdWUzNzAxNjcwMDA=","number":37,"title":"Removal of nre and improvement of re","user":{"login":"narimiran","id":16516130,"node_id":"MDQ6VXNlcjE2NTE2MTMw","avatar_url":"https://avatars2.githubusercontent.com/u/16516130?v=4","gravatar_id":"","url":"https://api.github.com/users/narimiran","html_url":"https://github.com/narimiran","followers_url":"https://api.github.com/users/narimiran/followers","following_url":"https://api.github.com/users/narimiran/following{/other_user}","gists_url":"https://api.github.com/users/narimiran/gists{/gist_id}","starred_url":"https://api.github.com/users/narimiran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narimiran/subscriptions","organizations_url":"https://api.github.com/users/narimiran/orgs","repos_url":"https://api.github.com/users/narimiran/repos","events_url":"https://api.github.com/users/narimiran/events{/privacy}","received_events_url":"https://api.github.com/users/narimiran/received_events","type":"User","site_admin":false},"labels":[{"id":1091665951,"node_id":"MDU6TGFiZWwxMDkxNjY1OTUx","url":"https://api.github.com/repos/nim-lang/rfcs/labels/RFC","name":"RFC","color":"1d1d1d","default":false},{"id":1091677081,"node_id":"MDU6TGFiZWwxMDkxNjc3MDgx","url":"https://api.github.com/repos/nim-lang/rfcs/labels/Stdlib","name":"Stdlib","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-10-15T13:36:31Z","updated_at":"2018-10-15T13:36:47Z","closed_at":null,"author_association":"COLLABORATOR","body":"<a href=\"https://github.com/dom96\"><img src=\"https://avatars0.githubusercontent.com/u/246651?v=4\" align=\"left\" width=\"96\" height=\"96\" hspace=\"10\"></img></a> **Issue by [dom96](https://github.com/dom96)**\n_Thursday Mar 01, 2018 at 14:46 GMT_\n_Originally opened as https://github.com/nim-lang/Nim/issues/7278_\n\n----\n\nThere isn't time for this in the upcoming release but we need to decide what to do about ``nre``. The consensus between me and Araq is that it should be deprecated and ``re``'s API improved to [fix issues with it](https://github.com/flaviut/nre#why)\n"},"comment":{"url":"https://api.github.com/repos/nim-lang/rfcs/issues/comments/429855140","html_url":"https://github.com/nim-lang/rfcs/issues/37#issuecomment-429855140","issue_url":"https://api.github.com/repos/nim-lang/rfcs/issues/37","id":429855140,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTg1NTE0MA==","user":{"login":"narimiran","id":16516130,"node_id":"MDQ6VXNlcjE2NTE2MTMw","avatar_url":"https://avatars2.githubusercontent.com/u/16516130?v=4","gravatar_id":"","url":"https://api.github.com/users/narimiran","html_url":"https://github.com/narimiran","followers_url":"https://api.github.com/users/narimiran/followers","following_url":"https://api.github.com/users/narimiran/following{/other_user}","gists_url":"https://api.github.com/users/narimiran/gists{/gist_id}","starred_url":"https://api.github.com/users/narimiran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narimiran/subscriptions","organizations_url":"https://api.github.com/users/narimiran/orgs","repos_url":"https://api.github.com/users/narimiran/repos","events_url":"https://api.github.com/users/narimiran/events{/privacy}","received_events_url":"https://api.github.com/users/narimiran/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T13:36:47Z","updated_at":"2018-10-15T13:36:47Z","author_association":"COLLABORATOR","body":"<a href=\"https://github.com/flaviut\"><img src=\"https://avatars3.githubusercontent.com/u/5213469?v=4\" align=\"left\" width=\"48\" height=\"48\" hspace=\"10\"></img></a> **Comment by [flaviut](https://github.com/flaviut)**\n_Tuesday Oct 09, 2018 at 17:39 GMT_\n\n----\n\n> I couldn't use `nre` for nimgrep [...]\r\n\r\nWhy not? I haven't tested this code, but it's more-or-less what nimgrep would look like with `nre`:\r\n\r\n```nim\r\n    let t = find(buffer, pattern, i)\r\n    if t.isNone: break\r\n    inc(line, countLines(buffer, i, t.first-1))\r\n\r\n    var wholeMatch = t.get.match\r\n\r\n    beforeHighlight()\r\n    inc counter\r\n    if optReplace notin options:\r\n      highlight(buffer, wholeMatch, \"\", t.get, filename, line, showRepl=false)\r\n    else:\r\n      let r = replace(wholeMatch, pattern, replacement)\r\n```\r\n\r\n> [...] and this ship has sailed. `nre` should become a Nimble package.\r\n\r\nI don't disagree, or agree with this. IMO the only thing that's important is that the regex library that ships with the stdlib is the best that Nim can offer. Whether that's some modified version of nre or some version of re is less important. I'd have no problem maintaining nre as a nimble package.\r\n\r\n> [...], but at least I understand the codebase and continue to improve it.\r\n\r\nI'm disapointed to hear this, since I try to make make my code as easy to read and write as possible.\r\n\r\nIf you can find time, can you provide some more specific feedback here? What changes could be made to make it easier to maintain?\r\n\r\n> You can argue that `re` should also move to a Nimble package but then Nim needs testament and testament uses regular expressions so before we do that, we need to remove these dependencies as well.\r\n\r\nI won't make this argument because regexes are so useful that I think it's important that the stdlib ships something to handle them.\r\n\n"}}
{"actor":{"display_login":"narimiran"}}