this post was submitted on 02 Sep 2024
136 points (100.0% liked)

Programming

423 readers
4 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

There are a couple I have in mind. Like many techies, I am a huge fan of RSS for content distribution and XMPP for federated communication.

The really niche one I like is S-expressions as a data format and configuration in place of json, yaml, toml, etc.

I am a big fan of Plaintext formats, although I wish markdown had a few more features like tables.

top 50 comments
sorted by: hot top controversial new old
[–] mox@lemmy.sdf.org 90 points 2 months ago* (last edited 2 months ago) (10 children)

ISO 8601 date format. Not because it's from a standards body, but because it's simple, sensible, clearly defined, easy to recognize, and very effective.

Date field placement in any order other than most-significant-digits-first is not only counterintuitive, but needlessly complicated to work with. Omitting critical information like the century is ambiguous and confusing.

We don't live in isolated villages any more. Mixing and matching those problems by accepting all the world's various regional and personal date styles, especially with no reliable indication of which ones apply in any given case, leads to the hodgepodge of error-prone date madness that we have today.

The 2024-09-02 format should be taught in schools and required in official documents. Let the antiquated date styles fall into disuse outside of art and personal correspondence, like cursive writing.

[–] The_Decryptor@aussie.zone 10 points 2 months ago* (last edited 2 months ago) (1 children)

RFC 3339 is a simplified profile of 8601 that only covers YYYY-MM-DD style formatting, if you only ever use that format and avoid the things like "2024-W36" they're mostly interchangeable.

load more comments (1 replies)
[–] driving_crooner@lemmy.eco.br 10 points 2 months ago

I had the fortune of being hired to build up from zero my department, and one of the first "rules" I made was all dates are ISO-8601 and now every process runs with 8601, if you use anything different your code is going to fail eventually when it finds another column date in 8601.

load more comments (8 replies)
[–] flameguy21@lemm.ee 56 points 2 months ago (3 children)

It's completely bonkers that JPEG-XL is as good as it is and no one wants to actually implement it into web browsers

[–] cyclohexane@lemmy.ml 8 points 2 months ago (1 children)
[–] flameguy21@lemm.ee 10 points 2 months ago (1 children)

Basically smaller file sizes than JPEG at the same quality and it also automatically loads a lower quality version of the image before it loads a higher quality version instead of loading it pixel by pixel like an image would normally load. Google refuses to implement this tech into Chrome because they have their own avif format, which isn't bad but significantly outclassed by JPEG-XL in nearly every conceivable metric. Mozilla also isn't putting JPEG-XL into Firefox for whatever reason. If you want more detail, here's an eight minute video about it.

[–] spartanatreyu@programming.dev 8 points 2 months ago (3 children)

I'm under the impression that there's two reasons we don't have it in chromium yet:

  1. Google initially ignored jpeg-xl but then everyone jumped on it and now they feel they have to create a post-hoc justification for not supporting it earlier which is tricky and now they have a sunk cost situation to keep ignoring it
  2. Google today was burnt by the webp vulnerability which happened because there was only one decoder library and now they're waiting for more jpeg-xl libraries which have optimizations (which rules out reference implementations), good support (which rules out libraries by single authors), have proven battle-hardening (which will only happen over time) and are written safely to avoid another webp style vulnerability.

Google already wrote the wuffs language which is specifically designed to handle formats in a fast and safe way but it looks like it only has one dedicated maintainer which means it's still stuck on a bus factor of 1.

Honestly, Google or Microsoft should just make a team to work on a jpg-xl library in wuffs while adobe should make a team to work on a jpg-xl library in rust/zig.

That way everyone will be happy, we will have two solid implementations, and they'll both be made focussing on their own features/extensions first so we'll all have a choice among libraries for different needs (e.g. browser lib focusing on fast decode, creative suite lib for optimised encode).

load more comments (3 replies)
load more comments (2 replies)
[–] lolcatnip@reddthat.com 37 points 2 months ago (2 children)

JSON5. it's basically just JSON with several QoL improvements, like comments, that make it usable as a format for human consumption (as opposed to a serialization format).

[–] tatterdemalion@programming.dev 8 points 2 months ago (3 children)

Objects may have a single trailing comma.

I just came.

[–] sxan@midwest.social 5 points 2 months ago

I love that there's someone out there who's that passionate about JSON.

load more comments (2 replies)
[–] jim@programming.dev 5 points 2 months ago

TIL this exists

[–] lime@feddit.nu 26 points 2 months ago (1 children)

i'm a plan 9 from bell labs fan. Imagine how excited I was when wsl used 9P for its plumbing. then they scrapped it all for wsl2.

just, the power they managed to get out of those union mounts... your application wants access to the mouse? sure, here's a file named "mouse". it's got the coordinates in it. you want to draw to the screen? here's a file called like "bitmap" or whatever, just write to it. you want to start a process on another machine? just cd to it and start the process there. want to have the UI show up on your machine? symlink your bitmap file to that directory.

