[Techie Tuesdays] Meet the co-creator of Julia programming language, Viral Shah

[Techie Tuesdays] Meet the co-creator of Julia programming language, Viral Shah

Tuesday May 02, 2017,

21 min Read

Viral Shah is a free radical, as rightly pointed out by the Aadhaar team. Driven by impact, this co-creator of the Julia programming language and the co-author of the book, Rebooting India, isn’t limited by his supposed capabilities.

There are two things you’ll notice when you meet Viral Shah, co-creator of Julia (programming language) for the first time. First, he’s ridiculously young looking for a 38 year old. And second, he has the patience of a monk (and currently, he has the hair of one as well).

Sitting in the FourthLion office (Bengaluru), the company he started to campaign for Nandan Nilekani in the 2014 general elections, he shared his geeky journey from Mumbai to Santa Barbara to Bengaluru in a candid conversation with YourStory.

Techie Tuesday_Viral shah

Whether it was building Aadhaar for a billion people, election campaigning for Nandan Nilekani, or creating Julia, the common thread running through his career has been impact. But how did the heir to the Sevantilal Mahasukhlal & Company find himself at the crossroads of finance, public policy, and scientific computing? And what led him to make the choices he did?

A reasonably studious childhood and an unreasonably high interest in computers

Born and brought up in Mumbai (then Bombay), Viral spent the first 21 years of his life in the same city. This doesn’t, however, mean that he didn’t get to see his share of the world in his early days. Quite the opposite in fact; his father was an avid traveller, and so, he got a chance to see the world. Viral owes his studious upbringing to his mother, who focused on her kids’ education and just wouldn’t accept anything less than the best. He studied in Hindi Vidya Bhavan School for a simple reason–that it was close to his house and within the supervision of his parents. Viral topped his class throughout his school days. He recalls, “I was always reasonably studious and kept to myself. But I was looking to take time off from the school syllabus, which I thought wasn't that interesting.”

Viral spent nights on the terrace, gazing at stars through his telescope, while his days were full of experimentation at the chemistry setup at home (it was easy to get as his father’s business was laboratory chemicals).

When Viral came across computers, he was fascinated by BASIC language and programming. Apart from his interest in computers, he also discovered that he suffered from weak eyesight. He recalls,

Our computer teacher used slides that I couldn't see, and so, in the PTA, I said that his slides were blurred. That was when I found out that my eyesight is weak.

Viral got a computer as a reward when he topped class 10. He started doing more and more programming. In classes XI and XII, he worked on BASIC and PASCAL. He says, “Computers made me feel that I could understand science by programming it.” He taught himself Newton's laws by programming the equations and plotting them. He even built the periodic table and some games.

Viral on computer during his college days
Viral on computer (at home) during his college days.

Like millions of maths and science students in India, Viral prepared for the IIT-JEE. But he liked the IIT syllabus more than the board syllabus. When he programmed equations from the book Resnick Halliday in BASIC, it gave him good insight into scientific computing, without him even realising it. He then learnt C on his own, and felt that it rendered immense performance that he never got to see in BASIC.

Collaborators in crime

In his school days, Viral had several collaborators in crime for all his scientific endeavours (and programming). But one person Viral is indebted to a lot is Vikram Agarwal, whom he met in junior college. Viral and Vikram collaborated for a lot of things later in life, but Viral is most thankful to Vikram for introducing him to some of the most important people in his life:

  1. His mentors Ajay Shah and Susan Thomas, two of the top economists of India. He learnt everything about his modern programming from them.
  2. His wife, Swapnika Ramu.

Viral believes that getting mentors early on helped him a lot. He says, “The challenge in India for the masses is the lack of mentorship, and our education system doesn't create it for them.”

Viral with his family
Viral with his family.

He went to Padmabhushan Vasantdada Patil Pratishthan’s College of Engineering (Mumbai University), but never really attended college. In his first year, he told his parents that he was still preparing for IIT-JEE, while he was actually busy learning C and Linux. He even became a Debian maintainer while in college. He used to maintain a lot of distributed computing Linux kernel patches.

Building a system for NSE

While still in college, Viral wrote a system for the National Stock Exchange (NSE) with Ajay, which he believes is still in production for computing the risk in derivatives trading. Ajay works with NIPPF (National Institute of Public Policy and Finance), and was given the responsibility to build this system. He had figured out the right algorithms for calculating VAR (Value at Risk), and Viral implemented that and improved the performance of the system significantly. It was all in C programming language. He explains,

