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.

131 points
*

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.

permalink
report
reply
40 points

And it can be sorted alphabetically in all software. That’s a pretty big advantage when handling files on a computer

permalink
report
parent
reply
17 points
*

I love this standard. If you dig deeper into it, the standard also covers a way to express intervals and periods. E.g. “P1Y2M10DT2H30M” represents one year, 2 months, 10 days, 2 hours and 30 mins.

I recall once using the standard when writing a cron-style scheduler.

I also like the POSIX “seconds since 1970” standard, but I feel that should only be used in RAM when performing operations (time differences in timers etc.). It irks me when it’s used for serialising to text/JSON/XML/CSV.

Also: Does Excel recognise a full ISO8601 timestamp yet?

permalink
report
parent
reply
3 points

I also like the POSIX “seconds since 1970” standard, but I feel that should only be used in RAM when performing operations (time differences in timers etc.). It irks me when it’s used for serialising to text/JSON/XML/CSV.

I’ve seen bugs where programmers tried to represent date in epoch time in seconds or milliseconds in json. So something like “pay date” would be presented by a timestamp, and would get off-by-one errors because whatever time library the programmer was using would do time zone conversions on a timestamp then truncate the date portion.

If the programmer used ISO 8601 style formatting, I don’t think they would have included the timepart and the bug could have been avoided.

Use dates when you need dates and timestamps when you need timestamps!

permalink
report
parent
reply
7 points

Thats an issue with the time library, not with timestamps. Actually timestamps are always in UTC, you need to do the conversion to your local time when displaying the value. There should be no possible off-by-one errors, unless you are doing something really wrong.

permalink
report
parent
reply
17 points

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.

permalink
report
parent
reply
14 points
*

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.

permalink
report
parent
reply

The week-of-year is far more relevant in Western Europe, and is used quite a bit in business. I have a Junghans watch that has a week complication.

It’s an important format outside of the US, and gives ISO-8601 an edge as a standard of conformance.

permalink
report
parent
reply
4 points

For the newbies: RFC 3339 vs ISO 8601. Bookmark this site.

permalink
report
parent
reply
1 point

That looks like an interesting diagram, but the text in it renders too small to read easily on the screen I’m using, and trying to open it leads to a javascript complaint and a redirect that activates before I can click to allow javascript. If it’s yours, you might want to look in to that.

The table below works, though. Thanks for the link.

permalink
report
parent
reply
1 point

Alas it’s not my site (and I think it’s meant to be read on a desktop screen), so I can’t fix it.

permalink
report
parent
reply
0 points

7 digit years feels way to optimistic, but I’ll be rooting for us.

permalink
report
parent
reply
2 points

I arrived to manage releases in a company, the previous manager named releases as “release04092016”, as USA standard. My first recommendation was to name releases as “releaseyyyymmdd” so “release20160409”. I was asked by another manager why to change that, so I showed her a sorted list of releases “git branches” and asked her, can you tell me there when was the last release? (a very common question) Of course, to find the last release you need to check the whole list because the mmddyyyy order is useless. The answer with yyyymmdd was immediate, just look at the last row.

permalink
report
parent
reply
1 point

Some countries already use it officially too :)

permalink
report
parent
reply
0 points

Also, you can sort by ascending file names

permalink
report
parent
reply
-5 points

The year is the information that most of the time is the least significant in a date, in day to day use.

DDMMYY is perfect for daily usage.

permalink
report
parent
reply
10 points

DDMMYY is perfect for daily usage.

Except that DDMMYY has the huge ambiguity issue of people potentially interpreting it as MMDDYY. And it’s not straight sortable.

My team switched to using YYYY-MM-DD in all our inner communication and documents. The “daily date use” is not the issue you think it is.

permalink
report
parent
reply
-10 points

Except that DDMMYY has the huge ambiguity issue of people potentially interpreting it as MMDDYY.

Yes and YYYY-MM-DD can potentially be interpreted as YYYY-DD-MM. So that is an zero argument.

I never said that the date format should never used, just that significants is a arbitrary value, what significant means depends on the context. If YYYY-MM-DD would be so great in everyday use then more or even most people would use it, because people, in general, tend to do things that make their life easier.

There is no superior date format, there are just date format that are better for specific use cases.

My team switched to using YYYY-MM-DD in all our inner communication and documents

