Skip to content

v2.0.0

Compare
Choose a tag to compare
@andimiller andimiller released this 20 Sep 15:58
daa2d21

IDML 2 Release Notes

Introduction

The 2.0 release was a change to put as many binary incompatible changes together as possible, although a lot of new features have also snuck in.

Key Sorting

All keys are now alphabetically sorted, previously they did have an order, but it was specific to the Jackson implementation.

Circe Support

The JSON parser is now pluggable, and you can pick either Circe or Jackson out of the box.

Multiline String Literals

You can now have multi-line string literals using triple quotes, the same as in python or scala.

Class Renames

On the internal API all references to Ptolemy have been renamed to Idml. This is a consistency change since having a separate name for the implementation was confusing for new users.

New Java API

The new IDML API has been written and tested in Java to ensure that it's friendly for those wanting to embed IDML in JVM services written in non-scala languages.

Hilights include:

  • JIdmlValue includes all java-safe constructors for data node types
  • IdmlBuilder can construct the Idml engine easily from Java
  • Idml (the engine class) now has new run methods that are java-friendly and have declared exceptions.

Performance Improvements

There's roughly a 20% speedup in server, test and idmldoc due to switching to circe over jackson

Tracing

A newer feature in IDML is the ability to trace output through a program, this would add a comment to the end of a line to say what that assignment set, for example:

result = 1 + 2 # 3

When tracing the document the # 3 would be added.

Tracing Support in the apply tool

There's now an option to enable tracing in the apply tool, this outputs a traced copy of the IDML document to a second path.

Tracing Support in server and idml-vscode

Tracing has also been integrated into the language server and the vscode plugin to allow you to live-render documents with traced output.

Tutor

There is now a tutor command within the idml command line tool which will walk you through exercises intended to help you learn the language, only chapter 1 is currently available, but more will be added over time.

Float Literals with Exponents

We now support floats with exponents, these look like 123.456e10 and work in the same way they work in javascript or JSON.

Set Operations

A new set of functions has been added to perform set operations on lists, these will treat all lists as sets and preserve ordering as in the original lists where possible.

  • intersect - perform a set intersection
  • diff - perform a set diff
  • union - perform a set union

Base64 Support

A full set of base64 functions have been added to help people encode and decode data.

As usual these will fail gracefully and short circuit if the data is not valid base64.

  • base64encode - standard base64 encode
  • base64decode - standard base64 decode
  • base64mimeEncode - mime compatible base64 encode
  • base64mimeDecode - mime compatible base64 decode
  • base64urlsafeEncode - urlsafe base64 encode
  • base64urlsafeDecode - urlsafe base64 decode