valczir
Re:Age is a simple, modern and secure file encryption tool, format, an...
on Monday August 05, 2024 @10:19AM (#41161590)
yaml is a superset of json, so by definition anything that accepts yaml _must_ accept json
Re:Goroutines: The concurrency model we wanted all along
on Friday July 07, 2023 @05:51PM (#36638773)
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
Re:Ask HN: Best current model routers for OpenWRT, DD-WRT, Tomato, etc.?
on Tuesday December 06, 2016 @09:50AM (#13114937)
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.