💾 Archived View for soviet.circumlunar.space › ~hektor › tdl.gmi captured on 2023-09-08 at 16:22:08. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-29)

-=-=-=-=-=-=-

Tool Data Language (TDL)

TDL is a half-baked proposal by me to create a TOML-style data language roughly based on TCL but with heavy influence from Racket. It's a bit like Dumbdown but for data. The idea was to create something that is easy to write a parser for, for folks stuck on locked-down corporate machines with access to only an ancient IDE. I placed an emphasis on readability and avoiding braces. It's probably dumb, given that S-expressions are a thing. I haven't actually tried parsing any of this.

https://github.com/akbarnes/tdl

https://github.com/treenotation/dumbdown

A fun HN thread pointing out that Dumbdown is dumb

Rosetta code examples for writing an S-expression parser in most common languages

To create a key-value pairs

set b 32.5
set c false

Nothing special is needed for strings, though they need to be quoted

if they look like numbers or booleans

set g hello\nthere

To create a list

set amounts list 10 33 18

Create a hash

set h hash a 2 b 3 c 33.5

TCL $ evaluation is used to create nested data structures

set h2 hash a $amounts b $b

Intermediate variables can be cleared

clear b amounts