Conversation
|
SauravMaheshkar
left a comment
There was a problem hiding this comment.
The PR preview seems broken. Let me look into this for now. I'll make a commit to this branch to fix this. And then once the preview is working I'll leave a review.
e42d90f to
6b2ed63
Compare
SauravMaheshkar
left a comment
There was a problem hiding this comment.
The bones for the article are there but needs work on the overall grammar (uniform grammar and wording) and technical depth (a lot more). Let's add more details on how bubble tea works and what the various snippets contain (we create a type for <>, a function to do <>, we use the builtin <> module).
It'd be pretty cool if we could isolate the components from this project, show a well documented MVP and then showcase how we go from template to implementation. As in this is a simple 25 line MRE implementation of how a menu works in bubble tea (uses types from ..., standard modules ... go constructs ...) and then we can modify this MRE to implementing the matrix effect.
Also let's call it the matrix effect and not the rain effect. It comes from the matrix and sounds for some reason grammatically better.
content/posts/matrix-go.md
Outdated
|
|
||
|  | ||
|
|
||
| We got bored one weekend and decided to build a Matrix rain effect in the terminal. You know, those cascading green characters from the movie? But we wanted ours to display actual text files, not just random symbols. Here's how we built it. |
There was a problem hiding this comment.
Grammar feels a little off, too much "we". Also totally forgetting to explicitly mention that opencode generated most of the code, we just orchestrated and observed.
content/posts/matrix-go.md
Outdated
| Building a terminal app is easy until you need to include data files. We had a bunch of text files we wanted to display, but asking users to download separate assets felt wrong. What if they put them in the wrong folder? What if they forgot entirely? | ||
|
|
There was a problem hiding this comment.
I think we should add a simple bash code block showing how the file structure is something like
assets/
rain-man.txtSomething like this but colorised maybe. We can get creative here.
content/posts/matrix-go.md
Outdated
|
|
||
| ## Building a Menu That Doesn't Suck | ||
|
|
||
| We wanted users to pick which text file to rain-ify. Bubble Tea (Charm's TUI framework) makes this possible, but it's not exactly plug-and-play. The API requires you to jump through some hoops. |
There was a problem hiding this comment.
"rain-ify" let's reword this to be something like choose the content of the effect. matrix like effect sounds a lot more coherent than "rain".
content/posts/matrix-go.md
Outdated
| } | ||
| ``` | ||
|
|
||
| Then there's the delegate - the thing that actually renders each item. This is where you customize the look: |
There was a problem hiding this comment.
Switching a lot between talking to the reader and monologue. As in the phrasing "we did ...", "we wanted to ..." is in line with a monologue. But saying things like "This is where you ..." adds the reader to the mix. Stick to a consistent tone. I prefer talking with the reader. Lots of back and forth, rather hear me speak.
content/posts/matrix-go.md
Outdated
|
|
||
| ## The Heartbeat of Animation | ||
|
|
||
| Bubble Tea uses the Elm Architecture: your app has a Model (state), an Update function (handles messages), and a View function (renders output). Everything flows through messages. |
There was a problem hiding this comment.
We need a proper introduction and overview of the Elm architecture with mermaid diagrams and everything.
We need to write this in a way that would have helped us when were building matrix.go i.e.
- someone who knows programming but doesn't know
go - someone who has no understanding about Bubble Tea
- someone who has no understanding about the Elm architecture
Add matrix.go blog post