That is great for your team, but I don’t think that your team has a size large enough to have any kind of statistically relevance at all. So it is a great example for a specific use case but not an argument for general use at all.

permalink
report
parent
reply
5 points

Your day to day use isn’t everyone else’s. We use times for a lot more than “I wonder what day it is today.” When it comes to recording events, or planning future events, pretty much everyone needs to include the year. Getting things wrong by a single digit is presented exactly in order of significance in YYYY-MM-DD.

And no matter what, the first digit of a two-digit day or two-digit month is still more significant in a mathematical sense, even if you think that you’re more likely to need the day or the month. The 15th of May is only one digit off of the 5th of May, but that first digit in a DD/MM format is more significant in a mathematical sense and less likely to change on a day to day basis.

permalink
report
parent
reply
-1 points

For any scheduled date it is irrelevant if you miss it for a day, a month or a year. So from that perspective every part of it is exactly the same, if the date is wrong then it is wrong. You say that it is sorted in the order of most significants, so for a date it is more significant if it happend 1024, 2024 or 9024? That may be relevant for historical or scientific purposes but not much people need that kind of precision. Most people use calendars for stuff days or month ahead or below, not years or decades.

If I get my tax bill, I don’t care for the year in the date because I know that the government wants the money this year not next or on ten. If I have a job interview, I don’t care for the year, the day and months is what is relevant. It has a reason why the year is often removed completely when dates are noted or made. Because it Is obvious.

Yes I can see why YYYY-MM-DD is nice for stuff like archiving purposes, it makes sorting and grouping very easy but there they already use the best system for the job.

For digital documents I would say that date and time information should be stored in a defined computer readable standard so that the document viewer can render or use it in any way needed. That could be swatch internet time as far as I care because hopefully I would never look at the raw data at all.

permalink
report
parent
reply
87 points
*

IPv6. Stop engineering IoT junk on single-stack IPv4, you dipshits.

Ogg Opus. It’s superior to everything in every way. It’s free and there is absolutely no reason to not support it. It blows my mind that MPEG 1.0 Layer III is still so dominant.

permalink
report
reply
24 points
*

It blows my mind that MPEG 1.0 Layer III is still so dominant.

Count the number of devices in use today that will never support Opus, and it might not blow your mind any longer. Also, AFAIK, the reference implementation still doesn’t implement full functionality on hardware that lacks a floating point unit.

These things take time.

permalink
report
parent
reply
6 points
*

I remember using Xiph’s integer implementation of Ogg Vorbis on my Nokia N-Gage (Symbian S60). I wonder if it’s not a priority for Opus. IIRC, Opus is floats all the way down.

update: it exists.

https://wiki.xiph.org/OpusFAQ#Is_there_a_fixed-point_implementation?

permalink
report
parent
reply
2 points

I remember trying to understand Vorbis fixed point codebase, it was completely bonkers, the three of us on this task couldn’t even draw a rough control flow diagram.

permalink
report
parent
reply
15 points

IPv6. Stop engineering IoT junk on single-stack IPv4, you dipshits.

Amen

permalink
report
parent
reply
5 points

Out of curiosity, why ogg as opposed to other containers? What advantages does it have?

Definitely agree on the Opus part, but I am very ignorant on the ogg container.

permalink
report
parent
reply
4 points

Large ISPs still don’t support it. It’s a fucking travesty.

permalink
report
parent
reply

Love, love, opus. It’s a fantastic format.

permalink
report
parent
reply
1 point
*

I setup my opnsense firewall for IPv6 recently with Spectrum as an ISP. I followed this howto from The Other Site:

https://www.reddit.com/r/OPNsenseFirewall/comments/xmurda/psa_howto_ipv6_on_spectrum_formerly_twc_time/

Even as someone who has a background in networking, I’d have no idea how to figure some of that stuff out on my own (besides reading a whole lot and trying shit that will probably break my network for a weekend). And whatever else you might say about Spectrum, they have one of the saner ways to implement it; no 6to4 or PPPoEv6 or any of that nonsense.

I did set the config for a /54, but Spectrum still gave me a /64. Which you can’t subnet in IPv6. Boo.

Oh, and I’m not 100% sure if the prefix is static or not. There’s no good reason that it should change, except to make self-hosting more difficult, but I have a feeling I’ll see it change at some point.