I also wish early web composability could have stayed and expanded. like, the old vlc embed player, which would just show up in your browser and could play any file inline? great stuff. Imagine if every application composed with everything else, like the android Activity and Intent concepts but for anything, just by virtue of living in the same os. need an image? just ask the os and it will present the user with many ways to procure an image, let the selected one run , and hand you back an image. you don't even have to care where from. in a way, it's what the arcan guy is doing with his experiments, although that's more for stitching together graphical pipelines.

[–] The_Decryptor@aussie.zone 8 points 2 months ago (2 children)

Plan 9 even extended the "everything is a file" philosophy to networking, unlike everybody else that used sockets instead.

load more comments (2 replies)
[–] beeng@discuss.tchncs.de 23 points 2 months ago* (last edited 2 months ago) (5 children)

Depending where you use it, but often tables are available in markdown.

markdown table
x y
 |markdown|table|
 |--|---|
 |x|y|

Fixed..cos you could only see rendered and not code.

[–] echindod@programming.dev 12 points 2 months ago (2 children)

Oh. Good one. Markdown everywhere. Slack always pissed me off for it's sub par markdown support.

load more comments (2 replies)
[–] spartanatreyu@programming.dev 6 points 2 months ago* (last edited 2 months ago) (1 children)

I fixed it for you (markdown tables support padding to make them easy to read):

markdown table
x y
|markdown|table|
|--------|-----|
|x       |y    |
load more comments (1 replies)
[–] tyler@programming.dev 5 points 2 months ago

Markdown tables are terrible though. Try and put a code block in there. Adoc tables are amazing on the other hand, but much more verbose to write.

load more comments (2 replies)
[–] webbureaucrat@programming.dev 19 points 2 months ago (2 children)

I'll give my usual contribution to RSS feed discourse, which is that, news flash! RSS feeds support video!

It drives me crazy when podcasters are like, "thanks for listening to our audio podcasts. We also have a video feed for our YouTube subscribers." Just let me have the video in PocketCasts please!

[–] 0x1C3B00DA@fedia.io 12 points 2 months ago (1 children)

I feel you but i dont think podcasters point to youtube for video feeds because of a supposed limitation of RSS. They do it because of the storage and bandwidth costs of hosting video.

load more comments (1 replies)
load more comments (1 replies)
[–] kersplomp@programming.dev 18 points 2 months ago (1 children)

Zigbee or really any Bluetooth alternative.

Bluetooth is a poorly engineered protocol. It jumps around the spectrum while transmitting, which makes it difficult and power intensive for bluetooth receivers to track.

[–] FizzyOrange@programming.dev 5 points 2 months ago

I agree Bluetooth (at least Bluetooth Classic) is not very well designed, but not because of frequency hopping. That improves robustness and I don't see why it would cost any more power. The hopping pattern is deterministic. Receivers know in advance which frequency to hop to.

[–] fubarx@lemmy.ml 18 points 2 months ago (3 children)

Since nobody's brought it up: MQTT.

It got pigeonholed into IoT world, but it's a pretty decent event pubsub system. It has lots lf security/encryption options, plus a websocket layer, so you can use it anywhere from devices, to mobile, to web.

As of late last year, RabbitMQ started suporting it as a supported server add-on, so it's easy to use it to create scalable, event-based systems, including for multiuser games.

load more comments (3 replies)
[–] Kissaki@programming.dev 13 points 2 months ago* (last edited 2 months ago) (1 children)

I wish standards were always open access. Not behind a 600 dollar paywall.

When it is paywalled I'm irritated it's even called a standard.

load more comments (1 replies)
[–] matcha_addict@lemy.lol 13 points 2 months ago (1 children)

I wish there was a good open standard for task management or todo list.

I know there's todo.txt, but it lacks features like dependent tasks, and overall the plain text format limits features and implementations.

[–] randy@lemmy.ca 9 points 2 months ago (3 children)

I think CalDAV (which uses the iCalendar format) may be the closest thing. It covers calendar items, obviously, but also task and journal items.

load more comments (3 replies)
[–] blarth@thelemmy.club 12 points 2 months ago* (last edited 2 months ago) (2 children)
[–] almost1337@lemm.ee 8 points 2 months ago

I also pick this guy's IRC

load more comments (1 replies)
[–] BB_C@programming.dev 12 points 2 months ago* (last edited 2 months ago) (3 children)

The term open-standard does not cut it. People should start using "publicly available and sharable" instead (maybe there is a better name for it).

ISO standards for example are technically "open". But how relevant is that to a curious individual developer when anything you need to implement would require access to multiple "open" standards, each coming with a (monetary) price, with some extra shenanigans ^[archived]^ on top.

IETF standards however are actually truly open, as in publicly available and sharable.

