<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go, branch makepkg</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=makepkg</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=makepkg'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2026-02-03T11:04:31Z</updated>
<entry>
<title>internal/testenv: exclude GOMAXPROCS when building test program</title>
<updated>2026-02-03T11:04:31Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2025-07-20T05:45:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ad5e43b7b4ec99a8dc203d77e0b56d93fe2fd53d'/>
<id>urn:sha1:ad5e43b7b4ec99a8dc203d77e0b56d93fe2fd53d</id>
<content type='text'>
In the environment where GOMAXPROCS set explicitly, for example to 3 in
shell profile, the runtime tests will fail with the following error,

----
ok      regexp/syntax   0.428s
--- FAIL: TestCgroupGOMAXPROCS (0.81s)
    crash_test.go:186: running /home/ms/src/go/bin/go build -o /tmp/go-build1753772192/testprog.exe
    crash_test.go:208: built testprog in 796.664277ms
    --- FAIL: TestCgroupGOMAXPROCS/containermaxprocs=0 (0.00s)
        cgroup_linux_test.go:60: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (907.06µs): ok
        cgroup_linux_test.go:63: output got "3\n" want "4\n"
--- FAIL: TestCgroupGOMAXPROCSNoLimit (0.00s)
    cgroup_linux_test.go:82: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (879.194µs): ok
    cgroup_linux_test.go:85: output got "3\n" want "4\n"
--- FAIL: TestCgroupGOMAXPROCSHigherThanNumCPU (0.00s)
    cgroup_linux_test.go:102: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (852.396µs): ok
    cgroup_linux_test.go:105: output got "3\n" want "4\n"
--- FAIL: TestCgroupGOMAXPROCSRound (0.01s)
    --- FAIL: TestCgroupGOMAXPROCSRound/50000 (0.00s)
        cgroup_linux_test.go:156: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (852.099µs): ok
        cgroup_linux_test.go:159: output got "3\n" want "2\n"
    --- FAIL: TestCgroupGOMAXPROCSRound/100000 (0.00s)
        cgroup_linux_test.go:156: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (894.001µs): ok
        cgroup_linux_test.go:159: output got "3\n" want "2\n"
    --- FAIL: TestCgroupGOMAXPROCSRound/150000 (0.00s)
        cgroup_linux_test.go:156: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (850.897µs): ok
        cgroup_linux_test.go:159: output got "3\n" want "2\n"
--- FAIL: TestCgroupGOMAXPROCSSchedAffinity (0.00s)
    cgroup_linux_test.go:229: /tmp/go-build1753772192/testprog.exe PrintGOMAXPROCS (867.987µs): ok
    cgroup_linux_test.go:232: output got "3\n" want "2\n"
FAIL
FAIL    runtime 23.088s
----

This changes exclude the GOMAXPROCS when building program for testing so it
does not affect the tests.
</content>
</entry>
<entry>
<title>all: set codereview remote name to upstream</title>
<updated>2026-02-03T11:04:31Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2025-07-20T06:07:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=98ec439c5103ff1e711593c8b164b0a0d3741700'/>
<id>urn:sha1:98ec439c5103ff1e711593c8b164b0a0d3741700</id>
<content type='text'>
Change-Id: I474ea1ac91c7e994a1ec7c24ec1ef23bdc0a988f
</content>
</entry>
<entry>
<title>testing: print the counter if its greater than 1</title>
<updated>2026-02-03T11:04:31Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2024-02-07T06:10:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3b913562dd71bec7d9e5bb50c3834ccc8c3dd3f9'/>
<id>urn:sha1:3b913562dd71bec7d9e5bb50c3834ccc8c3dd3f9</id>
<content type='text'>
When test run with "-count=Y" and Y is greater that 1, print a line
to indicated the current round of test as "### X/Y".
</content>
</entry>
<entry>
<title>encoding/json: realign struct encodeState, structFields, and field</title>
<updated>2026-02-03T11:04:30Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2024-01-24T21:23:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c1b21b3cccfeed8f8f6762410479ac03864cd30c'/>
<id>urn:sha1:c1b21b3cccfeed8f8f6762410479ac03864cd30c</id>
<content type='text'>
This reduce the struct encodeState size from 56 to 16 bytes (-42),
struct structFields size from 40 to 24 bytes (-16), and struct field size
from 136 to 128 bytes (-8).

Benchmark memory profiling before and after,

