MoreRSS

site iconBear Blog Trending PostsModify

Ranked according to the following algorithm:Score = log10(U) + (S / D * 8600), U is Upvotes , S/D is time.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of Bear Blog Trending Posts

i can't stop thinking about goodreads' top 100

2026-02-06 23:45:00

by goodreads' top 100, i'm specifically talking about the top 100 list dictated by user ratings. why it has failed to leave my mind is its fascinating modernity, especially in comparison to other user-rated best of all time lists.

a few months ago, i saw a tweet about how today's readers were "cooked" because moby dick was sitting at an average rating of 3.6 while catching fire was rated a much higher 4.3. someone in the replies went on to complain about the concerning lack of appreciation for classic novels today, moby dick or otherwise, and to look at how ridiculous goodreads' top 100 was as proof for their claim. curious, i examined the list myself and promptly saw that this complaint actually had some backing. on this list is no more than ten books published before the year 2000, with the oldest books having been published sometime in the 1950s. i don't think a lower rating on classic novels is bad on an individual level — but as a general consensus surprised me! it truly made my head spin as i began to ponder the lack of classics on the list.

i mean surely, classics were classics for a reason? the reason being that they were...good?

in a sort of mesmerized daze, i opened up the letterboxd top 250, imdb top 250, rym highest rated, and aoty highest rated just to compare.

i wanted to talk a little bit about letterboxd and imdb first because i feel more familiar with film than i do literature or music. these websites' highest rated movies have substantial overlap, even if their exact rankings are different. both lists feature multiple classics from old hollywood (12 angry men, casablanca), new hollywood (the godfather, apocalypse now), asian directors (akira kurosawa, masaki kobayashi), and european directors (andrei tarkovsky, vittorio de sica), which i consider to be a very healthy variety. these lists did not surprise me one bit because it had all the kinds of movies i expected to find in a top 250 list.

i considered that accessibility played a major role in shaping such a thing, as film is still a very new medium, relatively speaking of course, being a little over one hundred years old — whereas literature is so old we have no small amount of penguin classics that were published in the 1400s. i assumed it is probably far easier for the modern 2020s human to sit back and enjoy a movie from the 1940s than it might be to read something from medieval times.

even so, there are still plenty of modern classics published from the 1900s onwards that are nowhere to be found. something like to kill a mockingbird or 1984. i figured that if i am able to understand the english used in an early 20th century movie, i should have no trouble reading a novel of the same time period, difference in spoken and written word considered. to really test this, i picked up the 1938 novel rebecca and have found myself understanding its prose without issue. i know this is just one book, so maybe a reader who has read other novels from this time period would like to inform me if other books might be a bit harder to parse. i think the only popular classic i've read was crime and punishment, which to be honest, was not that hard to understand either.

additionally, i thought it was interesting that a few of the films listed are based on classic books. dune is an example, but one i considered to be more interesting is tolstoy's war and peace. somehow, a four-part film series that totals 413 minutes (a movie i think would not be very accessible for general, not just modern audiences) has landed itself at 82nd place with a score of 4.4 on letterboxd while its book counterpart is missing roughly 0.3 points before qualifying for top 100 status on goodreads.

as for rym and aoty: they are quite similar to their film counterparts the way they too have a significant overlap between artists. i'm aware that both websites are primarily used to rate modern music (is there a music website having fan wars over beethoven?) so "classics" in this sense would likely refer to something like the beatles, who to literally no one's surprise, has abbey road on both lists of highest rated albums. i hope you'll agree with me, but because different music genres emerged at different times the exact years an artist would be considered a "classic" varies. bearing that in mind, i'd consider both wu-tang clan (formed in the 1990s) and john coltrane (active 1960s) classics for their respective genres. and yes, both of these artists are on the two lists of highest rated albums.

again, i figured that because both websites focus on modern music, listening to a 1960s album is about as easy as watching a 1960s film. which is to say, very.

