{"blog_url":"https://t2ru.hatenablog.jp/","title":" [Scala]Scala\u3067eval","type":"rich","image_url":null,"blog_title":"t2ru's blog","height":"190","published":"2009-11-07 11:06:16","width":"100%","provider_url":"https://hatena.blog","url":"https://t2ru.hatenablog.jp/entry/20091107/1257559576","version":"1.0","description":"Ruby\u306e\u3088\u3046\u306b\u6587\u5b57\u5217\u3092Scala\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u3057\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u3067eval\u3059\u308b\u65b9\u6cd5\u3002scala-compiler.jar\u306e\u4e2d\u306bscala\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u304c\u4f7f\u3063\u3066\u3044\u308b\u30af\u30e9\u30b9Interpreter(\u305d\u306e\u307e\u3093\u307e)\u304c\u3042\u308b\u306e\u3067\u3001\u3053\u308c\u3067eval\u3067\u304d\u308b\u3002 package jp.hogehoge import scala.tools.nsc._ import scala.util.DynamicVariable class Evaluator { val i = new Interpreter(new Settings(null)) def eval(line: String): Any = { i.interpr\u2026","provider_name":"Hatena Blog","categories":[],"author_name":"t2ru","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ft2ru.hatenablog.jp%2Fentry%2F20091107%2F1257559576\" title=\" [Scala]Scala\u3067eval - t2ru&#39;s blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/t2ru/"}