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

Programmer Humor

32162 readers
658 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 28 points 4 months ago (4 children)

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

[–] seaQueue@lemmy.world 16 points 4 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 6 points 4 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 6 points 4 months ago

Hardware accelerated JSON Markov chain operations when?

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

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

[–] JackbyDev@programming.dev 2 points 4 months ago

60 million CLOPS? No way!

load more comments (1 replies)
[–] ApeNo1@lemm.ee 2 points 4 months ago

JSON and the Argonaut RISC processors

[–] 0x0@lemmy.dbzer0.com 2 points 4 months ago
[–] Randelung@lemmy.world 11 points 4 months ago (2 children)

Well, do you have dedicated JSON hardware?

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

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

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

And thus JsPU was born from Lemmy

[–] MareOfNights@discuss.tchncs.de 5 points 4 months ago (1 children)
[–] xavier666@lemm.ee 4 points 4 months ago

Modern sites: This page requires a JsPU to run which is not present on this system. The website will run in reduced feature mode.

[–] Empricorn@feddit.nl 1 points 4 months ago

I'll take 10. Here is a picture of a goldfish as payment.

load more comments (2 replies)
[–] ramble81@lemm.ee 1 points 4 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 4 points 4 months ago* (last edited 4 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 2 points 4 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 1 points 4 months ago (1 children)
[–] Randelung@lemmy.world 1 points 4 months ago (3 children)

The R in ARM and RISC is a lie.

[–] ChaoticNeutralCzech@feddit.de 2 points 4 months ago* (last edited 4 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)
[–] XPost3000@lemmy.ml 9 points 4 months ago (1 children)

Everybody gangsta still we invent hardware accelerated JSON parsing

[–] Overtheveloper@lemmy.world 4 points 4 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 1 points 4 months ago (1 children)

I'm so impressed that this is a thing

[–] enleeten@discuss.online 2 points 4 months ago

Coming soon, JSPU

[–] vvvvv@lemmy.world 1 points 4 months ago (1 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.

[–] neatchee@lemmy.world 1 points 4 months ago

Imagine you have a car powered by a nuclear reactor with enough fuel to last 100 years and a stable output of energy. Then you put it on a 5 mile road that is comprised of the same 250 small segments in various configurations, but you know for a fact that starts and ends at the same elevation. You also know that this car gains exactly as much performance going downhill as it loses going uphill.

You set the car driving and determine that, it takes 15 minutes to travel 5 miles. You reconfigure the road, same rules, and do it again. Same result, 15 minutes. You do this again and again and again and always get 15 minutes.

Do you need to test the car on a 20 mile road of the same configuration to know that it goes 20mph?

JSON is a text-based, uncompressed format. It has very strict rules and a limited number of data types and structures. Further, it cannot contain computational logic on it's own. The contents can interpreted after being read to extract logic, but the JSON itself cannot change it's own computational complexity. As such, it's simple to express every possible form and complexity a JSON object can take within just 0.6 MB of data. And once they know they can process that file in however-the-fuck-many microseconds, they can extrapolate to Gbps from there

[–] Xyloph@lemmy.ca 8 points 4 months ago (1 children)

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

[–] icesentry@lemmy.ca 1 points 4 months ago

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

[–] 2deck@lemmy.world 7 points 4 months ago (1 children)

Render the json as polygons?

[–] Dasnap@lemmy.world 5 points 4 months ago (1 children)

It's time someone wrote a JSON shader.

[–] ApeNo1@lemm.ee 2 points 4 months ago (1 children)
load more comments (1 replies)
[–] Ironfacebuster@lemmy.world 6 points 4 months 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"

[–] MacNCheezus@lemmy.today 4 points 4 months ago

Someone just needs to make a GPU-accelerated JSON decoder

[–] fmstrat@lemmy.nowsci.com 2 points 4 months ago (5 children)
load more comments (5 replies)
[–] lustyargonian@lemm.ee 2 points 4 months ago (1 children)

CPU vs GPU tasks I suppose.

GPU, render my 4.2 MB json file!

[–] Andrew15_5@mander.xyz 2 points 4 months ago (1 children)
[–] HopFlop@discuss.tchncs.de 2 points 4 months ago

Reject MiB, call it "MB" like it originally was.

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

there are simd accelerated json decoders

[–] manmachine@lemmy.world 2 points 4 months ago (1 children)

every day we stray further from god

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

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

load more comments (2 replies)
load more comments
view more: next ›