Nytril is a high-level, general purpose programming language that runs in an integrated development environment for Windows and Mac computers. The standard output of a nytril program is one or more typeset documents that can be published. The software is available for download at www.nytril.com. A Community Edition is available for free.
Nytril has a 'C' style, with insignificant white space, expressions separated by a semi-colon (;), and scope enclosed by curly braces {}. It uses almost all the standard C operators and flow statements. It supports both dynamic and static typing or a mix of the two. Namespaces can be created and used to organize symbols. It is an object oriented language with classes, single-inheritance, virtual functions and templates. Memory is managed, with automatic garbage collection.
Nytril contains built-in support for creating complex typeset documents, including alignments, tables, charts, drawings, and complex math layout, in the spirit of LaTeX. Nytril is not a markup language like html or markdown, but the grammar has a unique property called 'affinity' that allows the fluid mixing of calculations and text with a minimum of operators and escapes. Because it is a conventional programming language, Nytril allows for arbitrarily complex calculations to be performed in the usual way, and then inserted inline with the text with minimal punctuation.
Nytril 1.1 was released in June, 2025.
Design Philosophy and Features
A guiding principle of Nytril development is the DRY principle in programming (i.e. Don't Repeat Yourself). To make a large number of similar documents, without repeating information, the data and text must be separated from the style and the organization of the documents themselves. In this pattern, the documents are only a temporary representation of the text and data, and they can be discarded and rebuilt from source automatically, in the same way that an executable program can be rebuilt from source. When this source changes, the entire corpus of documents is rebuilt, which guarantees that every document is always up to date.
The Nytril language is influenced by the syntax and conventions of TypeScript, C# and LaTeX languages but it is a hybrid that is easy for beginners to learn. Nytril source files are UTF8 text files compatible with Git, and several authors can collaborate on different parts of the document set, in the same way that they would collaborate on different parts of a large software project. Raw information can be coded in Nytril source files in a structured way, minimizing the need for data to be stored in different formats like JSON and XML. All changes to data and style can be tracked by source control which enhances recoverability and accountability. Using source control tracking means that a small change to a data point or style shows up as a single change, even though it might affect hundreds of separate documents.
Nytril is an integrated desktop environment and the experience of authoring is a cross between Visual Studio and Excel because the calculations and graphical output are visible immediately inside the application. All execution and formatting is done on the desktop, so work can be done offline and synced later.
Portability
Nytril is written in C# and uses the latest version of the Microsoft .Net platform. Nytril is portable across operating systems and CPU architectures. Currently Nytril runs on computers running Windows 10-11 and MacOS 12 and later. On Windows, the GUI uses the WPF framework and on the Mac, it uses Avalonia, however the programming interfaces, user interface, menus and document views are identical.
The compiler, runtime library and math functions are identical on all platforms. Typesetting layout may differ marginally on different platforms due to the use of different underlying graphics frameworks. The long-term goal is to remove all the visible differences between the platforms.
Top comments (0)