This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package beep | |
import scala.concurrent.ops._ | |
import javax.sound.sampled._ | |
object main { | |
def main(args:Array[String]) { | |
var beep = new Beep | |
beep.play(0,32,32); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<title>Tiny OPM Applet</title> | |
<body> | |
<applet code="osc.oscApplet" archive="osc.jar" width=465 height=465> | |
</applet> | |
<h3>使い方</h3> | |
<p>ctrl + S で再生</p> | |
<p>ctrl + D でSTOP</p> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008-2009 h_sakurai, freecluster.net. All rights reserved. | |
* | |
* ftdop4.scala | |
* Functional Top Down Operator Precedence | |
* This program is Tiny programming language C Like eXpression Processor (TCLXP). | |
* | |
* HISTORY: | |
* ftdop4.scala append closure, quote, quasiquote, expand, macro, symbol,void | |
* TODO: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008 h_sakurai, freecluster.net. All rights reserved. | |
* | |
* ftdop3.scala | |
* Functional Top Down Operator Precedence | |
* This program is Tiny programming language C Like eXpression Processor (TCLXP). | |
* | |
*/ | |
package ftdop3 | |
import scala.util.matching.Regex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<title>Hello World Applet</title> | |
<body> | |
<applet code="app" archive="app.jar" width=100 height=100> | |
</applet> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileInputStream | |
import java.io.IOException | |
class String_readByteList(filename:String) { | |
def readByteList():List[Byte] = { | |
try { | |
def loop(in:FileInputStream):List[Byte] = { | |
val c:Int = in.read() | |
if (c == -1) { | |
in.close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Atom | |
case class Var(value: int) extends Atom | |
case class Add(left:Atom, right:Atom) extends Atom | |
case class Mul(left:Atom, right:Atom) extends Atom | |
object Case { | |
def main(args: Array[String]) = { | |
val exp = Add(Var(1),Var(2)) | |
println(exp) | |
println(eval(exp)) |