Sindre Sorhus

@sindre-sorhus · account

1 follower

Full-time open-sourcerer & indie Mac developer. Swift & Node.js.

mastodon.social ↗

I made this for my dad. He was using a crappy bloated app. I could not stand it.

“Bare” means “just” or “only” in Norwegian. Like “I just needed milk” but ended up buying everything except milk. In English, it also suggests something simple and stripped down. Fits a minimal shopping list app i think.

SOML comes with high-performance and well-tested implementations for 12 languages.

- JavaScript
- Swift
- Rust
- Python
- Go
- Ruby
- C++
- C
- Java
- Dart
- PHP
- Zsh

Also ESLint plugin, Prettier plugin, VSCode editor plugin, Sublime Text plugin.

And more integrations on the way.

Why not TOML?

SOML keeps TOML's predictable types, literal strings, and strict duplicate-key handling, while removing context-dependent table rules and inconsistent value parsing. It adds top-level arrays, block comments, comma-free multiline arrays, native durations, a unified instant type, canonical serialization, and standardized formatting. And fixes a bunch of things.

More here:

How is it different from my Folder Peek app?

Folder Peek is folders only: each folder can be its own menu bar item, with its own icon and keyboard shortcut. Super Menu is one menu for everything, with groups that can optionally only show when in a specific app. It also filters folders, makes smart folders, and shows Finder Saved Searches. Folder Peek is still fully maintained. Use Folder Peek if folders are all you need.

You can organize items into groups that are in a submenu or inline, you can add dividers, you can link in live folders, and folders can have filters and you can customize sorting, look, whether to show nesting or flat, icons size, file preview, etc. You can add files and choose which app they open with. You can add links and they can include placeholders, so when clicked you get a prompt.

...schemas. SOML has one block string style and fixed type rules.

- Consistent parsers. The 2022 YAML Test Matrix recorded 73 failures out of 402 tests for PyYAML. Parsers disagree on dates, leading zeros, and numbers like 1e3. SOML implementations use a shared suite of nearly 1000 tests.

- Fewer security risks. YAML aliases can enable YAML bombs, while unsafe tag loading has caused four 9.8-rated RCE CVEs in PyYAML. SOML has neither feature.

...

- Missing values are errors. YAML treats `timeout:` as null, and PyYAML even returns null for comment-only files. SOML rejects both.

- Indentation doesn't determine structure. YAML bans tabs in indentation. In SOML, indentation is insignificant except inside block strings.

- Simpler syntax. YAML has two block string styles with three newline-handling modes (6 syntaxes), indentation indicators, anchors, aliases, tags, multiple documents, three processing layers, and three recommended ...

What SOML fixes:

- Ambiguity. PyYAML turns country: `no` into false, `version: 10.23` into a float (but not 9.5.25), `zip: 01234` into 668 (octal), and `22:22` into 1342. All without warning.

- Keys are always strings. YAML allows integer keys like 1: x, while PyYAML even treats `on: x` as a boolean key, breaking JSON compatibility.

- Duplicate keys are errors. PyYAML silently keeps the last value, while YAML's spec ties duplicate detection to type resolution.

...

Why not YAML?

SOML borrows what I like about YAML: comments, no outer braces, and no unnecessary commas. But its biggest improvement is predictability: syntax determines types. `'no'` is a string, `1.1` is a float, and `2` is an integer.

Extra SOML features:

- Block comments with /* */
- Native durations like 3s and 3h5m
- Instant type
- Literal strings for paths and regexes without escaping backslashes
- Canonical form for hashing and signing
- A formatter that preserves comments & key order

I'm excited to launch:

SOML · A config format for humans

- Braceless top-level object
- Quoteless keys
- No unnecessary commas
- Comments
- Duration type

Draft spec. Feedback wanted.

https://soml.sh