So basically, if this is confusing and limiting for power users, how are average home users supposed to do it?

There are some standardization things that could make things easier, but ISPs seem to be doing everything they can to make this as painful as possible. Which is to their own detriment. Sticking to IPv4 makes their networks more expensive, less reliable, and slower.

permalink
report
parent
reply
83 points
*

The metric system, f*ck the imperial system. Every scientist sticks to the metric system, and why are people even still having an imperial system, with outdated measurements like stones for weight blows my mind.

Also f*ck Fahrenheit, we have Celsius and Kalvin for that, we don’t need another hard to convert temperature measurement.

permalink
report
reply
25 points

You are allowed to say fuck here.

permalink
report
parent
reply
1 point

Imperial is used in thermodynamics industries because the calculations work out better.

permalink
report
parent
reply
-4 points
*

Also f*ck Fahrenheit, we have Celsius and Kalvin for that,

Who is Kalvin? Did you mean kelvin?

One drawback of celsius/centigrade is that its degrees are so coarse that weather reports / ambient temperature readings end up either inaccurate or complicated by floating point numbers. I’m on board with using it, but I won’t pretend it’s strictly superior.

permalink
report
parent
reply
18 points

A degree Celsius is not coarse and does not require decimals in weather reports, and I suspect only a person who has never lived in a Celsius-using country could make such silly claims.

permalink
report
parent
reply
-10 points
*

A degree Celsius is not coarse and does not require decimals

Consider that even if the difference between 15° and 16°C is not significant to you, it very well might be to other people. (Spoiler: it is.)

I suspect only a person who has never lived in a Celsius-using country could make such silly claims.

Then your suspicions are leading you astray.

permalink
report
parent
reply
-21 points

I’ll fight you on fahrenheit. It’s very good for weather reporting. 0° being “very cold” and 100° being “very hot” is intuitive.

permalink
report
parent
reply
21 points
*

0 degrees Celsius, the water is freezing, 100 degrees Celsius, the water is boiling. Celsius has a direct link to Kelvin, and Kelvin is the SI unit for measurement temperatures.

permalink
report
parent
reply
4 points

Asterisk: At 1 atmosphere of pressure. Lots of people forget that part.

permalink
report
parent
reply
-2 points

What do I care about water? I’m not dressing water for the weather, I’m dressing me.

permalink
report
parent
reply
19 points

Knowing whether it may snow or rain depending on whether you are below or above 0 is very useful though. 0 and 100 are only intuitive because you’re used to those numbers. -20 bring very cold and 40 being very hot is just as easy.

permalink
report
parent
reply
15 points
*

0° being “very cold” and 100° being “very hot” is intuitive.

As someone who’s not used to Fahrenheit I can tell you there’s nothing intuitive about it. How cold is “very cold” exactly? How hot is “very hot” exactly? Without clear references all the numbers in between are meaningless, which is exactly how I perceive any number in Fahrenfeit. Intuitive means that without knowing I should have an intuitive perception, but really there’s nothing to go on. I guess from your description 50°F should mean it’s comfortable? Does that mean I can go out in shorts and a t-shirt? It all seems guesswork.

permalink
report
parent
reply
6 points

About the only useful thing I see is that 100 Fahrenheit is about body temperature. Yeah, that’s about the only nice thing I can say about Fahrenheit. All temperature scales are arbitrary, but since our environment is full of water, one tied to the phase changes of water around the atmospheric pressure the vast majority of people experience just makes more sense.

permalink
report
parent
reply
11 points

This is strictly untrue for many climates. Where I live in Canada, 0F is average winter day, 100F is record-breaking “I might actually die” levels of heat.

-30C to 30C is not any more complicated or less intuitive than -22F to 86F

permalink
report
parent
reply
6 points

For traffic Celsius is more intuitive since temps approaching zero means slippery roads.

You’re long passed that with Fahrenheit. And on a scale from 0 very cold to 100 very hot, 32 doesn’t seem that cold. Until you see the snow outside.

permalink
report
parent
reply

32 isn’t that cold, even if it’s snowing. I do currently live in Minnesota though, so my sense of temperature is much different than someone from somewhere warm.

permalink
report
parent
reply
4 points