File: json.test
Type: alloc_space
Time: Jan 25, 2024 at 4:51am (WIB)
Showing nodes accounting for -4.01GB, 4.66% of 85.95GB total
Dropped 64 nodes (cum &lt;= 0.43GB)
      flat  flat%   sum%        cum   cum%
   -4.25GB  4.94%  4.94%    -4.01GB  4.67%  encoding/json.Marshal
    0.19GB  0.22%  4.73%     0.24GB  0.28%  encoding/json.mapEncoder.encode
    0.05GB 0.057%  4.67%     0.05GB 0.057%  reflect.copyVal
    0.04GB 0.049%  4.62%     0.04GB 0.049%  bytes.growSlice
   -0.04GB 0.045%  4.66%    -0.04GB 0.045%  encoding/json.RawMessage.MarshalJSON
         0     0%  4.66%     0.04GB 0.046%  bytes.(*Buffer).WriteString
         0     0%  4.66%     0.04GB 0.049%  bytes.(*Buffer).grow
         0     0%  4.66%    -0.04GB 0.045%  encoding/json.(*Encoder).Encode
         0     0%  4.66%     0.20GB  0.23%  encoding/json.(*encodeState).marshal
         0     0%  4.66%     0.20GB  0.23%  encoding/json.(*encodeState).reflectValue
</content>
</entry>
<entry>
<title>encoding/json: realign struct UnmarshalTypeError and decodeState</title>
<updated>2026-02-03T11:04:30Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2024-01-24T21:18:36Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c9f30d6b1840f109b2009fbf3081a97659e0927c'/>
<id>urn:sha1:c9f30d6b1840f109b2009fbf3081a97659e0927c</id>
<content type='text'>
This reduce the UnmarshalTypeError size from 64 to 56 bytes (-8 bytes),
and decodeState from 128 to 96 (-32 bytes).
</content>
</entry>
<entry>
<title>bufio: realign struct Scanner</title>
<updated>2026-02-03T11:04:30Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2023-09-16T16:18:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=a145075005e7f3ead28ff8a517728c4a8a14fa0c'/>
<id>urn:sha1:a145075005e7f3ead28ff8a517728c4a8a14fa0c</id>
<content type='text'>
This reduce the Scanner allocation size from 112 to 72 bytes.
</content>
</entry>
<entry>
<title>bufio: realign struct Reader</title>
<updated>2026-02-03T11:04:30Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2023-09-16T16:17:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2c5946be59a4aa22833f83d5d7265be0ffe18f0e'/>
<id>urn:sha1:2c5946be59a4aa22833f83d5d7265be0ffe18f0e</id>
<content type='text'>
This reduce the Reader allocation size from 72 to 40 bytes and
Writer allocation size from 64 to 40 bytes.
</content>
</entry>
<entry>
<title>mime/quotedprintable: fix encoding where a period alone on a line</title>
<updated>2026-02-03T11:04:30Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2023-07-08T07:54:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7e9761a23fefb4e162db100d881ca1b371effaf0'/>
<id>urn:sha1:7e9761a23fefb4e162db100d881ca1b371effaf0</id>
<content type='text'>
Given the following example of message body,

  A line that precisely have length 75 with . + LF will cause DATA truncation.\n
  \n
  Footer.\n

The quotedprintable Writer will encode the message into,

  A line ... truncation=\r\n
  .\r\n
  \r\n
  Footer.\r\n

If we pass the Writer output into SMTP DATA command, the server read
the "\r\n.\r\n" as the end of DATA which cause the message truncated
on the receiver.

This changes fix this issue by encode the period at the end with "=2E"
based on recommendation in RFC 2049 Section 3, point (8) [1].

[1] https://www.rfc-editor.org/rfc/rfc2049.html#section-3

Fixes #61235

Change-Id: I350387b183ac6b25886f4084a060dcfcb48232a9
</content>
</entry>
<entry>
<title>encoding/json: optimize isValidNumber function</title>
<updated>2026-02-03T11:04:30Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2022-08-26T14:48:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c4890d155ec1c8992857245260c119be9dc474c0'/>
<id>urn:sha1:c4890d155ec1c8992857245260c119be9dc474c0</id>
<content type='text'>
Instead of re-slicing the string for checking the value, use single
index variable.

Benchmark result,

name             old time/op    new time/op    delta
NumberIsValid-8  19.0ns ± 0%    14.5ns ± 1%  -23.70%  (p=0.008 n=5+5)

name             old alloc/op   new alloc/op   delta
NumberIsValid-8   0.00B          0.00B          ~     (all equal)

name             old allocs/op  new allocs/op  delta
NumberIsValid-8    0.00           0.00          ~     (all equal)

Change-Id: I4698c5db134998f83ff47fb3add6a04ba6ec3aa0
</content>
</entry>
<entry>
<title>all: prealloc slice with possible minimum capabilities</title>
<updated>2026-02-03T11:04:30Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2024-10-25T17:48:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=011e40da85bddf83fee0ded83cb9115b7a88b3d4'/>
<id>urn:sha1:011e40da85bddf83fee0ded83cb9115b7a88b3d4</id>
<content type='text'>
</content>
</entry>
</feed>