The computation involves simulating for every trade. Since it's derivative trading, anything can happen in the future, depending on the movement of the stock. Of all the scenarios (and there can be as many as a million) you can pick the most optimistic and most pessimistic and come up to a realistic scenario, which will be used to cap your risk. Based on how pessimistic you want to be, you can calculate your risk.
Viral with Ajay Shah(right most) and Vikram Agarwal (centre)
Viral with Ajay Shah (right) and Vikram Agarwal.

A good chunk of the time was spent in sorting the results, and sorting in computer science is an expensive algorithm (because for sorting n values, you need n log n comparisons). Viral worked on it further and changed the algorithm so that the same hardware could now perform 4x evaluation. Interestingly, he couldn’t clear an interview to work at NSE (whose system was running his code). In hindsight, Viral thinks that they did the right thing, as he would have made a terrible employee. He now realises,

I was always a rebel, for the sake of being a rebel. Now that I'm on the other side of the table and have people working for me, I can understand how annoying I was.

He then wrote a paper with Professor Ashok Srinivasan from IIT Bombay, who was collaborating with Ajay at that time.

Viral scored terrible grades in college, and finished his four-year degree in four and a half. He even failed in DSP (Digital Signal Processing) in his seventh semester, and went on to write the digital signal processing in Julia later.

PhD amidst sun-soaked California beach culture

Viral was clear about going for a PhD, but he got rejected by everyone in his pre-final. Then, Prof. Ashok, an alumnus of the University of California Santa Barbara (UCSB) who by then had shifted to Florida State University, wrote a letter of recommendation that helped him gain admission at UCSB. Viral recalls his first impression of the institution,

UCSB is a beach university. It has the sun-soaked California beach culture. The campus is surrounded by ocean on three sides. My department was on the beach. I could see Channel Islands, whales, and dolphins from there.
Viral Vikram at UCSB (Vikram was also my roommate at UCSB)
Viral and Vikram at UCSB.

Though he had a rough idea, it took him two years to finalise his PhD topic. In fact, he took his PhD qualifiers too lightly, and almost got himself thrown out. He recalls, “I slept through one of the qualifiers, thinking that the exam was on the next day. But because I had taken a lot of graduate courses and scored good grades in them, I was exempted from most of the qualifiers.”

When he was in his second year, Dr. John Gilbert joined UCSB from Cornell University. He taught scientific computing, which was offered for the first time at UCSB, and Viral opted for it. That was the only class he got an A+ in during his entire time at the university. He then became a research assistant under Prof. Gilbert.

Viral visited MIT with the professor and met Alan Edelmen, a professor of Mathematics, who then became his PhD committee member and later co-founder of Julia computing. He got into scientific computing, sparse linear algebra, graph theory, MATLAB, and parallel computing.

As a part of his PhD thesis, Viral worked on a system called Star-P. He contributed parallel graph algorithms and sparse matrix systems for Star-P. His thesis was later licensed by a company, Interactive Supercomputing, which eventually got acquired by Microsoft.

Viral and Brad (Circuitscape)
Viral and Brad (Circuitscape).

Viral met Brad McRae, an engineer-turned-ecologist at UCSB's National Center for Ecological Analysis and Synthesis (NCEAS). His thesis had algorithms to find wildlife conservation corridors. Brad had a software called Circuitscape, which was an electrical network interpretation for wildlife conservation modeled as a circuit with resistors (where current flows through all paths). His software was in MATLAB, which Viral could speed up. Brad and Viral rewrote all the algorithms of Circuitscape and scaled it to a point where it became usable. After his PhD, Viral moved it to Python, and today, it is one of the world's largest conservation software for teaching, and is used by governments and think tanks who are buying land for conservation planning.

Viral also studied finance at UCSB under Prof. Rajnish Mehra, an economist known for the equity premium puzzle. Rajnish was influential in his understanding of the world, incentives, and public policy. At that time, a lot of bonds were mispriced during the financial crisis, and Viral was able to write an arbitrage matching algorithm.

Viral and PhD advisor John Gilbert
Viral with his PhD advisor John Gilbert.

