5 ms·
Human-Oriented Markup Language
- bmn__ 1y agoctrl+f grammar Term not found.
- xpe 1y agoMe like teh grammarz 2. Plays 4 author someday could put at https://github.com/huml-lang https://github.com/huml-lang then it slay
- xpe 1y ago> Provide as few ways as possible—preferably one—of representing something. TRUTH! Or, expressed in YAML 1.1 [1] y Y yes Yes YES true True TRUE on On ON As expressed in YAML 1.2 [2]: true
- jameskilton 1y agoI couldn't help but notice almost immediately one feature that is not human oriented, but most likely exists because it's easier for a machine to parse: single (":") vs double colon ("::"). This is not human-friendly. A human wants to write "key" "is" "value", and YAML has for a very long time supported a single ":" for "is" regardless of the actual type of the value. I shouldn't have to care about what the type of the value is when writing out effectively YAML. This double-colon feature will do nothing but lead to bug reports from people confused as to why their document is invalid.
- xpe 1y agoLanguage design often involves subjective tradeoffs. The author gives their rationale here: https://huml.io/specifications/v0-1-0/#why https://huml.io/specifications/v0-1-0/#why
- LordDragonfang 1y agoSlightly off-topic, but I find the text of that anchor fragment amusing ("why? just why?") and a little disappointing. Automatic CMSs have robbed us of attention to detail - that anchor (for "Why `::`?") should probably be changed to `why-double-colon`.
- Sohcahtoa82 1y agoThe double-colon is probably a necessity to disambiguate a scalar from an inline list that only has one scalar. For example `x: 3` would be equivalent to `"x": 3` in JSON, but `x:: 3` is equivalent to `"x": [3]`
- lucketone 1y agoMaybe author of huml will read: I would prefer mandatory braces for inline stuff. “X:: 3” feels like a trick question.
- SpaceNoodled 1y agoA trailing comma would also solve this, but is equally awkward. A clear list delimiter would work for both machines and humans.
- jampekka 1y agoI find this very human-friendly: "[double colon] permits vectors to be defined inline without additional syntax such as [ ... ] or { ... }." (One could question how human friendly it is to call lists and dicts "vectors" though...) https://huml.io/specifications/v0-1-0/#why https://huml.io/specifications/v0-1-0/#why
- sippeangelo 1y agoIt's especially clear in the "inline dict" example. I really like it! props:: mime_type: "text/html", encoding: "gzip" # Inline dict.
- OJFord 1y agoBut that's not done for human readability, that's done for machine parsing? A human would understand just as well: props: mime_type: "text/html", encoding: "gzip" # Inline dict.
- F3nd0 1y agoFor me, it’s clearer with a double colon. Not intuitive, but extremely easy to get used to. When I see the first colon introduce a list, I have to go out of my way to not see the other colons as introducing lists.
- lucketone 1y agoMy mind has a feeling that this might be possible interpretation: props: [mime: [html, encoding:[gzip]]] (Even if not legal, to be sure, I must backtrack and concentrate on this particular piece) There are many different humans. I definitely like the idea to separate “:: vs :”.
- xpe 1y agoThe comment above gives explanations defending subjective preferences about what "human oriented" means. That's fine as long as you remember that is what is happening: justification of subjective preferences. Other people can reasonably (or unreasonably) have different subjective preferences. Also notice what the commenter above haven't done (yet, maybe they will?): done a full "forest level" comparison of all the trade-offs between the current HUML specification and ... what is your alternative proposal, exactly? Based on my experience, I would guess that most people who design a language (and written a parser for it) for the first time will: (1) be surprised at how quickly design decisions snowball and lead to unexpected places; (ii) discover just how entangled design choices really are; (iii) will give up on trying to please everyone. In my view, a language designer does really well to describe one's motivations, goals, tradeoffs, decisions, and then live with what you make, because... (a) making something real and useful is rad and (b) any language you make will probably have some weird stank you can't seem to get rid of.
- DonHopkins 1y agoThe original designers of YAML explicitly declared in its name "Yet Another Markup Language" that it was designed to be a markup language, which it most certainly was not. Eventually somebody finally pointed out the mistake, and they sheepishly retronymed it "YAML Ain't Markup Language". https://stackoverflow.com/questions/6968366/if-yaml-aint-markup-language-what-is-it https://stackoverflow.com/questions/6968366/if-yaml-aint-mar... On the other hand, and to your points, Relax/NG (both its XML and simplified syntaxes) is a beautiful successful example of wisely and collaboratively designing a new clean powerful system with the deep understanding of what a markup language really is (James Clark was deeply involved with many SGML and XML standards and implementations), and full cognizance of the strengths and weaknesses of other systems you're trying to replace (SGML DTDs, XML Schemas, TREX, RELAX, XDuce, and other experimental XML schema languages). https://en.wikipedia.org/wiki/RELAX_NG https://en.wikipedia.org/wiki/RELAX_NG >In computing, RELAX NG (REgular LAnguage for XML Next Generation) is a schema language for XML—a RELAX NG schema specifies a pattern for the structure and content of an XML document. A RELAX NG schema is itself an XML document but RELAX NG also offers a popular compact, non-XML syntax.[1] Compared to other XML schema languages RELAX NG is considered relatively simple. RELAX NG Compact Syntax https://www.oasis-open.org/committees/relax-ng/compact-20021121.html https://www.oasis-open.org/committees/relax-ng/compact-20021... https://relaxng.org/jclark/design.html https://relaxng.org/jclark/design.html The Design of RELAX NG James Clark (jjc@thaiopensource.com) Abstract: RELAX NG is a new schema language for XML. This paper discusses various aspects of the design of RELAX NG including the treatment of attributes, datatyping, mixed content, unordered content namespaces, cross-references and modularity. [...] >Composability >RELAX NG is designed to be highly composable. A schema language (or indeed a programming language) provides a number of atomic objects and a number of methods of composition. The methods of composition can be used to combine atomic objects into compound objects which can in turn be composed into further compound objects. The composability of the language is the degree to which the various methods of composition can be applied uniformly to all the various objects of the language, both atomic and compound. For example, RELAX NG provides a choice element that can be applied uniformly to elements, attributes, datatypes and enumerated values. This is not mere syntactic overloading. The choice element has a single uniform semantic in all these cases and can have a single implementation. Another example is the grammar element, which is the container for definitions. The grammar element is just another pattern and can be composed in just the same way as other patterns. Composability improves ease of learning and ease of use. Composability also tends to improve the ratio between complexity and power: for a given amount of complexity, a more composable language will be more powerful than a less composable one. [...] >XML syntax RELAX NG uses XML instance syntax to express schemas. Although this makes for a rather verbose schema language, it has some major advantages. Since a user of an XML schema language must necessarily already learn XML instance syntax, using XML instance syntax for the schema language reduces the learning burden on a schema user. It also allows XML tools and technologies to be applied to the schema. For example, a schema can be used to specify the syntax of the schema language. Another important benefit of XML syntax is extensibility. RELAX NG has an open syntax that allows the RELAX NG defined elements and attributes to be annotated with elements and attributes from other namespaces. RELAX NG DTD Compatibility [12] uses this annotation mechanism to extend RELAX NG with a mechanism for declaring default values for attributes. RelaxNGCC [23] uses this annotation mechanism to allow users to embed Java code in RELAX NG schemas, which gets executed as an XML document is parsed against the schema. An unofficial non-XML syntax for RELAX NG has also been developed [8]. The non-XML syntax can be used for authoring RELAX NG schemas by hand and can then be transformed into the standard RELAX NG XML syntax for interchange. [...]
- vczf 1y agoThe clear distinction between scalars and vectors appears to be the main advancement HUML offers. I think it’s a neat improvement.
- deleted 1y ago[deleted]
- JoBrad 1y agoI found that example to be humerous, but specifically compared to the goals: > Provide as few ways as possible—preferably one—of representing something. Very Pythonic. Especially since representing a dict already has 2 ways, on the first page!
- sunrunner 1y ago> Especially since representing a dict already has 2 ways, And lists. > Pythonic Pythonic in the way that Python's 'There should be one...' is expressed through the existence of tuples, named tuples, dataclasses, regular classes and attrs (not part of the standard library but it seems to be as much of a goto as requests is)? ;)
- inerte 1y agoMaybe the plural of "is" is "are" :) But why double the character instead of picking another one... plenty of other non-alphanumeric characters to chose from.
- debo_ 1y agoI think we should have a name for the often undue examination and analysis of colon/semicolon usage in machine languages. I volunteer the name "colonoscopy."
- DonHopkins 1y agoAnd the obsession with inserting colons into things (and vice-verse) should be called "colonialism".
- renox 1y agoYour point is funny but if you're not anal-retentive about the syntax you get monstrosity such as the CSV-escape rule instead of the passwd-escape rule..
- xg15 1y agoThere would at least be some ambiguity with single-value lists otherwise: If numbers: 1, 2, 3 was a list, what would numbers: 1 be?
- jampekka 1y agoYou could have it like in Python tuples where 1 is a scalar and 1, is a tuple.
- CrimsonCape 1y agoIn my theory of "human-readability", odd double tokens like :: can exist successfully so long as there is sufficient utility and logic in the single token : Tokens are inseparable from human instincts of single = less, double = more and the corresponding emotions: single=less=easier=quicker, double=more=complicated=longer=difficult If you are not emphasizing the single token as them most common, it's going to cause confusion.
- troupo 1y ago"Human readability and editability above all else" would not chose significant whitespace for a markup language. IMO. Or restrictions like "only one space allowed after : before a value"
- ssivark 1y agoOn the contrary, such strictness makes it easy to lint / auto-format HUML.
- SpaceNoodled 1y agoThat's for computers, though, not humans.
- didip 1y agoWhy not just use YAML?
- vedmakk 1y agoBecause of the reasons presented in the actual article that was posted by op...
- captn3m0 1y agoSome context, this was launched at IndiaFOSS[0] yesterday 25 minute talk at https://www.youtube.com/live/AUrPdOZNsX8?feature=shared&t=13962 https://www.youtube.com/live/AUrPdOZNsX8?feature=shared&t=13... (starts 3h:52) The talk proposal is at https://fossunited.org/c/indiafoss/2025/cfp/arsnhack6n https://fossunited.org/c/indiafoss/2025/cfp/arsnhack6n And it primarily tries to avoid YAML horrors : https://noyaml.com/ https://noyaml.com/ and https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-fr.... [0]: https://fossunited.org/indiafoss/2025 https://fossunited.org/indiafoss/2025
- beckford 1y agoFor something like this I would love to see a formal spec to go along with the examples.
- Jolter 1y agoI do appreciate that they lead with the examples. They convey 90% of the important information. TBH, having worked with yaml just enough to get by with k8s deployments, I could immediately spot how this would be an improvement.
- beckford 1y agoYeah, I don't disagree. I'd go further and say the examples are on-point for a "human oriented" language. But the formal spec reveals how simple or complicated this language is. (And I'm also writing this from the perspective of someone who uses a programming language that does not have a HOML implementation).
- LordDragonfang 1y agoI was googling for the repo, and it looks like this project has a name collision with an 11-year-old, 3-star repo: https://github.com/shelling/huml https://github.com/shelling/huml
- NoSalt 1y agoThis is the main reason why YAML and Python are bad. Give us CLEAR beginnings and ends to code statements and blocks, not these dubious beginnings and ends. Ignore white space and use clear EOL delineation. Clearly, XML and JSON are superior to YAML and even this weird-looking HUML. Not to mention almost any other language syntax being superior to Python.
- kelvinjps 1y agoI think it's a preference? I find both Python and YAML to give clear beginnings and ends using whitespace, and you can also see it visually.
- wpm 1y agoThere are plenty of times in Python and YAML I cannot visually figure out where some block ends. JSON prevents this by explicitly closing lists and dicts. Though you do end up with Ladders to Heaven of `}`'s and `]`'s where you have no goddamn clue what is actually being closed out. XML prevents this by explictly stating what element was just closed. Deeply nested XML, provided the elements don't have some 300 character set of attributes all jammed into the opening element, is vastly easier to read than YAML.
- LordDragonfang 1y ago> There are plenty of times in Python and YAML I cannot visually figure out where some block ends. I might understand this objection for YAML, but for python, it's very clear: a block ends whenever the content on the next line is indented by four fewer spaces. (And lists and dicts are explicitly closed with brackets) If you're talking about matching block starts to ends, then that's just as bad in json, if not worse; without an editor that does brace coloring, it's almost impossible to eyeball which brace goes to which block without indenting (which is the whole point of significant whitespace). > Deeply nested XML, provided the elements don't have some 300 character set of attributes all jammed into the opening element, is vastly easier to read than YAML. Not really. More often than not, tags are visual noise that make it harder to scan for the actual content. I have to read a lot of deeply nested XML for part of my job, and I wrote a parser to display it as YAML precisely because it's more readable. If your data is so convoluted that you need xml tags to make sense of it, that's usually a sign you need to either refactor it, or provide a proper display tool.
- xg15 1y agoJSON5 allows comments. Can someone explain to me what is so horrible about curly braces that we need a whole host of "human-friendly" configuration languages with nontrivial parsing just to get around them?
- tracker1 1y agos/JSON/YAML/g s/curly braces/whitespace/g
- to11mtm 1y agoWell in that case, it's all the ways that IDEs like to jank up whitespace, as well as the additional difficulty knowing 'context'. With JSON it's fairly easy for me to know if I want to end my structure as well as the structure containing it, I can just type }}, and add the next element. With whitespace you have to keep track of HOW MUCH whitespace, and trust me once you've got people who are entirely inconsistent with how much whitespace they use it becomes a huge PITA.
- tracker1 1y agoMy point was the arguments are much the same for any human edited, computer parsed format. As for whitespace, you can set many IDEs to display placeholder markers if you want to go that route, it does help with visualizing horizontal alignment. I find that paste/format on copy/paste with YAML can be kind of troublesome too though... I have an exception in my vscode settings file for that format, my default is format on paste and save.
- sigmonsays 1y agoI prefer curly braces. My editor has all sorts of comments to jump between opening and closing curly braces. This is not possible with whitespace.
- wpm 1y agoDon't ask me, I don't even know what was so bad about XML tags.
- slowmovintarget 1y agoPosting a link to the XKCD comic would be a cliche at this point, yes?
- romperstomper 1y agoyeah, the 15th standard.. https://xkcd.com/927/ https://xkcd.com/927/ :)
- sigzero 1y agoXKCD predicting the future so well! :)
- insane_dreamer 1y agoI like the idea of using `::` to denote a vector value.
- kelvinjps 1y agoWasn't this solved by yaml 1.2?
- SpaceNoodled 1y agoOh good, another even more confusing YAML alternative that still offers less functionality, flexibility and readability than JSON.
- AlienRobot 1y agoYou could say the same thing about JSON compared to XML.
- sigzero 1y agoData only for JSON, it lacks just like everything else as a configuration language. Arguments against I have seen are too verbose, too strict, and no comments. I am sure there are more.
- SpaceNoodled 1y agoIt's not more verbose than this markup; strictness is only necessary for disambiguation; and comments are part of JSON5.
- burnt-resistor 1y agoOh lord. We already have TOML, which is an improvement on limited JSON when a human-readable, easily-diffable, more flexible format is needed. We don't even need HCL (offers little value), YAML (has too many features making it inherently less secure), XML (is a mess with too many features and too much verbosity), or INI (insufficient features) except for existing and historical reasons. In cases where a single file is attempted to be managed by multiple, competing interests, it's probably better to split the file into multiple, modular/include files like *.d/* so there would be less chances for merge conflicts. And then there's /{proc,sys}-like configuration with one "value" per file where the path forms the heirarchy. Please. Just. Stop reinventing wheels that were already round enough.
- zahlman 1y agoIf the goal is to look similar to YAML and fix its problems and assert itself as something that's needed in a world with YAML, the introduction should probably explicitly call out some clear differences.
- kazinator 1y agoThe buttstock of a rifle, trigger and other operating details are "human oriented" and the muzzle end is also frequently "human oriented". Not sure which one we have here.
- R_D_Olivaw 1y agoThanks for the chuckle.
- kardianos 1y agoMy only pet peeve: can we define decimals as dec128 rather then float64 in configuration files?
- romaniv 1y agoReminder: you can use indentation to encode s-expressions. The result is very easy to parse and easy to read provided the underlying data structures are not insane. https://srfi.schemers.org/srfi-49/srfi-49.html https://srfi.schemers.org/srfi-49/srfi-49.html
- skerit 1y agoStrictly 2 spaces for indentation? What's human about that.
- bvrmn 1y ago`::` is quite strange. 1) It only allows to resolve nesting conflicts for a single level. 2) Could be hard to read and could lead to reasoning mistakes. 3) Looks like an attempt to differentiate HUML from YAML somehow.
- mrbluecoat 1y agoIt's like YAML and MD had a baby
- sgarland 1y agoI don’t hate this nearly as much as I hate YAML. Now get everyone else to adopt it - good luck.
- braebo 1y agoLSP is the only thing that matters to me, regardless of the language I’m evaluating. Weeks of my life have been reclaimed thanks to TypeScripts LSP. All configuration languages suck in Monaco, so much so that I would rather use C# or TS to generate a config with docs in the tooltips, red squiggles under my typos, and location-aware autocomplete.