Author: Sahil Sawhney

Getting Asynchronous in Scala : Part 2 (macro, reflection and Async library)

Reading Time: 2 minutes “Our patience will achieve more than our force.” – Edmund Burke The thought above tells about the beauty of being patient. One of the most important trait of a programming language is to be patient for the code segments to complete their execution asynchronously. In this blog we will continue with the Async library and some prerequisite associated with it. RECAP In first blog of Continue Reading

The Async library in scala

Reading Time: 6 minutes OVERVIEW In this blog we will explore the ‘Async’ library and will see how it is actually implemented; with some understanding of macros and reflection from the previous blog module [ HIT ME ] our voyage will be smooth and prosperous. The Async Library -> Async is an object with only two methods namely ‘async()’ and ‘await()’. The main use case of Async object is to Continue Reading

Scala Macros -An overview

Reading Time: 4 minutes OVERVIEW In this blog we will understand the basics of Macros and reflection. The main motive of the blog is to lay a foundation for better understanding of the the ‘Async library’. The ‘MAGIC’ of macros -> Macros can be called ‘special functions’ that are called by the compiler during compilation. These functions are special as using macros we can access the compiler API’s which Continue Reading

Getting Asynchronous in Scala : Part 1 (Future, Callbacks, Combinators etc.)

Reading Time: 6 minutes ‘Only you can control your future.’ – Dr. Seuss The above quote has a great correspondence with this blog. In the blog we will discuss what are Future values and how we access them. During our journey we will be visiting,exploring and understanding following checkpoints :- 1). What are future (basics). 2). How to access them. 3). Basics about Macros. 4). The Async library in Continue Reading

Generating, visiting and unit testing grammar using ANTLR4 with Java and Scala

Reading Time: 6 minutes “Quality is free, but only to those who are willing to pay heavily for it” – T. DeMarco Now unit testing is not that heavy to pay off so lets start the blog. In this blog we will be continuing the voyage to the kingdom of ANTLR4 RECAP In previous blog we discussed how to test whether a string is grammatically correct or not using Continue Reading

Knolx – ANTLR4 Presentation

Reading Time: < 1 minute Hi all, Knoldus had organized an hours session on 18th May 2016 at 4:00 PM. Topic was ANTLR4 and its testing . Many people had joined and learned from the session. I am  sharing the slides of the session here. Please let me know if you have any question related to linked slides.     You can also watch the video below..  

Testing grammar using ANTLR4 TestRig (Grun)

Reading Time: 5 minutes “Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” –Martin Golding Quotes like above tell us the importance of testing the modules that we develop. Testing for different languages is done using various tools for example JUNIT for java, FunSuite for scala and TestRig (grun on command line) for grammar(.g4). In this Continue Reading