After completing his PhD, Viral stayed in Santa Barbara for two more years. He also wanted to stay in California because his wife Swapnika was finishing her PhD in Cancer Biology at the University of Southern California, Los Angeles. He took up a job as a researcher and engineer at Interactive Supercomputing, a startup that was commercialising the Star-P system (based on his PhD thesis). It was a Boston-based company founded by Alan Edelmen, an. MIT professor. After building parallel MATLAB, Interactive Supercomputing was building parallel Python and R.

Viral counts excelling in Ultimate Frisbee as one his remarkable achievements in UCSB. Stefan Karpinski and Viral played ultimate frisbee together for six years, and even represented the computer science frisbee team. Starting as the worst team, by the time they left, they stood as the best in the university.

Impact, Aadhaar, and Nandan Nilekani

In 2009, amidst the international financial crisis, Interactive Supercomputers wound up, and Viral was given the choice of going to MIT as a post-doctoral fellow and working with Prof. Edelmen, for which he had already lined up funding. But he had to come to India to get a new visa. In India, Viral met Nandan Nilekani at the economics conference (Indian Policy Forum) after Ajay had connected the two. Ajay told Viral that Aadhaar was going to be very important, and that it would be a great opportunity for Viral if he wanted to do anything in public policy at scale.

On his next visit to India soon after, Viral flew to Delhi to meet Nandan again, and inquired as to the situation, to which Nandan replied,

 Look, I've no position myself. I don't have budget, I don't have office, I don't have staff. But I can offer you excitement and impact at scale, if that's what you want.

He invited Viral to attend the next few meetings and see things for himself before coming to a decision. He met India Post management and Intel in two consecutive meetings and saw the contrast. While one seemed extremely formal and archaic to an extent, the other had discussions about biometric deduplication and next chip architecture. Viral decided that he was going to stay, and didn't bother to renew his visa.

Viral in Aadhaar (Village in Jharkhand)
Viral while working on Aadhaar, in a village in Jharkhand.

It took him a year to get a job title and salary in Aadhaar, but he was already representing the organisation by that time. Viral focused on applications of Aadhaar, i.e. on authentication, financial inclusion, subsidies, eKYC, and GST’s early formative documents. He was designing the economics of the subsidies and then the tech systems, and wrote reports that would make that happen. He recalls,

“When Pranab Mukherjee, the then Finance Minister of India, asked to give the inputs on LPG-Kerosene-fertiliser subsidies, I went on the field and visited fertiliser plants, LPG dealers, and villages using kerosene to understand how subsidies work. I travelled to Jharkhand to set up Aadhaar Pay, which was called micro ATM prices at that time.”

Ram Sewak Sharma, who was the Director General of UIDAI (2009-2013), had given the name Free Radical to Viral, because he would show up in shorts in government meetings and come up with off the cuff suggestions for policies that were outside his pay grade.

Viral co-authored the book Rebooting India with Nandan Nilekani based on his experiences and research at Aadhaar. His wife Swapnika too contributed with her research to the book.

Related readMeet the chief architect of Aadhaar, Pramod Varma

Viral Shah (2nd from left) and Nandan Nilekani (3rd from left) during the Rebooting India book launch.

While working on Aadhaar during the day, he was still working on Julia by night. After leaving Aadhaar in 2013, Viral started FourthLion with Shankar Maruwada and Naman Pugalia. It was a citizens-facing technology company that handled Nandan Nilekani's election campaign. Viral says,

We thought the next jump from bureaucracy should be in politics to make the real impact. I focused on building the tech team for driving the campaign. Figuring out what messages to send, processing the voter rolls, and coordinating the field campaigns through technology.

The company also handled Prithviraj Chavan's campaign in his assembly seat during the Maharashtra state elections in 2014. FourthLion then started focusing on loyalty and payments for retail, bringing their election learnings into retail, wherever large scale technology-based interactions took place. It translated into building a loyalty-based program for Cafe Coffee Day, and since then, they have signed up a number of customers. By this time, Julia was taking off in a big way, and Viral decided to work on it full-time.

The birth of Julia Programming Language

