this post was submitted on 14 May 2024
14 points (100.0% liked)

Programmer Humor

35334 readers
1 users here now

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

Rules:

founded 6 years ago
MODERATORS
 
top 27 comments
sorted by: hot top controversial new old
[–] themoonisacheese@sh.itjust.works 3 points 2 years ago (2 children)

Maybe it's time we invent JPUs (json processing units) to equalize the playing field.

[–] 0x0@lemmy.dbzer0.com 1 points 2 years ago
[–] seaQueue@lemmy.world 1 points 2 years ago

The best I can do is an ML model running on an NPU that parses JSON in subtly wrong and impossible to debug ways

[–] lustyargonian@lemm.ee 1 points 2 years ago (1 children)

CPU vs GPU tasks I suppose.

[–] Potatos_are_not_friends@lemmy.world 1 points 2 years ago (1 children)

GPU, render my 4.2 MB json file!

[–] pipe01@programming.dev 1 points 2 years ago

I'm afraid I can't do that, Dave

[–] XPost3000@lemmy.ml 1 points 2 years ago

Everybody gangsta still we invent hardware accelerated JSON parsing

[–] MacNCheezus@lemmy.today 1 points 2 years ago

Someone just needs to make a GPU-accelerated JSON decoder

[–] Randelung@lemmy.world 1 points 2 years ago

Well, do you have dedicated JSON hardware?

[–] Ironfacebuster@lemmy.world 1 points 2 years ago

Rockstar making GTA online be like: "Computer, here is a 512mb json file please download it from the server and then do nothing with it"

[–] 2deck@lemmy.world 0 points 2 years ago (1 children)

Render the json as polygons?

[–] Dasnap@lemmy.world 1 points 2 years ago

It's time someone wrote a JSON shader.

[–] model_tar_gz@lemmy.world 0 points 2 years ago (1 children)

Would you rather have 100,000 kg of tasty supreme pizza, or 200 kg of steaming manure?

Choose wisely.

[–] Buttons@programming.dev 0 points 2 years ago (1 children)

Careful, the 100,000 kg of pizza will turn into manure.

[–] model_tar_gz@lemmy.world 1 points 2 years ago

I figure I can probably convert about 10 kg into manure before it autoconverts into compost. Which is maybe even a worse problem.

[–] jballs@sh.itjust.works 0 points 2 years ago (1 children)

I have the same problem with XML too. Notepad++ has a plugin that can format a 50MB XML file in a few seconds. But my current client won't allow plugins installed. So I have to use VS Code, which chokes on anything bigger than what I could do myself manually if I was determined.

[–] seaQueue@lemmy.world 0 points 2 years ago (1 children)

Time to train an LLM to format XML and hope for the best

[–] PsychedSy@lemmy.dbzer0.com 1 points 2 years ago (1 children)

Do we need a "don't parse xml with LLM" copypasta?

[–] QuazarOmega@lemy.lol 1 points 2 years ago
L arge  
L regex  
M odel
[–] AusatKeyboardPremi@lemmy.world 0 points 2 years ago (2 children)

Given it is a CPU is limiting the parsing of the file, I wonder how a GPU-based editor like Zed would handle it.

Been wanting to test out the editor ever since it was partially open sourced but I am too lazy to get around doing it

[–] icesentry@lemmy.ca 1 points 2 years ago

That's not how this works, GPUs are fast because the kind of work they do is embarrassingly parallel and they have hundreds of cores. Loading a json file is not something that can be trivially parallelized. Also, zed use the gpu for rendering, not reading files.

[–] agelord@lemmy.world 0 points 2 years ago (1 children)

As far as my understanding goes, Zed uses the GPU only for rendering things on screen. And from what I've heard, most editors do that. I don't understand why Zed uses that as a key marketing point

[–] porous_grey_matter@lemmy.ml 1 points 2 years ago

To appeal to people who don't really understand how stuff works but think GPU is AI and fast

[–] vox@sopuli.xyz 0 points 2 years ago* (last edited 2 years ago) (1 children)

there are simd accelerated json decoders

[–] manmachine@lemmy.world 0 points 2 years ago (1 children)

every day we stray further from god

[–] xmunk@sh.itjust.works 0 points 2 years ago (1 children)

Don't worry, they still make extensive use of regexes.

[–] dan@upvote.au 1 points 2 years ago

I didn't think any JSON parsers used regex given how simple the grammar is... but I've seen some horrors, so I shouldn't rule it out.