{"action":"created","comment":{"url":"https://api.github.com/repos/opencog/opencog/pulls/comments/241265492","pull_request_review_id":184493870,"id":241265492,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTI2NTQ5Mg==","diff_hunk":"@@ -0,0 +1,58 @@\n+#include \"OctoMapValue.h\"\n+\n+#include <opencog/spacetime/octomap/atom_types.h>\n+#include <opencog/util/exceptions.h>\n+#include <opencog/atoms/base/ClassServer.h>\n+#include <opencog/atoms/value/ValueFactory.h>\n+\n+using namespace opencog;\n+\n+\n+void OctoValue::update() const\n+{\n+    auto it = (_om->get_locations_of_atom(_item)).rbegin(); //We need the last.\n+    _value = {it->x(), it->y(), it->z()};\n+}\n+\n+OctoValue::OctoValue(const HandleSeq& hseq) : FloatValue(OCTO_VALUE)","path":"opencog/spacetime/octomap/OctoMapValue.cc","position":17,"original_position":17,"commit_id":"035445f604f05e2073cdc2676a6af1bf34b079c5","original_commit_id":"035445f604f05e2073cdc2676a6af1bf34b079c5","user":{"login":"linas","id":94368,"node_id":"MDQ6VXNlcjk0MzY4","avatar_url":"https://avatars2.githubusercontent.com/u/94368?v=4","gravatar_id":"","url":"https://api.github.com/users/linas","html_url":"https://github.com/linas","followers_url":"https://api.github.com/users/linas/followers","following_url":"https://api.github.com/users/linas/following{/other_user}","gists_url":"https://api.github.com/users/linas/gists{/gist_id}","starred_url":"https://api.github.com/users/linas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linas/subscriptions","organizations_url":"https://api.github.com/users/linas/orgs","repos_url":"https://api.github.com/users/linas/repos","events_url":"https://api.github.com/users/linas/events{/privacy}","received_events_url":"https://api.github.com/users/linas/received_events","type":"User","site_admin":false},"body":"This is maybe nit-picking, but it would probably be better if this took two `Handle`s, instead of a `HandleSeq`. The reason for this is to minimize API complexity: If all code everywhere always uses Handles for everything .. then we're done. But if all code everywhere has to support both Handles and handleSeq and HandleSeqSeq, and HandleFooMap and ... well, that just ends up being more code, more complexity, more bugs, and everything is harder to understand.  So its best to avoid HandleSeq most of the time.  This seems like a good example where its not really needed.","created_at":"2018-12-13T03:56:51Z","updated_at":"2018-12-13T03:56:51Z","html_url":"https://github.com/opencog/opencog/pull/3362#discussion_r241265492","pull_request_url":"https://api.github.com/repos/opencog/opencog/pulls/3362","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/opencog/opencog/pulls/comments/241265492"},"html":{"href":"https://github.com/opencog/opencog/pull/3362#discussion_r241265492"},"pull_request":{"href":"https://api.github.com/repos/opencog/opencog/pulls/3362"}}},"pull_request":{"url":"https://api.github.com/repos/opencog/opencog/pulls/3362","id":236449239,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NDQ5MjM5","html_url":"https://github.com/opencog/opencog/pull/3362","diff_url":"https://github.com/opencog/opencog/pull/3362.diff","patch_url":"https://github.com/opencog/opencog/pull/3362.patch","issue_url":"https://api.github.com/repos/opencog/opencog/issues/3362","number":3362,"state":"open","locked":false,"title":"Make TimeOctomap work with Values WIP  ","user":{"login":"misgeatgit","id":2872565,"node_id":"MDQ6VXNlcjI4NzI1NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/2872565?v=4","gravatar_id":"","url":"https://api.github.com/users/misgeatgit","html_url":"https://github.com/misgeatgit","followers_url":"https://api.github.com/users/misgeatgit/followers","following_url":"https://api.github.com/users/misgeatgit/following{/other_user}","gists_url":"https://api.github.com/users/misgeatgit/gists{/gist_id}","starred_url":"https://api.github.com/users/misgeatgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misgeatgit/subscriptions","organizations_url":"https://api.github.com/users/misgeatgit/orgs","repos_url":"https://api.github.com/users/misgeatgit/repos","events_url":"https://api.github.com/users/misgeatgit/events{/privacy}","received_events_url":"https://api.github.com/users/misgeatgit/received_events","type":"User","site_admin":false},"body":"This PR depends on https://github.com/opencog/atomspace/pull/1937. Here is an example how it works:\r\n```\r\n(use-modules (opencog octomap))\r\n\r\n(define znode_0 (Node \"zitem_0\"))\r\n\r\n; One octomap object to store locations of items\r\n(define zmap (OctomapNode \"zmap\"))\r\n\r\n; Insert items and their location to the octomap\r\n(define zvalue_0 (OctoValue  (ListLink znode_0 zmap) 1.12 2.34 3.564))\r\n\r\n(define key (PredicateNode \"spacetime\") )\r\n\r\n; setting values\r\n(cog-set-value! znode_0 key zvalue_0)\r\n\r\n; getting values\r\n(cog-value znode_0 key)\r\n\r\n; list ref\r\n(define v (cog-value znode_0 key))\r\n(cog-value->list v)\r\n(cog-value->ref  v 1)\r\n```\r\nNext step will be  modifying the pointmemory API to make it work with OctoValue and some unit tests.","created_at":"2018-12-06T08:47:14Z","updated_at":"2018-12-13T03:56:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96d54d0d9b00c4df04bd4e43d090b79a3e5a37e6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/opencog/opencog/pulls/3362/commits","review_comments_url":"https://api.github.com/repos/opencog/opencog/pulls/3362/comments","review_comment_url":"https://api.github.com/repos/opencog/opencog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencog/opencog/issues/3362/comments","statuses_url":"https://api.github.com/repos/opencog/opencog/statuses/035445f604f05e2073cdc2676a6af1bf34b079c5","head":{"label":"misgeatgit:time-ocmap","ref":"time-ocmap","sha":"035445f604f05e2073cdc2676a6af1bf34b079c5","user":{"login":"misgeatgit","id":2872565,"node_id":"MDQ6VXNlcjI4NzI1NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/2872565?v=4","gravatar_id":"","url":"https://api.github.com/users/misgeatgit","html_url":"https://github.com/misgeatgit","followers_url":"https://api.github.com/users/misgeatgit/followers","following_url":"https://api.github.com/users/misgeatgit/following{/other_user}","gists_url":"https://api.github.com/users/misgeatgit/gists{/gist_id}","starred_url":"https://api.github.com/users/misgeatgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misgeatgit/subscriptions","organizations_url":"https://api.github.com/users/misgeatgit/orgs","repos_url":"https://api.github.com/users/misgeatgit/repos","events_url":"https://api.github.com/users/misgeatgit/events{/privacy}","received_events_url":"https://api.github.com/users/misgeatgit/received_events","type":"User","site_admin":false},"repo":{"id":15156276,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE1NjI3Ng==","name":"opencog","full_name":"misgeatgit/opencog","private":false,"owner":{"login":"misgeatgit","id":2872565,"node_id":"MDQ6VXNlcjI4NzI1NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/2872565?v=4","gravatar_id":"","url":"https://api.github.com/users/misgeatgit","html_url":"https://github.com/misgeatgit","followers_url":"https://api.github.com/users/misgeatgit/followers","following_url":"https://api.github.com/users/misgeatgit/following{/other_user}","gists_url":"https://api.github.com/users/misgeatgit/gists{/gist_id}","starred_url":"https://api.github.com/users/misgeatgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misgeatgit/subscriptions","organizations_url":"https://api.github.com/users/misgeatgit/orgs","repos_url":"https://api.github.com/users/misgeatgit/repos","events_url":"https://api.github.com/users/misgeatgit/events{/privacy}","received_events_url":"https://api.github.com/users/misgeatgit/received_events","type":"User","site_admin":false},"html_url":"https://github.com/misgeatgit/opencog","description":"A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)","fork":true,"url":"https://api.github.com/repos/misgeatgit/opencog","forks_url":"https://api.github.com/repos/misgeatgit/opencog/forks","keys_url":"https://api.github.com/repos/misgeatgit/opencog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/misgeatgit/opencog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/misgeatgit/opencog/teams","hooks_url":"https://api.github.com/repos/misgeatgit/opencog/hooks","issue_events_url":"https://api.github.com/repos/misgeatgit/opencog/issues/events{/number}","events_url":"https://api.github.com/repos/misgeatgit/opencog/events","assignees_url":"https://api.github.com/repos/misgeatgit/opencog/assignees{/user}","branches_url":"https://api.github.com/repos/misgeatgit/opencog/branches{/branch}","tags_url":"https://api.github.com/repos/misgeatgit/opencog/tags","blobs_url":"https://api.github.com/repos/misgeatgit/opencog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/misgeatgit/opencog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/misgeatgit/opencog/git/refs{/sha}","trees_url":"https://api.github.com/repos/misgeatgit/opencog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/misgeatgit/opencog/statuses/{sha}","languages_url":"https://api.github.com/repos/misgeatgit/opencog/languages","stargazers_url":"https://api.github.com/repos/misgeatgit/opencog/stargazers","contributors_url":"https://api.github.com/repos/misgeatgit/opencog/contributors","subscribers_url":"https://api.github.com/repos/misgeatgit/opencog/subscribers","subscription_url":"https://api.github.com/repos/misgeatgit/opencog/subscription","commits_url":"https://api.github.com/repos/misgeatgit/opencog/commits{/sha}","git_commits_url":"https://api.github.com/repos/misgeatgit/opencog/git/commits{/sha}","comments_url":"https://api.github.com/repos/misgeatgit/opencog/comments{/number}","issue_comment_url":"https://api.github.com/repos/misgeatgit/opencog/issues/comments{/number}","contents_url":"https://api.github.com/repos/misgeatgit/opencog/contents/{+path}","compare_url":"https://api.github.com/repos/misgeatgit/opencog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/misgeatgit/opencog/merges","archive_url":"https://api.github.com/repos/misgeatgit/opencog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/misgeatgit/opencog/downloads","issues_url":"https://api.github.com/repos/misgeatgit/opencog/issues{/number}","pulls_url":"https://api.github.com/repos/misgeatgit/opencog/pulls{/number}","milestones_url":"https://api.github.com/repos/misgeatgit/opencog/milestones{/number}","notifications_url":"https://api.github.com/repos/misgeatgit/opencog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/misgeatgit/opencog/labels{/name}","releases_url":"https://api.github.com/repos/misgeatgit/opencog/releases{/id}","deployments_url":"https://api.github.com/repos/misgeatgit/opencog/deployments","created_at":"2013-12-13T06:14:19Z","updated_at":"2017-12-12T08:03:15Z","pushed_at":"2018-12-13T03:24:57Z","git_url":"git://github.com/misgeatgit/opencog.git","ssh_url":"git@github.com:misgeatgit/opencog.git","clone_url":"https://github.com/misgeatgit/opencog.git","svn_url":"https://github.com/misgeatgit/opencog","homepage":"http://wiki.opencog.org/w/Development","size":196620,"stargazers_count":2,"watchers_count":2,"language":"Scheme","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"opencog:master","ref":"master","sha":"ff9f89bce938a44fcd947ced36d314c0ec531207","user":{"login":"opencog","id":2109913,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDk5MTM=","avatar_url":"https://avatars1.githubusercontent.com/u/2109913?v=4","gravatar_id":"","url":"https://api.github.com/users/opencog","html_url":"https://github.com/opencog","followers_url":"https://api.github.com/users/opencog/followers","following_url":"https://api.github.com/users/opencog/following{/other_user}","gists_url":"https://api.github.com/users/opencog/gists{/gist_id}","starred_url":"https://api.github.com/users/opencog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencog/subscriptions","organizations_url":"https://api.github.com/users/opencog/orgs","repos_url":"https://api.github.com/users/opencog/repos","events_url":"https://api.github.com/users/opencog/events{/privacy}","received_events_url":"https://api.github.com/users/opencog/received_events","type":"Organization","site_admin":false},"repo":{"id":6365343,"node_id":"MDEwOlJlcG9zaXRvcnk2MzY1MzQz","name":"opencog","full_name":"opencog/opencog","private":false,"owner":{"login":"opencog","id":2109913,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDk5MTM=","avatar_url":"https://avatars1.githubusercontent.com/u/2109913?v=4","gravatar_id":"","url":"https://api.github.com/users/opencog","html_url":"https://github.com/opencog","followers_url":"https://api.github.com/users/opencog/followers","following_url":"https://api.github.com/users/opencog/following{/other_user}","gists_url":"https://api.github.com/users/opencog/gists{/gist_id}","starred_url":"https://api.github.com/users/opencog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencog/subscriptions","organizations_url":"https://api.github.com/users/opencog/orgs","repos_url":"https://api.github.com/users/opencog/repos","events_url":"https://api.github.com/users/opencog/events{/privacy}","received_events_url":"https://api.github.com/users/opencog/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/opencog/opencog","description":"A framework for integrated Artificial Intelligence & Artificial General Intelligence (AGI)","fork":false,"url":"https://api.github.com/repos/opencog/opencog","forks_url":"https://api.github.com/repos/opencog/opencog/forks","keys_url":"https://api.github.com/repos/opencog/opencog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencog/opencog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencog/opencog/teams","hooks_url":"https://api.github.com/repos/opencog/opencog/hooks","issue_events_url":"https://api.github.com/repos/opencog/opencog/issues/events{/number}","events_url":"https://api.github.com/repos/opencog/opencog/events","assignees_url":"https://api.github.com/repos/opencog/opencog/assignees{/user}","branches_url":"https://api.github.com/repos/opencog/opencog/branches{/branch}","tags_url":"https://api.github.com/repos/opencog/opencog/tags","blobs_url":"https://api.github.com/repos/opencog/opencog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencog/opencog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencog/opencog/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencog/opencog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencog/opencog/statuses/{sha}","languages_url":"https://api.github.com/repos/opencog/opencog/languages","stargazers_url":"https://api.github.com/repos/opencog/opencog/stargazers","contributors_url":"https://api.github.com/repos/opencog/opencog/contributors","subscribers_url":"https://api.github.com/repos/opencog/opencog/subscribers","subscription_url":"https://api.github.com/repos/opencog/opencog/subscription","commits_url":"https://api.github.com/repos/opencog/opencog/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencog/opencog/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencog/opencog/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencog/opencog/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencog/opencog/contents/{+path}","compare_url":"https://api.github.com/repos/opencog/opencog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencog/opencog/merges","archive_url":"https://api.github.com/repos/opencog/opencog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencog/opencog/downloads","issues_url":"https://api.github.com/repos/opencog/opencog/issues{/number}","pulls_url":"https://api.github.com/repos/opencog/opencog/pulls{/number}","milestones_url":"https://api.github.com/repos/opencog/opencog/milestones{/number}","notifications_url":"https://api.github.com/repos/opencog/opencog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencog/opencog/labels{/name}","releases_url":"https://api.github.com/repos/opencog/opencog/releases{/id}","deployments_url":"https://api.github.com/repos/opencog/opencog/deployments","created_at":"2012-10-24T06:10:15Z","updated_at":"2018-12-13T02:07:13Z","pushed_at":"2018-12-13T03:25:00Z","git_url":"git://github.com/opencog/opencog.git","ssh_url":"git@github.com:opencog/opencog.git","clone_url":"https://github.com/opencog/opencog.git","svn_url":"https://github.com/opencog/opencog","homepage":"http://wiki.opencog.org/w/Development","size":184472,"stargazers_count":1621,"watchers_count":1621,"language":"Scheme","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":643,"mirror_url":null,"archived":false,"open_issues_count":76,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":643,"open_issues":76,"watchers":1621,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencog/opencog/pulls/3362"},"html":{"href":"https://github.com/opencog/opencog/pull/3362"},"issue":{"href":"https://api.github.com/repos/opencog/opencog/issues/3362"},"comments":{"href":"https://api.github.com/repos/opencog/opencog/issues/3362/comments"},"review_comments":{"href":"https://api.github.com/repos/opencog/opencog/pulls/3362/comments"},"review_comment":{"href":"https://api.github.com/repos/opencog/opencog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencog/opencog/pulls/3362/commits"},"statuses":{"href":"https://api.github.com/repos/opencog/opencog/statuses/035445f604f05e2073cdc2676a6af1bf34b079c5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"linas"}}