You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
$ scala -version 2.9.0.RC1 使用ライブラリ PircBot 1.5.0 http://www.jibble.org/pircbot.php HatoChanBot.scala import scala.xml._ import java.io._ import org.jibble.pircbot._ object HatoChanBot { def main(args: Array[String]) { val bot = new HatoChan bot.init bot.setAlreadyPosted(load(Conf.DAT_FILE_NAME)) while (true) { save(Conf.DAT_FILE_NAME, bot.crawl) Thread.sleep(Conf.CRAWL_INTERVAL) } } // deserialize
scala, twitter前回書いたプログラムはユーザ入力を受け取るところが非常にJavaっぽくてよろしくないので、書き直してみました。あと、コメント欄で、PredefにてreadLineというメソッドが定義されててコンソールの入力を受け取れると教えてもらったので、それも使った。こまごまと変更しているんですが、覚えてる範囲の変更点は次のような感じ BufferedReaderを使ったユーザ入力受け取りをPredefのreadLineに置き換え。変数の型指定が型推論で十分わかるときには型を書かないようにしてみた引数がない場合は()を省略するように変更JavaのString.format()を使っていたところを、"literal".format()に置き換え。文字列はWrappedStringにimplicitConversionされる、と。 主にcatchブロックでif文にて処理を分岐して
Twitterが分散フレームワーク「Gizzard」公開! Scalaで書かれたShardingを実現するミドルウェア Twitterは独自に開発した分散フレームワークの「Gizzard」をオープンソースとして公開しました。GizzardはScalaで書かれたJavaVM上で動作するミドルウェアで、PHPやRubyといったWebアプリケーションからの要求を自動的にデータベースに分散することで、大規模で可用性の高い分散データベースを容易に実現するためのものです。 Gizzard:フォルトトレラントな分散データベースを実現 The Twitter Engineering Blog: Introducing Gizzard, a framework for creating distributed datastores Twitterのブログにポストされた「Introducing Gizzard
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く