Live data from Hacker News

Ask HN: What small library or tool do you want that doesn’t exist?

news.ycombinator.com

1–10 of 145 posts

Re: Ask HN: What small library or tool do you want that doesn’t exist?

#2
I sometimes find myself wanting a Unix timestamp, or to convert one into a human-readable date, and usually it's simpler to go to an online tool than use time(1).

It might be nice to have a command line tool which can guess from the arguments what you want it to do. For example, if you run it with no arguments, it would output the current timestamp (to multiple levels of precision, listing the languages/platforms that typically use each one).

Re: Ask HN: What small library or tool do you want that doesn’t exist?

#3
post #2

I sometimes find myself wanting a Unix timestamp, or to convert one into a human-readable date, and usually it's simpler to go to an online tool than use time(1). It might be nice to have a command line tool which can guess from the arguments what you want it to do. For example, if you run it with no arguments, it would output the current timestamp (to multiple levels of precision, listing the languages/platforms tha…

I always forget how to get a unixtime so I either load a repl or the manpage for date, but FreeBSD date -r 123 works to go to human time. date -u -r 123 if you want UTC.

Re: Ask HN: What small library or tool do you want that doesn’t exist?

#5
I wish VLC, plex, video players in general had the ability to automatically sync subs to audio. (automatically, not manually)

We have the technology; everything we need to do this exists. It's just not done automatically, and when using slightly off-sync subs, you have to fiddle with sub timing for ages until you find the right sync. Even more so when the subtitles have different off-sync issues for the whole movie/episode.

Re: Ask HN: What small library or tool do you want that doesn’t exist?

#6
post #2

I sometimes find myself wanting a Unix timestamp, or to convert one into a human-readable date, and usually it's simpler to go to an online tool than use time(1). It might be nice to have a command line tool which can guess from the arguments what you want it to do. For example, if you run it with no arguments, it would output the current timestamp (to multiple levels of precision, listing the languages/platforms tha…

Get print the current time as as Unix timestamp.

    date +%s
To convert a Unix timestamp to local time with GNU date, e.g.

    date -d @1651483224
With BSD date, e.g.

    date -r 1651483224

Re: Ask HN: What small library or tool do you want that doesn’t exist?

#8
I use MS SQL Server a lot at work. I interact with instances via SSMS usually. I'd love a tool that would log to file every query that I execute. Including a customisable comment line with info including when it was run and the server/db it was run against.

I'd move to a command line tool, e.g. a sqlcmd variant or shell voodoo, if it could do that.

Re: Ask HN: What small library or tool do you want that doesn’t exist?

#9

I wish VLC, plex, video players in general had the ability to automatically sync subs to audio. ( automatically , not manually) We have the technology; everything we need to do this exists. It's just not done automatically, and when using slightly off-sync subs, you have to fiddle with sub timing for ages until you find the right sync. Even more so when the subtitles have different off-sync issues for the whole movie…

I've used https://github.com/kaegi/alass and sometimes it works, sometimes it doesn't. It's not an easy problem to address automatically...

Video players wouldn't want that in their codebase, maybe if it was available as a C library.

Re: Ask HN: What small library or tool do you want that doesn’t exist?

#10

I wish VLC, plex, video players in general had the ability to automatically sync subs to audio. ( automatically , not manually) We have the technology; everything we need to do this exists. It's just not done automatically, and when using slightly off-sync subs, you have to fiddle with sub timing for ages until you find the right sync. Even more so when the subtitles have different off-sync issues for the whole movie…

And you need to do the manual thing so rarely, that you always forget that does the delay need to be positive or negative if the subtitles are fast. =)
Post reply on HN