Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today. Learn more →
Jsonnet Functional Projects
-
Project mention: That people produce HTML with string templates is telling us something | news.ycombinator.com | 2023-05-26
Apologies for the lack of context, and for missing this comment until today.
Both are tools for defining kubernetes manifests (which are YAML) in a reusable manner.
Jsonnet is a formally specified extension of JSON. It’s essentially a functional programming language (w/some object oriented features) that generates config files in JSON/YAML/etc, so it’s straightforward to determine whether an input file is valid, and to throw an error that points to an exact line if it’s not. It has a high learning curve, especially for people whose only experience is with imperative languages.
Helm charts also generate YAML/JSON config files, but they use Go templating. This is easier and faster to understand, since it’s mostly string substitution and not much logic (there’s conditionals, iterators, and very basic helper functions). Unfortunately a simple typo or mistake can cause errors that are difficult to diagnose (the message may indicate a problem far away in code from the actual mistake). It can also generate output that’s valid according to the string templating rules, but not what was intended, which can be very confusing to debug.
Despite these shortcomings, the vast majority of kubernetes applications are distributed as helm charts. I understand why things ended up this way, but I still wish it were more common for people to invest the upfront effort to learn the superior tool, so it could be more widespread.
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Jsonnet Functional related posts
- Jsonnet – The Data Templating Language
- Jsonnet – The Data Templating Language
- Jsonnet – The Data Templating Language
- Learning YAML, I can't unsee this
- Nginx ingress controller: how to insert whitelist-source-range annotations globally, but conditionally at the same time?
- Show HN: Jsonnet Course Online
- No comment
-
A note from our sponsor - SonarLint
www.sonarlint.org | 7 Jun 2023
Index
Project | Stars | |
---|---|---|
1 | jsonnet | 6,266 |