<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>malibu-bulldog</author_name>
  <author_url>https://blog.hatena.ne.jp/malibu-bulldog/</author_url>
  <blog_title>malibu-bulldogの日記</blog_title>
  <blog_url>https://malibu-bulldog.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Program Technique</anon>
  </categories>
  <description>FLOPSを調べたくなり，C++のソース中で何回演算をしているのか数えるプログラムをRubyで。 といっても整数に対してなのか浮動小数点に対してなのかを判別するのは難しそうなので断念しました。それとポインタのアスタリスクなのかの判別も断念。 そんな，まぁへなちょこなプログラムをRubyで書きました。 #!/usr/bin/ruby begin $counter = 0 while line = gets $_.chomp! $_.gsub(/\++|\-+|\*|\//){|matched| p matched; $counter+=1} end p &quot;End counting operato…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmalibu-bulldog.hatenadiary.org%2Fentry%2F20090829%2F1251535269&quot; title=&quot;演算回数を数えたくて - malibu-bulldogの日記&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>2009-08-29 17:41:09</published>
  <title>演算回数を数えたくて</title>
  <type>rich</type>
  <url>https://malibu-bulldog.hatenadiary.org/entry/20090829/1251535269</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