so, coming back to goodreads, i really hope you don't think i'm crazy over being perplexed by the lack of classics. i don't want to come off as elitist or anything, but i'm not a hundred percent sure i can get behind literal harry potter fanfiction being in 62nd place over the count of monte cristo. i know the hurdle for getting into classic literature can be quite a high one (why, i myself failed to finish pride and prejudice in my teen years) but is this a hurdle nobody is trying to jump over anymore? are majority of the ratings on classics from kids who were annoyed they had to read the book for school? are the users holding classics to a higher standard and being more critical because they are classics? are the users judging classics using contemporary standards? i don't know. i feel like you could apply these thoughts to other art mediums but those user-rated lists still turned out very different.

of course, i could also just be deeply misunderstanding why the goodreads top 100 list would look like that. if you have any thoughts about it, please write me. i feel like i'm being haunted.

Introducing Axiom Bible - A Bible App That Gets Out of Your Way

2026-02-06 23:23:00

I'm a pastor in Louisiana, and like most people in ministry, I've tried just about every Bible app out there. They all start the same way: you open the app to read a passage, and before you get to a single verse you're greeted by a carousel of reading plans, a social feed, devotional pop-ups, and enough graphics to make your phone feel like a magazine rack.

I didn't want any of that. I just wanted to open an app, read Scripture, and go about my day.

So I built one.

Axiom Bible Teaser (wide)

Axiom Bible is a free Bible reader for iOS that's built around one idea: simplicity. No social media integrations. No curated content feeds. No accounts to create. No ads. No tracking. Just the Bible, a few tools that actually help you study it, and a clean interface that stays out of your way.

What's Inside

Seven translations. Axiom Bible ships with seven public-domain and openly-licensed translations (with more on the way): KJV, ASV, BBE, BSB, Darby, WEB, and YLT. Switch between them instantly while reading or searching, no downloads, no waiting. All the text lives on your device from the moment you install the app.

Search that actually works. Type a reference like "John 3:16" or "II Corinthians 3" and go straight there. Or type a keyword and get results across the entire Bible with your search term highlighted and bolded so you can scan quickly. You can also filter results by Old or New Testament, or search only within your saved favorites.

Matthew Henry's Concise Commentary. This is one of my favorite features. Tap-and-hold on any verse and you can pull up the corresponding entry from Matthew Henry's Concise Commentary, a trusted, public-domain resource that pastors and students have relied on for centuries. Nearly 4,000 commentary entries are bundled right into the app.

Historical Context powered by Apple Intelligence. For passages where you want more background, such as who wrote this, when, why, and to whom, Axiom Bible can generate historical context right on your device using Apple Intelligence. It runs entirely on-device, so nothing leaves your phone. You can adjust the length and tone (casual, pastoral, scholarly, or professional) depending on whether you're doing quick devotional reading or deeper study.

Favorites that sync. Swipe right on any verse to save it. Save single verses, ranges, or whole chapters. Your favorites sync across all your Apple devices through iCloud, and they're even indexed in Spotlight search so you can find them from your home screen.

Siri and Widgets. Ask Siri to look up a verse or open your favorites. Add a Scripture of the Day widget to your home screen. Use Shortcuts to build your own automations. The app plugs into the parts of iOS that make your phone actually useful.

Multi-select for study. When you're working through a passage, tap the select button to choose multiple verses at once, then copy, share, or favorite them all together. It's a small thing, but it makes a real difference when you're preparing a sermon or pulling together references.

What It Doesn't Have

No accounts. No social feeds. No reading plan guilt. No ads. No tracking.

The app is designed for people who already know what they want to read. It respects your time and your attention.

A Note on Supporter Tiers

Axiom Bible is free to use, including all versions of the Bible, Matthew Henry's Concise Commentary, and Historical Context. There's an optional "Axiom Supporter" subscription that unlocks a few extras such as custom app icons, full customization of the Historical Context feature, and a way to support ongoing development. Everything core to reading and studying Scripture is free.

