Expense proposal: Pure Dhall function to render YAML


#1

I’d like to propose creating a $100 feature bounty for a new contributor to implement the following Prelude utility:

-- ./Prelude/JSON/renderYAML : JSON → Text

In other words, this would render a value of type JSON as the corresponding YAML string, using Text/show for rendering YAML strings (for simplicity; no multi-line rendering necessary).

My selfish motivation for proposing this is that I’m currently implementing a dhall-kubernetes-charts repository to replace Helm with Dhall and this would benefit the repository in a few ways:

  • It would allow me to implement the entire repository logic in pure Dhall, including rendering the Kubernetes resources as YAML

  • I would like to write certain test assertions to compare against a rendered YAML string instead of comparing against the equivalent Dhall value

    The reason why is that the Dhall value representing a Kubernetes resource might be enormous (with a lot of None field), whereas the corresponding rendered YAML value (with nulls filtered out) will be much more compact.

However, I assume this would also benefit other people, too, since this could eventually replace the dhall-to-yaml utility in some cases.

I can implement this utility myself but part of the reason for proposing this bounty is to begin creating a few representative expenses that potential donors can refer to as an example of how their donations could be used. I would also like to use these sorts of bounties to grow the pool of contributors to the Dhall ecosystem.

According to the expense guidelines I need to formally document the following:

  • What purpose is the expense for?

    To create a “pure Dhall” utility for rendering YAML

  • Is this a one-time or recurring expense?

    One-time

  • What is the amount that you wish to expense?

    $100

Also, the expense has to be approved by the same process that we approve changes to the language standard


#2

:white_check_mark:

How do you intend to coordinate the payout in this case?


#3

@singpolyma: I believe the way it works is that anybody can submit an expense here:

https://opencollective.com/dhall/expenses/new

… as long as:

  • they provide an invoice
  • a core contributor approves the expense

#4

@Gabriel439 great idea, big yes from me! :clap:


#5

It seems like this has been implemented by https://github.com/dhall-lang/dhall-lang/pull/799 . Thanks!


#6

Yep, and the expense was submitted and approved, so this was successful!