HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
gavinhoward
bc
Roff2021–2025
gavinhoward / bc

bc

An implementation of the POSIX bc calculator with GNU extensions and dc. Finished.

4Distinct people
7Mentions
0Explicit recommenders
254GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

An implementation of the POSIX bc calculator with GNU extensions and dc. Finished.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 2:04:58 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year7 dated mentions

Observed mentions: 2021-09-25 15:34:15 UTC to 2025-07-21 18:15:26 UTC.

01232021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC312
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC110

What Hacker News says

2 sources
https://www.wolframalpha.com/input?i=-3%5E2 https://en.wikipedia.org/wiki/Order_of_operations Parentheses, Exponentiation, Multiplication, Division, Addition, Subtraction -3^2 would then be correctly parsed as -(3^2) which is -9. Parsing it as (-3)^2 would require the addition of parentheses. This gets to the special case of the unary minus sign... which the Wikipedia article specifically calls out. Special cases Unary minus sign There are differing conventions concerning the unary operation '−' (usually pronounced "minus"). In written or printed mathematics, the expression −3² is interpreted to mean −(3²) = −9. In some applications and programming languages, notably Microsoft Excel, PlanMaker (and other spreadsheet applications) and the programming language bc, unary operations have a higher priority than binary operat
Read the rest
ions, that is, the unary minus has higher precedence than exponentiation, so in those languages −3² will be interpreted as (−3)² = 9. This does not apply to the binary minus operation '−'; for example in Microsoft Excel while the formulas =-2^2, =-(2)^2 and =0+-2^2 return 4, the formulas =0-2^2 and =-(2^2) return −4. (edit) Digging into this a little bit more... https://www.gnu.org/software/bc/manual/html_mono/bc.html#TOC... The expression precedence is as follows: (lowest to highest) || operator, left associative && operator, left associative ! operator, nonassociative Relational operators, left associative Assignment operator, right associative + and - operators, left associative *, / and % operators, left associative ^ operator, right associative unary - operator, nonassociative ++ and -- operators, nonassociative This precedence was chosen so that POSIX compliant bc programs will run correctly. This will cause the use of the relational and logical operators to have some unusual behavior when used with assignment expressions. Consider the expression: ... This brings us to the POSIX specification for bc https://pubs.opengroup.org/onlinepubs/9699919799.2018edition... This also shows the unary - having higher precedence than ^. https://github.com/gavinhoward/bc/blob/master/manuals/develo... This document is meant for the day when I (Gavin D. Howard) get hit by a bus. In other words, it's meant to make the bus factor a non-issue. This document is supposed to contain all of the knowledge necessary to develop bc and dc. In addition, this document is meant to add to the oral tradition of software engineering, as described by Bryan Cantrill. ... now, it would be interesting if gavinhoward could clarify some of the design thoughts there (and I absolutely love the oral tradition talk).
In One in five genetics papers contains errors thanks to Excel (2016)
I am surprised at the interest, thank you! One note: technically my software isn't quite Open Source; it's source available. [0] I will have my first release in less than two months, hopefully. It will include a scripting language and a build system. If the language gets interest, I'll expand it and build the standard library. If the build system gets interest, I will expand it. The end goal is Nix for mere mortals. If neither gets interest, I will have to move to my next idea: VCS with project management and that handles large, binary files. Beyond that, we'll see. I have a business website, but not yet for those projects. I will at release, including tutorials. You can read an old commit of design docs at [1], [2], and [3]. It's just me; I want to run my business like Hwaci, the SQLite guys. That also reduces overhead and will let me pr
Read the rest
In YC: Requests for Startups

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.