<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sgryjp</author_name>
  <author_url>https://blog.hatena.ne.jp/sgryjp/</author_url>
  <blog_title>sgryjp.log</blog_title>
  <blog_url>https://blog.sgry.jp/</blog_url>
  <categories>
    <anon>Julia</anon>
  </categories>
  <description>今日は IOBuffer に使える redirect_stdout のオーバーロードを作った。取り急ぎ Gist として公開してある。Twitterでも呟いてるけれど。 Julia言語では標準ライブラリに redirect_stdout という関数が用意されており、これを使うと一時的に標準出力への書き込みを横取りすることができる。ドキュメントの雰囲気的には外部コマンドの出力を取り込んだりすることを想定しているようなのだけれど、この機構は標準出力への書き出しを行うプログラムの単体テストにも使える。つまり、テスト対象の関数を呼び出す間だけ標準出力に書き出されるデータを横取りして String に格…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.sgry.jp%2Fentry%2F2019%2F05%2F12%2F232009&quot; title=&quot;Julia言語で標準出力をリダイレクトしたStringを得る - sgryjp.log&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>2019-05-12 23:20:09</published>
  <title>Julia言語で標準出力をリダイレクトしたStringを得る</title>
  <type>rich</type>
  <url>https://blog.sgry.jp/entry/2019/05/12/232009</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
