whenever i see the typo “buisness” i pronounce it “bweezness”

start a small bweezness today

@ehashman I can't speak for all microwaves, but yes, my microwave just does (minutes*60)+seconds where seconds can be in [0,99].

If I need to cook something for 7 minutes I like to approximate it as 6:66 instead 🤔

If you're interested in the date-parsing software I mentioned yesterday, it now has documentation (percentagent.readthedocs.io/en), and also now you can clone from github.com/jameysharp/percenta and `pip install -e .` if you want to experiment with it.

@krozruch Ooh, I like the idea of `pip thank`. Thank you for mentioning it!

This week I wrote a Python library that figures out what date/time format a given piece of text is using, and which languages and countries use that format. It Just Works for input from all over the world, and I'm quite proud of it! github.com/jameysharp/percenta

@ninjawedding most of the "logic" is a large JSON file that I constructed from the glibc locale database; the rest is just 230 lines of Python according to sloccount. I hope people will port it to all sorts of languages, assuming this works as effectively in practice as I think it will! I just happened to need a Python version first.

@ninjawedding yeah, I have high hopes for it in the realm of, I guess, semi-structured data? I'm planning to use it on HTML where timestamps are either in attributes or are the only text content of an element. hopefully that describes to enough random HTML I'll encounter in practice that it'll be like magic 😁

@ninjawedding Yeah, that's one of the kinds of things I think it should be good for! Although I haven't come up with a way to split apart multiple timestamps presented in the same input, which somewhat limits how applicable it is for truly unstructured data.

I accidentally fed it two timestamps in one string (forgot to put a comma between two list items) and it spent a long time before finally deciding that the second timestamp was the one it should report. Kinda better than I expected I guess?

This week I wrote a Python library that figures out what date/time format a given piece of text is using, and which languages and countries use that format. It Just Works for input from all over the world, and I'm quite proud of it! github.com/jameysharp/percenta

@isagalaev I mean, I've lived in the US my whole life and I agree that MMDDYY is utter nonsense... but no, even within a single language people write dates and date-times in an astonishing number of different ways.

And then there's fun stuff, like lo_LA and th_TH using 543 BC as their "year 0", or ja_JP having a series of different year eras since 1873 based on who was emperor at the time.

Of course don't forget that every language has different words for months and days of the week...

@kity I think you might be out of luck? I've seen GNOME 3 on Wayland get mixed-DPI right but I don't think it's feasible in X, where apps are almost never aware of multi-monitor layout. But I could be wrong, so don't take my word for it. 😅

@kity I am _so_ Online

wait what does that mean

well anyway, I don't know for sure, but I'm pretty sure you need to mention whether you're using X or Wayland, and if Wayland, it probably matters which compositor you're using...

today I'm studying the time and date formats of 251 different locales in the GNU C library locale database 🤔

@deejoe I think you're right! That's really neat!

@deejoe I don't know what you mean but I'm scared of whatever you're talking about

@carbontwelve true, but you could save even more bytes by just representing all dates as Julian Day Numbers or something (en.wikipedia.org/wiki/Julian_d) 😅

Show more
Toot.Cat

A Mastodon instance for cats, the people who love them, and kindness in general. We strive to be a radically inclusive safe space. By creating an account, you agree to follow our CoC below.

Instance Administration

  • Woozle: Supreme Uberwensch, general support, web hostess
  • Charlotte: tech support, apprentice in warp-drive arcana (aka Mastomaintenance)
  • ash: backend stuff, gay crimes

The Project: