Darklang Releases 7 and 8

Darklang Releases 7 and 8
The Payment of Tithe, by Pieter Bruegel the Younger, ca 1616

tl;dr Release notes [7] [8] and release discussion

Darklang Release 7 contains all the changes from October 2022, and Release 8 contains all the changes from November 2022. Writing these changelogs takes a bit of time, so we’re a month late, sorry! We’ve recently written a REPL in Dark to make this process a bit easier for ourselves going forward - it pulls from GitHub PR descriptions to generate a draft of a month’s updates.

Some user-facing highlights

The editor/client loads a bit faster. The initial API requests needed to run the app are now preloaded, and we’ve reduced the number of files downloaded when the client is opened.

All standard library functions now use pretty formatting in their docstrings.

Darklang function call in the editor, showing a docstring

The editor used to support two forms of a left sidebar. One of them was confusing - it was really tough to know if there was data there to navigate to. The other one is ‘collapsed’ and allows you to navigate to parts of your program by hovering over the relevant icon. We removed the confusing sidebar in favor of the simpler one, and improved the stability of the simpler sidebar.

The collapsed sidebar (now the only sidebar)

We've started to use Tailwind to style the editor. Our styling of the editor was a mess of CSS, and Tailwind is turning out to be a great tool for tidying things. So far, it's used in the sidebar and the Settings modal, and has really helped tidy our styling!

When you copy/paste any Dark code in the Editor (what we call “reconstruction” internally), it’s not just the ‘text’ of your code that’s copied to your clipboard - instead, we copy a JSON-serialized form of your Dark code based on your selection. Our algorithm for copy/pasting `match` expressions was previously limited and flawed, and has been rewritten to work appropriately.

Contributing to Dark is smoother

Users trying to contribute to Dark from Windows using WSL were having issues getting set up due to some setup steps that ran on the on host machine. We’ve removed these steps to no longer block these contributors.

The remaining bits of OCaml that are still used by Dark (Static Assets and Trace Garbage Collection) have been removed from the main dark repository and extracted into a separate repository. Contributing to Dark no longer requires downloading and compiling this code (which also wouldn’t compile on some older machines). As a nice benefit, our builds in CI have gotten notably faster.

We have improved the safety of updating types used in our client-server communication. Many types used to communicate between the backend and the client were ‘internal’ types, used by the interpreter and various other parts of our codebase. Because of this, it was scary to change anything about these types - what if some internal change inadvertently breaks the editor!? We’ve now consolidated our ClientTypes, and persist sample .json output files that we compare against in tests, to ensure we serialize consistently and no longer have this worry.

The Docker container used during development and in production has been upgraded to Ubuntu 22.04. This brings along multiple security improvements and positions the codebase to be able to react more quickly to anything that may come up.

We have simplified and prettified our logo! These logos are all available on our “Sharing Dark” page, and we’ve been adding them wherever we’ve seen the Darklang logo used - let us know if we’ve missed any.

The detailed release notes are on our Changelog. We've recorded a discussion between Paul and Stachu about the release and what's on our mind in the coming months. This was streamed on the Darklang Twitch account, which we're starting to stream on a bit (Paul has also been streaming his coding in Dark).

Sign up or sign in to try out all the recent changes.

Discuss on Mastodon, Twitter, HN, Reddit, Lobsters, Youtube, in our Discord, or in the comments below!