Live data from Hacker News

Composition shouldn't be this hard

cambra.dev

71–78 of 78 posts

Re: Composition shouldn't be this hard

#71
Your timing for this effort is good because there is going to be a lot of thought leaders who are going to stop putting in the effort given the deafening avalanche of slop and devaluing of reusable code units in the wake of AI. So, less competition to novel/original efforts in the "operating environment" space like yours.

Your timing is also good because preeminent OS designs are becoming less relevant to the hardware of today and so a new operating environment could include holistic designs with abstractions that could reach all the way back to the system layer. Perhaps a good approach could be to bootstrap off of existing operating systems and containers and work your way back to the metal. We really need a modern Java VM-like effort that includes a memory model with the ambition to include I/O buses and sidecar computing devices like GPU/TPU/NPU.

Your message is a noble "boil the ocean" one, and looking at past efforts like BeOS/BeBox or modern things like Oxide Computer Company, I feel like shipping a boil the ocean project is possible for the pros, especially with enough runway. Perhaps boiling one sea at a time is possible? ;) Just don't paint yourselves into any corners.

In my personal experience, microservices development has been a successful way to develop software while addressing some of the versioning challenges you mentioned. I managed the impedance mismatch between API versions through JSON schema validations and allowing deprecation periods for old versions by hosting multiple version endpoints to the same backend to allow callers grace time to upgrade. Requests payloads are validated against their JSON schema at runtime, and response JSON payloads are tested against their JSON schema during integration testing. Runtime is "too late" to know when things are wrongly connected as you said, but at least I know loudly and don't accept crummy data.

Your discussion made me think of Alan Kay's discussion of how objects in a perfect world should be able to pass messages between one another: as a negotiation to come to an understanding rather than as rigidly defined payloads. I think it was a fanciful idea, but in the age of AI, such a loosey goose negotiation process seems attainable if it weren't for hallucinations. Active interrogation and negotiation is the key to combating impedance mismatches prior to runtime.

Finally, consider software supply chain trust issues. If you're going to boil the ocean, you gotta do much better than we've done. The internet was designed in the age of peace and love. We've reached the "we're cooked" age, please send help!

In any case, I hope you take my message here as encouragement, best wishes and I hope you succeed beyond measure.

Re: Composition shouldn't be this hard

#73

> What code is truly about is precision: code is unambiguous, even when it’s abstract. It’s easy to conflate ambiguity and abstraction—both refer to “a single statement that could have to multiple meanings.” But the meanings of an ambiguous statement are entirely unconstrained. I used to believe this, but after working at a successful SaaS I have come to believe that correctness and unambiguity are not entirely neces…

You can also run a successful manufacturing company without considering environmental impact. A successful tobacco company without considering public health. A successful social media persona without considering cultural impact. A mobile app slop farm that floods the app store. If economics is your priority, then everything comes down to that.

Re: Composition shouldn't be this hard

#74
post #27

This is light on specifics, but is still directionally the closest anyone has come to describing my ideal future data platform. The founder Dan Sotolongo's work at Snowflake included Dynamic Tables which makes me think the proposal is basically this: a hybrid transactional/analytical database, with declarative domain-oriented schemas, with smart incrementally calculated updates, and a la carte performance characteris…

I'm leaning into something like this.

My dream is to build an "access + excel + Jupyter" alike combo, where you declare the full components of a RDBMS, ie: "create log, select * from index, create queue, etc".

I think what is missing is the ability to actual declare the major paradigms so is not "I create a job queue on top of a leaky table" but "I declare a job queue".

This is my idea with https://tablam.org

Re: Composition shouldn't be this hard

#77
post #47

Earlier quoted context omitted.

> You end up rebuilding semantics over and over again (validation, mapping, enrichment), and a lot of failures only show up at runtime. I think die-hard fans of static typing mostly fail to acknowledge this objective reality and its implications. Every time they encounter this problem again and again, they approach it as if nobody thought of this before, and didn’t develop reliable abstractions to productively work i…

I'm genuinely interested in examples of these reliable abstractions, or at least in some keywords I can look up.

The way I see it, Clojure was created to address most of the philosophical problems highlighted in the article, and its ecosystem has developed under the influence of such ideas.

It embraces the dynamic nature of things. Every program that must do I/O is dynamically typed at the edges - so statically-typed languages must have both the facilities for dealing with dynamic types and static types, and use those differently for "inner" and "outer" parts of the program. The Clojure ecosystem makes it more approachable to work with dynamic data, and as a result, program's parts (modules, even functions) use the same machinery as the program as a whole. What helps, off the top of my head:

1. Immutability of values, persistent data structures, explicit state management - it turns out most of the "problems" with dynamic types are not due to the fact that types are unknown, but the fact that they may change over time. Most of concurrency problems also become irrelevant with immutable values.

2. Powerful data specs/schemas allowing to express full business requirements and constraints on expressible values (not possible with static typing anyway) — making invalid states unrepresentable and actually meaning it.

3. Concise unified model for working with different logical data structures, also nested data structures.

4. Simple asynchronous communication mechanisms and patterns between independent modules of a programs.

5. Rich extensible aggregates of data with namespaced keys as the object model.

6. An ethos of extreme backward compatibility (and tools for achieving and maintaining it) through accretion of novel values/parameters/features, enabling reloadable workflows, which makes it easy not only to redefine functions in code while program is running, but also updating individual programs while interconnected system is running, without breaking things.

The downside is that tools that reduce complexity are not very easy to use for people with less experience, so they cannot be too popular. People tend to overcomplicate, and to be quick to dismiss well-thought-out solutions.

Re: Composition shouldn't be this hard

#78
A great overview of the problems we all know we have. And zero new ideas on how to fix it.

Developing a "new kind of programming system" has been done many times before. Think case tools, functional programming, object oriented programming, CORBA, DDD, etc. etc. etc.

So best of luck but I highly recommend not investing your time unless you have at least one truly new idea that will change the outcome for the better.

Post reply on HN