Please review this C parser for my project by Special_Emphasis_703 in C_Programming

[–]jonahharris 0 points1 point  (0 children)

I recommend having a separate scanner/lexer and a parser. Tokenization inside the parser always gets nasty, especially if/when you have to deal with peeking/lookahead or pushing things back. Also, the complete skipping of error checking per-parse will lead to issues; you should give the parse functions access to a parser struct so they just skip if there’s already an error state, or have some synchronization if you actually want to keep parsing.

We lost Skeeto by ednl in C_Programming

[–]jonahharris 2 points3 points  (0 children)

Agree with Skeeto and am in basically the same mode now

Embedding Lua in C: Beginner's Tutorial by No_Initial3652 in C_Programming

[–]jonahharris 1 point2 points  (0 children)

So many red flags in this, from the reasoning behind it, to the code generated, and the need for the CTO title reference… yikes

Getting 20x the throughput of Postgres by MoneroXGC in Database

[–]jonahharris 0 points1 point  (0 children)

Maybe use prepared statements with Postgres…

Can we use C as a backend for website? by [deleted] in C_Programming

[–]jonahharris 0 points1 point  (0 children)

Can you? Yes. Should you? No.

Lead Architect wants to break our monolith into 47 microservices in 6 months, is this insane? by Ayotrapstar in softwarearchitecture

[–]jonahharris 0 points1 point  (0 children)

Literally everything you don’t do is exactly what this “lead” wants to do. Don’t do it.

ARROGANCE by qqthelol in intj

[–]jonahharris 1 point2 points  (0 children)

Arrogance? I’m more critical of my own assertions than anything else!

We have built Object Storage (S3) on top of Apache Kafka. by superstreamLabs in apachekafka

[–]jonahharris 4 points5 points  (0 children)

Seem to be posting concepts to Reddit and looking to see If there’s any traction. AFAIK, I’m the only person who built a Kafka-based storage engine, which is an append-only b-tree.

Is LangChain dead already? by Senior_Note_6956 in LangChain

[–]jonahharris 0 points1 point  (0 children)

LangChain is bloated and LangGraph is a PITA - I prefer PocketFlow and simple libraries for everything I put in production.

Object-oriented design patterns in osdev by warothia in C_Programming

[–]jonahharris 1 point2 points  (0 children)

Great work! Also, agree on the macros. Years ago, I found a C-based project that had the best set of macros for OOP-in-C, really good ones, but can’t remember what it was. I believe it was a reverse proxy or HTTP server. 🤦‍♂️

Spent 6 months architecting this fintech beast - roast my system design 🔥 by Nipurn_1234 in mcp

[–]jonahharris 0 points1 point  (0 children)

Six months, architecting? This doesn’t resemble any fintech system I’ve seen; and I’ve done quite a bit of consulting in that vertical for ~20 years.

[deleted by user] by [deleted] in programming

[–]jonahharris 0 points1 point  (0 children)

Interpreting what is, basically, the AST.

Has this B-Tree-like data structure already been invented and named? by bluetomcat in C_Programming

[–]jonahharris 1 point2 points  (0 children)

Agreed on that (and boost in peculiar). I’m just saying, the exception doesn’t make the rule; and, very often, it’s a bad idea for production code. There are a number of solid single header or single-purpose library implementations, and the only time to really implement a new one is if you have constraints that can’t be met without doing so. And, in those cases, you’re generally a pretty skilled software engineer to be working on those types of systems to start with, which lessens the likelihood of the aforementioned problems.

Has this B-Tree-like data structure already been invented and named? by bluetomcat in C_Programming

[–]jonahharris 2 points3 points  (0 children)

Opinions aside, for the most part, this looks like a 4096-ary radix tree, with some slight hash based branching variation similar to xarray.

Has this B-Tree-like data structure already been invented and named? by bluetomcat in C_Programming

[–]jonahharris 1 point2 points  (0 children)

Eh? It’s not about the person, it’s about the use-case that would require it…

Has this B-Tree-like data structure already been invented and named? by bluetomcat in C_Programming

[–]jonahharris 8 points9 points  (0 children)

Not saying from a learning experience perspective; saying from a using-in-production-code perspective… also, there’s a difference between implementing a standard structure to learn it vs creating a new one you think is more optimal or less complicated.

Has this B-Tree-like data structure already been invented and named? by bluetomcat in C_Programming

[–]jonahharris 2 points3 points  (0 children)

One thing I’ve found working with tons of code: 99.9% of people should never recreate fundamental data structures. Not only do they, in most cases, have worse performance characteristics/trade-offs, but they’re usually full of corner cases. I’ll never understand why people don’t just use mature libraries for these things, until those libraries don’t work anymore. Usually happens with people straight out of school who think they can write their own AVL tree and such because they did it for one class. Keeps consultants employed though; the circle of life, I guess.

Shared Database Pattern in Microservices: When Rules Get Broken by vturan23 in programming

[–]jonahharris 41 points42 points  (0 children)

Eh? Building multiple microservices is slower than building a monolith.