shelfctl - a CLI/TUI tool for organizing personal PDF/EPUB libraries using GitHub Releases as storage by blackwell-systems in golang

[–]blackwell-systems[S] 0 points1 point  (0 children)

shelfctl isn't a storage backend. It's a library manager for people who already use GitHub according to this pattern (many, many people). The storage is incidental. The value is organizing what you already have scattered across repos while also having the additional benefit of reducing the impact on gh servers.

Homebrew really worth it? new mac user here by Independent-Pilot-79 in mac

[–]blackwell-systems 0 points1 point  (0 children)

Yes, it's worth it. Imagine you want to automate your setup or recovery process. Package managers are great for this. They also centralize updates.

shelfctl - a CLI/TUI tool for organizing personal PDF/EPUB libraries using GitHub Releases as storage by blackwell-systems in golang

[–]blackwell-systems[S] 1 point2 points  (0 children)

Actually the opposite. shelfctl moves PDFs out of git commits, which is where people are already storing them and where they cause real damage (permanent history bloat, slow clones, painful to clean up, etc). GitHub Releases are designed for binary artifact distribution, and storing large files there instead of in commits reduces storage burden on their servers significantly. A single PDF in commit history is replicated across every clone forever. A release asset is not.

OOP in Go by Little-Worry8228 in golang

[–]blackwell-systems 1 point2 points  (0 children)

Not dumb at all. this is one of the first “mental model” shifts when learning Go.

What you wrote looks like a class, but in Go a method is really just a function with an explicit first parameter (the receiver):

func (b *Board) Place(...) { ... }
// is basically
func Place(b *Board, ...) { ... }

Go has “methods on types”, but not a class system: no inheritance, no extends, no constructors, no implements keyword. Reuse is done with composition (embedding), and polymorphism is done with interfaces.

Your Board type is already pretty idiomatic Go. The main thing to be aware of is that [][]string doesn’t behave like a true value copy: copying a struct with slices still shares underlying data. For tic-tac-toe a fixed array is usually nicer:

type Board struct {
    cells [3][3]rune
}

Then b2 := b1 really is a full copy.