The Genius of the "dc" Desktop Calculator

  Рет қаралды 6,438

Calculator Culture

Calculator Culture

Күн бұрын

Пікірлер: 35
@holgerH1
@holgerH1 3 жыл бұрын
Super interesting, thanks for making this. I use dc a lot actually but so far only for simple quick calculations. Cool to see how advanced it really is.
@gaius_marius
@gaius_marius 2 жыл бұрын
Thank you for the great video. DC is one of those cool little treasures buried in our computers that most people will never find.
@DrDavesDiversions
@DrDavesDiversions 3 жыл бұрын
3:50 ha, awesome. In my video about "The 1st UNIX BASIC" (bas by Ken Thompson) I wondered why unary minus/ negation was underscore, apart from using a different character works best with certain styles of parser (I.e. not recursive descent). You just showed me why from the contemporaneous dc(1) and RPN calculators. Aside: the J programming language c. 1990 also does this. Great video and idea! You hit the nail on the head with it being unusual to use dc. I usually use bc(1) instead, which is sometimes implemented upon dc(1).
@CalculatorCulture
@CalculatorCulture 3 жыл бұрын
Thanks Dave. Yeah _ is easier to parse, i'm not sure if Bob Morris chose underscore in particular for any other reason than it is the closest looking character to minus or whether there was a precedent in an earlier language.
@michaelfelzien6765
@michaelfelzien6765 3 жыл бұрын
use to be a unix / linux head. I never understood the dc command but knew of it. useful and interesting.
@rga218
@rga218 3 жыл бұрын
Thanks for this terrific video.
@denpickie
@denpickie 2 жыл бұрын
Loved watching such a learned demo of dc. Having used Linux since the 90's I had never run across dc but I'd heard of rpn. Wow, thank you for making the video.
@CalculatorCulture
@CalculatorCulture 2 жыл бұрын
Thanks for the kind words.
@DanSanderson
@DanSanderson 3 жыл бұрын
Really enjoyed this! I'd be interested in more brief reviews of software calculators (vintage or otherwise) that interest you as a calculator collector. Emacs Calc seems pretty featureful, especially when paired with Org Mode spreadsheets. I have Soulver on my Mac, though I've only poked at it, not pushed it to its limits. I'll use PCalc on my iPhone occasionally. If you've got a favorite mobile phone calc I'd love to know about it. Only if they interest you though, of course. :) I don't really know who is pushing the envelope on calc interfaces these days.
@CalculatorCulture
@CalculatorCulture 3 жыл бұрын
Yeah its odd, I've been using emacs for 30 years but have never used Emacs calc... it looks interesting I will check it out. Another fascinating one is Google's Android calculator app which allows users to scroll results to an arbitrary precision.
@Sylvan_dB
@Sylvan_dB 2 жыл бұрын
'dc' doesn't need all the spaces. This required it to use the underscore as negation to distinguish it from the hyphen as a subtraction operator. There are many implementations of 'dc' in use today. The original was not written in 'c' (in 'b' if I remember correctly) and so difficult to compile and use on today's platforms. This means that modern behavior may not always be 100% identical to the original, but it is remarkable that we still have available (because people find useful) a program with such a long history. I used to use 'dc' very often, but finally I wrote my own python 'rpn' calculator which removed the things I found irritating about 'dc' (e.g. the underscore, needing to use another operator to see my answer, need to echo my equation into 'dc' to get a quick evaluation, ...) and added some things I missed. I still use 'dc' but only where I don't have my 'rpn' ! My brain has become hard wired for rpn since switching from a TI-30 to an HP 15c in 1982, then to a 28s in 1989 or 1990.
@MrWaalkman
@MrWaalkman Жыл бұрын
@1:42 Robert Morris, the father of the father of the "Morris Worm". :) It's been ages since I've used DC. Thanks for the trip down memory lane!
@CalculatorCulture
@CalculatorCulture Жыл бұрын
That's true. RTM has done many other things in his career such as founding YCombinator and Viaweb, but for some reason, he is still most well known for the worm. He was very kind in answering my questions when I was researching this video.
@MrWaalkman
@MrWaalkman Жыл бұрын
@@CalculatorCulture I remember reading about it years ago. It was an innocent mistake that arguably got overblown by the prosecutor. Definitely brilliance runs in that family.
@dm319-j5y
@dm319-j5y Жыл бұрын
Really interesting! It also seems to be arbitrary base. Are there other calculators that can do bases other than 2,8,10,16?
@CalculatorCulture
@CalculatorCulture Жыл бұрын
The only other I’m aware of is the WP34S which supports any base from 2-16.
@dm319-j5y
@dm319-j5y Жыл бұрын
@@CalculatorCulture Oh wow that's pretty cool. Do you happen to have one? And do you know if it can correctly calculate say 1/3(base 12) without having a recurring decimal? (should give 0.4 not 0.3BBBB). thanks in advance. DC is giving me the recurring decimal which I guess is due to binary encoding
@richtraube2241
@richtraube2241 3 ай бұрын
Thank you for the great demonstration and brief history of dc. I especially like your demo of macros. I'm a dc fan for sure. I use dc for quick calculations oftenly. I also use dc scripts for tax itemization. It's easy to double check the script against other records. As you demonstrate, using text in dc for interaction can be done but with some friction. dc also accepts stdout so you can pipe a heredoc to it, letting you use shell variables in a dc script.
@stillwrinkled
@stillwrinkled 3 жыл бұрын
good tutorial, never used dc in interactive mode before. video is a little difficult to comprehend for non-native english speakers and turning on caption obstructs the view. but thanks for this excellent video
@danceswithdirt7197
@danceswithdirt7197 3 жыл бұрын
I love it! Thanks!
@CalculatorCulture
@CalculatorCulture 3 жыл бұрын
Very cool.
@seanhunter111
@seanhunter111 Жыл бұрын
Isn't Morris also the originator of the "finger worm" (the very first piece of malware) which he wrote as an experiment?
@CalculatorCulture
@CalculatorCulture Жыл бұрын
That was his son, Robert Tappin Morris.
@seanhunter111
@seanhunter111 Жыл бұрын
Aah thanks. Also thanks for covering dc. It's a little-known tool and extremely opaque to anyone who stumbles upon it.
@dharmatech
@dharmatech 3 жыл бұрын
Consider a video on Emacs Calc 😁
@CalculatorCulture
@CalculatorCulture 3 жыл бұрын
A few people have mentioned Emacs Calc - I will look into it.
@dharmatech
@dharmatech 3 жыл бұрын
@@CalculatorCulture Oh man..... You're in for a treat! Just go through the tutorial some time. You will be blown away.
@Mythologos
@Mythologos 2 жыл бұрын
Unix is the One True Faith and Emacs is its Prophet! Blessings in Elisp, Blessings in Pure C, Benedictions from the Messages Buffer. Amen!
@MrWaalkman
@MrWaalkman Жыл бұрын
Heretic... :)
@HeyBirt
@HeyBirt 3 жыл бұрын
Very interesting!
@CalculatorCulture
@CalculatorCulture 3 жыл бұрын
Thanks Birt, I subscribe to your channel and enjoy your videos too.
@GregMeece
@GregMeece 3 жыл бұрын
Interesting history and video. I've not heard too many reference to the 'B' language, although I've known of its existence. FWIW, Mac OS X was re-christened macOS on June 13, 2016 with the release of 'Sierra' (10.12). Ref: en.wikipedia.org/wiki/MacOS_version_history#Version_10.12:_%22Sierra%22
@CalculatorCulture
@CalculatorCulture 3 жыл бұрын
Yeah my understanding is that B had a similar syntax to C but didn't support types.
@angelcastaneda4023
@angelcastaneda4023 11 ай бұрын
dc bc > p TRUE
HP 27S - HP's elegant "Do All" calculator from 1988
19:49
Calculator Culture
Рет қаралды 7 М.
Kahan on HP calculators: Solve, Integrate and Matrix Operations
8:26
Turing Awardee Clips
Рет қаралды 14 М.
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.
Tools EVERY Software Engineer Should Know
11:37
Tech With Tim
Рет қаралды 23 М.
TI-58C Scientific Calculator from 1978
16:58
Calculator Culture
Рет қаралды 6 М.
HP 42S Scientific Calculator from 1988
16:29
Calculator Culture
Рет қаралды 11 М.
HP 49G - Meta Kernel, Erable and ALG48
17:34
Calculator Culture
Рет қаралды 2,5 М.
OpenAI's o1 just hacked the system
26:31
AI Search
Рет қаралды 38 М.
HP-41CX Pocket Computer Hiding as a Calculator - First Look
31:29
Tech Tangents
Рет қаралды 84 М.
The GNU Emacs Calculator
13:22
Calculator Culture
Рет қаралды 6 М.
Emulating DOS on Apple Silicon #DOScember / #DOScember2024
12:38
Rich's Random Retro Reviews
Рет қаралды 617
Review of the DM42 Scientific Calculator
11:36
Logan West
Рет қаралды 41 М.
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН