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_marius2 жыл бұрын
Thank you for the great video. DC is one of those cool little treasures buried in our computers that most people will never find.
@DrDavesDiversions3 жыл бұрын
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).
@CalculatorCulture3 жыл бұрын
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.
@michaelfelzien67653 жыл бұрын
use to be a unix / linux head. I never understood the dc command but knew of it. useful and interesting.
@rga2183 жыл бұрын
Thanks for this terrific video.
@denpickie2 жыл бұрын
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.
@CalculatorCulture2 жыл бұрын
Thanks for the kind words.
@DanSanderson3 жыл бұрын
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.
@CalculatorCulture3 жыл бұрын
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_dB2 жыл бұрын
'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 Жыл бұрын
@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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
Really interesting! It also seems to be arbitrary base. Are there other calculators that can do bases other than 2,8,10,16?
@CalculatorCulture Жыл бұрын
The only other I’m aware of is the WP34S which supports any base from 2-16.
@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
@richtraube22413 ай бұрын
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.
@stillwrinkled3 жыл бұрын
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
@danceswithdirt71973 жыл бұрын
I love it! Thanks!
@CalculatorCulture3 жыл бұрын
Very cool.
@seanhunter111 Жыл бұрын
Isn't Morris also the originator of the "finger worm" (the very first piece of malware) which he wrote as an experiment?
@CalculatorCulture Жыл бұрын
That was his son, Robert Tappin Morris.
@seanhunter111 Жыл бұрын
Aah thanks. Also thanks for covering dc. It's a little-known tool and extremely opaque to anyone who stumbles upon it.
@dharmatech3 жыл бұрын
Consider a video on Emacs Calc 😁
@CalculatorCulture3 жыл бұрын
A few people have mentioned Emacs Calc - I will look into it.
@dharmatech3 жыл бұрын
@@CalculatorCulture Oh man..... You're in for a treat! Just go through the tutorial some time. You will be blown away.
@Mythologos2 жыл бұрын
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 Жыл бұрын
Heretic... :)
@HeyBirt3 жыл бұрын
Very interesting!
@CalculatorCulture3 жыл бұрын
Thanks Birt, I subscribe to your channel and enjoy your videos too.
@GregMeece3 жыл бұрын
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
@CalculatorCulture3 жыл бұрын
Yeah my understanding is that B had a similar syntax to C but didn't support types.