News for hackers. Stuff that matters.
Re:Facebook invented a new time unit called the ‘flick’ and ... by asudghionbio on Tuesday January 23, 2018 @10:12AM (#16214154)
I wish people were more willing to use rational numbers in programs. Rather than leaving something as 1/24, people almost always perform the division and wind up with a float.

I've never seen rationals in a codebase. And that's a shame, because they do some things elegantly.

Re:Facebook invented a new time unit called the ‘flick’ and ... by throwaway080383 on Tuesday January 23, 2018 @09:04PM (#16219751)
I think the problem is that the numerator and denominator in reduced form can easily get pretty big, even if the magnitude of the number itself isn't all that big. E.g. in the rational number

1 + 1/2 + 1/3 + ... + 1/24,

the denominator already can't fit in a 32-bit int.

Re:Facebook invented a new time unit called the ‘flick’ and ... by wiml on Wednesday January 24, 2018 @03:36AM (#16221256)
You can reasonably efficiently find the nearest rational number whose numerator and denominator fit in a given sized type. This means your rationals are imprecise, just like floats; the sparse subset of numbers they can represent exactly is different from floats' (and possibly more useful).
Re:Facebook invented a new time unit called the ‘flick’ and ... by dahart on Tuesday January 23, 2018 @11:41AM (#16214891)
I've had to use rationals for Project Euler.

You could think of fixed point as a type of rational. ;)

In computer graphics we sometimes use rational curves. It's not the same as rational numbers, but related.

Re:Facebook invented a new time unit called the ‘flick’ and ... by hmm_really on Tuesday January 23, 2018 @02:06AM (#16211624)
Sign of the times I guess, what would of once of been a neat C macro, is now marketing news in the tech industry.
Re:Facebook invented a new time unit called the ‘flick’ and ... by jjaredsimpson on Tuesday January 23, 2018 @10:01AM (#16214055)
Least common multiples are amazing tech now.
Re:Facebook invented a new time unit called the ‘flick’ and ... by geezerjay on Tuesday January 23, 2018 @01:59PM (#16216296)
> what would of once of been a neat C macro

I agree on the overboard marketing spiel but the idea is actually rather clever.

Re:Facebook invented a new time unit called the ‘flick’ and ... by CyberDildonics on Tuesday January 23, 2018 @08:36AM (#16213427)
I wish we could skip the commentary part of the headline that is a signature part of clickbait.
Re:Facebook invented a new time unit called the ‘flick’ and ... by em3rgent0rdr on Monday January 22, 2018 @10:14PM (#16210673)