Live data from Hacker News

A deeper introduction to Unix DC

ben165.github.io

1–10 of 21 posts

Re: A deeper introduction to Unix DC

#5
dc is worth having installed because of this CLI gem alone:

    echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq" | dc
I've never tried to understand what's really going on to produce the result, but also wouldn't really know where to start - maybe someone in HN's audience can enlighten me? :)

Re: A deeper introduction to Unix DC

#6
post #5

dc is worth having installed because of this CLI gem alone: echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq" | dc I've never tried to understand what's really going on to produce the result, but also wouldn't really know where to start - maybe someone in HN's audience can enlighten me? :)

dc and bc are standard POSIX utils (and also part of busybox for embedded systems) so for most unix-like systems they're installed by default unless you take active measures to exclude them.

Re: A deeper introduction to Unix DC

#7
post #6
post #5

dc is worth having installed because of this CLI gem alone: echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq" | dc I've never tried to understand what's really going on to produce the result, but also wouldn't really know where to start - maybe someone in HN's audience can enlighten me? :)

dc and bc are standard POSIX utils (and also part of busybox for embedded systems) so for most unix-like systems they're installed by default unless you take active measures to exclude them.

[deleted]

Re: A deeper introduction to Unix DC

#8
post #6
post #5

dc is worth having installed because of this CLI gem alone: echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq" | dc I've never tried to understand what's really going on to produce the result, but also wouldn't really know where to start - maybe someone in HN's audience can enlighten me? :)

dc and bc are standard POSIX utils (and also part of busybox for embedded systems) so for most unix-like systems they're installed by default unless you take active measures to exclude them.

POSIX.1-2017 describes the `dc` program as "excluded" from the standard; check https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu... for details.

Many GNU/Linux distros (at least Debian and RHEL) install neither `dc` nor `bc` by default, afaik.

Post reply on HN