Skip to content
Pre-release
Pre-release

@andimiller andimiller released this Jan 8, 2020

This adds new node types in our datanodes tree, one for a DOM node with text in, and one for a DOM Element.

The new functions parseXml and parseHtml are available which will parse XML in a string into a tree of DOM nodes.

The new functions attributes()and tagName() can be called to pull the attributes object or the name out of a DOM node.

The text() function can be used to pull out all the text nodes from beneath the selected node and combine them.

DOM nodes are addressable as both objects and arrays, indexing them as an array gives you the contained item at that index, this also means you can filter them down to certain sub-elements. When addressing them as an object, it will filter the array for tags with the name you're asking for, eg. xml.parseXml().a[0] will parse the XML in the xml string, filter to the a tags, then grab the 0th one.

Assets 3
  • v2.0.3
  • d24bc46
  • Compare
    Choose a tag to compare
    Search for a tag
  • v2.0.3
  • d24bc46
  • Compare
    Choose a tag to compare
    Search for a tag

@andimiller andimiller released this Nov 5, 2019

This release includes a normalize function which can compose and decompose unicode ligatures based on Unicode Standard Annex #15.

Examples:

We can put in some text with a composed character, here it's in it's normal 00e5 form, and we get the decomposed version out, with the circle combining character: a\u030a.

json> {"input": "kr\u00f8stek\u00e5l och risbudding"}
....>
JSON accepted

idml> output = input.normalize("NFD")
....>
{
  "output" : "krøstekål och risbudding" // "kr\u00f8steka\u030al och risbudding"
}

And we can do the other direction too:

We pass in the a\u030a and get \u00e5 out.

json> {"input": "kr\u00f8steka\u030al och risbudding"}
....>
JSON accepted

idml> output = input.normalize("NFC")
....>
{
  "output" : "krøstekål och risbudding" // "kr\u00f8stek\u00e5l och risbudding"
}
Assets 3

@andimiller andimiller released this Oct 9, 2019

Always target java 8
Assets 3
  • v2.0.1
  • f659dad
  • Compare
    Choose a tag to compare
    Search for a tag
  • v2.0.1
  • f659dad
  • Compare
    Choose a tag to compare
    Search for a tag

@andimiller andimiller released this Oct 7, 2019

This release fixes issues with shallow merges being used in combineAll by always using deep merges.

Assets 3

@andimiller andimiller released this Sep 20, 2019

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
Assets 3

@andimiller andimiller released this Sep 19, 2019

Fix docker builds
Assets 3

@andimiller andimiller released this Sep 19, 2019

Fix docker builds
Assets 3

@andimiller andimiller released this Sep 18, 2019

* Add full suite of base64 functions to IDML

These can be called on strings as suffixes and include:

* `base64encode`
* `base64decode`
* `base64mimeEncode`
* `base64mimeDecode`
* `base64urlsafeEncode`
* `base64urlsafeDecode`

Decoders will fail gracefully and short circuit if the input is not valid.
Assets 3

@andimiller andimiller released this Sep 11, 2019

All of these functions may be called on arrays and passed another array as their argument.

* `intersect` - perform a set intersect between the arrays
* `diff` - perform a set diff between the arrays
* `union` - perform a set union between the arrays, equivalent to `[a,b].flatten().unique()`
Assets 3

@andimiller andimiller released this Sep 3, 2019

Always use UTF-8 for UUID serializing
Assets 3
You can’t perform that action at this time.