Hacker Newsnew | past | comments | ask | show | jobs | submit | autarch's commentslogin

I'm the author of the Perl DateTime library. It works correctly as _documented_. Here's the first two paragraphs of the docs:

> DateTime is a class for the representation of date/time combinations, and is part of the Perl DateTime project.

> It represents the Gregorian calendar, extended backwards in time before its creation (in 1582). This is sometimes known as the "proleptic Gregorian calendar". In this calendar, the first day of the calendar (the epoch), is the first day of year 1, which corresponds to the date which was (incorrectly) believed to be the birth of Jesus Christ

Always RTFM.

Edit: I double-checked, and while this was not in the docs in the first release, it _was_ in the docs as of 2015.

https://metacpan.org/pod/DateTime


Who else uses the proleptic Gregorian calendar other than programmers of datetime libraries?


It's typically not used in modern historical writing when referring to events located in areas that used the Julian calendar at that time.

But it is typically used when referring to events located in areas with no calendar system familiar to modern readers, most notably the Maya calendar. Maya Long Count dates are typically converted to the proleptic Gregorian calendar.

Also, many modern historical writings will display both Julian and Gregorian dates, particularly for dates around when the calendars were changing or when context is unclear (e.g. a historical figure who was born in an area with one calendar and died in an area with another calendar).


> Also, many modern historical writings will display both Julian and Gregorian dates, particularly for dates around when the calendars were changing or when context is unclear (e.g. a historical figure who was born in an area with one calendar and died in an area with another calendar).

To follow up on this, George Washington is a great example. He was born about 20 years before the British calendar changed from Julian to Gregorian and changed the new year from beginning on March 25 to January 1.

The vast majority of modern sources will cite Washington's birthday as February 22, 1732, which is actually the proleptic Gregorian calendar (called "New Style"). George Washington himself would have said that his birthday was February 11, 1731, at least until the British calendar changed in 1752 (at which point he probably would have still used the "Old Style" since it would have been clear from context).


Considering it only diverges from the standard Gregorian for dates more than 400 years ago, it's not super relevant. Most people don't think about it. But it made a lot of sense to do the shift at the time. All recorded dates up to that point had been physically written down, so it would have been infeasible to migrate those all to the proleptic. If computers had been around, maybe things would have been different.

Fun fact: Greece was still using the old Julian calendar as of 1928, so it's entirely possible that you'll see dates on relatively recent Greek documents that are up to 14 days off from the calendar the rest of the world was using. Civil timekeeping is just a mess.


Who writes computer programs that deal with pre-1582 _dates_ at all?

In science-related code, I can image a case for calculating things like seconds elapsed across a very long time period. But in that case you're not really dealing with dates. Instead, you want something like the Unix epoch, but probably with an earlier epoch start.

There may be some very niche cases for pre-1582 dates in code that I'm not thinking of. But I'd expect that in this case you're going to put a lot of effort into finding the right libraries, or you might just write your own code.

Regardless, the linked blog post says of DateTime: "Unfortunately, like Python, a proper error message for impossible Gregorian dates is notably absent."

But this is just wrong. There's no "proper error message" to emit. The code works as documented.


Most applications don't have to worry about it, but platforms do. The SQL standard requires accurate date representation for years 0000-9999. I was surprised to learn about the Gregorian shift while testing our database system. I also learned about "war time" in WW2 and the "battle of the clocks" in colonial India. A lot of history came out of debugging those tests.


For sure. I was thinking more of "normal" applications, as opposed to things like SQL databases. It looks like the SQL standard explicitly calls for the use of the Gregorian calendar for dates, so I think that answers the previous question of "Who else uses the proleptic Gregorian calendar other than programmers of datetime libraries?"


"normal applications", no. But there are more platforms besides databases, e.g. programming languages. Any platform that works with dates will have to deal with these weird quirks. And application that works with dates probably would not, although there's always leap seconds...


Library and Archival management systems

Lots of written work pre 1582 that needs to be accurately catalogued.

Source: I used to work on one of the first computerised library management software systems, and plenty of our academic customers had manuscripts dating back that far.


