423
all 45 comments
sorted by: hot top controversial new old
[-] Blackmist@feddit.uk 48 points 2 months ago

RSS is what we had before algorithms that just pick adverts and far right fuckery.

[-] AbsoluteChicagoDog@lemm.ee 6 points 1 month ago

Legit we should go back

[-] state_electrician@discuss.tchncs.de 27 points 2 months ago

I am so old that I worked with SGML. Compared to that, XML is a lovely language. And sometimes I still miss writing XSLT to quickly transform some XML documents. These days you can do similar things with JSON, of course. But it's not as easy and standardized as the XML tooling.

[-] vk6flab@lemmy.radio 25 points 2 months ago

Reddit support to the rescue..

[-] muntedcrocodile@lemm.ee 23 points 2 months ago

Json is superior and thats a hill im willing to die on

[-] Skates@feddit.nl 10 points 1 month ago

That's silly, if Json was superior the web would be using HTJson, not HTML.

[-] muntedcrocodile@lemm.ee 2 points 1 month ago

Most of the data driven web already does. Whats the fediverse run on?

[-] JaddedFauceet@lemmy.world 1 points 1 month ago

it is HTJS now

[-] ripcord@lemmy.world 6 points 1 month ago* (last edited 1 month ago)

(YAML has entered the fight!)

