50 points microflash 3 hours ago 44 comments
paulddraper 2 hours ago | parent
I'm curious for example configs that are top-level lists?
priomsrb 1 hour ago | parent
Or it could be a list of records:
{name: 'Alice', age: 42}
{name: 'Bob': age: 44}
arionmiles 2 hours ago | parent
drvd 2 hours ago | parent
brianm 2 hours ago | parent
I think cue is better thought of as a language you use to generate JSON (or yaml, or, let's be honest, k8s flavored yaml) configs rather than a config language you use in your app.
CodesInChaos 2 hours ago | parent
1. The readme doesn't make it clear what its "float" type is. A double, a decimal, implementation defined. I'm generally not a fan of restricting numbers to what a double can represent, like toml does.
2. It doesn't have a good way to model key-value pair like types such as tagged unions, polymorphic types, or function invocations. Simply allowing a key-value pair as a value (right associative) where the key is a string matching the keys of an object would fix this. Alternatively a function call syntax would fix this, which would also enable tuples as a concept distinct from arrays.
bjacobso 1 hour ago | parent
I’ve been building Forma (https://forma-lang.com), a small typed Lisp aimed at that zone. Everything is (head args...), so a tagged value and a call are the same syntax, and you declare the vocabulary yourself:
(job nightly-export
:schedule "0 3 * * *"
:retry (backoff :max 5))
job and backoff are forms you define with typed holes. The checker reports errors at the line you wrote, even after macro expansion. The output is plain JSON (or generated Effect TypeScript, but could target any language), so the app reading it doesn’t embed the language.lightandlight 2 hours ago | parent
I don't want to read Claude's interpretation of why your project matters. I want you to tell me directly.
functionmouse 1 hour ago | parent
there's a very good chance there's no human involvement at all in this
dvirsky 21 minutes ago | parent
ModernMech 20 minutes ago | parent
They look like a human to me.
petre 1 hour ago | parent
microflash 1 hour ago | parent
[0]: https://github.com/soml-lang/soml/blob/main/comparison.md
catlifeonmars 1 hour ago | parent
I think where TOML shines is when your configuration schema is relatively flat and simple. If you want to heavily nest configuration it can quickly get difficult to read. I’d love a more limited version of TOML that restricts the nesting depth.
priomsrb 1 hour ago | parent
It would be great if you had a simple website that allowed you to enter SOML and see the JSON side-by-side (similar to typescript playground https://www.typescriptlang.org/play/).
catlifeonmars 1 hour ago | parent
> CVE-2026-44244 injected a [core] section into .git/config for code execution.
Git config is not TOML. It’s an ini-based bespoke syntax
> SOML needs quotes for a literal dot.
So does TOML, the dot notation is for nested keys. You use quotes for a literal dot.
——
FWIW I like the decision to have a first class duration type.
joshheitzman 1 hour ago | parent
A GUI is a config format for humans as it can you show what all of the configuration options are along with text that tells you what they do. A GUI can also ensure that there are no invalid settings that are discovered separately from the edit session (sure it may not do so, but it has the possibility unlike whatever random text editor the user opens the config in).
Yasuraka 56 minutes ago | parent
> 'the name': 'quotes are the escape hatch, when a key needs spaces'
To quote David Fincher:
> They know you have computers and can show a Tyrannosaurus Rex eat a car, so they know you can do anything. The question is: what don't you do, not what do you do.
Constraints liberate; I wish people tended to more strictness. I had plenty of stumbling over "features", asking myself who couldve ever needed them. This particular one also irked me about CUE.
But that's just a nit.
walthamstow 20 minutes ago | parent
ActionHank 56 minutes ago | parent
I'm guessing so you don't need to learn them, so then anyone off the street can edit the files, but it will break so bad without those guardrails, usually in some non-obvious way.
Leading us back to inventing some new "human" thing, but with more implicit rules, and the cycle continues.
econ 31 minutes ago | parent
Trying to remove a required number the last remaining digit is highlighted so that you can type over it.
nine_k 7 minutes ago | parent
But they added syntax, such as unit specifiers for time.
And some syntax, like YAML bare strings, or XML entities referring to external resources, has to be removed.
layer8 55 minutes ago | parent
This seems both underspecified and incorrect. Assuming a single-precision binary IEEE 754 floating-point number, 10.20 is actually 10.19999980926513671875. With double precision, it would be 10.199999999999999289457264239899814128875732421875. So what you see is not what you get, and it’s also unclear what exactly you’ll get.
> A value's type comes from its syntax, never from its content […] allowed-origins: [ 'https://example.com' 'https://example.org' ]
This looks like URLs, but are strings. What if you had:
> allowed-origins: [ 'httpș://example.com' 'ħttps://example.org' ]
Still strings and therefore fine for the SOML parser, but probably not a valid configuration in terms of the application-level types of the values. The syntax telling you the types is of limited utility as soon as the application schema has more specific ideas about the types than the configuration language.
sscaryterry 53 minutes ago | parent
umvi 52 minutes ago | parent
Pet peeve of mine, but I would argue that it's better to always keep units baked into the key.
If you have:
timeout_s: 30
Then unit information will never be lost, because the unit is always marshalled as a part of the key name and you don't have to worry if the target language has a duration type or not.If you have:
timeout: 30s
Then unit information probably won't be lost, but could in the following scenarios:- Target language doesn't have duration types (looking at the list - Ruby?)
- If you ever need to convert to/from a data format without durations like JSON
So basically you have to use SOML across your entire stack and always use languages that have native duration types, and also you have to be careful never to convert SOML to/from JSON (which is highly likely if you ever have to interface with external APIs). Do any of those things and you'll likely run into a unit confusion scenario at some point.
But there are going to be lots of configs that won't have native type like size. Again, just include units in key:
max_size_bytes: 30000000
In conclusion, my opinion is to KISS by including units in the key name and by sticking to bool/number/string primitives, hence why I almost always use JSON for everything (though if I could be granted one wish, it would be for JSON spec to allow for dangling commas)vbezhenar 47 minutes ago | parent
umvi 34 minutes ago | parent
Ruby:
config = SOML.load_file('config.soml', symbolize_names: true)
config[:timeout] # what are the units? uses SOML::Duration non-Ruby type
Even worse if you ever convert to/from JSON. My opinion is that config files should be as dumb and simple as possible. If you want humans to be able to read/write fancy stuff like "72h" for config, build a UI layer for the human to use in front of the config. Then they can click a little calendar icon to select the date. The backing config uses dumb iso 8601 string instead of a magical date type baked into the config language.sedatk 45 minutes ago | parent
hk1337 39 minutes ago | parent
yoyohello13 39 minutes ago | parent
ModernMech 14 minutes ago | parent
tln 19 minutes ago | parent
1. You should mention TOML in your first paragraph. "Why not TOML" exists at the end
2. how often are "instants"/dates really specified? Are you baking this in for TOML parity?
If you want leaner, drop this. If nothing else it's a lot of grammar.
If you want to lean in to "A value's type comes from its syntax", I'd suggest taking a cue from postgres and JS -- extensible literals. With JS tagged literals it would look like date`2026-09-19T14:00:00Z`. Conforming readers can fall back.
I'd use ver`3.1.0` 1000x more in config files than dates... I do like durations being baked in though.
Solid improvements over TOML and YAML.
nine_k 10 minutes ago | parent