{"id":1862,"date":"2015-06-22T14:09:32","date_gmt":"2015-06-22T14:09:32","guid":{"rendered":"http:\/\/www.dyalog.com\/blog\/?p=1862"},"modified":"2015-07-03T07:25:21","modified_gmt":"2015-07-03T07:25:21","slug":"in-praise-of-magic-functions-part-one","status":"publish","type":"post","link":"https:\/\/www.dyalog.com\/blog\/2015\/06\/in-praise-of-magic-functions-part-one\/","title":{"rendered":"In Praise of Magic Functions: Part I"},"content":{"rendered":"<p>A <i>magic function<\/i> is an APL-coded (dfn) computation in the C source of the interpreter. For example, some cases of <code class=\"language-apl\">\u2227.=<\/code> are coded as <code class=\"language-apl\">MAGIC(\"(\u2262\u237a)(\u2191\u2218.=\u2193)\u237a\u2373\u237a\u236a\u2349\u2375\")<\/code>. The rubric &#8220;magic function&#8221; includes magic functions and magic operators.<\/p>\n<p><strong>Acknowledgments<\/strong>. Magic functions in Dyalog are made possible due to work done by John Scholes and Richard Smith.<\/p>\n<h2 id=\"0\">Development Speed<\/h2>\n<p>A magic function implementation takes an order of magnitude less time to write than a C-coded implementation. A case in point is <code class=\"language-apl\">\u2218.\u2261<\/code> (and <code class=\"language-apl\">\u2218.\u2262<\/code>) on enclosed character vectors, as recounted in the blog post <i><a href=\"http:\/\/www.dyalog.com\/blog\/2014\/11\/a-speed-up-story-2\/\">A Speed-Up Story<\/a><\/i>. The chronology is recovered from the G-mail, Mantis and SVN systems.<\/p>\n<table style=\"width: 600px;\">\n<tbody>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\">2014-10-27 04:24<\/td>\n<td style=\"text-align: left;\">Nicolas<\/td>\n<td style=\"text-align: left;\">initial e-mail describing the problem<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\">2014-10-27 07:33<\/td>\n<td style=\"text-align: left;\">Roger<\/td>\n<td style=\"text-align: left;\">proposes <code class=\"language-apl\">i\u2218.=i\u2190a\u2373a<\/code> as a solution<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\">2014-10-27 07:36<\/td>\n<td style=\"text-align: left;\">Jay<\/td>\n<td style=\"text-align: left;\">objects that solution should check <code class=\"language-apl\">\u2395CT<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\">2014-10-27 07:40<\/td>\n<td style=\"text-align: left;\">Roger<\/td>\n<td style=\"text-align: left;\">responds to objection<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\">2014-10-27 10:29<\/td>\n<td style=\"text-align: left;\">Roger<\/td>\n<td style=\"text-align: left;\">creates Mantis issue<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\">2014-10-27 13:57<\/td>\n<td style=\"text-align: left;\">Roger<\/td>\n<td style=\"text-align: left;\">SVN commit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\">2014-10-27 18:12<\/td>\n<td style=\"text-align: left;\">Roger<\/td>\n<td style=\"text-align: left;\">reports factor 6-64 speed-up and submits blog post<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\">2014-10-28 16:33<\/td>\n<td style=\"text-align: left;\">Roger<\/td>\n<td style=\"text-align: left;\">SVN commit to fix a bug<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>After checking that <code class=\"language-apl\">\u2395CT<\/code> is not required, the main processing in the C source is as follows:<\/p>\n<ul>\n<li><code class=\"language-apl\">c\u00a0 <\/code>1 iff a &#8220;selfie&#8221;, i.e. the left and right arguments are equal as C pointers<\/li>\n<li><code class=\"language-apl\">eq <\/code>1 if <code class=\"language-apl\">\u2218.\u2261<\/code> ; 0 if <code class=\"language-apl\">\u2218.\u2262<\/code><\/li>\n<li><code class=\"language-apl\">r\u00a0 <\/code>1 iff the right argument has rank 1<\/li>\n<\/ul>\n<pre><code class=\"language-apl\">#define CASE(x,y,z)  ((x&lt;&lt;2)+(y&lt;&lt;1)+(z))\r\n\r\nswitch(CASE(c,eq,r))\r\n{\r\n  case CASE(0,0,0): MAGIC(\"((,\u237a)\u2373\u237a)\u2218.\u2260((,\u237a)\u2373\u2375)\"); break;\r\n  case CASE(0,0,1): MAGIC(\"(  \u237a \u2373\u237a)\u2218.\u2260(  \u237a \u2373\u2375)\"); break;\r\n  case CASE(0,1,0): MAGIC(\"((,\u237a)\u2373\u237a)\u2218.=((,\u237a)\u2373\u2375)\"); break;\r\n  case CASE(0,1,1): MAGIC(\"(  \u237a \u2373\u237a)\u2218.=(  \u237a \u2373\u2375)\"); break;\r\n  case CASE(1,0,0): MAGIC(\"\u2218.\u2260\u2368(,\u2375)\u2373\u2375\");          break;\r\n  case CASE(1,0,1): MAGIC(\"\u2218.\u2260\u2368  \u2375 \u2373\u2375\");          break;\r\n  case CASE(1,1,0): MAGIC(\"\u2218.=\u2368(,\u2375)\u2373\u2375\");          break;\r\n  case CASE(1,1,1): MAGIC(\"\u2218.=\u2368  \u2375 \u2373\u2375\");          break;\r\n}\r\n<\/code><\/pre>\n<h2 id=\"1\">Execution Speed<\/h2>\n<p>Development speed for a magic function need not be at the expense of execution speed. As indicated above, <code class=\"language-apl\">\u2218.\u2261<\/code> is 6 to 64 times faster than the previous (C coded) implementation. Factors for a few other magic function implementations:<\/p>\n<table style=\"width: 350px;\">\n<tbody>\n<tr>\n<td><strong>expression<\/strong><\/td>\n<td><strong>factor<\/strong><\/td>\n<td><strong>version<\/strong><\/td>\n<\/tr>\n<tr>\n<td nowrap=\"nowrap\"><code class=\"language-apl\">x\u2218.\u2261y<\/code> and <code class=\"language-apl\">x\u2218.\u2262y<\/code><\/td>\n<td>6-64<\/td>\n<td>14.1<\/td>\n<\/tr>\n<tr>\n<td nowrap=\"nowrap\"><code class=\"language-apl\">x\u2227.=y<\/code> and <code class=\"language-apl\">x\u2228.\u2260y<\/code><\/td>\n<td>1.5-4<\/td>\n<td>14.1<\/td>\n<\/tr>\n<tr>\n<td><code class=\"language-apl\">,\/y<\/code><\/td>\n<td>1-\u221e<\/td>\n<td>15.0<\/td>\n<\/tr>\n<tr>\n<td><code class=\"language-apl\">x\u22a5y<\/code><\/td>\n<td>1-26<\/td>\n<td>15.0<\/td>\n<\/tr>\n<tr>\n<td><code class=\"language-apl\">x\u22a4y<\/code><\/td>\n<td>1-3.3<\/td>\n<td>15.0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>One can always make a magic function faster by hand-translating it from APL into C, and in so doing save on the tokenizing (scanning) and parsing costs. However, the effort increases the development time and the code size (see <a href=\"#3\">Special Cases<\/a> below) for (I argue) not much reduction in execution time. I also expect that such translation can be done automatically by the APL compiler in the future.<\/p>\n<p>Accurate estimates for the amount of speed up obtain readily from APL benchmarks. For example, <code class=\"language-apl\">x\u2355b<\/code> where <code class=\"language-apl\">x<\/code> is a scalar or 2-element vector and <code class=\"language-apl\">b<\/code> is a Boolean array, is a candidate for a magic function implementation, and:<\/p>\n<pre><code class=\"language-apl\">   f\u2190{((\u00af1\u2193s),(\u2283\u233d\u2374t)\u00d7\u2283\u233ds\u2190\u2374\u2375)\u2374(t\u2190\u237a\u2355\u236a0 1)[\u2375;]}\r\n\r\n   b\u21901=?10\u23742     \u235d small argument\r\n   cmpx '2 f b' '2\u2355b'\r\n 2 f b \u2192 5.83E\u00af6 |    0% \u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\r\n 2\u2355b   \u2192 1.23E\u00af5 | +110% \u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\r\n\r\n   b\u21901=?1e6\u23742    \u235d large argument\r\n   cmpx '8 2 f b' '8 2\u2355b'\r\n 8 2 f b \u2192 9.75E\u00af3 |     0% \u2395\r\n 8 2\u2355b   \u2192 3.35E\u00af1 | +3339% \u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\r\n<\/code><\/pre>\n<p>We can say with confidence that <code class=\"language-apl\">x\u2355b<\/code> can be made 2 to 34 times faster before actually proceeding with the implementation.<\/p>\n<p>Magic functions can be used when execution speed is not paramount. For example a problem was reported with <code class=\"language-apl\">!\u2218y\u2363\u00af1<\/code>:<\/p>\n<pre><code class=\"language-apl\">   !\u221825\u2363\u00af1 \u22a2 1e4\r\nDOMAIN ERROR\r\n   !\u221825\u2363\u00af1\u22a210000\r\n  \u2227\r\n<\/code><\/pre>\n<p>The problem can be solved readily with an APL function using Newton iteration, with a relatively complicated computation for the initial estimate:<\/p>\n<pre><code class=\"language-apl\">   f\u2190{-\u2218\u2375\u2218\u237a\u237a{\u2375-(\u2283t)\u00d7\u00af0.01\u00f7-\/t\u2190\u237a\u237a \u2375\u00d71 1.01}\u2363\u2261\u2283\u234b|\u2375-(\u2373!\u22a2)\u230a0.5+\u237a\u237a 1}\r\n   \u2395\u2190x\u2190!\u221825 f 1e4\r\n3.85142\r\n   x!25\r\n10000\r\n<\/code><\/pre>\n<h2 id=\"2\">General Case vs. Special Cases<\/h2>\n<p>Magic functions are well-suited for implementing operators. An operator has potentially tens or hundreds of cases, and it would be onerous, not cost-effective and unnecessary to write code for each case. Instead, the general case can be implemented quickly and succinctly by a magic function, and the saved effort can be devoted to cases deemed worthy of attention. The <em>rank<\/em> <code class=\"language-apl\">\u2364<\/code> and <em>key<\/em> <code class=\"language-apl\">\u2338<\/code> operators are done this way. The magic function for the general case of <em>key<\/em>:<\/p>\n<pre><code class=\"language-apl\">MAGIC(\r\n  \"0=\u2395nc'\u237a':\u2375 \u2207 \u2373\u2262\u2375    \u22c4\"  \/\/ monadic case: f\u2338 x \u2190\u2192 x f\u2338 \u2373\u2262x\r\n  \"\u237a \u237a\u237a{\u237a \u237a\u237a \u2375}{        \"\r\n  \"  \u2395ml\u21901             \u22c4\"  \/\/ needed by \u2191\u2375 and \u237a\u2282\u2375 \r\n  \"  j\u2190\u234bi\u22a3\u2395dr i\u2190\u2373\u2368\u237a    \u22c4\"\r\n  \"  \u2191 (\u2282[1\u2193\u2373\u2374\u2374\u237a]((\u2373\u2262i)=\u2373\u2368i)\u233f\u237a) \u237a\u237a\u00a8 (2\u2260\/\u00af1,i[j])\u2282[\u2395io]\u2375\u2337\u2368\u2282j\"\r\n  \"}\u2375                   \"\r\n);\r\n<\/code><\/pre>\n<p>Before execution reaches the general case, special cases are detected and are implemented by special code, usually in C. These special cases are:<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>operand<\/strong><\/td>\n<td nowrap=\"nowrap\"><strong>version<\/strong><\/td>\n<td><strong>comment<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{f\u233f\u2375}<\/code> and <code class=\"language-apl\">\u22a2\u2218(f\u233f)<\/code><\/td>\n<td valign=\"top\" nowrap=\"nowrap\">14.0<\/td>\n<td style=\"text-align: left;\">for <code class=\"language-apl\">f<\/code> one of <code class=\"language-apl\">+ \u2308 \u230a<\/code> or (for Boolean right arguments) one of <code class=\"language-apl\">\u2227 \u2228 = \u2260<\/code>; also <code class=\"language-apl\">\/<\/code> instead of <code class=\"language-apl\">\u233f<\/code> for vector right arguments<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u237a(f\u233f\u2375)}<\/code><\/td>\n<td>15.0<\/td>\n<td style=\"text-align: left;\">for <code class=\"language-apl\">f<\/code> as above<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u237a,f\u233f\u2375}<\/code><\/td>\n<td>15.0<\/td>\n<td style=\"text-align: left;\">for <code class=\"language-apl\">f<\/code> as above and numeric left arguments<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u2262\u2375}<\/code> and <code class=\"language-apl\">\u22a2\u2218\u2262<\/code><\/td>\n<td>14.0<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u237a(\u2262\u2375)}<\/code><\/td>\n<td>14.1<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u237a,\u2262\u2375}<\/code><\/td>\n<td>14.1<\/td>\n<td style=\"text-align: left;\">for numeric left arguments<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u2262\u222a\u2375}<\/code><\/td>\n<td>14.1<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u237a(\u2262\u222a\u2375)}<\/code><\/td>\n<td>14.1<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u237a,\u2262\u222a\u2375}<\/code><\/td>\n<td>14.1<\/td>\n<td style=\"text-align: left;\">for numeric left arguments<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u2282\u2375}<\/code> and <code class=\"language-apl\">\u22a2\u2218\u2282<\/code><\/td>\n<td>14.0<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u237a\u2375}<\/code><\/td>\n<td>14.1<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" nowrap=\"nowrap\"><code class=\"language-apl\">{\u237a}<\/code> and <code class=\"language-apl\">\u22a3<\/code><\/td>\n<td>14.1<\/td>\n<td style=\"text-align: left;\"><code class=\"language-apl\">\u22a3\u2338x \u2190\u2192 \u222ax<\/code> if <code class=\"language-apl\">\u222a<\/code> were extended like <code class=\"language-apl\">\u2373<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Additional special cases can be implemented as required.<\/p>\n<h2 id=\"3\">Special Cases<\/h2>\n<p>Since magic functions are so terse, sometimes it is worthwhile to make special cases which would not be made special cases if the implementation were more verbose and\/or require more effort. The implementation of <code class=\"language-apl\">\u2218.\u2261<\/code> (in the <a href=\"#0\">Development Speed<\/a> section above) illustrates the point. In general, <code class=\"language-apl\">x\u2218.\u2261y \u2190\u2192 ((,\u237a)\u2373\u237a)\u2218.=((,\u237a)\u2373\u2375)<\/code>. However, if <code class=\"language-apl\">x<\/code> is a vector, the two ravels can be elided; moreover, if <code class=\"language-apl\">x<\/code> and <code class=\"language-apl\">y<\/code> are equal as C pointers, the two uses of <code class=\"language-apl\">\u2373<\/code> can be reduced to one use (not only that, but to a &#8220;selfie&#8221; <code class=\"language-apl\">\u2375\u2373\u2375<\/code> if a vector). So instead of the one case:<\/p>\n<pre><code class=\"language-apl\">MAGIC(\"((,\u237a)\u2373\u237a)\u2218.=((,\u237a)\u2373\u2375)\");\r\n<\/code><\/pre>\n<p>we have<\/p>\n<pre><code class=\"language-apl\">switch(CASE(c,eq,r))\r\n{\r\n    \u2026\r\n  case CASE(0,1,0): MAGIC(\"((,\u237a)\u2373\u237a)\u2218.=((,\u237a)\u2373\u2375)\"); break;\r\n  case CASE(0,1,1): MAGIC(\"(  \u237a \u2373\u237a)\u2218.=(  \u237a \u2373\u2375)\"); break;\r\n    \u2026\r\n  case CASE(1,1,0): MAGIC(\"\u2218.=\u2368(,\u2375)\u2373\u2375\");          break;\r\n  case CASE(1,1,1): MAGIC(\"\u2218.=\u2368  \u2375 \u2373\u2375\");          break;\r\n}\r\n<\/code><\/pre>\n<p>The extra cases are not too burdensome, and their detection is done in scalar code at which C is better than APL. The following benchmarks illustrate the difference that the special cases make:<\/p>\n<pre><code class=\"language-apl\">   t \u2190' zero one two three four five six seven eight nine'\r\n   t,\u2190' z\u00e9ro un deux trois quatre cinq six sept huit neuf'\r\n   t,\u2190' zero eins zwei drei vier f\u00fcnf sechs sieben acht neun'\r\n   u\u21901\u2193\u00a8(' '=t)\u2282t\r\n\r\n   x\u2190u[?300\u2374\u2262u]    \u235d vector selfie vs. non-selfie\r\n   y\u2190(\u2374x)\u2374x\r\n   cmpx 'x\u2218.\u2261x' 'x\u2218.\u2261y'\r\n x\u2218.\u2261x \u2192 1.48E\u00af4 |   0% \u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\r\n x\u2218.\u2261y \u2192 1.93E\u00af4 | +30% \u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\r\n\r\n   x1\u2190(1,\u2374x)\u2374x     \u235d matrix selfie vs. non-selfie\r\n   y1\u2190(\u2374x1)\u2374x1\r\n   cmpx 'x1\u2218.\u2261x1' 'x1\u2218.\u2261y1'\r\n x1\u2218.\u2261x1 \u2192 1.50E\u00af4 |   0% \u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\r\n x1\u2218.\u2261y1 \u2192 1.97E\u00af4 | +31% \u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\u2395\r\n<\/code><\/pre>\n<p><em>To be continued&#8230;<a title=\"In Praise of Magic Functions: Part II\" href=\"http:\/\/www.dyalog.com\/blog\/2015\/06\/in-praise-of-magic-functions-part-two\/\">Part II<\/a> will describe the benefits from future improvements and APL as a tool of implementation.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A magic function is an APL-coded (dfn) computation in the C source of the interpreter. For example, some cases of \u2227.= are coded as MAGIC(&#8220;(\u2262\u237a)(\u2191\u2218.=\u2193)\u237a\u2373\u237a\u236a\u2349\u2375&#8221;). The rubric &#8220;magic function&#8221; includes magic functions and magic operators. Acknowledgments. Magic functions in Dyalog &hellip; <a href=\"https:\/\/www.dyalog.com\/blog\/2015\/06\/in-praise-of-magic-functions-part-one\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,8],"tags":[],"class_list":["post-1862","post","type-post","status-publish","format-standard","hentry","category-algorithms","category-apl-language"],"_links":{"self":[{"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/posts\/1862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/comments?post=1862"}],"version-history":[{"count":20,"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/posts\/1862\/revisions"}],"predecessor-version":[{"id":3090,"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/posts\/1862\/revisions\/3090"}],"wp:attachment":[{"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/media?parent=1862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/categories?post=1862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dyalog.com\/blog\/wp-json\/wp\/v2\/tags?post=1862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}