kellogh,
@kellogh@hachyderm.io avatar

imo XML gets a lot of hate because it's for semi-structured data but people used it for structured data.

if you have text and you want to imbue more meaning on top of it, XML kicks serious ass

leoncowle,
@leoncowle@hachyderm.io avatar

@kellogh Kinda like what html does for text? I <em>really</em> like what you said. (if I'm understanding your post correctly).

kellogh,
@kellogh@hachyderm.io avatar

@leoncowle yeah, but you can use it for a lot more than just displaying. like you could annotate the parts of speech in a sentence. or break down a book into chapters and passages. or annotate who said what, or where an idea came from

leoncowle,
@leoncowle@hachyderm.io avatar

@kellogh Definitely has its place, for sure. It's just So. Damn. Ugly. to look at 😂

john,
@john@sauropods.win avatar

@leoncowle @kellogh yeah, I think that’s the real reason it gets hate. It’s verbose and ugly.

I haven’t seen a nicer replacement though. I parallel-invented JSONml to use for templating on my site, and let me tell you, it’s just as ugly.

kellogh,
@kellogh@hachyderm.io avatar

@john it was popular when i started my career and the reason i hated it was that it didn’t map to objects very well, e.g. there isn’t one single way to represent an array.

it’s actually not that verbose (depending on how you represent objects and arrays), and imo asthetics aren’t a great metric for choosing technology since it’s so volatile over time.

another reason was the ecosystem — it got complicated fast

@leoncowle

john,
@john@sauropods.win avatar

@kellogh @leoncowle yeah, it doesn’t map to objects because it’s a different type of structure, right? A necessary one too!

I think aesthetics are more important than many people think, as it goes to readability. I suffer from very poor comprehension of code, and noisy syntax kills me.

kellogh,
@kellogh@hachyderm.io avatar

@john @leoncowle fwiw, xml can be written just about as compactly as toml

<person
name="Tim"
handle="@kellogh"
/>

There's really not a lot of extra cruft there.

john,
@john@sauropods.win avatar

@kellogh @leoncowle yeah, as I said earlier, I haven’t seen a better alternative. I think angle brackets are quite ugly in text, it might be as simple as that.

I mean, in your example you could be using white space and ditch the brackets, but that doesn’t work for other structures.

kellogh,
@kellogh@hachyderm.io avatar

@john @leoncowle my issues with whitespace-only is that it fails the "partial transfer" test. i've seen a ton of times when a file gets half-transferred (for a lot of dumb reasons). i like formats with delimiters so that the file doesn't parse if it wasnt' fully transferred

e.g. you should be able to delete half the file at any point and it should no longer parse

passes: json, xml
fails: toml, yaml

john,
@john@sauropods.win avatar

@kellogh @leoncowle good point. I do generally like white space syntax for reading and writing, but it’s got some limitations for sure. How do you do <inline>tokens</inline> for example?

kellogh,
@kellogh@hachyderm.io avatar

@john @leoncowle like that. i think the inline xml approach is far superior for markup.

the slack api uses json for markup, and it's really hard to read because they chop up the spans of text into different objects

https://api.slack.com/reference/block-kit/blocks#rich_text_quote

leoncowle,
@leoncowle@hachyderm.io avatar

@kellogh @john Love this thread so far! PS Tim, I think John was saying (agreeing) that the XML <inline>tokens</inline> would be difficult to do in white space syntax (‘it's got some limitations, for sure’), not asking how you'd do it. :-)

john,
@john@sauropods.win avatar

@leoncowle @kellogh Indeed, the inline tokens thing is something I’ve thought about a lot, since I sort accidentally invented the javascript templating thing I used for my site which I called “Jarkdown” (javascript objects + markdown for inline html bits and bobs). It's certainly no nicer than XML.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • modclub
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • cubers
  • GTA5RPClips
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • tacticalgear
  • ethstaker
  • kavyap
  • Durango
  • anitta
  • everett
  • Leos
  • provamag3
  • mdbf
  • ngwrru68w68
  • cisconetworking
  • tester
  • osvaldo12
  • megavids
  • khanakhh
  • normalnudes
  • JUstTest
  • lostlight
  • All magazines