<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>miura1729</author_name>
  <author_url>https://blog.hatena.ne.jp/miura1729/</author_url>
  <blog_title>miura1729の日記</blog_title>
  <blog_url>https://miura1729.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>よく考えるとマクロの引数は評価しちゃいけなかったんだ。 defmacro :foo {|x| &quot;print \'foo -&gt; #{x}\'&quot;} で foo(1 + 1) は print '2'ではなく、print '1+1'にしないといけなかった。これを実現するには、 Rubyインタープリタから抽象構文木(AST)を得るような拡張ライブラリを作る Rubyのパーサーを作る バイトコードから逆コンパイルする が方法としてあると思います。3の逆コンパイルが面白そうで、実は簡単な気がするのでこれをちょっと検討します。でも、ちょっと最適化を強化するとすぐ動かなくなりそうです。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmiura1729.hatenadiary.org%2Fentry%2F20080225%2F1203932915&quot; title=&quot; defmacroの検討その２ - miura1729の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-02-25 18:48:35</published>
  <title> defmacroの検討その２</title>
  <type>rich</type>
  <url>https://miura1729.hatenadiary.org/entry/20080225/1203932915</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
