lyda

joined 2 years ago
[–] lyda@programming.dev 5 points 2 weeks ago

Windows isn't Unix and as someone who has spent a career coding for Unix and Unix-like systems, Windows just isn't useful to me. I'm perfectly happy with Linux, FreeBSD, OpenBSD or even OS X or whatever it's called this week. The code I write generally runs on any of those and things behave as expected.

I've never really used Windows, but I have had to deal with the problems caused by developers using Windows. EOL chars, not putting a trailing EOL char in a file (postconf no like that), a lack of understanding of various Unix things. It's kind of tedious to deal with, but that's more the devs than Windows.

[–] lyda@programming.dev 1 points 3 weeks ago

This is amazing!

[–] lyda@programming.dev 7 points 2 months ago

That's a pretty shitty outcome. And the LoucheBear character doesn't seem to contribute anything of value, just ignorant abuse.

[–] lyda@programming.dev 26 points 2 months ago (3 children)

All the more reason to buy your computers from companies that support Linux in the first place - like Slimbook and System 76.

[–] lyda@programming.dev 4 points 3 months ago

It happened due to Microsoft disabling an Internation Criminal Court lawyer's Office 365 account. This has spooked EU officials that a rogue US administration could harm it and there's a stronger push now for digital sovereignty.

[–] lyda@programming.dev 10 points 4 months ago (1 children)

Long ago I tried a cygwin based openssh server in Windows. Permissions were a real issue.

 

A template project for creating OpenAPI document driven API servers in Go.

[–] lyda@programming.dev 3 points 2 years ago

ls /usr/share/man/man?/* will show you all the man pages on your system. I used to pick ones at random.

Originally there were a number of manuals. Manual 1 had user commands. Manual 2 had system calls. Etc. You can type man NUMBER intro to read about that manual. You can also use man -k or appropos but I've also just used grep. These days they're compressed so zgrep.

[–] lyda@programming.dev 2 points 2 years ago

Good answers. I like these. I like the more than one command in a file, that will work. And yes, should have read the source!

 

Say I have go:generate directives in two files: one in the foo/ directory and one in the mock/ directory. The generated mock code will need data structures from the generated code in the foo module. Will go generate ./... reliably generate code in the correct order? What do I need to do to make that happen?

[–] lyda@programming.dev 1 points 2 years ago (4 children)

Well, nix would be an entire operating system. This is just for a build system to specify the versions of the tools to use.

 

Wonder if anyone here has been using bingo for reproducible builds. I've found it to be really good and wish I could find similar tooling for things like python for tools like yamllint.

[–] lyda@programming.dev 2 points 2 years ago

I suppose I should be clearer on the features I want. I'd want to be able to store my cache in memcached or redis and I want the cached data to expire. So for one call, I might want to keep it for five minutes, but another one can stick around for 24 hours.

The memorize package falls down there.

 

I'm curious what people are doing for memoization in #golang. I've looked around and haven't found great libraries for this which makes me wonder if I'm pursuing the wrong solution to a problem.

Caching the return values of functions based on the params has been useful to reduce load on downstream services, make things a bit faster on average and even add some level of consistency in functions that can be highly variable (which is an odd use case but nonethelass useful). But maybe there's a different pattern/idiom that's used in the Go ecosystem?