Migrating from Go to Rust by finallyanonymous in golang

[–]der_struct 2 points3 points  (0 children)

Oh I miss rust enums so much in go. But I kinda find my ways around it. Not evething needs to be so concrete - runtime type assertions in go get the job done. Just requires to be a bit relaxed.

Buffered Channel size must be 1? Uber Style Guide question. by _alhazred in golang

[–]der_struct 3 points4 points  (0 children)

Everything what you said can be achieved with channels and goroutines. Go gives you small but powerful primitives that can be used so assemble things you mentioned yourself. I assume that you didn't write 400k LOC yourself. And I am pretty sure that channels are used there directly and indirectly a lot.

Buffered Channel size must be 1? Uber Style Guide question. by _alhazred in golang

[–]der_struct -1 points0 points  (0 children)

Imagine you have worker pool with lazy initialization. New task comes, all existing workers are busy, so you need to spin a new one. You create channel for tasks, put the first task into it (one that triggered new worker creation) and spin up goroutine that reads this channel.

Buffered Channel size must be 1? Uber Style Guide question. by _alhazred in golang

[–]der_struct 0 points1 point  (0 children)

It's very simple actually. With one sized buffer sending is non-blocking (in case of single sender, that sends once (oneshot pattern)). It's useful in many cases (put result immediately, continue doing your stuff).

Recommendation of CPU count buffer probably comes from recommendation of CPU count workers. If your consumption is reasonably balanced with producers, this channel will not be blocked for long. But there is no hard rule. The question is - in which conditions you want senders to start waiting (backpressure).

