{"action":"created","issue":{"url":"https://api.github.com/repos/exercism/problem-specifications/issues/1314","repository_url":"https://api.github.com/repos/exercism/problem-specifications","labels_url":"https://api.github.com/repos/exercism/problem-specifications/issues/1314/labels{/name}","comments_url":"https://api.github.com/repos/exercism/problem-specifications/issues/1314/comments","events_url":"https://api.github.com/repos/exercism/problem-specifications/issues/1314/events","html_url":"https://github.com/exercism/problem-specifications/pull/1314","id":356039469,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNDI5MzUw","number":1314,"title":"zipper: major change, adding immutability tests and node insertion tests","user":{"login":"cglacet","id":28622118,"node_id":"MDQ6VXNlcjI4NjIyMTE4","avatar_url":"https://avatars2.githubusercontent.com/u/28622118?v=4","gravatar_id":"","url":"https://api.github.com/users/cglacet","html_url":"https://github.com/cglacet","followers_url":"https://api.github.com/users/cglacet/followers","following_url":"https://api.github.com/users/cglacet/following{/other_user}","gists_url":"https://api.github.com/users/cglacet/gists{/gist_id}","starred_url":"https://api.github.com/users/cglacet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cglacet/subscriptions","organizations_url":"https://api.github.com/users/cglacet/orgs","repos_url":"https://api.github.com/users/cglacet/repos","events_url":"https://api.github.com/users/cglacet/events{/privacy}","received_events_url":"https://api.github.com/users/cglacet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-31T16:04:29Z","updated_at":"2018-09-05T15:59:21Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/exercism/problem-specifications/pulls/1314","html_url":"https://github.com/exercism/problem-specifications/pull/1314","diff_url":"https://github.com/exercism/problem-specifications/pull/1314.diff","patch_url":"https://github.com/exercism/problem-specifications/pull/1314.patch"},"body":"The main goal is to be able to run tests without using an intermediate tree structure.\r\n\r\nThis follows issue exercism/python#1497. \r\n\r\nNow the test consists in creating a tree starting from an empty zipper\r\nusing the the atomic operations left, right, up and insert/modify/read\r\nnode values. (Each operation is tested independently.)\r\n\r\nIn the old version there were no immutability check. Immutability will\r\nnow be an important part of students goals."},"comment":{"url":"https://api.github.com/repos/exercism/problem-specifications/issues/comments/418785108","html_url":"https://github.com/exercism/problem-specifications/pull/1314#issuecomment-418785108","issue_url":"https://api.github.com/repos/exercism/problem-specifications/issues/1314","id":418785108,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODc4NTEwOA==","user":{"login":"cglacet","id":28622118,"node_id":"MDQ6VXNlcjI4NjIyMTE4","avatar_url":"https://avatars2.githubusercontent.com/u/28622118?v=4","gravatar_id":"","url":"https://api.github.com/users/cglacet","html_url":"https://github.com/cglacet","followers_url":"https://api.github.com/users/cglacet/followers","following_url":"https://api.github.com/users/cglacet/following{/other_user}","gists_url":"https://api.github.com/users/cglacet/gists{/gist_id}","starred_url":"https://api.github.com/users/cglacet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cglacet/subscriptions","organizations_url":"https://api.github.com/users/cglacet/orgs","repos_url":"https://api.github.com/users/cglacet/repos","events_url":"https://api.github.com/users/cglacet/events{/privacy}","received_events_url":"https://api.github.com/users/cglacet/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T15:59:21Z","updated_at":"2018-09-05T15:59:21Z","author_association":"NONE","body":"> From an arbitrary leaf, I move left (to a space where I can insert a node), then left again. What should happen?\r\n\r\nIt should raise an error.  I though I added this in the tests, but maybe I changed this after the push. I'll have a look at it as soon as I can free a bit of time (sadly a few days).\r\n\r\n > Should I understand insert to only work where there is no existing node\r\n\r\nExactly. \r\n\r\n>  and set_value to only work when there is an existing node?\r\n\r\nYes, this function only modifies the value of a node. Whereas `insert` add a node in some empty space. \r\n\r\n> Is it an error to set_value on a space where a node doesn't exist, \r\n\r\nIt definitely should yes. \r\n\r\n> and/or is it an error to insert where a node already exists?\r\n\r\nI'm not really sure about that, we could imagine that insert simply replaces the existing node if there is one. Note that this node can be a tree, this would thus remove the whole tree and replace it by a new node.\r\n\r\n > Will set_left and set_right still exist in the proposed interface?\r\n\r\nIf you have a look at my python solution you'll see that I added two macros that do exactly what `set_left` and `set_right` used to do. It simply uses the existing methods to first move left (or right) then insert a node, and move back up. This could also be tested but I didn't added it as it's only a shortened version of the sequence: \"set_left(x) = left insert(x) up\".\r\n\r\nWe could also have the ability to insert more than a node (using its value), we could have `insert` and `insert_tree`  and even `insert_zipper` they would all work the same way and simply take as argument objects of different types (a value, a tree or a zipper). I think we may also only have `insert` to only take zippers as input, this would make the exercise cleaner. I'm not sure how to describe that in the test description though.  \r\n\r\n> Is it acceptable to drop them? (set_left and set_right still)\r\n\r\nI really think it can be dropped. \r\n\r\n> Should they be tested?\r\n\r\nIf they exist then yes.\r\n"}}
{"actor":{"display_login":"cglacet"}}