Hacker Newsnew | past | comments | ask | show | jobs | submit | never_inline's commentslogin

Well, pnpm solves the storage issue, which is a more pressing reason to use it. (I don't know about deno/bun)

I am no web developer but whenever I built the UIs, re-rendering a page by doing some big DOM change through JS as always led to stutter. So maybe its just inefficient and can't be optimised.

I fix it by micromanaging it. Which class, method, function, module - I dictate the low level structure and features. I dump my all my hard earned coding opinions in a profoundly crafted markdown file.

What helps me adjust is what I call Thanos-coding: trying to get AI to do the thing with contexts and agents and SDD and whateverthefuck, and if it gets tangled on its own shoelace say "Fine. I'll do it myself." Alternatively: making its mistakes disappear with a snap of my fingers and starting over.

Opera Mini used to load many pages in <20kb.

UBO also let's you limit attachment size. Eg you can configure it to block anything larger than 100KB. Not sure what it does without Content-Length header though.

For one thing I am under 25 and I get my views from here the orange site.

It was a while back (when I was a worse programmer) I found both Micronaut and Quarkus dev experience more palatable than spring.

what did you dislike? Pervasive DI? Annotations? configuration mess?


Never done much Spring, so I don't have a lot to compare to. But ...

I'm not a massive fan of using annotations in concept, because they obfuscate what's taking place. Unlike in (say) Python, where annotations are effectively functions wrapping the function they annotate, in java they're more akin to a customisable preprocessor. Obviously I do use them, liberally, because that's the way things are done, but I'm not a big fan. And using any modern framework relies on these a lot.

Micronaut gripes -

1. It works great until it doesn't, and you have a special case, and then you have to dig into source to figure out what on earth is going on.

2. Keeping up with latest isn't always easy, micronaut 3->4 was a huge effort.

3. For all it's called micronaut, the produced packages are pretty huge.

Serverless-specific gripes -

1. What I'm receiving isn't really an http message over a socket. It's an AWS gateway event with everything already read and packaged up. So there's no reason that (for instance) I shouldn't access the message body in a request filter, because I don't give a crap about the jetty server-loop being non-blocking.

2. Startup time is terrible. And when I managed to get a native compiled version to actually run, it got worse. A lot of this seems to be down to hibernate, but there's a big gap between startup and any logging from the framework at all. We've tried a bunch of stuff to remediate, so far with little success.

In general I think that serverless is such a different paradigm from a long-running server that approaching it from the point of view of "how can we make this the same so developers who've never thought outside of the spring-like box can still be productive?" was wrong from the outset.


> Unlike in (say) Python, where annotations are effectively functions wrapping the function they annotate, in java they're more akin to a customisable preprocessor.

I find that Python decorators can do as much magic as an annotation processor - due to the dynamism of Python. Annotation processors, in most cases, produce a new class based on annotations on existing class / interface. The injection of that class is done by the DI container (unless it's a standalone annotation processor like mapstruct).

> And using any modern framework relies on these a lot.

To be fair to language designers, it's hard to avoid code generators. And they're a compelling thing compared to building proxy objects / DI / decorator / dataclass etc.. kind of functionality in language and getting it wrong.

> ... then you have to dig into source to figure out

Agree. It's not a "boring technology" yet.

> For all it's called micronaut, the produced packages are pretty huge.

How huge? And jlink or graal vm? Just curious.

> A lot of this seems to be down to hibernate,

With micronaut atleast, I remember using Micronaut Data JDBC. Anything is better than hibernate.

> In general I think that serverless is such a different paradigm from a long-running server.

Agreed.


1. AI Slop Post

2. """You define Pydantic models for your API, then define separate ORM models for your database, then write converters between them.""" So you could've written something that let you convert between two. That would not warrant a whole new ORM.

3. """But infrastructure stuff like SQL generation, connection pooling, and row serialization is where a systems language makes sense."""

This makes no sense to me (except row serialization - maybe, but you're incurring a messagepack overhead instead). Unnecessary native dependency.


1. We're all AI agents in a simulation anyway...

2. A converter still means maintaining two model systems. The point was to not have two in the first place.

3. MessagePack overhead is negligible compared to actual DB round-trips. And the Rust core isn't just SQL generation, it bundles the full driver stack (sqlx), pooling, and streaming, so you don't need asyncpg/aiosqlite as separate dependencies.


I would suggest not delegating the LLD (class / interface level design) to the LLM. The clankeren are super bad at it. They treat everything as a disposable script.

Also document some best practices in AGENT.md or whatever it's called in your app.

Eg

    * All imports must be added on top of the file, NEVER inside the function.
    * Do not swallow exceptions unless the scenario calls for fault tolerance.
    * All functions need to have type annotations for parameters and return types.
And so on.

I almost always define the class-level design myself. In some sense I use the LLM to fill in the blanks. The design is still mine.


What actually stood out to me is how bad the functions are, they have no structure. Everything just bunched together, one line after the other, whatever it is, and almost no function calls to provide any structure. And also a ton of logging and error handling mixed in everywhere completely obscuring the actual functionality.

EDIT: My bad, the code eventually calls into dedicated functions from database.ts, so those 200 lines are mostly just validation and error handling. I really just skimmed the code and the amount of it made me assume that it actually implements the functionality somewhere in there.

Example, Agent.ts, line 93, function createManageKnowledgeTool() [1]. I would have expected something like the following and not almost 200 lines of code implementing everything in place. This also uses two stores of some sort - memory and scratchpad - and they are also not abstracted out, upsert and delete deal with both kinds directly.

  switch (action)
  {
    case "help":
      return handleHelpAction(arguments);

    case "upsert":
      return handleUpsertAction(arguments);

    case "delete":
      return handleDeleteAction(arguments);

    default:
      return handleUnknowAction(arguments);
  }
[1] https://github.com/skorokithakis/stavrobot/blob/master/src/a...

Which reinforces my point that LLMs are really bad at class and module level design.

I think this is just anthropomorphism. Sub agents make sense as a context saving mechanism.

Aider did an "architect-editor" split where architect is just a "programmer" who doesn't bother about formatting the changes as diff, then a weak model converts them into diffs and they got better results with it. This is nothing like human teams though.


Absolutely agree with this. The main reason for this improving performance is simply that the context is being better controlled, not that this approach is actually going going to yield better results fundamentally.

Some people have turned context control into hallucinated anthropomorphic frameworks (Gas Town being perhaps the best example). If that's how they prefer to mentally model context control, that's fine. But it's not the anthropomorphism that's helping here.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: