this post was submitted on 08 Sep 2024
1221 points (98.3% liked)

Programmer Humor

32874 readers
599 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
(page 3) 38 comments
sorted by: hot top controversial new old
[–] [email protected] 12 points 4 months ago (12 children)

It is very cool, specifically as a human readable mark down / data format.

The fact that you can make anything a tag and it's going to be valid and you can nest stuff, is amazing.

But with a niche use case.

Clearly the tags waste space if you're actually saving them all the time.

Good format to compress though...

load more comments (12 replies)
[–] [email protected] 44 points 4 months ago (4 children)

I hate writing xml with a passion

load more comments (4 replies)
[–] [email protected] 5 points 4 months ago (1 children)

Balisage Paper: Fat Markup: Trimming the Fat Markup Myth one calorie at a time

https://www.balisage.net/Proceedings/vol10/html/Lee01/BalisageVol10-Lee01.html

XML is a fine format in comparison to JSON.

[–] [email protected] 6 points 4 months ago (1 children)

I hate writing and reading xml compared to json, I don't really care if one is slightly leaner than the other. If your concern is the size or speed you should probably be rethinking how you serialize the data anyway (orotobuff/DB)

load more comments (1 replies)
[–] [email protected] 9 points 4 months ago

AI is starting to get really smart

[–] [email protected] 13 points 4 months ago (1 children)

stuff like this is how reddit found out their users comments were being used 😂

[–] [email protected] 26 points 4 months ago (2 children)

I'm sorry which LLM is this? What are its settings? How'd you get that out of it?

And how did it give sources?

[–] [email protected] 57 points 4 months ago (1 children)

I’m sorry which LLM is this?

It's perplexity.ai. I like it because it doesn't require an account and because it can search the internet. It's like microsoft's bing but slightly less cringe.

How’d you get that out of it?

The screenshot is fake. I used Inspect Element.

[–] [email protected] 18 points 4 months ago (1 children)

perplexity.ai

Like DuckDuckGo's AI's, but with sources? Sounds cool, thanks!

fake

Ah... Too bad (:

[–] [email protected] 8 points 4 months ago (1 children)

Never knew that ddg had an LLM, will check it out. Thanks!

[–] [email protected] 12 points 4 months ago

It's a proxy for a number of LLMs of choice, prompts anonymised before they're sent. A bit like how their search engine is anonymised Bing, or how their maps are anonymised Apple Maps. I'm happy with the service!

load more comments (1 replies)
[–] [email protected] 36 points 4 months ago* (last edited 4 months ago) (1 children)

It’s not a waste of time… it’s a waste of space. But it does allow you to “enforce” some schema. Which, very few people use that way and so, as a data store using JSON works better.

Or… we could go back to old school records where you store structs with certain defined lengths in a file.

You know what? XML isn’t looking so bad now.

If you want to break the AI ask instead what regex you should use to parse HTML.

[–] [email protected] 11 points 4 months ago (2 children)

Had to work with a fixed string format years ago. Absolute hell.

Something like 200 variables, all encoded in fixed length strings concatenated together. The output was the same.

...and some genius before me used + instead of stringbuilders or anything dignified, so it ran about as good as lt. Dan.

load more comments (2 replies)
[–] [email protected] 69 points 4 months ago

a wate of time

[–] [email protected] 16 points 4 months ago

RSS/ATOM has to be the best thing to come out of XML

[–] [email protected] 90 points 4 months ago (1 children)

Wow, that's a very passive aggressive reaction. I enjoyed a lot.

[–] [email protected] 45 points 4 months ago (2 children)

This is what happens when stack overflow is used for training.

[–] [email protected] 20 points 4 months ago (1 children)

Not long before AI just tells me to google it, or read the manual.

load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 60 points 4 months ago (1 children)
[–] [email protected] 63 points 4 months ago* (last edited 4 months ago) (2 children)
[–] [email protected] 28 points 4 months ago (1 children)

Lots or file formats are just zipped XML.

I was ~~reverse engineering~~ fucking around with the LBX file format for our Brother label printer's software at work, because I wanted to generate labels programmatically, and they're zipped XML too. Terrible format, LBX, really annoying to work with. The parser in Brother P-Touch Editor is really picky too. A string is 1 character longer or shorter than the length you defined in an attribute earlier in the XML? "I've never seen this file format in my life," says P-Touch Editor.

[–] [email protected] 10 points 4 months ago* (last edited 4 months ago) (4 children)

Sounds like it’s actually using XSLT or some kind of content validation. Which to be honest sounds like a good practice.

load more comments (4 replies)
[–] [email protected] 7 points 4 months ago

The future if text documents were Json:

City_pic.png.xml

[–] [email protected] 141 points 4 months ago (5 children)
load more comments (5 replies)
load more comments
view more: ‹ prev next ›