{"id":1213,"date":"2010-11-30T21:47:25","date_gmt":"2010-12-01T02:47:25","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/?p=1213"},"modified":"2016-08-02T14:16:03","modified_gmt":"2016-08-02T18:16:03","slug":"the-glorious-horror-of-teco","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2010\/11\/30\/the-glorious-horror-of-teco\/","title":{"rendered":"The Glorious Horror of TECO"},"content":{"rendered":"<p>In my oh-so-abundant free time, I&#8217;ve been working on my own little text editor. And one of my motivations is TECO: one of the oldest, and one of the very best, ever written. It&#8217;s both a text editor <em>and<\/em> a programming language &#8211; and, in fact, that&#8217;s exactly what made it such a brilliant tool.  So much of the drudgery of programming is stuff that really could be done by a program. But we&#8217;ve spent so much time learning to be fancy that we&#8217;ve lost track of that. Nowadays, you can write an emacs lisp program to do the stuff you used to do in TECO; only it&#8217;s awkward enough that you usually don&#8217;t.<\/p>\n<p>The problem, though, with just re-implementing TECO with a modern UI is that it was designed in a different time. When TECO was written, every byte was critical. And so the language, the syntax, the structure, it was completely ridiculous. And, as a result, it became the world&#8217;s most <em>useful<\/em> pathological programming language. It&#8217;s a glorious, hideous, wonderful, horrific piece of computing history<\/p>\n<p>TECO is one of the most influential pieces of software ever written. If, by chance, you&#8217;ve ever heard of a little editor called &#8220;emacs&#8221;; well, that was originally a set of editor macros for TECO (EMACS = Editor MACroS). As a language, it&#8217;s both wonderful and awful. On the good side, The central concept of the language is wonderful: it&#8217;s a powerful language for processing text, which works by basically repeatedly finding text that matches some kind of pattern, taking some kind of action when it finds it, and then selecting the next pattern to look for. That&#8217;s a very natural, easy to understand way of writing programs to do text processing. On the bad side, it&#8217;s got the most god-awful hideous syntax ever imagined.<\/p>\n<p><!--more--><\/p>\n<h2>History<\/h2>\n<p>TECO deserves a discussion of its history &#8211; it&#8217;s history is basically the history of how programmers&#8217; editors developed. This is a <em>very<\/em> short version of it, but it&#8217;s good enough for this post.<\/p>\n<p>In the early days, PDP computers used a paper tape for entering programs. (Mainframes mostly used punched cards; minis like the PDPs used paper tape). The big problem with paper tape is that if there&#8217;s an error, you need to either create a <em>whole new tape<\/em> containing the correction, or carefully cut and splice the tape together with new segments to create a new tape (and splicing was <em>very<\/em> error prone).<\/p>\n<p>This was bad. And so, TECO was born. TECO was the &#8220;Tape Editor and COrrector&#8221;. It was a turing complete programming language in which you could write programs to make your corrections. So you&#8217;d feed the TECO program in to the computer first, and then feed the original tape (with errors) into the machine; the TECO program would do the edits you specified, and then you&#8217;d feed the program to the compiler. It needed to be Turing complete, because you were <em>writing a program<\/em> to find the stuff that needed to be changed.<\/p>\n<p>A language designed to live in the paper-tape world had to have some major constraints. First, paper tape is <em>slow<\/em>. <em>Really<\/em> slow. And punching tape is a miserable process. So you <em>really<\/em> wanted to keep things as short as possible. So the syntax of TECO is, to put it mildly, absolutely mind-boggling. <em>Every<\/em> character is a command. And I don&#8217;t mean &#8220;every punctuation character&#8221;, or &#8220;every letter&#8221;. <em>Every<\/em> character is a command. Letters, numbers, punctuation, line feeds, control characters&#8230; Everything.<\/p>\n<p>But despite the utterly cryptic nature of it, it was good. It was <em>very<\/em> good. So when people started to use interactive teletypes (at 110 baud), they <em>still<\/em> wanted to use TECO. And so it evolved. But that basic tape-based syntax remained.<\/p>\n<p>When screen-addressable terminals came along &#8211; vt52s and such &#8211; suddenly, you could write programs that used cursor control! The idea of a full-screen editor came along. Of course, TECO lovers wanted their full screen editor to be TECO. For Vaxes, one of the very first full screen editors was a version of TECO that displayed a screen full of text, and did commands as you typed them; and for commands that actually needed extra input (like search), it used a mode-line on the bottom of the screen (exactly the way that emacs does now).<\/p>\n<p>Not too long after that, Richard Stallman and James Gosling wrote emacs &#8211; the editor macros for TECO. Originally, it was nothing but editor macros for TECO to make the full screen editor easier to use. But eventually, they rewrote it from scratch, to be Lisp based. And not long after that, TECO faded away, only to be remembered by a bunch of aging geeks. The syntax of TECO killed it; the simple fact is, if you have an alternative to the mind-boggling hideousness that is TECO syntax, you&#8217;re willing to put up with a less powerful language that you can actually <em>read<\/em>. So almost everyone would rather write their programs in Emacs lisp than in TECO, even if TECO <em>was<\/em> the better language.<\/p>\n<p>The shame of TECO&#8217;s death is that it was actually a really nice programming language. To this day, I still come across things that I need to do that are better suited to TECO than to any modern day programming language that I know. The problem though, and the reason that it&#8217;s disappeared so thoroughly, is that the <em>syntax<\/em> of TECO is so mind-bogglingly awful that no one, not even someone as insane as I am, would try to write code in it when there are other options available.<\/p>\n<h3>A Taste of TECO Programming<\/h3>\n<p>Before jumping in in and explaining the basics of TECO in some detail, let&#8217;s take a quick look at a really simple TECO program. This program is absolutely <em>remarkably<\/em> clear and readable for TECO source. It even uses a trick to allow it to do comments. The things that look like comments are actually &#8220;goto&#8221; targets.<\/p>\n<pre>\n0uz                      ! clear repeat flag !\n&lt;j 0aua l                ! load 1st char into register A !\n&lt;0aub                    ! load 1st char of next line into B !\nqa-qb\"g xa k -l ga-1uz ' ! if A&gt;B, switch lines and set flag !\nqbua                     ! load B into A !\nl .-z;>                  ! loop back if another line in buffer !\nqz;>                     ! repeat if a switch was made last pass !\n<\/pre>\n<p>The basic idea of TECO programming is pretty simple: search for something that matches some kind of pattern; perform some kind of edit operation on the location you found; and then choose new search to find the next thing to do.<\/p>\n<p>The example program above is a rather sophisticated version of that for such a small program. It searches for the beginnings of consecutive lines. For each pair of lines, if they&#8217;re not in sorted order, it swaps them, and then searches for the next pair of lines. That&#8217;s enclosed in a loop which keeps repeated the scan through the file up until every consecutive pair is in order. In other words, it&#8217;s a swap-sort.<\/p>\n<p>The fundamental (the only?) data structure in TECO is a <em>buffer<\/em>. All TECO programs are based on the idea that you&#8217;ve got a buffer full of text, and you want to do something to change it. The way that you access a buffer is through a <em>cursor<\/em>, which is a pointer into the buffer, which represents the position at which any edit operations will be performed. So TECO operations all work by either reading text at the cursor; editing text at the cursor; or moving the cursor. In TECO lingo, the position of the cursor is called <em>dot<\/em>. Dot is always <em>between<\/em> two characters.<\/p>\n<h3>TECO Commands<\/h3>\n<p>I can&#8217;t possibly explain all of TECO in one post, so I&#8217;m just going to go through enough to give you the flavor, and to make it possible to walk you through a sample program. If you want, you can go and <a href=\"http:\/\/home.tiac.net\/~cri\/2005\/teco.html\">see the full command list<\/a>, or even read <a href=\"http:\/\/www.copters.com\/teco.html\">the TECO manual<\/a>.<\/p>\n<p>TECO commands are generally single characters. But there is some additional structure to allow arguments. There are two types of arguments: numeric arguments, and text arguments. Numeric arguments come <em>before<\/em> the command; text arguments come <em>after<\/em> the command. Numeric values used as arguments can be either literal numbers, commands that return numeric values, &#8220;.&#8221; (for the index of the buffer pointer), or numeric values joined by arithmetic operators like &#8220;+&#8221;, &#8220;-&#8220;, etc.<\/p>\n<p>So, for example, the <code>C<\/code> command moves the pointer forward one character. If it&#8217;s preceded by a numeric argument <em>N<\/em>, it will move forward <em>N<\/em> characters. The <code>J<\/code> command jumps the pointer to a specific location in the buffer: the numeric argument is the offset from the beginning of the buffer to the location where the pointer should be placed.<\/p>\n<p>String arguments come <em>after<\/em> the command. Each string argument can be delimited in one of two ways. By default, a string argument continues until it sees an Escape character, which marks the end of the string. Alternatively (and easier to read), if the command is prefixed by an &#8220;@&#8221; character, then the <em>first character<\/em> after the command will be used as a string delimiter, so that the string parameter will continue until the next instance of that character.<\/p>\n<p>So, for example, the first thing that most TECO programs do is specify what it is that they want to edit &#8211; that is, what they want to read into the buffer. The command to do that is &#8220;ER&#8221;. It needs a string argument to tell it the name of the file to read &#8211; so the command to edit a file &#8220;foo.txt&#8221; is <code>ERfoo.txt<\/code> (followed by pressing escape twice to tell TECO to run the command). Alternatively, you could use one of the other variations for string arguments. For example, you could quote the filename, using <code>@ER'foo.txt'<\/code>. Or you could use quoting in a deliberately silly way: <code>@ER foo.txt <\/code>. (That is, using space as the quote character, giving you nearly invisible quoting.)<\/p>\n<p>In addition to the standard arguments, you can also modify commands, by placing a &#8220;:&#8221; in front of them. For most commands, &#8220;:&#8221; makes them return either a 0 (to indicate that the command failed), or a -1 (to indicate that the command succeeded). For others, the colon does <em>something else<\/em>. The only way to know is to know the command.<\/p>\n<p>So, now that we know basically what commands and arguments look like, we can start looking at the commands that create the beast that was TECO.<\/p>\n<p>There are, of course, a bunch of commands for printing out some part of the buffer. Remember, TECO originally comes from the pre-full-screen-editor days, so you needed to be able to ask it to show you what the text looked like after a sequence of edits, to make sure you had it right before you went and saved it. The basic print command is <code>T<\/code>, which prints out the current line. To print a string, you&#8217;d use the command ^A (that is, control-A; I said everything is a command!).<\/p>\n<p>This means that now, we can finally say how to write the good<br \/>\n    old classic &#8220;Hello, World&#8221; program in TECO! It&#8217;s very simple:<\/p>\n<pre>\n    @^A'Hello, World!'\n<\/pre>\n<p>That is, string argument quoted, print, followed by the quoted<br \/>\n    string. Perfoctly clear, right?<\/p>\n<p>There are also, naturally, commands to edit text in various    ways:<\/p>\n<dl>\n<dt><code>D<\/code><\/dt>\n<dd> delete the character after the cursor. <\/dd>\n<dt><code>FD<\/code><\/dt>\n<dd> Find-and-delete. Takes a string argument, finds the next occurrence of the string, and deletes it.<\/dd>\n<dt><code>K<\/code><\/dt>\n<dd> Delete the text from the cursor to the end of the line.<\/dd>\n<dt><code>HK<\/code><\/dt>\n<dd> Delete the entire current buffer.<\/dd>\n<dt><code>I<\/code><\/dt>\n<dd>Insert text. Obviously, this needs a string argument, which is the text that it inserts.<\/dd>\n<dt><code>&lt;tab&gt;<\/code><\/dt>\n<dd> A second insert command; the only difference is that the tab character is also inserted into the text.<\/dd>\n<\/dl>\n<p>Next are the commands for moving dot around in the buffer.<\/p>\n<dl>\n<dt><code>C<\/code><\/dt\n\n\n<dd> move the pointer forward one character if no argument is supplied; if it gets a numeric argument <code>N<\/code>, it moves forwards N characters. <code>C<\/code> can be preceeded by a &#8220;<code>:<\/code>&#8221; to return a success value.<\/dd>\n<dt><code>J<\/code><\/dt>\n<dd> jumps the pointer to a location specified by its numeric argument. If there is no location specified, it jumps to location 0. <code>J<\/code> can be preceeded by a &#8220;<code>:<\/code>&#8221; to see if it succeeded. <\/dd>\n<dt><code>ZJ<\/code><\/dt>\n<dd> jumps to the position <em>after<\/em> the last character in the file.<\/dd>\n<dt> <code>L<\/code><\/dt>\n<dd> pretty much like <code>C<\/code>, except that it moves by lines instead of characters. <\/dd>\n<dt> <code>R<\/code><\/dt>\n<dd> moves backwards one character &#8211; it&#8217;s basically the same as <code>C<\/code> with a negative argument. <\/dd>\n<dt><code>S<\/code><\/dt>\n<dd>searches for its argument string, and positions the cursor <em>after<\/em> the last character of the search string it found, or at position 0 if the string isn&#8217;t found. <\/dd>\n<dt><code>number,numberFB<\/code><\/dt>\n<dd> searches for its argument string between the buffer positions specified by the numeric arguments. Search strings can include something almost like regular expressions, but with a much worse syntax. I don&#8217;t want to hurt your brain <em>too<\/em> much, so I won&#8217;t go into detail.<\/dd>\n<\/dl>\n<p>TECO has variables; in it&#8217;s own inimitable fashion, they&#8217;re not called variables; they&#8217;re called Q-registers. There are 36 global Q-registers, named &#8220;A&#8221; through &#8220;Z&#8221; and &#8220;0&#8221;-&#8220;9&#8221;. There are also 36 <em>local<\/em> Q-registers (local to a particular <em>macro<\/em>, aka subroutine), which have a &#8220;.&#8221;<br \/>\ncharacter in front of their name.<\/p>\n<p>Q-registers are used for two things. First, you can use them as variables: each Q-register stores a string <\/em>and<\/em> an integer. Second, any string stored in a Q-register can be used as a subroutine; in fact, that&#8217;s the  <em>only<\/em> way to create a subroutine. The commands to work with Q-registers include:<\/p>\n<dl>\n<dt><code>nUq<\/code><\/dt>\n<dd> <code>n<\/code> is a numeric argument; <code>q<\/code> is a register name. This stores the value <code>n<\/code> as the numeric value of the register <code>q<\/code>.<\/dd>\n<dt><code>m,nUq<\/code><\/dt>\n<dd> both <code>m<\/code> and <code>n<\/code> are numeric arguments, and <code>q<\/code> is a register name. This stores <code>n<\/code> as the numeric value of register <code>q<\/code>, and then returns <code>m<\/code> as a parameter for the next command.<\/dd>\n<dt><code>n%q<\/code><\/dt>\n<dd> add the number <code>n<\/code> to the numeric value stored in register <code>q<\/code>.<\/dd>\n<dt><code>^Uqstring<\/code><\/dt>\n<dd> Store the string as the string value of register <code>q<\/code>.<\/dd>\n<dt><code>:^Uqstring\"<\/code><\/dt>\n<dd> Append the string parameter to the string value of register <code>q<\/code>.<\/dd>\n<dt><code>nXq<\/code><\/dt>\n<dd>clear the text value of register <code>q<\/code>, and copy the next <code>n<\/code> lines into its string value.<\/dd>\n<dt><code>m,nXq<\/code><\/dt>\n<dd> copy the character range from position <code>m<\/code> to position <code>n<\/code> into register <code>q<\/code>.<\/dd>\n<dt><code>.,.+nXq<\/code><\/dt>\n<dd> copy <code>n<\/code> characters following the current buffer pointer into register <code>q<\/code>. <\/dd>\n<dt><code>*Qq<\/code><\/dt>\n<dd> use the integer value of register <code>q<\/code> as the parameter to the next command. <\/dd>\n<dt><code>nQq<\/code><\/dt>\n<dd> use the ascii value of the <code>n<\/code>th character of register <code>q<\/code> as the parameter to the next command. <\/dd>\n<dt><code>:Qq<\/code><\/dt>\n<dd> use the length of the text stored in register <code>q<\/code> as the parameter to the next command.<\/dd>\n<dt><code>Gq<\/code><\/dt>\n<dd> copy the text contents of register <code>q<\/code> to the current location of the buffer pointer. <\/dd>\n<dt><code>Mq<\/code><\/dt>\n<dd> invoke the contents of register <code>q<\/code> as a subroutine. <\/dd>\n<\/dl>\n<p>And last, but definitely not least, there&#8217;s control flow. First, there are loops. A loop is &#8220;<code>n&lt;commands&gt;<\/code>&#8220;, which executes the text between the left brack and the right bracket &#8220;n&#8221; times. Within the loop, &#8220;;&#8221; branches out of the loop if the last search command failed; &#8220;n;&#8221; exits the loop if the value of &#8220;n&#8221; is greater than or equal to zero. &#8220;:;&#8221; exits the loop if the last search succeeded. &#8220;F&gt;&#8221; jumps to the loop close bracket (think C continue), &#8220;F&lt;&quot; jumps back to the beginning of the loop.<\/p>\n<p>Conditionals are generally written <code>n\"Xthen-command-string|else-command-string'<\/code>. The quotes there are part of the command!) The double-quote character introduces the conditional, and the single-quote marks the end. In this command, the &quot;X&quot; is one of a list of conditional tests, which define how the numeric argument <code>n<\/code>; is to be tested. Some possible values of <code>X<\/code> include:<\/p>\n<ul>\n<li> &#8220;A&#8221;: tests if n is the character code for an alphabetic character.<\/li>\n<li> &#8220;D&#8221;: tests if n is the character code of a digit<\/li>\n<li> &#8220;E&#8221;: tests if n is zero or false<\/li>\n<li> &#8220;G&#8221;: tests if n is greater than zero<\/li>\n<li> &#8220;N&#8221;: tests if n is not equal to zero<\/li>\n<li> &#8220;L&#8221;: test if n is a numeric value meaning that the last command succeeded.<\/li>\n<\/ul>\n<h3>Example TECO Code<\/h3>\n<p>So, time for a couple of real TECO programs.<\/p>\n<p>Let&#8217;s start by looking back at the swapsort program up at the top of this<br \/>\npost.<\/p>\n<ol>\n<li><code>0uz<\/code>: set the Q-register z to 0.<\/li>\n<li><code>&lt;j<\/code>: start a loop, and set dot to the beginning of the<br \/>\nfile.<\/li>\n<li> <code>0aua<\/code> read the character at the beginning of the line, and pass it as a numeric argument to <code>ua<\/code>, which updates the value of register a. So register a contains the first character of the line.<\/li>\n<li> <code>l<\/code>: advance by one line.<\/li>\n<li> <code>&lt;0aub<\/code>: start a new loop, and assign the first character of the new line to register b.<\/li>\n<li> <code>qa-qb\"g<\/code>: subtract the value of register b from register a. If the result is greater than 0, then do the following:\n<ol>\n<li> <code> xa <\/code>: load the current line (the second of these two consecutive lines) into register A.<\/li>\n<li> <code>k<\/code>: delete this line.<\/li>\n<li> <code>-l<\/code>: move back one line.<\/li>\n<li> <code>ga<\/code>: insert the contents of a (what used to be the later line) into the line. So now, we used to have &#8230; L1 L2 &#8230;; we&#8217;ve deleted L2, giving us &#8230; L1 &#8230;, and now we&#8217;ve jumped the cursor back to before L1, and inserted, so we&#8217;ve got &#8230; L2 L1 &#8230; &#8211; so we&#8217;ve swapped the two lines.<\/li>\n<li> <code>-1uz<\/code>: set register z to -1. This is just setting a flag saying &#8220;I did a swap&#8221;. <\/li>\n<li> <code>'<\/code>: end of the conditional.<\/li>\n<\/ol>\n<li><code>qbua<\/code>: put what was in register b into register a.<\/li>\n<li><code>l .-z;><\/code>: if there are any more lines in the buffer, then go to the beginning of the (inner) loop.<\/li>\n<li><code>qz;&gt;<\/code>: if the z flag is non-zero, ther repeat the outer loop.<\/li>\n<\/ol>\n<p>Gosh, wasn&#8217;t that simple? All kidding aside, it really is. Once you get used to the idea of editing a text buffer, it&#8217;s really very natural. It&#8217;s damned near impossible to <em>read<\/em>&#8230; but it&#8217;s not at all bad, semantically.<\/p>\n<p>So now you should be ready for something that&#8217;s a bit less clearly written. No one wrote code like that example, with all of that documentation! This is an example of what real, working TECO code looked like. It&#8217;s a really useful program: it scans through a file containing a mixture of spaces and tabs, and replaces all of the tabs, assuming that tab stops appear every 8 columns.<\/p>\n<pre>\n  FEB  :XF27: F H M Y&lt;:N   ;'.U 0L.UAQB-QAUC&lt;QC-9\"L1;'-8%C&gt;9-QCUD\nS    DQD&lt;I &gt;&gt;EX\n<\/pre>\n<p>That&#8217;s perfectly clear now, isn&#8217;t it?<\/p>\n<p>Ok, since that was so easy, how about something <em>challenging<\/em>?<\/p>\n<p>This little baby takes a buffer, and executes its contents as a BrainFuck program. Yes, it&#8217;s a BrainFuck interpreter in TECO!<\/p>\n<pre>\n    @^UB#@S\/{^EQQ,\/#@^UC#@S\/,^EQQ}\/@-1S\/{\/#@^UR#.U1ZJQZ^SC.,.+-^SXQ-^SDQ1J#\n    @^U9\/[]-+&lt;&gt;.,\/&lt;@:-FD\/^N^EG9\/;&gt;J30000&lt;0@I\/\/&gt;ZJZUL30000J0U10U20U30U60U7\n    @^U4\/[]\/@^U5#&lt;@:S\/^EG4\/U7Q7; -AU3(Q3-91)\"=%1|Q1\"=.U6ZJ@i\/{\/Q2@i\/,\/Q6@i\/}\n    \/Q6J0;'-1%1'&gt;#&lt;@:S\/[\/UT.U210^T13^TQT;QT\"NM5Q2J'&gt;0UP30000J.US.UI\n    &lt;(0A-43)\"=QPJ0AUTDQT+1@I\/\/QIJ@O\/end\/'(0A-45)\"=QPJ0AUTDQT-1@I\/\n    \/QIJ@O\/end\/'(0A-60)\"=QP-1UP@O\/end\/'(0A-62)\"=QP+1UP@O\/end\/'(0A-46)\"=-.+QPA\n    ^T(-.+QPA-10)\"=13^T'@O\/end\/'(0A-44)\"=^TUT8^TQPJDQT@I\/\/QIJ@O\/end\/'(0A-91)\n    \"=-.+QPA\"=QI+1UZQLJMRMB    -1J.UI'@O\n    \/end\/'(0A-93)\"=-.+QPA\"NQI+1UZQLJMRMC-1J.UI'@O\/end\/'\n    !end!QI+1UI(.-Z)\"=.=@^a\/END\/^c^c'C&gt;\n<\/pre>\n<p>If you&#8217;re actually insane enough to want to try this masochistic monstrosity, you can get a TECO interpreter, with documentation and example programs, from <a href=\"http:\/\/almy.us\/teco.html\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my oh-so-abundant free time, I&#8217;ve been working on my own little text editor. And one of my motivations is TECO: one of the oldest, and one of the very best, ever written. It&#8217;s both a text editor and a programming language &#8211; and, in fact, that&#8217;s exactly what made it such a brilliant tool. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[92,1],"tags":[147,178,318,313,242],"class_list":["post-1213","post","type-post","status-publish","format-standard","hentry","category-pathological-programming","category-uncategorized","tag-editors","tag-history","tag-pathological-programming","tag-programming","tag-teco"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-jz","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/1213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/comments?post=1213"}],"version-history":[{"count":2,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/1213\/revisions"}],"predecessor-version":[{"id":3295,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/1213\/revisions\/3295"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=1213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=1213"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=1213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}