I found that java is in the process of adding function closures (function as first class citizen) to its syntax.
Here is a good example
March 29, 2013
March 25, 2013
How to check Scala/Java in real Bytecode?
Imagine you have the following code in AntiTailRecursive.scala
object bc {
def factorial(n: BigInt): BigInt = {
if (n == 0)
1
else {
//n*factorial(n-1)
val t1 = n - 1
val t2 = factorial(t1)
n * t2
}
}
def main(args: Array[String]): Unit = {
println(factorial(5))
}
}
$ scalac AntiTailRecursive.scala #compile the code $ scala b # verify that the code works $ javap -l -p -c -v b #To view the java byte code of this scala source code/class:
March 24, 2013
Alternative Way to Master Ubuntu
Recently I found some new tools that make you a master using linux specially ubuntu.
Try Krusader which is a file manager instead of Nautilus. Nautilus is cool but doesn't give you the feelign fo a good file manager.
Krudsader benefits:
tools to compare files,
open terminal here,
Try Krusader which is a file manager instead of Nautilus. Nautilus is cool but doesn't give you the feelign fo a good file manager.
Krudsader benefits:
tools to compare files,
open terminal here,
March 6, 2013
Peer-to-Peer Command-Line Chat in Go Lang
I just implemented a peer to peer (p2p) command-line chat in Go language version as an example to start with. I start to like Go!
You can view the source code here on Github: https://github.com/mshahriarinia/Golang/blob/master/p2pChat/src/node.go
Some notes :
1. Spent quite some time on finding and setting up debuggers
You can view the source code here on Github: https://github.com/mshahriarinia/Golang/blob/master/p2pChat/src/node.go
Some notes :
1. Spent quite some time on finding and setting up debuggers
Subscribe to:
Comments (Atom)