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 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 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

7 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
Yes, absolutely. I'm starting a business, and this is my real product. Most everybody will see my FOSS code as my product, but that's my loss leader. My real product, the stuff people will actually pay for, is doing stuff such as responding to bug reports like [1]. In other words, my product is caring about your needs and meeting them. On the flip side, I want customers who care too. I think one reason those furniture people did so well is because they had a customer who cared, and it was refreshing. When you do something day in and day out, you either become careless, or obsessed. As a customer, you want to seek out the latter, but as a vendor, when you are the latter, getting a customer who cares is not just refreshing, it's enormously fun! [1]: https://github.com/gavinhoward/bc/issues/66
In Giving a Shit as a Service (2022)
I am a programmer and a blogger, like the author. Unlike the author, I do not monetize my blog in any way (or I assume he does on Substack). The author is both right and wrong, just about different things. First, he assumes GPT will get exponentially better. If that were true, all cars would be full self-driving already. GPT will have an S curve or Sigmoid function. Second, he assumes that GPT will always be able to produce things from differing voices well. However, as more data is used, these bots will only become more homogenous. You can see clues of this when it managed to make a Biggie Smalls rap, but did not with Woody Gunthrie, whose data is probably closer to the mainstream than Biggie's. (This is a gut feeling; could be wrong.) Third, as things become more of the same bot-like feeling, even from people, those who have their own v
Read the rest
oice and touch will stand out more. You can see this in his essay, versus the two written by the bot. The voice of the bot ones feels more stilted to me. His feels more natural. What people need to do is to develop their own voice and touch. In writing, develop your voice. Write without help. Write a lot. Create a blog. Put random stupid stuff there. Let yourself rant. That random stupid stuff and those rants will not be mainstream, and if it's stupid and ranty, you won't have to care about quality. That lack of care will let you have fun, and that fun will become your voice. This is how I developed my voice with my blog. In code, develop your touch. Don't just code; design. Think about concepts. Think about UX and workflows. Iterate until everything is great. Then design the implementation and iterate until everything fits. Then, and only then, code. But as you code, iterate the design to remove things that no longer fit and add things that do. Dogfood your software. Use it for everything you can, even things that don't fit well. Iterate and change some more to make your dogfooding easier. The end result will be software that is easy-to-use and fits the users' needs well. That fit will be your touch. This is how I developed my touch with my most well-known project: `bc`. [1] But you don't even need to stop there. With my `bc`, I spent time supporting users and implementing things for them. Obviously, I still designed changes before implementing them, but I listened to my users and gave them what they wanted within the constraints I had. The end result is a `bc` that can act like the GNU `bc` or the BSD `bc`, whichever you want. It can also be its own thing with extra features. Listening to users is another human touch. Make use of it. In fact, that's where I will make a living from my current project: my support for it will be best-in-class [2], and that's something GPT can never replicate because it cannot replicate my brain, my voice, and my touch, even when trained on my writing. In other words, the author is write that the 90% is useless, but those 90% were the ones where you were at least partially imitating a bot anyway. Those 10% are the human traits. If you want to have useful skills, be a human, not a fleshy bot. Footnote: I feel bad for anyone that gets my code or writing as output from GPT. My code fits my head and no one else's. It also uses custom API's that don't exist anywhere else, which means such output would be useless. The same goes for my writing, though to a lesser extent. [1]: https://github.com/gavinhoward/bc [2]: https://github.com/gavinhoward/bc/issues/66
In Most of my skills are now worth nothing, but 10% are worth 1000x
You're welcome. :) > I've bookmarked your gitea bc repo, not just for bc, but as an example of a neatly managed FOSS project, like providing performance comparison, fuzzing, project structure, the fact of using self-hosted gitea itself, etc Thank you! It's good to know that my project is actually good; sometimes I wonder if I am just full of myself. XD > Skimming through [1], I see neither of Winget [2] nor Chocolatey [3] have any `bc` implementations as of yet. Maybe you can send them a PR? It may help adoption in other distros in the future. I will do that. However, I might wait until I accept a PR that was just made [1] that will fix issues on Windows. I am not good at Windows, so there are problems. > Hope your implementation wins ;) Thank you. :) [1]: https://github.com/gavinhoward/bc/pull/38
In Toybox: All-in-one Linux command line

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.