News for hackers. Stuff that matters.
Re:Porting 4.5K lines of C to Go by Arnavion on Friday August 04, 2017 @08:10PM (#14933420)
>`a | b` can be written as: `if !a && b { a = true }`

`a || b` ...

The repository does have multiple cases of `a || b` and none of the `a = true` kind, so perhaps the author realized it after writing this blog post.

Re:Porting 4.5K lines of C to Go by thetic on Friday August 04, 2017 @09:42PM (#14933797)
This one tripped me up too. I'm guessing he meant `a |= b`.
Re:Porting 4.5K lines of C to Go by Arnavion on Sunday August 06, 2017 @01:50AM (#14939961)
Of course he meant that. My point was that `if !a && b { a = true; }` is a silly way to write `a = a || b;`
Re:Porting 4.5K lines of C to Go by teolandon on Friday August 04, 2017 @10:59PM (#14933997)
It's right on the line wrap, but it actually says `a = a | b`. At least right now, not sure if they edited it.