Live data from Hacker News

Ask HN: Did you encounter any leap year bugs today?

news.ycombinator.com

301–310 of 498 posts

Re: Ask HN: Did you encounter any leap year bugs today?

#303

Earlier quoted context omitted.

I'm sure it's more complicated than "we didn't think about leap years", but it certainly sounds pretty amateurish. Old programmer rant: In my day, we fixed the Y2K bug - we went to the future and back several times a day!

It does sound amateurish eh? I do most of my business logic inside Microsoft SQL Server Stored Procedure, and MS SQL just takes care of date pretty well. But then, come to think of it, you don't need to use SQL to have good date logic. C# and Java both have excellent date handing libraries. I don't know about C++, but I'd be surprised if there was not a modern date library for C++, so I am of the opinion there should…

> but I'd be surprised if there was not a modern date library for C++

The standard library now includes . AFAIK: It was mostly written by Howard Hinnant. He now has more date/time libs that expand upon : https://github.com/HowardHinnant/date

Re: Ask HN: Did you encounter any leap year bugs today?

#307
post #271

Earlier quoted context omitted.

Even if it sees tokens, I don't think it's an impossible task. Certainly an advanced enough LLM should be able to decipher token meanings, to know that a word is made up of the individual character tokens regardless of how the full word is tokenized. Maybe something gpt5 can do (or there's some real technical limitation which I don't understand)

> to know that a word is made up of the individual character tokens A token is the smallest unit, it's not made of further tokens. It maps to a number.

He's saying the LLM will figure out how many letters are in each token.

Re: Ask HN: Did you encounter any leap year bugs today?

#308
post #276
post #268

Earlier quoted context omitted.

Is March more logical? Feb 29 + 1 year = Feb 28.

What’s the significance of 365? Each Earth year has just a smidge under 365.25 days.

But 1 day is still 24 hours.

If you want to celebrate your birthday at the moment earth reaches the same spot around the sun as when you were born, then we’d all have the same issue - we’d have to celebrate it 6 hours later every year, reseting every 4 years.

February 29 is very much a new day… which simply doesn’t exist on non-leap years.

Re: Ask HN: Did you encounter any leap year bugs today?

#309
post #284

Earlier quoted context omitted.

365 days is what people commonly think of as a year. So if you're born Feb 29th and celebrate your birthday one year later (whether you call that 365 or 365.25), you land on Feb 28th. Then again, folks born between Jan 1 and Feb 28th of a leap year celebrate their birthdays 366 days later by calendar days. Anyway, I'm not sure there's any more or less logical date to use and Feb 29th babies seem to choose both about…

Celebrating on the 28th makes no sense. That is when you celebrate your Birthday Eve every year so your birthday is the next day, whatever that is.

You can make the same argument that March 1st makes no sense, as that is the day of your birthday hangover, the day after whenever your birthday is.

Re: Ask HN: Did you encounter any leap year bugs today?

#310
post #271

Earlier quoted context omitted.

Even if it sees tokens, I don't think it's an impossible task. Certainly an advanced enough LLM should be able to decipher token meanings, to know that a word is made up of the individual character tokens regardless of how the full word is tokenized. Maybe something gpt5 can do (or there's some real technical limitation which I don't understand)

> to know that a word is made up of the individual character tokens A token is the smallest unit, it's not made of further tokens. It maps to a number.

I think what of is getting at is that given

{the:1, t: 2, h:3, e:4}

There should be somewhere in the corpus, "the is spelled t h e" that this system can use to pull this out. We can ask gpt to spell out individual words in NATO phonetic and see how it does.

Post reply on HN