Alan Edelmen, Jeff Bezanson, Stefan Karpinski, and Viral started working on Julia together in 2009. It was built on the premise that the existing programming languages then were either easy or high performance. Viral explains, “Scientific computing has always focused on easy, so while there are top scientific codes written by large teams in C, FORTRAN, and MPI, a majority of the scientific work is done in R, Matlab, and Python (increasingly Python today). On the commercial side, an equivalent is SAS Analytics. While programmers will use C, C sharp, and Java, because they can give you full control, if you want to do any kind of applied mathematical programming and deploy it, the physicists, engineers, chemists, and all other applied mathematicians write the program in their language of choice and then rewrite in C. We termed it the two language problem, and identified it as a source of many issues.”

Julia co-founders and Keno Fischer
Julia co-founders and Keno Fischer

Jeff joined Alan's research team at MIT as a PhD student because there were no other sources of funding. He took a PhD to work on Julia even though he didn't really want a PhD. Stefan moved from Santa Barbara to New York to work with Etsy, a niche e-commerce company. Jeff, Alan, and Viral had spoken and worked on developing a compiler to Matlab, and realised that the existing tools would not speed up existing language compilers and get the performance. Rewriting in C and then calling it from higher level language was also not a way to make progress in the area of numerical scientific computing. Viral then did an email introduction between the four, and within a few weeks, Jeff started writing the code.

Viral believes that Julia is a journey of decades for all of its co-creators. Alan has been thinking about this his whole career. Viral has spent a decade of intellectual work as a build-up to this. Jeff has been writing languages, and has written two other languages of his own ever since he graduated from Harvard. He has years of experience with writing compilers. Stefan had data science experience because of his work at Etsy. All four brought with them different perspectives. Viral says,

To build a language for scientific computing, you need math, science, engineering, computer science, and compiler skills together. People writing computer science programming languages don't understand how scientists think, and scientists writing programming language don't understand how compilers should be written. Ours was first project where we got different skills together in an open collaborative way.
Viral, Alan, Jeff, Stefan with Prof. Kahan
Viral, Alan, Jeff, Stefan with Prof. Kahan.

According to Viral, among all the earlier languages, only FORTRAN had got things right for scientific computing, and that's why it's still in use. But then the pendulum shifted towards performance, because Intel's Moore's Law started kicking in, and productivity became more important. So, we had languages like Matlab, R, and S.

Viral didn’t give away the secret behind the name ‘Julia’ at first, because he thought it didn’t make for a great story, and only after a lot of nudging did he disclose it, saying,

“Jeff had an earlier project called Julia, and he had a nice ASCII logo for it, which was cool. So, we thought ‘Let's go for it!’, we anyways didn't think this thing would go anywhere. We knew that we didn't need a geeky name, and so, we went with Julia."

On February 14, 2012, Viral, Jeff, Alan, and Stefan published a post – ‘Why we created Julia’ – which went viral on Reddit and Hackernews, getting more than 200,000 hits in a day. It was a big tipping point for all four. Viral says,

We were not even ready to post it. I hit submit thinking ‘Who's going to read anyways?’ Looking back, we realise that we couldn't possibly have engineered it.

Viral spoke about some of the key contributors to Julia and shared with us some interesting anecdotes:

  1. Keno Fischer: Viral and others didn't even know that Keno was in high school when he started contributing to Julia. He had a Stanford address, and so they thought he was an undergrad student. In six months, he ported Julia from Linux to Windows.
  2. Jameson Nash: An aeronautics PhD student from MIT, he went from being a person who never wrote compiler before, to becoming the deep internals guy for Julia compilers.
  3. Douglas Bates: The original author of all the algorithms in R, became a contributor to Julia at the age of 72. He was a professor at the University of Wisconsin-Madison. He wanted to write his mixed effects models (a statistical method) package, which he had written in R originally, in Julia. Julia was very young then, so it didn't have the entire underlying infrastructure required to write this. So, over a year, he implemented all of Julia's linear algebra, and then finally wrote the mixed effects model in it.
  4. Tim Holy: A neuroscientist from St. Louis who photographs transparent fish to see how neurons fire, to understand brain's activity, became one of the core contributors to Julia.
  5. Steven G. Johnson: A professor at MIT who's a physicist, mathematician, and one of the best programmers in the world became a core contributor in Julia. He is known for developing the Fast Fourier Transform in the West (FFTW) libraries. He created a built-in interface to the FFTW in Julia.

There were several other contributors Viral wanted to speak about, but our time simply didn’t permit it. You can find the list of the major contributors here.

