highlights
Dec 08, 2022

December library ecosystem updates

Rebecca Mark

New(ish) libraries:

Exists library

Maintained by @ceedubs

Has programming been feeling like you're pushing a rock up a hill? Maybe the lack of existential types in Unison has been causing youā€¦ angst? While you can't directly represent an existential type in Unison, you can emulate them, and as it turns out there "exists" a mini library demoing that.

The project readme breaks down a datatype which can represent an existential type, but if you want more information about existential types in general, the Basics section of this Haskell wiki does a good job at explaining them.

Google Places API

Maintained by @tapegram

This library currently supports a subset of the Google Places API. For example, I used it to search for "Dinner" at the the Mount Everest Basecamp in an imagined future where I am capable of climbing a mountain. I got quite a few restaurants in response!

...
{
  place_id: ChIJT-phrtoI6TkRybyBNFC4-WQ
  name: Himalayan Lodge Restaurant
},{
  place_id: ChIJdQYGNtQJ6TkRhOX1KvC7Lak
  name: The Hungry Yak Live Music Bar Pvt Ltd
},{
  place_id: ChIJ576ljNoI6TkRMi00fxQVj-w
  name: Hotel khangri
},{
  place_id: ChIJ9celvckP6TkRkzz9XydzCcM
  name: Rokpa guest house
}
...

"The Hungry Yak" speaks to me, so I can use the information from the previous query to see what it looks like using the library. Here's where we're eating:

An exterior photo of The Hungy Yak restaurant, showing signage and a facade and staircase painted with red and blue.

Midi library

Maintained by @alvaroc1

"Why not?" asks the project's readme, and we agree! Why not! If you need to parse a Midi file, you should be able to do it in Unison. Once the UCM supports UDP, the library should be able to play music, and perhaps a Unison concert is in order. šŸŽø

Version updates:

Dhall parsing library

Maintained by @hagl

Having misconfigured quite a few YAML configs in our day, we are very thrilled that Unison has a library to support parsing the Dhall language. If you haven't heard, Dhall is the coolest configuration language on the block. The Dhall language homepage includes a helpful tutorial which showcases its expressiveness and utility and the readme of the Dhall library on Share brings that content to Unison.

Ability-based parsing library

Maintained by @rlmark

Version two of this parsing library includes a rewrite of the Parse ability to make use of the more efficient Pattern utilities included in the base library. The CHANGELOG for this version contains information about the update.

That's all for now! If you have a library you'd like featured in a post, get in touch with us in the #libraries channel in the Unison slack!