Digital Developer Conference: Hybrid Cloud 2021. On Sep 21, gain free hybrid cloud skills from experts and partners. Register now

Tosca

The Tosca application primarily deals with computer languages and the implementation of their supporting tools, including interpreters, compilers, editors, documentation generators, and so on.

The number of computer languages increases constantly, either to address specific domain requirements (DSL), or to adapt to new infrastructure such as cloud computing. Many of these languages have compilers and tools that make it easy to process them. However, many new languages provide just a few tools, sometimes just an interpreter, because of the difficulty and huge cost involved. The Tosca preprocessor addresses this issue.

For the compiler back-end, a set of frameworks exists for generating various kinds of code, although they seem less standardized as a whole, each one is incredibly useful to its own users.

The tosca-lang project on github is “the preprocessing compiler generator language.” Its goal is to provide a simple language that is quick to learn and easy to use, to specify the inner source-to-source transformations inside your compiler and tools and quickly emit C++ or Java code to run that transformation. The goal is to think of Tosca as just a preprocessor and a thin one at that. It generates easy-to-read-and-debug C++ or Java code that directly maps from your Tosca source, so that you understand it and know just what it’s doing.

What is the advantage of Tosca?

For the transformations inside your compiler, you know what you want done, but it can get complicated to explain and implement. It’s easier if you can specify the mappings without specifying the details. That way it’s quicker to write and easier to maintain and debug. Check out our simple tutorial for an example to see how it works and how your code is simplified while maintaining its essence!

Why should I contribute?

Computer languages are fundamental to all software development, but they are constantly evolving. By contributing to Tosca, you will have an impact on reinventing the way compilers are written today. Plus, you’ll get to learn new things-—whether you interested in understanding how parser and type inference works, how to implement closure conversion, or how the term rewriting is being used within Tosca. It’s also a great platform for experimenting with new cool programming language features you think would help with writing compilers and other tools. We’re just getting started, so you don’t have a huge learning curve to get up-to-speed.

What technology problem will I help solve

Tosca is ultimately about reducing the cost of developing new or improving existing programming languages, be it a general-purpose programming language or small, domain-specific languages.

How will Tosca help my business?

The project will help developers me more productive. New computer languages are invented all the time to increase productivity, efficiency, or to solve new problems. It’s natural to apply these requirements to computer language tools as well.