Make your tech dreams come true with VirtusLab!

Inkuire: Hoogle-like searches for Scala 3 and Kotlin

inkuire_min

Do you have an idea for an innovative tech solution? Do you want to improve something in the language ecosystem? Do you want to work in a place where you can fully develop your ideas with the support of experts?

Join us to work in such a place! These aren’t empty words, and the best proof will be in our series of stories, “Make your tech dreams come true with VirtusLab!” From these stories, you’ll learn how our programmers develop their ideas with us, from initial concepts to full-fledged projects.

In this first interview, you’ll get to know the success story of our Junior Scala Developer, Kacper Korban. He’s a member of our Scala team that covers the main part of the Scala ecosystem, including the Scala 3 compiler, Metals (Language Server Protocol), and scalafmt (source code formatter). Kacper’s tech interests include functional programming, mainly in Scala and Haskell, and he’s been working in VirtusLab for over two years now.

image for article: Make your tech dreams come true with VirtusLab!

The interview with Kacper

 

How did you end up in VirtusLab in the first place?

I think about myself as a person with a strange taste in technology. One of the reasons might be because I started learning Haskell in junior high school. When I started looking for a software development internship, Haskell wasn’t really an option, since it’s only used in very particular applications. That’s why I started looking for the next best thing, which for me is Scala. And when it comes to Scala companies in Cracow, there’s only one choice: VirtusLab.

When did you start working on developer tooling?

After working at VirtusLab for about six months while studying Computer Science, it came time to pick a Bachelor’s thesis project. The story with those projects usually goes like this:

  • you spend a lot of time working on them
  • you show them to your advisor
  • and you never use it or even look at it again

But I wanted my project to be used by someone, so that’s why I got really excited when I found out about the opportunity to work on a tooling project under the supervision of VirtusLab, especially since I started the project with my two friends who are also working at VirtusLab — Andrzej Ratajczak and Filip Zybała.

What was the project about?

In a nutshell, the goal of the project was to write Hoogle for Kotlin. We named it Inkuire — like the word “inquire,” but with a K for Kotlin.

What exactly does it do?

Hoogle ([H]askell + G[oogle]) is something I wanted to create for Scala for a while.

The problem it tries to solve is as follows. We know that IDE auto-completion is really useful when writing code, especially in object-oriented languages, because after writing a ‘dot’, the language server has quite an easy job of providing every method on a given class.

But, when it comes to static functions or extension methods under an import, this problem becomes hard. Current solutions only allow for searching by symbolic names, and as Phil Karlton once said, “There are only two hard things in computer science: cache invalidation and naming things.”

Hoogle aims to ease this process by allowing developers to search by function signatures instead. For example, consider the following function definition:

span :: [a] -> (a -> Bool) -> ([a], [a])
Instead of searching for
span we can also search for
[a] -> (a -> Bool) -> ([a], [a]) .

If it’s a tool for Kotlin, how come it works
for Scala 3 now?

After releasing the version for Kotlin, it was met with little response, so we stopped working on Inkuire for a while. Back then, the dreams of Inkuire working with Scala were just in my head.

Then I joined the team working on the new Scaladoc project and had to keep up to date with the development of Scala 3, so I joined the Scala Contributors forum. Just a few days after that, a thread resurfaced with a discussion about implementing the exact same feature Inkuire was created to provide. Moreover, a day later, Tom Grigg found an article I wrote with Andrzej Ratajczak about creating the tool for Kotlin. That is how the initiative of porting Inkuire to Scala 3 began.

Was the Scala community’s response different?

It was. Even the news of a very basic proof of concept (PoC) was very well received. The most rewarding moment of developing the tool was when David Barri tweeted about the Inkuire PoC. It was incredibly amazing since I was watching his programming stream just a week earlier.

What is your dream vision for this solution?

I would love for Inkuire to be used as widely as possible. That’s why I really like working on tooling — I can contribute to something that people can use.

Try Inkuire!

If you’re interested in Inkuire, you can try it out here on the latest version of Scala 3 standard library. Just click on the red search icon in the top-right corner and type a signature you’re looking for.

image for article: Make your tech dreams come true with VirtusLab!

Inkuire is an open-source solution, so you can develop it with Kacper and his friends at https://github.com/VirtusLab/Inkuire. Also, if you would like to learn more about this solution, read Andrzej Ratajczak’s blog post on Medium.

You can also join our Dev Tooling team at VirtusLab and develop your ideas with us! Check out our open positions:

> Junior Scala Engineer

> Scala Engineer

> Senior Scala Engineer

If you are keen on working on the Scala ecosystem, let us know; even if there currently aren’t any open positions, we will find something for you!

P.S. We do not expect you to have previous experience in Scala. A willingness to learn and develop your skills in the Scala ecosystem is sufficient 😉

Written by

Kasia Pytko
Kasia Pytko Sep 22, 2021