News for hackers. Stuff that matters.
Re:The Value in Go’s Simplicity by fluffything on Tuesday November 19, 2019 @08:19AM (#21572566)
Can you solve the exact same problem using Python list comprehensions or Rust iterators?

I'd like to see how solving this same problem in those languages is less of a nightmare.

I personally find that C loop quite readable compared with the same iteration being done in Rust.

Re:The Value in Go’s Simplicity by pcwalton on Tuesday November 19, 2019 @03:04PM (#21577638)
This is a sum of absolute differences, so in Rust:

    let satd = d.iter().cloned().map(abs).sum();
As an added bonus, there's no undefined behavior!