I've been using twitter Eval function to compile Scala functions. But would prefer to evaluate the function as being provided at project scala-notebook (https://github.com/Bridgewater/scala-notebook)
Is scala-notebook hooking up to the internal repl of machine its running on ?
How is it different to twitter Eval library (https://twitter.github.io/util/docs/index.html#com.twitter.util.Eval) ?
Both scala-notebook and twitter-eval use the scala-compiler tool under the hood to compile and interpret the text as scala code. So, technically there is no difference between those two with regard to how they compile the source code.
Just to shed some light on how they both do that, check out the below files:
scala-notebook: https://github.com/Bridgewater/scala-notebook/blob/master/kernel/src/main/scala/com/bwater/notebook/kernel/Repl.scala
twitter-eval: https://github.com/twitter/util/blob/develop/util-eval/src/main/scala/com/twitter/util/Eval.scala
As you can see, both of the use the scala-compiler. The compiler classes and utilities are located in the package 'scala.tools'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With