Available Now

Axiom Bible is available on the App Store for iPhone. If you've been looking for a Bible app that just lets you read, I'd love for you to give it a try.

Everyone should play more games offline

2026-02-06 23:01:26

There's something cozy about playing a video game offline.

Try it. Turn off WiFi in the house or go into offline mode and boot up your favorite game. Get comfy with your favorite beverage and snack.

If the game works in offline mode, you're in for a real treat. You'll notice:

  • Nothing is trying to "keep" you longer than you want to be there.
  • Microtransactions don't work or are non-existent.
  • The experience is less "noisy". It's more focused.
  • There's nothing tracking you while you play. Nothing is sending data back home about you.
  • There are no system notifications interrupting your experience.
  • There are no fomo driven promotions trying to upsell you

The mere fact that the game runs offline means it's built to last. If it can boot up without internet, you can be confident it will boot up 10 years from now.

It's feels simple. Back to basics. Pure. Boot up the game and play. No updates needed before it can run and the only thing getting in the way of you and your game is a loading screen.

Immerse yourself like you used to back in the day. Just enjoy the artistry on display. Avoid looking up reviews, hints, and guides. Get lost and try to figure things out. Ask yourself how you feel about the experience. Make up your own mind. Don't try to optimize the experience based on someone else's suggestions.

Just play. Play the way you want to play.

Why and how to write things on the Internet

2026-02-06 21:00:00

January was my first month back to writing my blog. As I’ve become more invested in the habit and the online writing community, I started reading articles that offer personal takes on the why and how of writing. I especially enjoyed Ben Kuhn's suggestions and wanted to take some notes for myself as a reminder.

I decided to share them here in case they are useful for anyone else starting out.

What follows is the content of Ben's article; some sentences are rephrased, some are edited, and others are original. For the full version, you can check out the original article on Ben's website.


Why to start

1. More awesome friendships

The strongest reason for any random person to start a blog is that you will have more awesome friendships:

  • meet new awesome people as a result of your blog
  • writing will cause you to have more interesting ideas

Most other important things in life, like job opportunities and romantic relationships, are downstream of the quality of your friends, so this is pretty great.