load more comments (3 replies)
[–] arthur@lemmy.zip 11 points 2 months ago (4 children)
load more comments (4 replies)
[–] arthur@lemmy.zip 11 points 2 months ago (5 children)

GRPC for building APIs instead of REST. Type safety makes life easier

[–] JakenVeina@lemm.ee 7 points 2 months ago* (last edited 2 months ago)

I mean, REST-ful JSON APIs can be perfectly type-safe, if their developers actually take care to make them that way. And the self-descriptive nature of JSON is arguably a benefit in really large public-facing APIs. But yeah, gRPC forces a certain amount of type-safety and version control, and gRPC with protobuf is SUCH a pleasure to work with.

Give it time, though, it's definitely gaining traction.

[–] sexual_tomato@lemmy.dbzer0.com 6 points 2 months ago* (last edited 2 months ago)

It's the recommended approach to replace WCF which was deprecated after .NET framework 4.8. My company is just now getting around to ripping out all their WCF stuff and putting in gRPC. REST interfaces were always a non-starter because of how "heavyweight" they were for our use case (data collection from industrial devices which are themselves data collectors).

load more comments (3 replies)
[–] Kissaki@programming.dev 10 points 2 months ago (2 children)

TOML instead of YAML or JSON for configuration.

YAML is complex and has security concerns most people are not aware of.

JSON works, but the block quoting and indenting is a lot of noise for a simple category key value format.

[–] NostraDavid@programming.dev 14 points 2 months ago (3 children)

YAML is complex and has security concerns most people are not aware of.

YAML is racist to Norwegians.

If you have something like country: NO (NO = Norway), YAML will turn that into country: False. Why? Implicit casting. There are a bunch of truthy strings that'll be cast automagically.

load more comments (3 replies)
[–] FizzyOrange@programming.dev 9 points 2 months ago (2 children)

TOML is not a very good format IMO. It's fine for very simple config structures, but as soon as you have any level of nesting at all it becomes an unobvious mess. Worse than YAML even.

What is this even?

[[fruits]]
name = "apple"

[fruits.physical]
color = "red"
shape = "round"

[[fruits.varieties]]
name = "red delicious"

[[fruits.varieties]]
name = "granny smith"

[[fruits]]
name = "banana"

[[fruits.varieties]]
name = "plantain"

That's an example from the docs, and I have literally no idea what structure it makes. Compare to the JSON which is far more obvious:

{
  "fruits": [
    {
      "name": "apple",
      "physical": {
        "color": "red",
        "shape": "round"
      },
      "varieties": [
        { "name": "red delicious" },
        { "name": "granny smith" }
      ]
    },
    {
      "name": "banana",
      "varieties": [
        { "name": "plantain" }
      ]
    }
  ]
}

The fact that they have to explain the structure by showing you the corresponding JSON says a lot.

JSON5 is much better IMO. Unfortunately it isn't as popular and doesn't have as much ecosystem support.

load more comments (2 replies)
[–] mox@lemmy.sdf.org 9 points 2 months ago (1 children)
[–] Gobbel2000@programming.dev 8 points 2 months ago (1 children)

Alright, but seriously: IPv6.

load more comments (1 replies)
[–] RonSijm@programming.dev 9 points 2 months ago (3 children)

Problem Details for HTTP APIs - I have to work and integrate with a lot of different APIs and different kinda implementations of error handling. Everyone seems to be inventing their own flavor of returning errors.

My life would be so much easier if everyone just used some 'global unified' way to returning errors, all in the same way

[–] MonkderVierte@lemmy.ml 7 points 2 months ago (4 children)

Please guys, stop using line-breaks mid-sentence. It's not the 90's anymore, viewers generally can wrap.

load more comments (4 replies)
load more comments (2 replies)
[–] 0x0@programming.dev 9 points 2 months ago (21 children)
load more comments (21 replies)
[–] matcha_addict@lemy.lol 9 points 2 months ago

Not sure if it counts, but the terminal world being a place where many applications do so many different things but are interoperable, is amazing. I guess that would be the POSIX standard?

[–] MonkderVierte@lemmy.ml 8 points 2 months ago (2 children)

About s-expressions, what i read about it: https://web.archive.org/web/20120206034439/https://shinkirou.org/blog/2010/06/s-expressions-the-fat-free-alternative-to-json/

Seems rather niche, for non-key-value-pair data structures (aren't no-sql databases good for that?), considering that lightweight markup fulfills that role for readable document source.

load more comments (2 replies)
[–] UFODivebomb@programming.dev 7 points 2 months ago (1 children)

Is ipfs usage growing? Stagnant? No idea... Diatributed serving of content seems great

load more comments (1 replies)
[–] anzo@programming.dev 6 points 2 months ago

AV1 video codec !

[–] MonkderVierte@lemmy.ml 6 points 2 months ago* (last edited 2 months ago)

Unicode editors for notes/todo formats, making markup unnecessary.

load more comments
view more: next ›