News for hackers. Stuff that matters.
Re:Show HN: Lightweight time-management CLI tool by ams6110 on Monday October 03, 2016 @07:35PM (#12632259)
> Around 100 LOC

Say what? To ring the bell after sleeping based on a parameter?

Re:Show HN: Lightweight time-management CLI tool by lgas on Monday October 03, 2016 @08:06PM (#12632402)
To be fair it does slightly more than that (relative times, absolute times, etc) but it is somewhat ironic considering that it advertises itself as an alternative to one liners like "sleep 4231; beep".
Re:Show HN: Lightweight time-management CLI tool by tingol on Monday October 03, 2016 @08:14PM (#12632432)
You can do sleep 15m; beep
Re:Show HN: Lightweight time-management CLI tool by duaneb on Monday October 03, 2016 @08:30PM (#12632488)
One of the reasons to use this is to avoid beep, which may not even be enabled on your machine.
Re:Show HN: Lightweight time-management CLI tool by tingol on Monday October 03, 2016 @09:44PM (#12632771)
Use echo '\a' that's what this program uses anyway... It's literally sleep $1; echo '\a' or you can use at if you want exact time.
Re:Show HN: Lightweight time-management CLI tool by michaelcampbell on Monday October 03, 2016 @10:37PM (#12632956)
Yes, anything can be done in a different way.
Re:Show HN: Lightweight time-management CLI tool by swiley on Tuesday October 04, 2016 @06:17AM (#12634450)
X11 bell almost never works for me.
Re:Show HN: Lightweight time-management CLI tool by zokier on Monday October 03, 2016 @11:24PM (#12633117)
GNU sleep is around 150 loc, and does significantly less...
Re:Show HN: Lightweight time-management CLI tool by glandium on Tuesday October 04, 2016 @04:08AM (#12634003)
GNU programs are not a reference. They must have usage(), and handle --help and --version. Even /bin/true.

  coreutils-8.25$ wc -l src/true.c
  80 src/true.c
Re:Show HN: Lightweight time-management CLI tool by liviu- on Tuesday October 04, 2016 @02:06PM (#12637763)
Ding has `--version`, and a help message too :P

To be honest, a big chunk of it is just handling user input and attempting to provide useful error messages.