{"action":"created","issue":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/458","repository_url":"https://api.github.com/repos/kaitai-io/kaitai_struct","labels_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/458/labels{/name}","comments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/458/comments","events_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/458/events","html_url":"https://github.com/kaitai-io/kaitai_struct/issues/458","id":341212106,"node_id":"MDU6SXNzdWUzNDEyMTIxMDY=","number":458,"title":"Non-hardcoded contents","user":{"login":"KOLANICH","id":240344,"node_id":"MDQ6VXNlcjI0MDM0NA==","avatar_url":"https://avatars1.githubusercontent.com/u/240344?v=4","gravatar_id":"","url":"https://api.github.com/users/KOLANICH","html_url":"https://github.com/KOLANICH","followers_url":"https://api.github.com/users/KOLANICH/followers","following_url":"https://api.github.com/users/KOLANICH/following{/other_user}","gists_url":"https://api.github.com/users/KOLANICH/gists{/gist_id}","starred_url":"https://api.github.com/users/KOLANICH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KOLANICH/subscriptions","organizations_url":"https://api.github.com/users/KOLANICH/orgs","repos_url":"https://api.github.com/users/KOLANICH/repos","events_url":"https://api.github.com/users/KOLANICH/events{/privacy}","received_events_url":"https://api.github.com/users/KOLANICH/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-14T05:59:01Z","updated_at":"2018-07-15T00:53:17Z","closed_at":null,"author_association":"NONE","body":"From https://github.com/KOLANICH/kaitai_struct_formats/blob/CNTK/scientific/data_science/cntk.ksy\r\n```yaml\r\ntypes:\r\n  begin_marker_hardcode:\r\n    params:\r\n      - id: name\r\n        type: str\r\n    seq:\r\n      - id: end\r\n        contents: [\"B\", 0]\r\n      - id: marker\r\n        contents: [name]\r\n```\r\n\r\ncontents matches variable name instead of parameter.\r\nIt should match the string passed as a parameter. It would also be nice to specify string length in the parameter if the marker is fixed length. And string type (str or strz and terminator) too. And make the compiler cast types if it is possible or check if it is impossible to cast. Length mismatch should not be cast. str->strz and encodjngs should."},"comment":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/comments/405059612","html_url":"https://github.com/kaitai-io/kaitai_struct/issues/458#issuecomment-405059612","issue_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/458","id":405059612,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTA1OTYxMg==","user":{"login":"GreyCat","id":157154,"node_id":"MDQ6VXNlcjE1NzE1NA==","avatar_url":"https://avatars0.githubusercontent.com/u/157154?v=4","gravatar_id":"","url":"https://api.github.com/users/GreyCat","html_url":"https://github.com/GreyCat","followers_url":"https://api.github.com/users/GreyCat/followers","following_url":"https://api.github.com/users/GreyCat/following{/other_user}","gists_url":"https://api.github.com/users/GreyCat/gists{/gist_id}","starred_url":"https://api.github.com/users/GreyCat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreyCat/subscriptions","organizations_url":"https://api.github.com/users/GreyCat/orgs","repos_url":"https://api.github.com/users/GreyCat/repos","events_url":"https://api.github.com/users/GreyCat/events{/privacy}","received_events_url":"https://api.github.com/users/GreyCat/received_events","type":"User","site_admin":false},"created_at":"2018-07-15T00:53:17Z","updated_at":"2018-07-15T00:53:17Z","author_association":"MEMBER","body":"This is basically a question of validation. I don't see why this could not be solved with #435, and why would we need to invent \"enhanced `contents` syntax\"."}}
{"actor":{"display_login":"GreyCat"}}