News for hackers. Stuff that matters.
Re:GitHub Codespaces by lukevp on Wednesday May 06, 2020 @08:15PM (#23098106)
Why not post the change here so someone else could contribute it? Sounds useful.
Re:GitHub Codespaces by hannibalhorn on Wednesday May 06, 2020 @08:43PM (#23098329)
That'd be awesome!

    diff --git a/src/strconv/atof.go b/src/strconv/atof.go
    index 28ad094..49cec69 100644
    --- a/src/strconv/atof.go
    +++ b/src/strconv/atof.go
    @@ -410,12 +410,12 @@ out:
     }
     
     // Exact powers of 10.
    -var float64pow10 = []float64{
    +var float64pow10 = [...]float64{
      1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
      1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
      1e20, 1e21, 1e22,
     }
    -var float32pow10 = []float32{1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10}
    +var float32pow10 = [...]float32{1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10}
     
     // If possible to convert decimal representation to 64-bit float f exactly,
     // entirely in floating-point math, do so, avoiding the expense of decimalToFloatBits.

math.Pow10() already uses arrays this way, and I found a ~10% performance while optimizing an alternative float parsing implementation by making the same change.
Re:GitHub Codespaces by toomuchtodo on Wednesday May 06, 2020 @08:52PM (#23098382)
I just want to say kudos and well done to post the diff here.
Re:GitHub Codespaces by tom_mellior on Thursday May 07, 2020 @09:16AM (#23102599)
Didn't you just poison this change and ensure that it can never be applied? Having posted this anonymously, nobody can sign the Contributor License Agreement and promise truthfully that this is original code that they have the rights to contribute. Including yourself, in the future.
Re:GitHub Codespaces by z3t4 on Thursday May 07, 2020 @02:51PM (#23106697)
You can not copyright the ... (dot dot dot) nor can you claim copyright to an existing work by adding ... to it. You might be able to pattern it though...
Re:GitHub Codespaces by tom_mellior on Friday May 08, 2020 @01:41AM (#23111734)
I don't know the specifics of Google's contributor agreement (you need to log in with a Google account just to read it), but in my experience they are much stricter than copyright law. I've heard of organizations that would like to force people to sign contributor agreements just to be allowed to open GitHub issues. Because the issue might contain information that might taint everything. At least in the view of corporate lawyers.