{"action":"closed","issue":{"url":"https://api.github.com/repos/cortexlang/cortex/issues/35","labels_url":"https://api.github.com/repos/cortexlang/cortex/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/cortexlang/cortex/issues/35/comments","events_url":"https://api.github.com/repos/cortexlang/cortex/issues/35/events","html_url":"https://github.com/cortexlang/cortex/issues/35","id":50715276,"number":35,"title":"Make `dbsh_stateStr` and `dbsh_attrStr` publicly available","user":{"login":"jleeothon","id":6202537,"avatar_url":"https://avatars.githubusercontent.com/u/6202537?v=3","gravatar_id":"","url":"https://api.github.com/users/jleeothon","html_url":"https://github.com/jleeothon","followers_url":"https://api.github.com/users/jleeothon/followers","following_url":"https://api.github.com/users/jleeothon/following{/other_user}","gists_url":"https://api.github.com/users/jleeothon/gists{/gist_id}","starred_url":"https://api.github.com/users/jleeothon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleeothon/subscriptions","organizations_url":"https://api.github.com/users/jleeothon/orgs","repos_url":"https://api.github.com/users/jleeothon/repos","events_url":"https://api.github.com/users/jleeothon/events{/privacy}","received_events_url":"https://api.github.com/users/jleeothon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cortexlang/cortex/labels/QA","name":"QA","color":"f7c6c7"},{"url":"https://api.github.com/repos/cortexlang/cortex/labels/Tools","name":"Tools","color":"5319e7"}],"state":"closed","locked":false,"assignee":{"login":"jleeothon","id":6202537,"avatar_url":"https://avatars.githubusercontent.com/u/6202537?v=3","gravatar_id":"","url":"https://api.github.com/users/jleeothon","html_url":"https://github.com/jleeothon","followers_url":"https://api.github.com/users/jleeothon/followers","following_url":"https://api.github.com/users/jleeothon/following{/other_user}","gists_url":"https://api.github.com/users/jleeothon/gists{/gist_id}","starred_url":"https://api.github.com/users/jleeothon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleeothon/subscriptions","organizations_url":"https://api.github.com/users/jleeothon/orgs","repos_url":"https://api.github.com/users/jleeothon/repos","events_url":"https://api.github.com/users/jleeothon/events{/privacy}","received_events_url":"https://api.github.com/users/jleeothon/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cortexlang/cortex/milestones/2","html_url":"https://github.com/cortexlang/cortex/milestones/alpha%200.2.0","labels_url":"https://api.github.com/repos/cortexlang/cortex/milestones/2/labels","id":880518,"number":2,"title":"alpha 0.2.0","description":"The focus of this release is stabilization and QA.\r\n\r\nNew development will include:\r\n * implicit casting\r\n * improvements in compile-time type checking\r\n * an automated test framework\r\n * improved language stability tests","creator":{"login":"SanderMertens","id":9919222,"avatar_url":"https://avatars.githubusercontent.com/u/9919222?v=3","gravatar_id":"","url":"https://api.github.com/users/SanderMertens","html_url":"https://github.com/SanderMertens","followers_url":"https://api.github.com/users/SanderMertens/followers","following_url":"https://api.github.com/users/SanderMertens/following{/other_user}","gists_url":"https://api.github.com/users/SanderMertens/gists{/gist_id}","starred_url":"https://api.github.com/users/SanderMertens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SanderMertens/subscriptions","organizations_url":"https://api.github.com/users/SanderMertens/orgs","repos_url":"https://api.github.com/users/SanderMertens/repos","events_url":"https://api.github.com/users/SanderMertens/events{/privacy}","received_events_url":"https://api.github.com/users/SanderMertens/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":75,"state":"open","created_at":"2014-11-25T22:01:50Z","updated_at":"2015-07-21T02:06:06Z","due_on":"2015-06-29T04:00:00Z","closed_at":null},"comments":5,"created_at":"2014-12-02T20:33:31Z","updated_at":"2015-07-21T02:06:06Z","closed_at":"2015-07-21T02:06:06Z","body":"From `dbsh.c`, the functions `dbsh_stateStr` and `dbsh_attrStr` could be made available for reuse as the standard way of representing the state and attributes of an object, for example for serializers.\r\n\r\nAlso, what should be a recommended size for the buffer? Lines 129 and 130 in dbsh.c (https://github.com/Seldomberry/Hyve/blob/master/tools/dbsh/src/dbsh.c) seem to suggest that the representation was different than it actually is.\r\n\r\nSolution 1. We could define a global size constant, something like `#define STATE_STR_MAX (sizeof(\"S|W|O\"))`. Cons: pollute the global namespace.\r\n\r\nSolution 2. Let the functions internally handle the creation of a necessary buffers. Cons: buffer can be internally allocated and externally freed. \r\n\r\nSolution 3. Postpone this issue to merge it with defining a buffer allocation strategy."}}