(Edit: incidentally, I'm not saying YAML is the best. JSON is possibly the one I hate thr least. But I do hate them all!)

[-] derpgon@programming.dev 18 points 1 month ago

All JSON is valid YAML

[-] blackstrat@lemmy.fwgx.uk 19 points 2 months ago

XML is a superior format to Json or yaml or any of those other trendy formats around today. It's the hill I'm willing to die on because I'm right.

[-] anyhow2503@lemmy.world 93 points 2 months ago

XML aims to be both human-readable and machine-readable, but manages neither. It's only really worth it if you actually need the complexity or extensibility, otherwise it's just a major pain to map XML structures to any sensible type representation. I've been forced to work with some of the protocols that people like to present as examples of good XML usage and I hate every single one of them.

Fuck YAML though. That spec is longer and more complex than any other markup language I know of and it doesn't have a single fully compliant implementation.

[-] youRFate@feddit.org 25 points 2 months ago

Ye, we like to use toml for configuration files etc.

[-] corroded@lemmy.world 24 points 2 months ago

I'm okay with the "human-readability," but I've never been happy with the "machine-readibility" of XML. Usually I just want to pull a few values from an API return, yet every XML library assumes I want the entire file in a data structure that I can iterate through. It's a waste of resources and a pain in the ass.

Even though it's not the "right" way, most of the time I just use regex to grab whatever exists between an opening and closing tag. If I'm saving/loading data from my own software, I just use a serialization library.

[-] i_am_not_a_robot@feddit.uk 7 points 2 months ago

Yep, it's a PITA to parse and get the values you want. Much prefer JSON. Recently when I needed to parse XML I ran it through an XML to JSON library. Much easier!

If you need to parse XML just for RSS though, it isn't so bad as there are RSS specific libraries which take most of the pain away.

[-] MagicShel@programming.dev 4 points 2 months ago
[-] corroded@lemmy.world 3 points 1 month ago

I appreciate the suggestion, but that looks like a Java library. Interpreted languages make me feel dirty. Java makes me feel even dirtier. If it's not C, C++, or ASM, is it really worth using?

[-] MagicShel@programming.dev 2 points 1 month ago

Idk. Been doing it for nearly 20 years and before that I was doing IBM's take on VBScript for another 10. So I have my own perspective there. I've only ever had to parse massive xmls when doing web apps, and for web backends I really only like Java and NodeJS.

But everyone is entitled to their own take. I would imagine there is a streaming parser in other languages as well.

[-] GTG3000@programming.dev 0 points 1 month ago

Yeah, I remember when I was trying to parse XML into some lua tables and it forever stumped me how to represent something like

<thing important_param=10 other_param="abracadabra"> stuff </thing>

You just have to have different ways to turn different tags into stuff in your program and that's a huge amount of overhead to think about when all I want is a hash map and maybe an array.

[-] cryptiod137@lemmy.world 23 points 2 months ago
[-] magic_lobster_party@fedia.io 94 points 2 months ago

It makes you want to die on a hill

[-] bhamlin@lemmy.world 9 points 2 months ago

Fact. An unfortunate one, but still a fact.

[-] Sphks@lemmy.dbzer0.com 5 points 2 months ago

From my point of view : it has a hudge ecosystem with tons of robust libraries. This does not make it perfect, but for an industrial point of view, you don't look for new shiny clean things. (My point of view is 15 years old yet...)

[-] magic_lobster_party@fedia.io 14 points 2 months ago

I think JSON is more robust than XML by now. Mostly due to its simplicity. There are few reasons why anyone would pick XML over JSON these days.

[-] i_am_not_a_robot@feddit.uk 21 points 2 months ago

I can only assume you've never tried to parse or read XML.

[-] shield_gengar@sh.itjust.works 15 points 2 months ago

JSON, which has been around since 01, is trendy?

[-] key@lemmy.keychat.org 14 points 2 months ago

Something being "old" is totally unrelated to whether it's trendy. See: virtually every food and fashion trend.

[-] ripcord@lemmy.world 1 points 1 month ago

Trendy also isn't the same as popular or preferred.

[-] shield_gengar@sh.itjust.works 2 points 1 month ago* (last edited 1 month ago)

Ah, alright. Trendy does have a negative connotation with it as well; as opposed to "established" i.e. this trend will pass. Also, note the addition of "data formats that are around today" is clearly a jab at the age of JSON and nothing else.

Saying the data format that's easier to work with and parse while being nearly as old is trendy, is kinda disingenuous, no?

[-] RonSijm@programming.dev 12 points 2 months ago

Uh-huh... ever tried to integrate with a poorly implement WCF service? Like communication from a Java service to a dotnet service through a WSDL?

I'll take a json API over XML any day

[-] nogooduser@lemmy.world 11 points 2 months ago

I’m not sure that’s the fault of XML though.

It’s more the fault of the implementation and documentation.

We have a WCF service with an odd configuration and nobody has been able to integrate with it that didn’t use Microsoft tools. It’s definitely not XML’s fault.

(That service has been replaced with a REST API now)

[-] RonSijm@programming.dev 5 points 2 months ago* (last edited 2 months ago)

It’s more the fault of the implementation and documentation.

Yea sure. Though it's slightly XMLs fault for allowing that kinda implementations. Every random thing is in it's own obscure namespace with 20 levels of nested objects in different namespaces, and if you get anything wrong it barely explains what's wrong, and just refuses to work.

It's mostly WCFs fault. I just automatically associate XML with nightmare flashbacks of implementing WCF stuff

[-] red@sopuli.xyz 9 points 1 month ago

As someone who works with both, readability is the utmost important thing for me, and XML is cumbersome and has more characters to sift through to find what I'm lookin for.

[-] banshee@lemmy.world 5 points 1 month ago

I don't miss XML, but at least it has support for comments. On the other hand, I wish whitespace in XML wasn't significant. JSON needs to die in favor of JSON 5.

[-] Moldy@lemmy.zip 1 points 1 month ago* (last edited 1 month ago)

Nah, XML is just a slightly older fad. Let's go back to S Expressions. They've been in use for over 60 years and have significantly better readability.

[-] 1984@lemmy.today 8 points 2 months ago

Lol this is actually true.

[-] ripcord@lemmy.world 8 points 1 month ago

This seems like a weird answer to the question, though.

[-] sip@programming.dev 4 points 1 month ago

imo, it's fake as it's a "wate of time"

[-] fin@sh.itjust.works 6 points 2 months ago

I’m struggling with it right now

[-] Skates@feddit.nl 1 points 1 month ago* (last edited 1 month ago)

Wow, a wate of time, he even left out the 's' to save time. This is how you know he's a good programmer, others never bother to optimize unneeded characters out of their comments.

this post was submitted on 09 Sep 2024
423 points (95.9% liked)

Programmer Humor

19488 readers
856 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS