{"id":62,"date":"2003-08-15T15:07:05","date_gmt":"2003-08-15T19:07:05","guid":{"rendered":"http:\/\/www.theoreti.ca\/?p=62"},"modified":"2003-08-15T15:07:05","modified_gmt":"2003-08-15T19:07:05","slug":"text-toy-language-2","status":"publish","type":"post","link":"https:\/\/theoreti.ca\/?p=62","title":{"rendered":"Text Toy Language 2"},"content":{"rendered":"<p>The grammar of TBC (Text by Code) should have:<br \/>\n&#8211; Primitives: Paths, Glyphs, Characters, Words, Strings, and Element<br \/>\n&#8211; Methods: To get text, parse it into primitives, manipulate it, place it, render it, and make it move.<br \/>\n<!--more--><br \/>\nPrimitives:<br \/>\n1. A <b>path<\/b> is a line that moves through space.<br \/>\n2. A <b>shape<\/b> is a closed path with fill.<br \/>\n3. A <b>glyph<\/b> is a shape that for TBC is usually a letter.<br \/>\n4. A <b>character<\/b> is the semantic equivalent to a glyph. Thus Roman Character &#8220;I&#8221; is a character that corresponds to a family of shapes that are horizontal bars with serifs at the ends.<br \/>\n5. A <b>word<\/b> is a sequence of characters that usually does not include a space character and isn&#8217;t too long.<br \/>\n6. A <b>string<\/b> is a more general version of a word in that it can be longer and contain all characters.<br \/>\n7. An <b>element<\/b> is an xml object. I am not sure of this, but I would like an xml api native to the language.<\/p>\n<p>Processes:<br \/>\nSo what could we do with these primitives?<br \/>\n1. In the simplest form we should be able to get text from a source like a keyboard, file, or URL and create a string. We should then be able to do things to the string like break it into words. The words we should be able to place in a 2D space.<br \/>\n2. At a more advanced level I should be able to break a text into characters and then do things to the corresponding glyphs. In other words I can not only manipulate the strings, but the shapes of the letters. Thus I could have letters that jitter on the screen or change shape.<br \/>\n3. The manipulation of text should be something I can do so I could create an Eliza like bot. Thus I need regular expressions and so on.<\/p>\n<p>I can probably fake this out with Ruby in that I can create library of objects and a mechanism to output to html using divs and absolute placement.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The grammar of TBC (Text by Code) should have: &#8211; Primitives: Paths, Glyphs, Characters, Words, Strings, and Element &#8211; Methods: To get text, parse it into primitives, manipulate it, place it, render it, and make it move.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-text-analysis"],"_links":{"self":[{"href":"https:\/\/theoreti.ca\/index.php?rest_route=\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theoreti.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theoreti.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theoreti.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theoreti.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=62"}],"version-history":[{"count":0,"href":"https:\/\/theoreti.ca\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions"}],"wp:attachment":[{"href":"https:\/\/theoreti.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theoreti.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theoreti.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}