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

Programmer Humor

32558 readers
508 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] themoonisacheese@sh.itjust.works 291 points 6 months ago (4 children)

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

[–] seaQueue@lemmy.world 218 points 6 months ago (3 children)

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

[–] Aceticon@lemmy.world 57 points 6 months ago (1 children)

Just make it a LJM (Large JSON Model) capable of predicting the next JSON token from the previous JSON tokens and you would have massive savings in file storagre and network traffic from not having to store and transmit full JSON documents all in exchange for an "acceptable" error rate.

[–] seaQueue@lemmy.world 13 points 6 months ago

Hardware accelerated JSON Markov chain operations when?

load more comments (1 replies)
[–] NigelFrobisher@aussie.zone 33 points 6 months ago* (last edited 6 months ago) (2 children)

Latest Nvidia co-processor can perform 60 million curly brace instructions a second.

load more comments (2 replies)
[–] 0x0@lemmy.dbzer0.com 16 points 6 months ago
load more comments (1 replies)
[–] Randelung@lemmy.world 163 points 6 months ago (4 children)

Well, do you have dedicated JSON hardware?

[–] MareOfNights@discuss.tchncs.de 105 points 6 months ago (2 children)

Please no, don't subsidize anything Java-Script. It will only make it less efficient.

[–] xavier666@lemm.ee 59 points 6 months ago (6 children)

And thus JsPU was born from Lemmy

[–] ramble81@lemm.ee 25 points 6 months ago (3 children)

My thoughts on software in general over the past 20 years. So many programs inefficiently written and in 4th level languages just eats up any CPU/memory gain. (Less soap box and more of a curious what if to how fast things would be if we still wrote highly optimized programs)

[–] masterspace@lemmy.ca 35 points 6 months ago* (last edited 6 months ago)

Answer: there'd be far less software in the world, it would all be more archaic and less useful, and our phones and laptops would just sit at 2% utilization most of the time.

There's an opportunity cost to everything, including fussing over whether that value can be stored as an int instead of a double to save 8 bits of space. High level languages let developers express their feature and business logic faster, with fewer bugs, and much lower ongoing maintenance costs.

[–] InternetCitizen2@lemmy.world 18 points 6 months ago

Even if our apps used resources better the adware will just use the free space.

load more comments (1 replies)
[–] fleckenstein@social.lizzy.rs 24 points 6 months ago (7 children)
[–] Randelung@lemmy.world 23 points 6 months ago (3 children)

The R in ARM and RISC is a lie.

[–] ChaoticNeutralCzech@feddit.de 14 points 6 months ago* (last edited 6 months ago)

The website title says "Arm Developer", not "ARM Developer", in a clearly non-acronym way so it's a guide for making prosthetic hardware. Of course you want a cyborg arm to parse JS natively, why else even get one?

load more comments (2 replies)
load more comments (6 replies)
[–] WanderingCat@lemm.ee 15 points 6 months ago
load more comments (1 replies)
[–] XPost3000@lemmy.ml 120 points 6 months ago (5 children)

Everybody gangsta still we invent hardware accelerated JSON parsing

[–] Overtheveloper@lemmy.world 98 points 6 months ago (2 children)

https://ieeexplore.ieee.org/document/9912040 "Hardware Accelerator for JSON Parsing, Querying and Schema Validation" "we can parse and query JSON data at 106 Gbps"

[–] ByteJunk@lemmy.world 29 points 6 months ago (1 children)

I'm so impressed that this is a thing

load more comments (1 replies)
[–] vvvvv@lemmy.world 26 points 6 months ago (5 children)

106 Gbps

They get to this result on 0.6 MB of data (paper, page 5)

They even say:

Moreover, there is no need to evaluate our design with datasets larger than the ones we have used; we achieve steady state performance with our datasets

This requires an explanation. I do see the need - if you promise 100Gbps you need to process at least a few Tbs.

load more comments (5 replies)
load more comments (4 replies)
[–] 2deck@lemmy.world 106 points 6 months ago (3 children)

Render the json as polygons?

[–] Dasnap@lemmy.world 86 points 6 months ago (2 children)

It's time someone wrote a JSON shader.

[–] ApeNo1@lemm.ee 42 points 6 months ago (1 children)
load more comments (1 replies)
load more comments (1 replies)
[–] Lumisal@lemmy.world 16 points 6 months ago (1 children)

That just results in an image of JSON Bourne.

load more comments (1 replies)
[–] Xyloph@lemmy.ca 76 points 6 months ago (1 children)

That is sometime the issue when your code editor is a disguised web browser 😅

[–] icesentry@lemmy.ca 12 points 6 months ago

No, if you're struggling to load 4.2 mb of text the issue is not electron.

[–] vox@sopuli.xyz 57 points 6 months ago* (last edited 6 months ago) (1 children)

there are simd accelerated json decoders

[–] manmachine@lemmy.world 66 points 6 months ago (2 children)

every day we stray further from god

[–] xmunk@sh.itjust.works 21 points 6 months ago (4 children)

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

load more comments (4 replies)
load more comments (1 replies)
[–] model_tar_gz@lemmy.world 43 points 6 months ago (4 children)

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

Choose wisely.

[–] PrettyFlyForAFatGuy@feddit.uk 29 points 6 months ago (4 children)

200kg of steaming manure would be pretty sweet if you had a vegetable garden

[–] ByteJunk@lemmy.world 13 points 6 months ago (1 children)

Not sure if I'm just missing a reference here, but if you choose the pizza you can have both.

load more comments (1 replies)
load more comments (3 replies)
load more comments (3 replies)
[–] lustyargonian@lemm.ee 43 points 6 months ago (1 children)

CPU vs GPU tasks I suppose.

[–] Potatos_are_not_friends@lemmy.world 41 points 6 months ago (1 children)

GPU, render my 4.2 MB json file!

[–] pipe01@programming.dev 19 points 6 months ago

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

[–] jballs@sh.itjust.works 37 points 6 months ago (5 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 12 points 6 months ago (1 children)

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

[–] PsychedSy@lemmy.dbzer0.com 21 points 6 months ago (1 children)

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

[–] QuazarOmega@lemy.lol 14 points 6 months ago (2 children)
load more comments (2 replies)
load more comments (4 replies)
[–] MacNCheezus@lemmy.today 25 points 6 months ago

Someone just needs to make a GPU-accelerated JSON decoder

[–] fmstrat@lemmy.nowsci.com 24 points 6 months ago (1 children)
[–] bjornsno@lemm.ee 12 points 6 months ago (9 children)

Except if it's a single line file, only god can help you then. (Or running prettier -w on it before opening it or whatever.)

load more comments (9 replies)
[–] Andrew15_5@mander.xyz 17 points 6 months ago (15 children)
load more comments
view more: next ›