countdown command in all languages possible. It is an adventure in chrestomathy. We seek to explore following.
-
How it is to write something useful in a particular language and not just 'Hello World'.
-
To have an opportunity to understand things that are woven around a particular language and make up important part of the overall developer expirience. This includes communities, libraries, package management, environment setup etc. Ideally entire expirience should be documented as well.
-
countdownshould refer to a specific binary and should not be a binary command. E.g.countdownmay be aliased tocountdown-nodeto showcase the command implemented using Node runtime. Of coursecountdown-nodecan be used directly as well. -
Following all simply outputs
Time is now!string.-
countdownoutputs immediately as there is no duration provided. Here the duration is taken to be 0. -
countdown --milliseconds 2000orcountdown -k 2000outputs after 2000 milliseconds. -
countdown --seconds 20orcountdown -s 20outputs after 20 seconds. -
countdown --minutes 10orcountdown -m 10outputs after 10 minutes. -
countdown --minutes 10.5orcountdown -m 10.5outputs after 10.5 minutes. -
countdown --hours 2orcountdown -h 2outputs after 2 hours. -
countdown --hours 1.5orcountdown -h 1.5outputs after 1.5 hours. -
countdown -m 2.5 -s 15outputs after 150+15 seconds. Various such combination should be possible. -
Options aliases list (and tolerance to spelling mistakes)
- k, mil, mils, mill, mills, milisecond, millisecond, miliseconds, milliseconds
- s, sec, secs, second, seconds
- m, min, mins, minute, minutes
- h, hr, hrs, hour, hours
-
countdown --helpdisplays the usage and exits. -
countdown --versiondisplays the version and which implementation it is pointing to and exits.
-
-
.countdownrcfile should be consulted. -
Support for installation.
-
Support for uninstallation.
-
Use
aliasto aliascountdownto a specific implementation. E.g., following code aliases to a Node implementation.alias countdown='countdown-node' -
Use
unaliasto remove the alias.unalias countdown -
If you want to see which implementation the
countdownis aliased to, use following command.alias | grep 'countdown'