タグ

scalaに関するsendのブックマーク (8)

  • MacRuby: The Definitive Guide

    More than 5,000 organizations count on our digital courses and more to help their teams learn the tools and technologies that drive business outcomes. We can help yours too. New AI policy for O’Reilly authors and talent O’Reilly president Laura Baldwin shares the company’s ethical approach to leveraging GenAI tools and ensuring O’Reilly experts are compensated for their work. Read it now It’s time

    MacRuby: The Definitive Guide
  • inforno :: Scalaでスタック指向言語をサクッと実装する

    Scalaにはご存知のとおり scala.util.parsing.combinator というパーサコンビネータライブラリがある。さらには scala.util.parsing.ast というのもあるわけだけど、これは激しく開発中な感じ。Scalaはバージョンがあがるとこういう開発中ライブラリはごそっと変わったりするので今はおいておく。ちなみに、2.7.1では前のパーサコンビネータは scala.util.parsing.combinatorold といういかにも使いたくない名前にされてしまった。 パーサコンビネータといえば言語処理系だ(そうか?)。というわけで scala.util.parsing.ast は置いておいて、とりあえずASTについてほとんど考える必要がない、簡単なスタック指向言語を実装してみることにする。実行はScala 2.7.1.finalで。 スタック指向言語とは

  • Scala 勉強会 - 兼雑記

    http://cappuccino.jp/scala-ja/?Scala%CA%D9%B6%AF%B2%F1%A1%F7%B4%D8%C5%EC-1 いくつか印象に残ったことを。以下なんか勘違いもあるかも。 Scala も Nemerle も研究畑な感じらしい。 意外だった。研究者ってのは関数型言語だけだと思ってた。あるいは Smalltalk 。 後置制御構文の追加 これはすごいなーと思った。任意の式からその式を封じ込めたオブジェクトへの暗黙の変換を定義することによって、その式が実行される前に型変換を行わせることができるらしい。でも暗黙の変換は変換無しですむ場合は常に変換しないので、その式を実行した結果の型にその後置制御構文と同名のメソッドがあったらダメっぽい。 class When(any: => Any) { def when(b: Boolean) = if (b) any } i

    Scala 勉強会 - 兼雑記
    send
    send 2008/05/13
  • How lift uses Scala actors - David Pollak's Blog

    There have been a lot of questions about how the lift web framework uses Scala actors. Here's a short summary Two of lift's important features are full Comet support and Ask/Answer where components can delegate display and user input to another component until a user has satisfied certain input criteria. lift uses Scala Actors to implement both these features. You can see an example of Ask/Answer

  • inforno :: 日本語プログラミング言語Scala

    via 第20回 日語でおk Ruby もいいけど Smalltalk でも、おk。 Scalaはメソッド名に日語使えるよ。Scalaは日語プログラミング言語だよ(言いすぎ)。 1object JapaneseLanguage { 2 class Standard[A](self:A) { 3 def の[B](f:(A) => B) = f(self) 4 def を[B](f:(A) => B) = f(self) 5 def する() = () 6 } 7 8 class PseudoKansai[A](self:A) { 9 def のな[B](f:(A) => B) = f(self) 10 def をな[B](f:(A) => B) = f(self) 11 def すんねん() = () 12 } 13} 14 15 16def 平方根(v:int) = Math.sq

    send
    send 2008/03/05
  • Scalaチュートリアル - Spirit of Apprenticeship (みならいだましい)

    まつもとさんのところで見て気になったので訳してみた。 http://lamp.epfl.ch/~phaller/doc/ActorsTutorial.html Scalaアクター -- ショートチュートリアル 著者: Philipp Haller Date: May 24, 2007 はじめに マルチコアプロセッサーの到来と共に、並列プログラミングは無視できないものになりつつある。Scalaの主たる並列性の構成要素はアクターである。アクターは基的な並列プロセスで、メッセージ交換を通じてお互いにやり取りできる。アクターは、また、メッセージ送信に反応してメソッドを起動する生きたオブジェクトの一形態と見ることも可能だ。 Scalaアクターライブラリは非同期と同期両タイプのメッセージ送信(後者はいくつかの非同期メッセージを使って実装される)をサポートする。さらに、アクターは非同期にリクエストを処

    send
    send 2007/08/31
  • The Scala Programming Language

    val fruits = List("apple", "banana", "avocado", "papaya") val countsToFruits = // count how many 'a' in each fruit fruits.groupBy(fruit => fruit.count(_ == 'a')) for (count, fruits) <- countsToFruits do println(s"with 'a' × $count = $fruits") // prints: with 'a' × 1 = List(apple) // prints: with 'a' × 2 = List(avocado) // prints: with 'a' × 3 = List(banana, papaya)

    The Scala Programming Language
    send
    send 2007/08/31
  • Lift :: Home

    When I decided to put Innovation Games® online, I knew that I couldn't afford a massive development effort. I needed a small, sharp team who could leverage best-in-class tools to help us solve the problems we knew that we'd have to solve in creating a new kind of collaborative gaming experience on the web. David suggested Lift and Scala and initial testing proved that we could realize the develope

  • 1