Today, Julia has 250,000 users, and has broad use cases in the domain of applied mathematics. Some of the current use cases of Julia include:

  1. Self driving cars: UC Berkeley researchers use Julia to optimise model predictive control for the Berkeley Autonomous Race Car (BARC).
  2. Astrophysics: Lawrence Berkeley Labs, Intel, and UC Berkeley researchers are using Julia and a NERSC supercomputer to increase the speed of astronomical image analysis by 225 times.
  3. Risk models at Aviva.
  4. Cancer Genomics: UK cancer researchers use Julia to model tumor growth, informing interpretations of cancer genomes.
  5. Aviation: The Federal Aviation Administration is using Julia to develop the Next Generation Airborne Collision Avoidance System.
  6. Asset Management: Conning is using Julia in large scale Monte Carlo simulations for insurance risk assessment solutions.

According to Viral, Julia is a very algorithm-oriented language, and it's not about business transactions.

Julia Computing Inc

Viral has been working on Julia full-time since 2014. He says,

We increasingly started facing the situation that people wanted to use Julia commercially, and they wanted support and a commercial entity to work with. We thought the right thing for Julia was to grow in all senses, and grow commercially as well. So, we started Julia Computing.
Julia Computing - 4 co-founders + Deepak + Keno
The six co-founders of Julia Computing.

Stefan was consulting a hedge fund in the US, and that brought in the company’s first $100,000 in revenues. The company got two new co-founders in 2015 – Deepak Vinchhi and Keno Fischer (while he was still pursuing his Bachelor's at Harvard). The four original creators, along with these two, form the co-founding team of Julia Computing Inc. It's a Boston-registered entity, and the Indian entity is owned by the US entity. Currently, half of the 21-member team is in India, and the other half is spread between the US and the UK. Viral says,

“All our cloud products and parallel computing work is done out of India. Julia distribution, packaging, and builds are done in India, while the compiler team is largely based out of Boston. We have our finance machine learning people in London.”

Julia Computing is sustained through customer contracts and grants. The company is already breaking even. Viral and other co-founders have now shifted the company’s focus to products from consulting. Realising that the ease of installation can be a big bottleneck in the growth from 250,000 to a million users, they have created a distribution package. It shifts 150 common Julia packages, including an editor, compiler, and debugger. Julia Run, Julia Pro, Julia Box, and Julia Fin are the current product offerings of the company.

JuliaCon Bengaluru
JuliaCon Bengaluru.

According to Viral, the Julia user base has been doubling every nine months, and so, he’s targeting a million users in the next two years. Julia 1.0 will be launched in Berkeley at the upcoming JuliaCon (the community conference of Julia).

Viral is the CEO of Julia Computing, and focuses on ongoing business deals and product development (with three time zones to coordinate on), while anchoring a lot of JuliaCon work as well. All six co-founders spend a lot of time on open source community management of Julia.

Impact, impact, and impact

Viral with his wife Swapnika
Viral with his wife Swapnika.

Viral grew up in a Jain household with the basic Jain values like non-violence, truthfulness, and transparency. He never chased money as an end goal, but he acknowledges that that’s partly because of his financial stability. One value that VIral always had but which was articulated by Nandan very well was,

When you're doing something, focus on a goal that is so big that everything else (egos, tussles, politics both inside and outside the organisation) is small in comparison.

Julia is that bigger goal for Viral and his team members.

Viral is guided by impact for all the important decisions in his life. He thinks, “What is it I can do today that will disproportionately make an impact to the society that nobody else will or may be able to make?" Aadhaar and Julia follow that philosophy. He isn’t limited to his capabilities.

According to Viral’s wife Swapnika, who is a scientist and a researcher, Viral is comfortable in the collaborative approach, and is a good team player.

For Viral, technology by itself is not as interesting as its intersection with all these areas – ecology, finance, physics, astronomy. He is really interested in what technology enables – the larger human thinking progress. He says,

Computer science, when applied to these applied fields, enables you to make these leaps in science that would not have been possible otherwise, either in theory or in experimental science. Computational science is the third arm of research and science in my opinion.

He defined impact for him,

Impact is making a positive change at scale, and I want to make a real impact in the lives of people in a meaningful way.


You can find Viral on Github, Twitter and LinkedIn.