From other people’s blogs:

  • My friend Ben wrote a post about how he likes to work (https://tbenthompson.com/post/maintaining_momentum/) that has led to both actual, and potential future, jobs.

2. The bar is lower than you think

Most people dramatically underestimate the impact that their writing has on others. It’s easy to think that you have to put out really “interesting” writing in order for other people to like it.

Lower your bar for what’s worth writing about: my personal standard is anything that I’ve said more than once in a conversation.

How to start writing

Top suggestions for writing on the internet are: (1) publish consistently and (2) pay attention to feedback.

1. Build a consistent writing habit

My ability to write improved the most when I committed to writing every week and, briefly, every day. Blog posts are one of the ultimate examples of searching for outliers and one of the best ways to improve your chances is just to take lots of shots

2. Come up with ideas to write about

As mentioned above, an important first step here is to lower your bar for what’s worth writing about.

Start paying attention to topic ideas. These can come from lots of different places:

  • Something you said in a conversation with a friend that surprised them
  • Document a project you did recently
  • Explain how to do something you do
  • Explain how something works
  • Review a book
  • Curate a set of links about a topic
  • A rant
  • Something internet commenters/public intellectuals frequently say that seems wrong

The most important thing here is to write about whatever you’re most excited to write about (n.b. not what you think you should be most excited to write about, or what you’re most excited to have written about)

I recommend trying to keep your list of topics roughly ranked by how excited you are.

3. Get your initial set of readers

You want two things from your initial set of readers:

  1. More-involved feedback from a few draft readers.
  2. A larger set of normal subscribers whose reaction can help understand what resonates

A note on draft readers: The main value of draft readers is often getting their overall reaction rather than those detailed improvement suggestions.

Appendix 1: Writing quality tips

  1. Come up with a good title. A good title makes a promise about what the reader will get from reading the post that is (1) exciting, and (2) accurate. I used to just title posts based on the general topic. This doesn’t promise anything about takeaways.
  2. Find the right framing. By “framing” I mean the part of the post that ties it up into an overall takeaway and makes it clear why it’s important and worth reading.
  3. Use lots of examples. Writing without examples tends to be dry and abstract.
  4. Write like you talk. It comes from an essay by Paul Graham

Appendix 2: “... but writing takes a lot of time!”

A typical blog post for me might be around 1500 words, or about 2.5 hours to write. Multiply by two for outlining and editing, and I could do one post a week with about 45 minutes a day of writing.

Writing takes a lot longer than that if you’re trying to make one particular post very good, but I don’t think that’s the right strategy for someone who's starting out.

{{ previous_post }} {{ next_post }}

Consume, Consume, Consume, Create

2026-02-06 09:13:43

At the end of the day, when the kid is asleep, I sit down in front of the TV and hours go by.

The algorithm tells me to consume, so I consume. The strength needed to fight it isn't there.

It never ends. Consume, consume, consume, consume.

Then it's time for bed. Repeat, evening after evening.

I don't know what I want from my nights, but I know its not this.

The only thing I know to counter consumption is creation.

The burn is there. The soul wants to make. That's why I'm doing this #100DaysToOffload writing challenge.

It's out of desperation. I can't keep going without creating something. Anything.

I want to have a body of work I can look back on and be proud of. Work that connected with someone, somewhere.

I know that I'll be throwing messages in a bottle into the infinite raging sea of the internet. I'll need to learn to be okay with that. But if it means I can tip the balance towards creation, I hope I can shake this feeling that an algorithm is in charge.

I've realized that in a world of consumption, creation is an act of rebellion.

And I really want to rebel.

cforge C build system tooling + safe_c.h

2026-02-06 07:25:00

Introduction

I've been building a modern C build tooling called cforge where it solves a lot of the issues in the C ecosystem. There has been requests for me to explain its main functionalities and how it helps eliminate one of the pain points of developing in C: its build tooling system, while they are functional and varied, are fragmented and difficult to use.

Moreover I then combined cforge with safe_c.h --> it gave birth to a wholly different user experience when writing C. It is very powerful, so much that I can't go back to use vanilla C. You know that thing once you found out about something and you can never go back? Some examples:

  • IPS screen vs CRT.
  • SSD vs HDD.
  • Android phones vs old Nokia phones.
  • cforge+safe_c.h vs vanilla C.

While I understand there might be issues with portability, I can never write vanilla C again and in this post I'll show you why.

One caveat though: I live in two worlds: finance and programming so I have a fairly busy schedule. I struggle to find the time to write this and it has been postponed since a month ago, hence I made the difficult decision to let AI produce an overview of cforge+safe_c.h

==Below is an AI generated overview of the features and capabilities of cforge and safe_c.h==

Comprehensive Analysis: cforge + safe_c.h Contribution to the C Ecosystem

1. The Problem Space: Why C Needs This

The "C Safety Gap"

  ┌────────────────────────────────────────────────────────────────────┐
  │                    Systems Programming Landscape                   │
  ├──────────────┬────────────────┬──────────────────┬─────────────────┤
  │   Language   │  Safety Level  │  Learning Curve  │  Interop with C │
  ├──────────────┼────────────────┼──────────────────┼─────────────────┤
  │     C        │      Low       │       Low        │    Native       │
  │    C++       │    Medium      │       High       │    Native       │
  │     Zig      │    Medium-High │     Medium       │    Excellent    │
  │    Rust      │      High      │       High       │    Complex      │
  │  safe_c.h    │    Medium      │       Low        │    Native       │
  └──────────────┴────────────────┴──────────────────┴─────────────────┘

The Gap: There was no solution for C programmers who wanted:

  • Memory safety aids without switching languages
  • Modern abstractions (vectors, optionals, results) without C++ complexity
  • Compile-time code generation without template metaprogramming
  • Production-grade hardening without manual flag management

────────────────────────────────────────────────────────────────────────────────

2. Technical Innovations

A. Build System Innovation: "Safety-First Compilation"

cforge introduces a staged compilation philosophy unique in the C ecosystem:

 ┌────────────────────────┬───────────────────────────────────────┬────────────────────────────┐
 │ Traditional Build      │ cforge Approach                       │Innovation                  │
 ├────────────────────────┼───────────────────────────────────────┼────────────────────────────┤
 │ Single compilation     │ Multi-stage validation                │ Defense in depth           │
 ├────────────────────────┼───────────────────────────────────────┼────────────────────────────┤
 │ Manual sanitizer flags │ Automated sanitizer→hardened pipeline │ Simplified safety          │
 ├────────────────────────┼───────────────────────────────────────┼────────────────────────────┤
 │ No PGO by default      │ Integrated PGO workflow               │ Performance + safety       │
 ├────────────────────────┼───────────────────────────────────────┼────────────────────────────┤
 │ Per-project Makefiles  │ Auto-generated build.zig              │ Cross-platform consistency │
 └────────────────────────┴───────────────────────────────────────┴────────────────────────────┘

Key Insight: cforge treats compilation as a verification pipeline, not just a translation step.

  # Traditional: Just compile
  gcc -o app main.c

  # cforge: Validate then compile
  Stage 1: fanalyzer (static analysis)
  Stage 2: ASan/UBSan (runtime verification)
  Stage 3: clang-tidy (code quality)
  Stage 4: Hardened release (production)

B. Comprehensive Test Suite ~ criterion-lite

cforge_testTable

The cforge test suite excels through zero-configuration auto-registration (constructor-based), crash resilience (signal handlers for segfaults), and a two-tier assertion model (fatal/non-fatal)—all within a single dependency-free header. Its tight integration with the cforge build pipeline automatically runs tests under AddressSanitizer, providing memory safety validation without extra setup, making it ideal for teams wanting modern testing ergonomics without leaving the C ecosystem.

C. safe_c.h: The "Modern C Standard Library"

1. RAII Without Language Changes

Using GCC/Clang cleanup attribute (now C23 [[cleanup]]):

  // Before: Manual cleanup, error-prone
  FILE* f = fopen("data.txt", "r");
  if (!f) return -1;
  // ... 50 lines later, forgot fclose() or return path missed it

  // After: Automatic cleanup
  AUTO_FILE(f, "data.txt", "r");  // fclose() guaranteed

Contribution: Brings deterministic resource management to C without requiring C++ destructors or Rust ownership.

2. Type-Safe Generics via Macros

  // Generates complete type-safe vector implementation
  DEFINE_VECTOR_TYPE(Player, struct Player)

  PlayerVector team;
  player_vector_push_back(&team, (Player){.health = 100});
  // Type-safe: compiler enforces Player type

Contribution: Proves that C macros can provide generics-like functionality with better error messages than C++ templates (no SFINAE madness).

3. Error Handling as Values

  DEFINE_RESULT_TYPE(Int, i32, const char*)

  ResultInt divide(i32 a, i32 b) {
      if (b == 0) return RESULT_ERROR(Int, "Division by zero");
      return RESULT_OK(Int, a / b);
  }

  // Explicit error handling - no exceptions
  ResultInt r = divide(10, 0);
  TRY(r);  // Early return on error

Contribution: Rust-style error handling in C without language changes or exception overhead.

4. Zero-Cost Smart Pointers

  UniquePtr ptr = UNIQUE_PTR_INIT(malloc(100), free);
  void* data = unique_ptr_get(&ptr);
  // ...
  // Automatic cleanup at scope end

Contribution: Proves RAII patterns can work in C without vtables or runtime overhead.

D. Reflection Infrastructure

The annotation system is novel for C:

  typedef struct REFLECTED {
      JSON_KEY("player_id")  // Metadata for code generator
      i32 id;

      VALID_RANGE(0, 100)    // Validation constraints
      f32 health;
  } Player;

Contribution: Demonstrates that C can have modern reflection through:

  1. Source annotations (clang attributes)
  2. External parsing (Python + libclang)
  3. Code generation

This bridges the gap between C's compile-time simplicity and modern introspection needs.

────────────────────────────────────────────────────────────────────────────────

3. Ecosystem Contributions

A. The "Progressive Enhancement" Model

Unlike Rust or Zig which require rewriting, cforge enables incremental adoption:

  Existing C Codebase
         │
         ▼
  ┌─────────────────┐
  │ Phase 1: Drop   │  Add safe_c.h header
  │ in safe_c.h     │  Use AUTO_FILE, AUTO_MEMORY
  │                 │  Risk reduction: Medium
  └─────────────────┘
         │
         ▼
  ┌─────────────────┐
  │ Phase 2: Use    │  Replace manual arrays with vectors
  │ type-safe       │  Add Result error handling
  │ containers      │  Risk reduction: High
  └─────────────────┘
         │
         ▼
  ┌─────────────────┐
  │ Phase 3: Add    │  Annotate structs for reflection
  │ reflection      │  Auto-generate serializers
  │                 │  Development velocity: Increased
  └─────────────────┘
         │
         ▼
  ┌─────────────────┐
  │ Phase 4: Full   │  Use cforge build pipeline
  │ cforge          │  PGO, hardening, cross-compilation
  │ integration     │  Production readiness: High
  └─────────────────┘

Impact: Lowers barrier to entry for safety improvements—no rewrite required.

B. Cross-Compilation Simplified

cforge's use of Zig as a cross-compiler backend:

  cforge target aarch64-linux-musl
  # Automatically handles:
  # - Toolchain acquisition
  # - Flag translation (removes -march=native for cross)
  # - Static linking configuration

Contribution: Makes cross-compilation accessible to C developers who would otherwise struggle with complex toolchain setup.

C. Education Value

safe_c.h serves as a reference implementation for:

  • How to implement RAII in C
  • Macro-based generic programming patterns
  • C23 attribute usage
  • Safe C coding practices

Impact: Educational resource for C developers wanting to modernize their skills.

────────────────────────────────────────────────────────────────────────────────

4. Comparative Positioning

vs. C++ (The "Upgrade Path")

 ┌──────────────────┬──────────────────────────────┬────────────────────────┐
 │ Aspect           │ C++                          │ cforge + safe_c.h      │
 ├──────────────────┼──────────────────────────────┼────────────────────────┤
 │ Learning curve   │ High (templates, RAII rules) │ Low (still C)          │
 ├──────────────────┼──────────────────────────────┼────────────────────────┤
 │ Compile times    │ Slow (templates)             │ Fast (macro expansion) │
 ├──────────────────┼──────────────────────────────┼────────────────────────┤
 │ Binary size      │ Can bloat                    │ Predictable            │
 ├──────────────────┼──────────────────────────────┼────────────────────────┤
 │ Debugging        │ Complex (name mangling)      │ Simple (C symbols)     │
 ├──────────────────┼──────────────────────────────┼────────────────────────┤
 │ Interoperability │ ABI issues                   │ C ABI (universal)      │
 └──────────────────┴──────────────────────────────┴────────────────────────┘

cforge's niche: "I want C++ features but in C."

vs. Rust (The "Safety Rewrite")

┌────────────────┬─────────────────────────────┬─────────────────────────┐
│ Aspect         │ Rust                        │ cforge + safe_c.h       │
├────────────────┼─────────────────────────────┼─────────────────────────┤
│ Memory safety  │ Compile-time guaranteed     │ Runtime detected        │
├────────────────┼─────────────────────────────┼─────────────────────────┤
│ Learning curve │ High (ownership, lifetimes) │ Low (C + macros)        │
├────────────────┼─────────────────────────────┼─────────────────────────┤
│ Migration      │ Rewrite required            │ Incremental adoption    │
├────────────────┼─────────────────────────────┼─────────────────────────┤
│ Ecosystem      │ Growing but smaller         │ Vast C ecosystem        │
├────────────────┼─────────────────────────────┼─────────────────────────┤
│ Hiring         │ Harder to find developers   │ C developers everywhere │
└────────────────┴─────────────────────────────┴─────────────────────────┘

cforge's niche: "I need safety improvements but I don't want to rewrite. Rewrites are waste of time."

vs. Zig (The "C Alternative")

 ┌──────────────────┬────────────┬─────────────────────┐
 │ Aspect           │ Zig        │ cforge + safe_c.h   │
 ├──────────────────┼────────────┼─────────────────────┤
 │ Comptime power   │ Native     │ External (Python)   │
 ├──────────────────┼────────────┼─────────────────────┤
 │ C interop        │ Excellent  │ Native (it's C)     │
 ├──────────────────┼────────────┼─────────────────────┤
 │ Build system     │ Integrated │ External (cforge)   │
 ├──────────────────┼────────────┼─────────────────────┤
 │ Reflection       │ Native     │ Generated           │
 ├──────────────────┼────────────┼─────────────────────┤
 │ Tooling maturity │ Young      │ Leverages clang/GCC │
 └──────────────────┴────────────┴─────────────────────┘

cforge's niche: "I want Zig's safety but in C."

────────────────────────────────────────────────────────────────────────────────

5. Unique Value Propositions

1. The "Zero-Rewrite" Safety Upgrade

Unlike Rust or Zig, cforge allows teams to improve safety without rewriting a single line of legacy code. Just include the header and start using AUTO_FILE for new code.

2. Production-Hardening Automation

The combination of sanitizer→hardening pipeline is unique:

  # One command gets you:
  # - AddressSanitizer (development)
  # - Stack canaries (production)
  # - Control-flow integrity (production)
  # - PGO optimization (production)
  cforge pgo main.c

3. C as a "Safe Assembly"

safe_c.h demonstrates that C can be used as a portable assembly with safety guardrails, challenging the narrative that C is inherently unsafe.

4. Reflection Without Runtime Cost

The annotation→generation approach proves you can have:

  • JSON serialization
  • Schema versioning
  • Binary formats
  • All at zero runtime overhead (generated C code is plain C)

────────────────────────────────────────────────────────────────────────────────

6. Limitations and Trade-offs

A. Fundamental Limitations

 ┌───────────────────────────────┬────────────────────┬─────────────────────────┐
 │ Limitation                    │ Impact             │ Mitigation              │
 ├───────────────────────────────┼────────────────────┼─────────────────────────┤
 │ No borrow checking            │ UAF still possible │ ASan catches at runtime │
 ├───────────────────────────────┼────────────────────┼─────────────────────────┤
 │ Macro-based generics          │ Weak type checking │ Careful use, tests      │
 ├───────────────────────────────┼────────────────────┼─────────────────────────┤
 │ External reflection           │ Build complexity   │ Automated by cforge     │
 ├───────────────────────────────┼────────────────────┼─────────────────────────┤
 │ Manual cleanup still possible │ Can forget defer   │ Code review, linters    │
 └───────────────────────────────┴────────────────────┴─────────────────────────┘

B. When NOT to Use cforge

  • Kernel/embedded with no stdlib: safe_c.h needs malloc/free
  • Certified safety-critical (SIL 4/ASIL D): Needs formal verification, not just sanitizers

C. The "Two-Step Build" Problem

  cforge reflect  # Generate code
  cforge build    # Compile

This is more complex than single-step compilation, though cforge automates it.

────────────────────────────────────────────────────────────────────────────────

7. Impact on C Ecosystem

A. Influencing C Standards

safe_c.h demonstrates demand for:

  • [[cleanup]] attribute (now in C23)
  • Better bounds-checking standard functions
  • Optional types in standard C

B. Bridging C and Modern Languages

cforge shows a migration path:

  1. Start with C + safe_c.h
  2. Add reflection annotations
  3. Generate bindings for other languages
  4. Gradually replace modules with Rust/Zig

C. Tooling Elevation

By integrating:

  • clang static analyzer
  • AddressSanitizer
  • clang-tidy
  • Profile-guided optimization

cforge raises the bar for what C build tools should provide.

────────────────────────────────────────────────────────────────────────────────

8. Future Implications

The "Annotated C" Pattern

The REFLECTED, JSON_KEY, VALID_RANGE annotations suggest a future where:

  • C code carries semantic metadata
  • External tools generate bindings, validators, documentation
  • The "single source of truth" problem is solved

Build System Convergence

cforge's use of Zig for cross-compilation suggests a trend:

  • C compilers focus on compilation
  • Build orchestration handled by modern tools (Zig, cforge)
  • Package management integrated (cforge pkg)

────────────────────────────────────────────────────────────────────────────────

Conclusion

cforge + safe_c.h contributes the "missing link" in systems programming: a way to write safer C without leaving C.

Its key contributions are:

  1. Proving C can be safe-ish with the right tooling
  2. Lowering the barrier to safety (no rewrites required)
  3. Demonstrating annotation-driven development for C
  4. Automating production hardening (PGO, sanitizers, hardening flags)
  5. Providing a migration path from C to safer languages

For the C ecosystem, this means:

  • Existing C codebases have a viable modernization path
  • New projects have an alternative to "C or rewrite" dichotomy
  • The C tooling ecosystem gets a reference for what modern C development should look like

The ultimate contribution: Showing that C's obsolescence is not inevitable—with the right headers and build tools, C can remain viable for new development while teams gradually migrate to Zig or Rust.

cforge with safe_c.h represents a novel "progressive enhancement" approach to modernizing C—delivering C++17/Rust-like safety and ergonomics without abandoning C's core philosophy or requiring language changes. It fills a critical gap in the C ecosystem: how to write safer C without learning a new language or accepting runtime overhead.

Some screenshots of cforge: cforge

cgrep_project_structure

cflags_targets

test_suite

Addendum

How does this cforge+safe_c.h combo affect my programming?

  • I fear that I no longer want or willing to write vanilla C using existing build tools (unless its a requirement).
  • Write less and less of Zig and Rust.
  • There might be still a chance for Zig though if they've sorted out their async and released the 1.0 stable version. Breaking changes is a hassle I don't want nor have the time to deal with.
  • In the mean time I'm having an absolute blast writing C in cforge+safe_c.h, so much that it diminishes the value of Zig and Rust in my eyes. Don't get me wrong, they're are still great languages!
  • Imagine using Cargo in Rust or uv in Python or crosscompiling to multiple targets in Zig: that's the user experience of using cforge.

I'm currently using cforge+safe_c.h for a monsoonsim-lite project ~ a CLI-based business simulator. Another question I get asked frequently: will I open source the code for cforge and safe_c.h ? I'm not sure, most of the programs I've built are for internal use either me personally or office related work.

I actually don't want a "maintainer's life" as the creator of Zen-C is currently having. As mentioned earlier: I live in 2 worlds (finance and programming). I built something, it works for me and that's it. If there's a bug I'll fix it, if there's additional features that I need, I'll make the features.

The key: it revolves around to what I need and my use case, I'm not interested to what others need. So yeah it's the opposite mindset of a maintainer. Why do I have this mindset? Coz I've burned out before trying to fulfill other people's requests and I don't want to repeat that. Sorry for the rant...cheers!

Comments section here

==If you enjoyed this post, click the little up arrow chevron on the bottom left of the page to help it rank in Bear's Discovery feed and if you got any questions or anything, please use the comments section.==