This file contains 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 razie.actionables; | |
/** | |
* result is false 69978 vs 100000 | |
* | |
* @author razvanc | |
* | |
*/ | |
public class TestVol { | |
volatile Long i = 0L; |
This file contains 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
@volatile var x = 5 | |
(0 to 10 toList).par foreach { t => | |
var i:Int = 0; while (i < 100) { | |
x += 1 | |
i += 1 | |
} | |
} | |
x |
This file contains 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
nohup java $* $_JAVA_OPTIONS -Dlogger.file=$APP/dist/conf/logback.prod.xml -Drk.properties=$RKPROPERTIES -cp $classpath play.core.server.NettyServer $DIST & |
This file contains 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
def f(x:Int)=1+2 |
This file contains 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
/** | |
* minimal script interface | |
* | |
* TODO use JSR 264 or whatever the thing is and ditch custom code... | |
* | |
* @author razvanc | |
*/ | |
trait RazScript { | |
import RazScript._ |
This file contains 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
trait InterpolationContext { | |
implicit def str2interp(s: String) = new InterpolatedString(s) | |
class InterpolatedString(val s: String) { | |
def / = interpolate(s) | |
def identifier = s.substring(2, s.length - 1) | |
} | |
object Tokenizer { | |
def unapply(s: String): Option[Iterator[String]] = { |
This file contains 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
class Interpreter(val settings: Settings, out: PrintWriter) { | |
repl => | |
// 1. Request is private. I need: dependencies (usedNames?) newly defined values (boundNames?) | |
// the resulting value and the error message(s) if any | |
case class PublicRequest (usedNames : List[String], valueNames:List[String], extractionValue:Option[Any]) | |
// 2. Can't get the last request |
This file contains 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
wif (_ == 1) { | |
inc + log ($0) | |
} welse { | |
inc + inc + log ($0) | |
} |
This file contains 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
par { | |
seq { | |
inc | |
log($0) | |
} | |
seq { | |
inc | |
log($0) | |
} | |
} |
This file contains 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
v(c) (c ? P | c ! Q) |
OlderNewer