News for hackers. Stuff that matters.

valczir

yaml is a superset of json, so by definition anything that accepts yaml _must_ accept json
alternatively:

    var errClosed = errors.New("closed")

    func doAThing[T any](ctx context.Context, c chan T) (T, error) {
        // the generics are not necessary, but they're also not awful for
        // DRYing up this type of a select.
        select {
        case <-ctx.Done():
            var empty T
            return empty, fmt.Errorf("could not doAThing: %w", ctx.Err())
        case item, ok := <-c:
            if !ok {
                var empty T
                return empty, fmt.Errorf("channel of type %T is done: %w", empty, errClosed)
            }
            return item, nil
        }
    }

    // ... and later...
    for {
        item, err := doAThing(ctx, channel)
        if err != nil {
            break
        }
        // code goes here
    }
I dislike labeled loops, naked returns, and else statements, so this is the pattern I use.
Re:Steam Top 50 Games: Over 70% now work on Linux on Saturday September 11, 2021 @01:12PM (#28493679)
Check the chart again - ARK is native. If you run it in proton (many mods have issues with the linux-native version of the game, so many people do run it in proton), then you can't join battleye-enabled servers.
Re:Id Software on Wednesday June 13, 2018 @10:33AM (#17303425)
https://garbagecollected.org/2017/10/24/the-carmack-plan/

There's a table in the above link, as well as a few more details

I've stuck with buffalo for the last ... 6-8 years, and I have yet to see any of my buffalo routers need a restart, let alone die permanently. Coming with (a customized) DD-WRT out of the box is just a bonus, at that point.

They may not have the greatest wifi range in the world, but I haven't found a router to beat them at stability.