Ask someone in the north of finland how hot is “very hot”, and how cold is very cold. Then ask the same in middle Africa. Spoiler: it will vary alot.

permalink
report
parent
reply
71 points

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

permalink
report
reply
31 points

Adobe is backing the format, Apple support is coming along, and there are rumors that Apple is switching from HEIC to JPEG XL as a capture format as early as the iPhone 16 coming out in a few weeks. As soon as we have a full blown workflow that can take images from camera to post processing to publishing in JXL, we might see a pretty strong push for adoption at the user side (browsers, websites, chat programs, social media apps and sites, etc.).

permalink
report
parent
reply
3 points

Do you know QOI format ? I would appreciate your opinion about it.

permalink
report
parent
reply
3 points

To be honest, no. I mainly know about JPEG XL only because I’m acutely aware of the limitations of standard JPEG for both photography and high resolution scanned documents, where noise and real world messiness cause all sorts of problems. Something like QOI seems ideal for synthetic images, which I don’t work with a lot, and wouldn’t know the limitations of PNG as well.

permalink
report
parent
reply
2 points

QOI is just a format that’s easy for a programmer to get their head around.

It’s not designed for everyday use and hardware optimization like jpeg-xl is.

You’re most likely to see QOI in homebrewed game engines.

permalink
report
parent
reply
9 points

What’s so good about it?

permalink
report
parent
reply
56 points
  • Existing JPEG files (which are the vast, vast majority of images currently on the web and in people’s own libraries/catalogs) can be losslessly compressed even further with zero loss of quality. This alone means that there’s benefits to adoption, if nothing else for archival and serving old stuff.
  • JPEG XL encoding and decoding is much, much faster than pretty much any other format.
  • The format works for both lossy and lossless compression, depending on the use case and need. Photographs can be encoded in a lossy way much more efficiently than JPEG and things like screenshots can be losslessly encoded more efficiently than PNG.
  • The format anticipates being useful for both screen and prints. Webp, HEIF, and AVIF are all optimized for screen resolutions, and fail at truly high resolution uses appropriate for prints. The JPEG XL format isn’t ready to replace camera RAW files, but there’s room in the spec to accommodate that use case, too.

It’s great and should be adopted everywhere, to replace every raster format from JPEG photographs to animated GIFs (or the more modern live photos format with full color depth in moving pictures) to PNGs to scanned TIFFs with zero compression/loss.

permalink
report
parent
reply
8 points
  • The format works for both lossy and lossless compression, depending on the use case and need. Photographs can be encoded in a lossy way much more efficiently than JPEG and things like screenshots can be losslessly encoded more efficiently than PNG.

Someone made a fair point that having a format being both lossy and lossless is not necessarily a great idea. If you download a jpeg file you know it will be compressed, if you download png it will be lossless. Shifting through jxl files to check if it’s lossy or not doesn’t sound very fun.

All in all I’m a big supporter of jxl though, it’s one of the only github repos I actively follow.

permalink
report
parent
reply
7 points
*

Existing JPEG files (which are the vast, vast majority of images currently on the web and in people’s own libraries/catalogs) can be losslessly compressed even further with zero loss of quality. This alone means that there’s benefits to adoption, if nothing else for archival and serving old stuff.

Funny thing is, there was talk on the Chrome bug tracker of using just this ability transparently at the HTTP layer (like gzip/brotli compression), but they’re so set on pushing their AVIF format that they backed away from it.

permalink
report
parent
reply
18 points

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.

permalink
report
parent
reply
13 points

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).

permalink
report
parent
reply
5 points
*

I think I would feel better using JPEG-XL where I currently use WebP. Here’s hoping for wider support.

permalink
report
parent
reply
1 point

Good news! I believe the Ladybird Browser intends to include support for JPEG XL.

permalink
report
parent
reply
49 points

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).

permalink
report
reply
12 points

Objects may have a single trailing comma.

I just came.

permalink
report
parent
reply

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

permalink
report
parent
reply
2 points

I hate grammers in anything that don’t support trailing commas. It’s even worse when it’s supported in some contexts and not others. Like lists are OK, but not function parameters.

permalink
report
parent
reply
1 point

TMI

permalink
report
parent
reply
6 points

TIL this exists

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

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



Community stats

  • 3.5K

    Monthly active users

  • 1.7K

    Posts

  • 28K

    Comments