Remix.run Logo
ghurtado 3 days ago

> Sort by date" in museum registrars software

This sounds like the perfect invitation for some old school over engineering.

I'm already having so much fun running through every possible input in my head, and I would inevitably write a serious mountain of steaming code to support it.

tzury 3 days ago | parent | next [-]

I simply built a side table in the DB, whereas any expression was associated with a range of a 2 YEARS (numbers).

any time they enter and expression (auto complete), it they introduce a new one, they needed to add the range.

this did the job.

the time I spent the most was to sort the existing data and restore it in the new dictionary.

kehvyn 3 days ago | parent | prev | next [-]

I've actually done this, and it's very fun.

My main testing dataset is the 470,000 records from the Met, with 33k unique date values. Fortunately they include machine-readable dates I can validate against.

https://github.com/kjrocker/epochal

jacquesm 3 days ago | parent | prev | next [-]

That's got to be a study in exceptions. Let's start with which calendar we're referencing. C14 anybody?

Waraqa 3 days ago | parent | prev | next [-]

I assume an integer field is sufficient since mostly it's only the year that they know not the exact date.

brazzy 3 days ago | parent | next [-]

No, you need a lot more complexity if you really wanted to represent it semantically. The assumption that people in the past used calendars with sequentially numbered years you just need to offset, is simply wrong.

You have things like "in the Xth year of the reign of King Y", where we can easily relate multiple entries with different values for X, but don't actually know which CE years they correspond to. Even weirder is the Roman habit of recording "the year of the consulship of X and Y", which doesn't even allow you to relate any two different years at all without a reference table (which we don't have completely). And no, "years from the foundong of the city" wasn't a thing.

kehvyn 3 days ago | parent | next [-]

I actually looked at supporting dates like this, but if you go through the Met's open dataset (https://github.com/metmuseum/openaccess) that kind of "alternative calendar with no reference to the BCE/CE dates" is basically nonexistent.

There are references to the Islamic and Japanese calendar systems, but always next to the CE equivalent.

Data entry is fortunately being done by modern people, so the translation to CE/BCE is usually baked in, and all you need to support is every possible way somebody could say "the early half of" and "5th millenium B.C. to mid 1914"

kragen 3 days ago | parent | prev [-]

Mostly true, but not absolutely:

https://en.wikipedia.org/wiki/Varronian_chronology

> The Varronian chronology was adopted by the Roman state during the first century BC and gave rise to the traditional years ab urbe condita ("from the founding of the city"); most especially, those dates were used in monumental Augustan-era inscriptions, the fasti Capitolini and the fasti Triumphales.[40]

Atlas667 3 days ago | parent | prev [-]

Text is better together with specific formats like Circa, ranges, exact years or dates, and unknown.

lazide 3 days ago | parent | prev | next [-]

Turing complete DSL, here we come!

rossant 3 days ago | parent | prev [-]

Tiny language model.