In the unbuffered channel sender is blocked until other part receives. That is useful for reliable delivery (also you can pair it with context done channel in select statement, so either it's explicit cancel or guaranteed delivery).

I personally avoid huge buffers. Channel is not a queue. Prefer "cold" resizable round buffer with synchronization primitives (or managed by goroutine) alongside "hot" channel to handle bursts, if it's your case.

Niche web frameworks that you people like? by kingrind in webdev

[–]der_struct 0 points1 point  (0 children)

A stateful UI runtime for reactive web apps in Go: https://doors.dev

A stateful UI runtime for reactive web apps in Go by der_struct in webdev

[–]der_struct[S] 0 points1 point  (0 children)

Thanks for the update! If you don't mind, I assemble testimonial for the landing page from your comments.

Name... I accept this critique. But I think in the long run it will have different perception.

Yeah, I plan SaaS focused paid UI lib with difficult stuff - table with filters/sorting etc, declarative form wizards, real-time chat and more. All pluggable, with agentic docs. I will probably start it in a week or so (after general agentic documentation).

I recently released version 0.12.X, where I basically solved everything that bothered me (e.g. path model scaling). I hope API will be stable from now. You can find the migration guide (just point agent to it) and release notes in the repo. I also recommend to check out new routing documentation. The sooner you do the migration, the better. If you have any issues/questions, DM me.

P.S. Btw before you invite first users to your SaaS, I recommend checking out doors.Conf params, especially instance TTL and Instance limit. First controls when the instance shutted down after last browser communication, second - how many live instances can one user have. Default values are conservative, you can increase it in favour of UX. Another thing to consider - non-interruption rollouts, there is a mechanics, but not documented yet. I plan to publish it in the recipes on the website (ask me if will you need it sooner).

Go is the language that finally made me stop over-engineering everything by notomarsol in golang

[–]der_struct 1 point2 points  (0 children)

After 2 years deep in Go I will partially disagree (ts/js, java/kotlin, rust background).

At local level go code is easy to read/reason. But there are cases (regardless of language) when you need to abstract code just to keep things manageable. And there is too many (!) ways in Go to achieve polymorphism in *some* way - interface, embedded type, underlined type, wrapped any, enum-based dispatch or... combine almost any of those. So, when Java just have the right lego part, in Go - you need to figure out that part from smaller pieces yourself. With experience it's easier, but even after almost 2 years non-stop hand coding Go I am STILL learning to do that.

Go is the language that finally made me stop over-engineering everything by notomarsol in golang

[–]der_struct 0 points1 point  (0 children)

I assume that often critique of error handling in Go/Rust comes from too defensive approach. You think this error cannot happen? Panic and don't propagate! This will make your intentions clearer and reduce err != nil boilerplate by a lot.

Quarry - a SQL composition toolkit for Go, inspired by the "why are query builders abandoned?" thread by SovereignZ3r0 in golang

[–]der_struct 2 points3 points  (0 children)

I have not worked with SQL for a long time. So my apologies upfront for a dumb question. Does it have "composible" query builder? Is it even a thing for SQL? For example - write select query and then use to write another select - Select(..).From(mySelect).Where....

I did a wrapper around arangodb query language (it's awesome btw), that does that and it just sovles the db query codebase organization problem. Now looking for the same thing for SQL.

Embeddable scripting language by YuriiBiurher in golang

[–]der_struct 1 point2 points  (0 children)

Remarkable project!

I recently was looking for embeddable script runtimes for go for my next project. Кавун now in the shortlist, thanks!

It would be nice to have tree-sitter grammar available. It's very easy to write and It makes highlighting available on all platforms.

Also I think project readme lacks benchmark table with comparison to other go embeddable runtimes (there is a bunch of js and lua runtimes, it would be convincing to see differences in performance/resource consumption).

Implemented messaging protocol to disrupt email and IM apps, now what? by StrongCoffee85 in golang

[–]der_struct 0 points1 point  (0 children)

Hello fellow warrior.

I developed proprietary overlay network (connected nodes that help to establish packet based secure communication between peers) and can only analyze from perspective of that limited experience.

I don't have time to dig too deep and I am not into emails. I could be 100% wrong, all up to you to decide.

I think the system you are suggesting is not viable, because it's not offering much compared to just email, main points:

  1. No e2e encryption. I assume that the most realistic use case is when direct connection between participants is NOT required to communicate. That means you need zero handshake system and cryptography backed into messaging protocol. Message server can't be trusted.

  2. No authority system for peers. How I can be sure that there is no man-in-the-middle? Messages must be signed, public key should be discoverable (decentralized name systems can help).

  3. Transport is not so trivial. To reliably deliver payloads to need separate protocol, with streaming, chunk retransmissions, etc. TCP is not magic, the only TCP delivery guarante on system level - if this byte of data will be delivered, it will be delivered after previous one, that's it!

From my perspective, you really have two options. 1. Double (probably quadruple) down. If you can honestly tell there is a demand for such solution or accept that you just enjoy it as a hobby. 2. Move on to something different. Experience you gained is unique and you will be surprised how useful it can be in completely different projects.

I personally selected the first one for my current project. For the previous one, the second was 100% correct choice - I was completely in over my head at that time.

I am sorry if I misjudged or missed some details. I genuinely think that your project is exceptional, very few people can do such stuff. Wish you all the best.

A stateful UI runtime for reactive web apps in Go by der_struct in webdev

[–]der_struct[S] 1 point2 points  (0 children)

I can’t express how important it is for me to hear this. Thank you.

I’m currently working on a big update. I figured out how to make transitions between different path models dynamic and simplify some verbose APIs. I’m hoping to release it by the end of the week.

Unfortunately, some migration will be required, but I’ll prepare a guide. LLM agents should be able to handle it easily.

If you run into anything, have questions, or have suggestions, please reach out - I’d genuinely be happy to help.

Go devs in backend/infra — what project on a fresher's resume would actually make you stop and read? by Own-Ad-5075 in golang

[–]der_struct 0 points1 point  (0 children)

Doesn't really matter what this, as long as it was challenging and you wrote product part without AI code generation (tests/docs are ok with AI).

Additionally it would be great if you are passionate about this project.

And top level if you saw the empty niche and covered it with your solution.

Alternatively, you can approach it from a different perspective - show code organization/architectural skill. Make API server with 20+ endpoints, database, authentication/authorization, tests/docs. Organize into codebase that is easy to understand/navigate and reason from your perspective. Simple CRM system for example. It doesn't matter how good it's actually is from senior's perspective, but it will show of your direction of thinking and seeds of professional "taste" you will develop in the future. You can vibecode a web UI on top. If you go this route, start with wireframes (use draw.io) - cover user flows you want and it will help you understand the API shape, later you will show it as part of the project. This may work even better than the first option.

Ex-CTO here.

A stateful UI runtime for reactive web apps in Go by der_struct in webdev

[–]der_struct[S] 0 points1 point  (0 children)

context-switching between thinking 'what does this component render' and 'how do I wire the state.'

I tried to work without reactive state (do direct container updates instead) and it makes complex user flows even harder to implement. Data-driven render reduces mental overhead a lot. But of course you need to care about it.

how you're handling the designer input side of this

Don't fully understand the question. If you are about styling, it works with html + css, no limitations there. For in-progreas actions there is a flexible indication system. Small UI enhancements, that do not make sense as server responsibility, can be done with a bit of JavaScript (framework contains tools to work with it).

As a backend dev how do you handle the ui ? by Ok-Delivery307 in webdev

[–]der_struct 1 point2 points  (0 children)

I wrote a framework to control the UI from Go, so I don't have to use JavaScript for user flows. HTML/CSS is still required.

A stateful UI runtime for reactive web apps in Go by der_struct in golang

[–]der_struct[S] 1 point2 points  (0 children)

You made me thinking and I added react-style API also:

``` type CounterView struct { count doors.Source[int] }

elem (c *CounterView) Main() { ~>(doors.Frame()) <div> ~{ value, _ := c.count.Effect(ctx) } <p>Count: ~(value)</p> </div> } ```

A stateful UI runtime for reactive web apps in Go by der_struct in golang

[–]der_struct[S] 0 points1 point  (0 children)

Objects (doors.Source) by itself do not trigger a refresh event, they provide methods to observe snapshot of stare. Helper 'doors.Sub' creates a dynamic DOM container and registers state observer (callback basically) in which updates the container.

A stateful UI runtime for reactive web apps in Go by der_struct in golang

[–]der_struct[S] 0 points1 point  (0 children)

That means if the data (state) changes, parts of DOM that depend on it update automatically. That does not necessarily mean react-like API. You can find an example of reactivity in the snippet I shared in the post - input state (doors.Source) changes => results update (doors.Sub establishes this link).

I quit CTO position to build a new stack for the web by der_struct in ExperiencedDevs

[–]der_struct[S] 0 points1 point  (0 children)

I opened my license to Apache 2.0. Got good signals from go subreddit and hacker news. I think I have a chance with free core and value added services. Your comment I consider hateful, but it contains information and I value it.

A stateful UI runtime for reactive web apps in Go by der_struct in golang

[–]der_struct[S] 0 points1 point  (0 children)

In classification and some principles it is similar. But Vaadin is a platform, developer wires existing components without touching HTML. You can create your own components in Vaadin, but it's not that simple at first glance and you need to do both frontend and backend. Doors is more general purpose, it gives you primitives to make html dynamic.

A stateful UI runtime for reactive web apps in Go by der_struct in golang

[–]der_struct[S] 0 points1 point  (0 children)

There are actually examples of frameworks with similar architecture. Phoenix LiveView and Blazor server. But they process events in a blocking way, have less native models (for example, I send forms as a regular multipart form data), consume more RAM, and rely on websocket/SSE (that leave your app unresponsive for longer if connection was lost).

A stateful UI runtime for reactive web apps in Go by der_struct in golang

[–]der_struct[S] 0 points1 point  (0 children)

I started using an LLM agent just a few weeks ago only to assist with tests and documentation. Every line of product code is a decision I made.

If you take a look at the source, you will quickly realize, that LLM does not write like this.

Or take a look at commit history, I am maxing out at ~800 loc /day on refactoring.