> Who writes computer programs that deal with pre-1582 _dates_ at all?

People writing knowledge base software, like Wikidata. It's helpful to be able to display historical dates in any desired calendar, and also to be able to do date arithmetic between any two arbitrary dates.


This point about using seconds is entirely correct, and date-time should always be in epoch timestamp (numeric) except for human interfaces (input or rendering for output). APIs and web-forms should never pass multipart date strings because they can be internally inconsistent, for example February 30. (edit: unless there's no sequential meaning in the date and the date is just a local day name without the notion that adding or subtracting 1 takes you to yesterday or tomorrow (https://gist.github.com/timvisee/fcda9bbdff88d45cc9061606b4b...)).

(p.s. autarch thanks for your efforts in open source).


For astronomical code (and any sane date code) you use Julian Day Number which is the number of days since a defined day 0.

The one most seen would be Microsoft DateTime first in Excel where day 1 is 31st Dec 1899 in USA/Georgian Calendar - but only useful from March 1st 1900

Wikipedia gives the Astronomical Day number as

The Julian day number (JDN) has the same epoch as the Julian period, but counts the number of days since the epoch rather than the number of years since then. Specifically, Julian day number 0 is assigned to the day starting at noon Universal Time on Monday, January 1, 4713 BC, proleptic Julian calendar (November 24, 4714 BC, in the proleptic Gregorian calendar).[4][5][6][a] For example, the Julian day number for the day starting at 12:00 UT (noon) on January 1, 2000, was 2451545.[7]

There is the Modified Julian Dates several of which including the Microsoft one are listed in Variants here https://en.wikipedia.org/wiki/Julian_day


I've been writing some programs to deal with the Maya Calendars, where it is an issue.

On some level, it doesn't matter if an inscription corresponds to "August 31, 83 CE" or "September 2, 83 CE" (a date potentially inscribed at the site Takalik Abaj in Proleptic Gregorian or Julian), but it's nice to try to get the details correct. And if you want to correlate with other events in history (especially if you can find astronomical event data from Europe), you need to be at least consistent.

Plus, it's just fun to think about these events from long ago in terms (dates) we understand.


People working with buildings, infrastructure, and artifacts that predate 1582. Many such things in Europe


Genealogical software, historical video games (CK2 has at least one mod which adds alternative calendars), I can imagine there are some needs for this in contract management software for countries with very old businesses and properties like England and Japan.


> (CK2 has at least one mod which adds alternative calendars)

I imagine that must have been absolutely riveting to mod in.


Genealogy apps, e.g. Ancestry.com


Astronomy



I've been using an old iPad as a clock for a while. The "Clocks" app I installed lets me configured 5 different alarms (quite handy since my week varies a lot).


Murderbot was 2021. I would defend it as a winner, but take a look at other recent years:

* 2020 - A Memory Called Empire by Arkady Martine - a science fiction story set in a future Aztec space empire - quite inventive and odd. The sequel won in 2022.

* 2024 - Some Desperate Glory by Emily Tesh - basically a story about growing up as a terrorist in a sci-fi setting, with some wild turns.

* 2025 - The Tainted Cup by Robert Bennett Jackson - a very bizarre Holmes & Watson take set in a land constantly invaded by sea kaiju, and where there's "magic" (or is it science) based on harvesting the dead kaiju's bodies.

These are all excellent books, each of which has something different to recommend them.

Are they as good as Dune? Well, it's very hard to say _now_. Assuming humans still exist in 60 years, will they still read them like we read Dune 60 years from its publication? Maybe.

Heinlein's Stranger in a Strange Land won in 1961. I've read it, and I don't think it's aged very well. It's certainly not Dune.

How many people are still reading the 1969 winner, John Brunner's Stand on Zanzibar? I _have_ read it. It's good, but nowhere close to Dune. And how about 1978's winner, Gateway by Frederik Pohl? It's ... fine. It's not even in the same category as Dune, IMO.

Dune is an outlier among _all_ winners. It's one of the best SF books of all time, with a voice that still seems fresh today. Most Hugo (and Nebula) just don't live up to this standard. There are a few that do, like Left Hand of Darkness, Ender's Game, Hyperion, and Jonathan Strange & Mr Norrell (better than Dune, IMO). But those are outliers just like Dune.


I haven't yet read the last few ones because I found the Aztec ones underwhelming. The Calculating Stars to A Desolation Called Peace was when I started feeling they were not so strong and decided I'd go read prior years instead. But I suppose the vagaries of 'winner' vs. shortlist probably take this. It is true that all those others you're talking about are much stronger. I do think that The Ninefox Gambit, The Fifth Season, The Three Body Problem are all just as strong as the ones you've mentioned.

Having read Network Effect and compared it to Piranesi, the two seem simply leagues apart. Perhaps the real thing here is that I'm over-indexing on taste instead of some object measure of quality. Piranesi was otherworldly in the way of Strange and Norrell but Network Effect was Yet Another Story in comparison.

And it's true what you say. Some of the past winners were also relatively weak. Downbelow Station seemed incomplete though I think Neuromancer was unbelievable.

It's just that when I went back and just picked old winners to read it felt like banger after banger after banger. The one where I only remember Kallikantzaros or Lord of Light or Dune or The Left Hand of Darkness. Ringworld I could see people being put off by, but it had this whole thing with the ringworld and the trifold symmetry thing and all that.

Then again, everything that comes now has to avoid everything that came prior, sort of O(n) problem. You can't be new when much has been written.


I love both the Murderbot books and Piranesi. I think they're excellent for _very_ different reasons.

With Murderbot, the "corpos control everything" scifi future setting is nothing new. I think the brilliance is in its portrayal of the main character, primarily through its inner voice. Murderbot is a really unique character and it is written very well.

Conversely, in Piranesi, the main character is basically a cipher. He doesn't know who is, and we don't learn a lot about him or his psychology for most of the book. I felt like he was mostly there to let us experience the world, which as you put it was otherworldly and quite unique. The brilliance of the book is the prose and the world, not the character.

But like I said, I think comparing anything to Dune is pretty tough. Dune is a landmark work that still influences modern writers, and that modern audiences still enjoy reading. The recent movies have translated it to the big screen and captured an even larger audience (an amazing feat given how weird the books are).

Very, very few SFF books have had a similar impact. There's Tolkien, who is arguably the most influential SFF writer of all time. What other SFF works from the 60s or earlier are still as widely read and influential as Dune and LotR? Almost none, except Le Guin's Earthsea books, which barely squeaks in with a 1969 release for the first book.


Hmm, the inner voice didn't feel particularly novel and had a young-adult feel to me, but ah well. Quibbling now. Apparently just a matter of taste.


Young Adult is a marketing term. It's a really terrible idea to leave classification to marketers.

As it is you've been given a way to respectably say "I'm more mature than you" and you've leapt at the opportunity, it seems.


Murderbot Diaries (the eight books) start in 2017[0], Murderbot series (TV) started in 2025[1]. Where are you getting 2021 from?

[0]: https://en.wikipedia.org/wiki/The_Murderbot_Diaries

[1]: https://en.wikipedia.org/wiki/Murderbot_(TV_series)


Murderbot won the Hugo for best novel in 2021. This is the first _novel_ in the series. The previous publications were novellas, and so not in the same category. I suspect that the award may have been in part for the series and not this book specifically. We see this in other years, for example with N.K. Jemisin winning the Nebula for Stone Sky, the third book in a trilogy. Was Stone Sky better than the first two, or was this just a way to recognize a great overall series?

I really like that the Hugos added a Best Series category in 2017 to hopefully avoid this sort of thing. It seems like a great series is a different beast than a great single novel.


The Murderbot Diaries, you mean? Won best series

All Systems Red won (Novella) in 2018, Network Effect (book) won in 2021, and The Murderbot Diaries (series) won in 2021. Wells and Hugo have a .. cantankerous relationship


I was just referring to Network Effect in 2021 and looking at what other novels won in nearby years.


So.. what I said?


We've done the same thing in my job. I think what they're saying is that rather than passing/returning `SomeStruct` and having it maybe be optional, they either pass `SomeStruct`, with a rule that it's never nil, _or_ they pass `Option[*SomeStruct]`. Then anything that deals with optional types is forced to explicitly check.

This is exactly how Rust works, except there it's built into the compiler, and there's no such as nil in most code.


Except Altered Carbon mostly waves the real difficulty away by talking about something like "downloading" a mind into a body.

I don't remember there being anything about growing replacement clones, but it would make sense given the other tech in the story.


The initial murder case Kovacs investigates in both the book/show involves a wealthy man who is killed but has his backup mind inserted into his backup clone so he is “recovered” so the victim has no memory of his killing since the backup was prior to killing instead of optimally just prior to death. There is also a big subplot that is show only with Kovacs’ sister and clones.


Imagine that you are a consultant. You get a call that starts with, "Hi, this is Joe Schmoe and Schmoe Law Firm. I need a new billing system. Can you build me one?"

And you respond by saying that you can, but you need to do a _lot_ of work with him to spec this billing system out. You can't just build "a new billing system" without any more details. You tell him that this will take many hours of work between the two of you where you ask him questions, write a spec, get his feedback, and repeat that a number of times.

At this point, he says "wow, that sounds like a ton of of work for me just get started", and he gives up.

AI does not fix any of this, and this is the thing that I think most people will not want to do, and that's why I think this blog post is making a very good point. The amount of work it takes to build a new software system, even with a super competent programmer as a partner, is still quite significant. And it requires thinking about hundreds of tiny little details in a way that drives a lot of people nuts. They will only do it if they _really_ have to do it.


Think payroll. I used to think payroll is relatively simple. Then I spent some time on government of Canada Phoenix pay system (go ahead... Google and weep). And it's... Insane. System has been live for a decade and still regularly gets hit with some weird scenario from some department that nobody foresaw, it wasn't captured in requirements, but upon review by business analysts is a valid scenario. Bob was a CS5 in department of defense and speaks French so gets bilingual bonus and his boss was away for half a day so Bob gets acting cs5 pay and is in public alliance union so these are the dues, and it is second Tuesday of a month and blue moon, but then Bob got moved to department of agriculture and then 3 months later realized that his previous manager at defense didn't put in his promotion on time so now you have to figure out his retro pay for when he was in defense even though everything on his file now has agriculture labour agreement and codes and rates etc etc etc. And this made up example is a fraction of the complex examples.

Clear and comprehensive Requirements are always the tricky bit, at least in business software. Twilight zone covered it perfectly and presciently decades before AI, with genies taking your requests literally and giving you unpredictable and usually negative outcomes.


Or AI won't fix diffusion of responsibility that you see in companies through outsourcing, offshoring or matrix organizations...Or to go through committees to know if they should change shh root access with abc123 as password.


That billing system will end glue code that links existing Big SaaS players which AI can handle just fine.

Consultants are not spinning up a bespoke SaaS product given the risk.


> You can't just build "a new billing system" without any more details.

Does every billing system need to be a one of a kind snowflake?


Nice. I think my new climbing routine will be to just look at the 5.13 and mime moves from the ground for an hour, then go home.


I _could_ flash this V12 but what would be the point?


I'd love to see this for Taiwan. I'm here now (on my Nth trip where N >= 11), and my impression is that 7-11 is the clear winner in all the cities I've been to, followed by Family Mart and then some stragglers like Hilife and OK Mart (it's ok).

My personal favorite is probably Family Mart, because they have multiple very delicious vegan rice balls to choose from.


I thought Japan had a lot of convenience stores, and then I went to Taiwan.


Yeah, it's quite difficult to walk for any length of time without encountering one, usually a 7-11. They're everywhere. And they actually have some decent food. It's a bizarre thing to experience for an American like myself.


I was wondering about this myself. My guess is no, since AFAIK the only way to do this sort manual memory management is to use unsafe code. But there's also things like the (bumpalo)[https://docs.rs/bumpalo/latest/bumpalo] crate in Rust, so maybe you wouldn't need to do this sort of thing by hand, in which case you're as leak-free as the bumpalo crate.


The website seems fine to me. I'm using Chrome on Linux with an X1 Carbon (so integrated graphics, no fancy GPU).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: