Code

Ammonite tunes the heavyweight for simple tasks

Pro
Image: Stockfresh

15 June 2017

Ammonite, an open source tool to use the Scala language for scripting, should debut in its Version 1.0 production version in next two months.The two-year-old project lets Scala be used for small scripts. It offers an interactive REPL (read-eval-print loop) and system shell capabilities. The project also can be used as a library in existing Scala projects, via the Ammonite-Ops file system library.

“Scala has traditionally been a heavy, powerful language with heavy, powerful tools. Ammonite aims to let you use it for small, simple tasks as well,” said Ammonite developer Li Haoyi, a former engineer at Fluent Systems. The project enables Scala to vie for tasks that previously have been the domain of Python or the Bash shell for small housekeeping or automation scripts. It also can be used for file system and system administration.

Scala was built for the Java Virtual Machine; it was also extended to JavaScript compilation via Scala.js and to the LLVM compiler via Scala Native. Ammonite takes a different twist on Scala, providing an iPython-like REPL experience and a way to run Scala script files.

Ammonite’s REPL serves as a replacement for the default Scala REPL. It offers syntax-highlighted input and multiline editing. Ammonite’s scripts provide a lightweight way to execute Scala code without the boilerplate and slowness of the Scala SBT build tool.

IDG News Service

 

Read More:


Back to Top ↑

TechCentral.ie