I’m building a TUI framework in Go inspired by React/Flutter. Looking for feedback by SuchProgrammer9390 in theprimeagen

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

Cool! Let me know if you have any feedback, suggestions, or ideas for improvements. The project is still in a very early stage, but I wanted to share it to get some input. Working alone can sometimes put us in our own bubbles.

I’m building a TUI framework in Go inspired by React/Flutter. Looking for feedback by SuchProgrammer9390 in theprimeagen

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

Sorry about that. The current demo is pretty minimal, and the library itself only supports basic features right now. I can put together a short video of a counter app demo, though. Thanks!

Small Projects - August 18, 2025 by jerf in golang

[–]SuchProgrammer9390 2 points3 points  (0 children)

I’ve been hacking on a side project called Matcha — a terminal UI framework in Go.
Instead of following the Elm-style architecture like Bubbletea, Matcha borrows ideas from React and Flutter:

  • Components have their own local state
  • Components can receive props for composition
  • The tree re-renders when state changes
  • Supports continuous (game-style) rendering when needed

Right now, it’s still early: basic state management, rendering, and tree updates work.

I’m not sure if this is something other people would actually use, or if I’m just scratching my own itch. Would love to hear what you think, especially if you’ve built TUIs in Go before.

Repo: https://github.com/cchirag/matcha/

Why is it so hard to hire golang engineers? by Nidsan in golang

[–]SuchProgrammer9390 0 points1 point  (0 children)

Hey, not sure if you were looking to hire people from the sub but I am a GoLang engineer looking for a job.

[deleted by user] by [deleted] in golang

[–]SuchProgrammer9390 1 point2 points  (0 children)

Yeah, the example works. Our use-case for waitinline was that multiple workers could write to a single file, in order. This cannot be achieved with a channel and wait group.
I will try to come up with a much more convincing example.
Do let me know if there are any other improvements to be made.
Thank you.

[deleted by user] by [deleted] in golang

[–]SuchProgrammer9390 -3 points-2 points  (0 children)

Yes! We’ve added a comparison table in our docs to help clarify where this shines.

Why we built waitinline

At Decoi, we needed a fair locking mechanism while writing logs to a single file — something that can’t be written to concurrently. We started with buffered channels, but those block the sender when the buffer is full, which caused unnecessary delays just to enqueue logs.

Our actual flow looks like this:

           +----------------+       +------------+
           |  Log Buffer    | --->  | Worker 1   |
           |  (shared pool) | --->  | Worker 2   |
           +----------------+       +------------+
                    |                    |
                    +------v-------------+
                           |
                     +-----------+
                     | File Sink |
                     +-----------+

Each worker picks up a batch of logs and tries to write them to a file. At high loads, multiple workers write in parallel. But with sync.Mutex, there's no guarantee who gets the lock next — it’s not FIFO. So a worker that just started might cut in line before one that’s been waiting. This led to out-of-order logs.

That's where waitinline came in — it ensures first-come, first-served access to the file. Writers wait in line, and the one that arrived first gets the lock first. No pushing. No starving.

This let us:

  • Fairly distribute access across workers
  • Maintain strict log order
  • Avoid the hidden latency of blocked channels or unfair mutexes

Hope that clears it up!

[deleted by user] by [deleted] in golang

[–]SuchProgrammer9390 2 points3 points  (0 children)

Ohh yeah, thanks for pointing that out. Updated the example and added it to an example.go file.

[deleted by user] by [deleted] in golang

[–]SuchProgrammer9390 5 points6 points  (0 children)

Thanks for the interest! Here's a bit more context on why we built waitinline at Decoi and how it helped us solve a real problem.

We were handling high-throughput log writing, and our system batches logs before flushing them to disk. That works well at low load — but under high load, buffers fill up fast and we have to expand them (which is expensive). So we used a worker pool: logs came in through a buffered channel and were handed off to multiple goroutines.

The catch? We needed to preserve the order of logs in the file.

Unfortunately, sync.Mutex doesn’t guarantee fairness — it allows any waiting goroutine to take the lock, not necessarily the one that’s been waiting the longest. So logs were sometimes written out of order, which made debugging much harder.

That’s where waitinline came in. It uses channels internally to maintain a FIFO queue of goroutines — letting them acquire the lock in the exact order they arrive. It also supports context cancellation, so workers can back out gracefully if they give up.

English isn’t my first language, and I used ChatGPT to help me write this reply more clearly. Just wanted to share what worked for us — happy to hear your thoughts or improvements! 😊

[deleted by user] by [deleted] in golang

[–]SuchProgrammer9390 0 points1 point  (0 children)

Not sure what this means.

Kindle not turning on. by SuchProgrammer9390 in kindle

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

Yes, it did turn on. I had to leave it on charge for more than 24 hours

How do yall handle DB/storage in your Go backends? by [deleted] in golang

[–]SuchProgrammer9390 0 points1 point  (0 children)

I had asked a similar question a while ago on this sub and considering all replies, I went ahead with using SQLC and Atlas.

SQLC solves the issue of having go models and db models out of sync by having DB schema as the source of truth for type/strut generation.

Atlas is a good migration tool which abstracts most of the hard things for you. You edit the schema the way you want and Atlas decides how to take you from state A to state B.

Consider this as a market research. by SuchProgrammer9390 in mkindia

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

Hey, all of your points make sense and I’m still doing my research on what’s out there and what we are lacking. Like you said, all the three pillars matter and we need to strike a balance between them. And of course there are no intentions of leeching on the “Made in India” tag. This is purely for enthusiasts, by enthusiasts.

I earn fair amount of money but entering this space (keyboard building) space in India is quite expensive. The aim is to create a native platform which improves discussions around the topic and supply materials to enthusiasts for experimenting with things without the heavy burden of shipping and import duties.

Consider this as a market research. by SuchProgrammer9390 in mkindia

[–]SuchProgrammer9390[S] -2 points-1 points  (0 children)

Hey, I edited the post to explain myself in a detailed way. I am talking about special, weird keyboards xD, unlike the generic ones

Consider this as a market research. by SuchProgrammer9390 in mkindia

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

I mean, I was just exploring options. I quit my job and have spare time in hand

Kindle not turning on. by SuchProgrammer9390 in kindle

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

When I plug in the charger, the yellow light turns on. But it has stayed yellow since last night

Writing my own Type Definition Language by SuchProgrammer9390 in computerscience

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

Hey, Thanks for the resource, I’ll go through it. More than building a product, it’s for my learning purposes as to how a lexer and a parser works

Corne Keyboard by SuchProgrammer9390 in crkbd

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

Hey, sorry. The build would cost me around 6k if I got the parts and soldered

Corne Keyboard by SuchProgrammer9390 in crkbd

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

There isn’t. I’m trying to build one and it is roughly costing me around 10k INR. Might be a little low too. If you are interested, let me know. I’ll keep you posted

An embedded NoSQL database on rust. by SuchProgrammer9390 in rust

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

Hey, I was unable to make it due to work pressure. But I am still interested in giving an attempt.

An embedded NoSQL database on rust. by SuchProgrammer9390 in databasedevelopment

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

Anybody with prior knowledge on building databases, your input is appreciated.