norden.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Moin! Dies ist die Mastodon-Instanz für Nordlichter, Schnacker und alles dazwischen. Folge dem Leuchtturm.

Administered by:

Server stats:

3.4K
active users

#go

19 posts15 participants0 posts today

I'm learning #GoLang too. For practice I checked out a small codebase. Well written & working code with 0 unit tests. And adding interfaces for mocking would mean an unacceptable amount of code duplication. 😖

In #Python, mocking is easy. And compared to that, it looks like no one has given a single thought about unit testing when #Go was designed, so now it looks possible through workarounds only.

I'm sure I'll learn correct the way to do it sooner or later, but still...

In Go (weiqi, baduk), the word "urgent" is used a lot to identify what should be done first.

I wonder if it is an unfortunate mistranslation from Japanese, Chinese or Korean, because I think the most appropriate term should have been "critical" instead.

"It’s not that hard to build a fully functioning, code-editing agent.

It seems like it would be. When you look at an agent editing files, running commands, wriggling itself out of errors, retrying different strategies - it seems like there has to be a secret behind it.

There isn’t. It’s an LLM, a loop, and enough tokens. It’s what we’ve been saying on the podcast from the start. The rest, the stuff that makes Amp so addictive and impressive? Elbow grease.

But building a small and yet highly impressive agent doesn’t even require that. You can do it in less than 400 lines of code, most of which is boilerplate.

I’m going to show you how, right now. We’re going to write some code together and go from zero lines of code to “oh wow, this is… a game changer.”

I urge you to follow along. No, really. You might think you can just read this and that you don’t have to type out the code, but it’s less than 400 lines of code. I need you to feel how little code it is and I want you to see this with your own eyes in your own terminal in your own folders.

Here’s what we need:

- Go
- Anthropic API key that you set as an environment variable, ANTHROPIC_API_KEY"

ampcode.com/how-to-build-an-ag

ampcode.comHow To Build An Agent | AmpBuilding a fully functional, code-editing agent in less than 400 lines.

Got localization and a planned pipeline working on apply.coop for @limeleaf last evening. Shout out to Alex Edward's post alexedwards.net/blog/i18n-mana and code from the folks working on @Codeberg for pointing me in the right direction to find a solution that doesn't involve external dependencies in Go (aside from golang.org/x packages)

Also, if you've never heard of @weblate you should absolutely check it out. Super awesome project!

www.alexedwards.netI18n in Go: Managing Translations - Alex Edwards