<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>go-brainfuck-yourself, branch HEAD</title>
<subtitle>A Brainfuck interpreter that I wrote myself in Go
</subtitle>
<entry>
<id>9f20ae3252a41835203ebd2ff83f1aac4d4f86ea</id>
<published>2026-07-24T03:39:38Z</published>
<updated>2026-07-24T03:39:38Z</updated>
<title>remove unnecessary slice allocation from . and ,</title>
<link rel="alternate" type="text/html" href="commit/9f20ae3252a41835203ebd2ff83f1aac4d4f86ea.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit 9f20ae3252a41835203ebd2ff83f1aac4d4f86ea
parent ed31b64ea0479f9fcf59a55b7e404998f238352d
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Thu, 23 Jul 2026 20:39:38 -0700

remove unnecessary slice allocation from . and ,

we can Read from and Write to bf.cells directly -- no need to allocate
a 1-byte slice every time. the benchmark win here is seen in allocs/op.

```
$ go test -bench=. -benchmem
goos: darwin
goarch: arm64
pkg: github.com/abtrout/gbfy
cpu: Apple M3
BenchmarkLong-8                        1        10477888417 ns/op          37896 B/op         23 allocs/op
BenchmarkMandelbrot-8                  1        12086849000 ns/op         329912 B/op         39 allocs/op
BenchmarkFactor-8                      1        1320697583 ns/op          128120 B/op         30 allocs/op
PASS
ok      github.com/abtrout/gbfy 24.177s
```

</content>
</entry>
<entry>
<id>ed31b64ea0479f9fcf59a55b7e404998f238352d</id>
<published>2026-07-24T03:03:54Z</published>
<updated>2026-07-24T03:14:21Z</updated>
<title>replace sparse loop jump map with dense array.</title>
<link rel="alternate" type="text/html" href="commit/ed31b64ea0479f9fcf59a55b7e404998f238352d.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit ed31b64ea0479f9fcf59a55b7e404998f238352d
parent d4706460bc780d61852e0538f569c4d081ff2c16
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Thu, 23 Jul 2026 20:03:54 -0700

replace sparse loop jump map with dense array.

profiling showed we spent a lot of time computing hash lookups.
we can trade some memory for a big improvement on Eval performance,
at least for all of our benchmark programs!

&gt; 70% reduction (333% improvement) on BenchmarkLong.
&gt; 49% reduction (196%) on BenchmarkMandelbrot.
&gt; 33% reduction (142%) on BenchmarkFactor.

```
$ go test -bench=.
goos: darwin
goarch: arm64
pkg: github.com/abtrout/gbfy
cpu: Apple M3
BenchmarkLong-8                        1        10378019125 ns/op
BenchmarkMandelbrot-8                  1        11992853958 ns/op
BenchmarkFactor-8                      1        1297234500 ns/op
PASS
ok      github.com/abtrout/gbfy 24.032s
```

also cleaned up partial eval logic. now the interpreter can Eval
multiple valid Brainfuck expressions.

</content>
</entry>
<entry>
<id>d4706460bc780d61852e0538f569c4d081ff2c16</id>
<published>2026-07-13T03:09:03Z</published>
<updated>2026-07-13T03:09:03Z</updated>
<title>bump Go version</title>
<link rel="alternate" type="text/html" href="commit/d4706460bc780d61852e0538f569c4d081ff2c16.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit d4706460bc780d61852e0538f569c4d081ff2c16
parent 2cc5adf4f02e109c888639692bbdd82294e6a399
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Sun, 12 Jul 2026 20:09:03 -0700

bump Go version

</content>
</entry>
<entry>
<id>2cc5adf4f02e109c888639692bbdd82294e6a399</id>
<published>2026-07-12T21:24:59Z</published>
<updated>2026-07-12T21:35:28Z</updated>
<title>add benchmarks for upcoming optimizations</title>
<link rel="alternate" type="text/html" href="commit/2cc5adf4f02e109c888639692bbdd82294e6a399.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit 2cc5adf4f02e109c888639692bbdd82294e6a399
parent aa565944a634fe5dbfc933226dc8174a94b5766c
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Sun, 12 Jul 2026 14:24:59 -0700

add benchmarks for upcoming optimizations

```
$ go test -bench=.
goos: darwin
goarch: arm64
pkg: github.com/abtrout/gbfy
cpu: Apple M3
BenchmarkLong-8                        1        30521266042 ns/op
BenchmarkMandelbrot-8                  1        23543847083 ns/op
BenchmarkFactor-8                      1        1914946834 ns/op
PASS
ok      github.com/abtrout/gbfy 56.339s
```

</content>
</entry>
<entry>
<id>aa565944a634fe5dbfc933226dc8174a94b5766c</id>
<published>2026-07-08T03:05:22Z</published>
<updated>2026-07-08T03:06:42Z</updated>
<title>replace recursive eval with for</title>
<link rel="alternate" type="text/html" href="commit/aa565944a634fe5dbfc933226dc8174a94b5766c.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit aa565944a634fe5dbfc933226dc8174a94b5766c
parent 95adca93024128834464c55876fda58676697b23
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Tue,  7 Jul 2026 20:05:22 -0700

replace recursive eval with for

fixes stack overflow from complex programs, e.g. mandelbrot.

</content>
</entry>
<entry>
<id>95adca93024128834464c55876fda58676697b23</id>
<published>2024-01-02T13:24:53Z</published>
<updated>2024-01-02T13:25:25Z</updated>
<title>update README with examples</title>
<link rel="alternate" type="text/html" href="commit/95adca93024128834464c55876fda58676697b23.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit 95adca93024128834464c55876fda58676697b23
parent a2f90706e8525a8187835bc566f3f22b378c6c27
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Tue,  2 Jan 2024 05:24:53 -0800

update README with examples

</content>
</entry>
<entry>
<id>a2f90706e8525a8187835bc566f3f22b378c6c27</id>
<published>2023-12-31T03:48:02Z</published>
<updated>2024-01-02T13:14:51Z</updated>
<title>fixes #7 - move partial loop logic into recursive eval</title>
<link rel="alternate" type="text/html" href="commit/a2f90706e8525a8187835bc566f3f22b378c6c27.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit a2f90706e8525a8187835bc566f3f22b378c6c27
parent f5c1fb462a5163db0e9240fa5cad6a67bd4b2a61
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Sat, 30 Dec 2023 19:48:02 -0800

fixes #7 - move partial loop logic into recursive eval

</content>
</entry>
<entry>
<id>f5c1fb462a5163db0e9240fa5cad6a67bd4b2a61</id>
<published>2023-12-30T13:30:59Z</published>
<updated>2023-12-30T13:30:59Z</updated>
<title>fixes #8 - let REPL handle interpreter Reset</title>
<link rel="alternate" type="text/html" href="commit/f5c1fb462a5163db0e9240fa5cad6a67bd4b2a61.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit f5c1fb462a5163db0e9240fa5cad6a67bd4b2a61
parent 61f8144755065e465703f2381b0c07e632dda094
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Sat, 30 Dec 2023 05:30:59 -0800

fixes #8 - let REPL handle interpreter Reset

</content>
</entry>
<entry>
<id>61f8144755065e465703f2381b0c07e632dda094</id>
<published>2023-12-29T17:36:30Z</published>
<updated>2023-12-30T13:17:37Z</updated>
<title>refactor to use io Reader/Writer</title>
<link rel="alternate" type="text/html" href="commit/61f8144755065e465703f2381b0c07e632dda094.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit 61f8144755065e465703f2381b0c07e632dda094
parent bfdbf53a13e919d0c466180ed4a5819a2f659e1d
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Fri, 29 Dec 2023 09:36:30 -0800

refactor to use io Reader/Writer

</content>
</entry>
<entry>
<id>bfdbf53a13e919d0c466180ed4a5819a2f659e1d</id>
<published>2023-12-28T21:31:25Z</published>
<updated>2023-12-30T12:54:05Z</updated>
<title>read Bytes rather than String</title>
<link rel="alternate" type="text/html" href="commit/bfdbf53a13e919d0c466180ed4a5819a2f659e1d.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit bfdbf53a13e919d0c466180ed4a5819a2f659e1d
parent 28c1e49c0224de7ae71fcce230995bd612a1b5b0
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Thu, 28 Dec 2023 13:31:25 -0800

read Bytes rather than String

</content>
</entry>
<entry>
<id>28c1e49c0224de7ae71fcce230995bd612a1b5b0</id>
<published>2023-12-11T23:16:34Z</published>
<updated>2023-12-11T23:19:40Z</updated>
<title>fixes #4 - execute commands from unix pipes</title>
<link rel="alternate" type="text/html" href="commit/28c1e49c0224de7ae71fcce230995bd612a1b5b0.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit 28c1e49c0224de7ae71fcce230995bd612a1b5b0
parent 573382e878c41f7684b2544e9862b69b89071aae
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Mon, 11 Dec 2023 15:16:34 -0800

fixes #4 - execute commands from unix pipes

</content>
</entry>
<entry>
<id>573382e878c41f7684b2544e9862b69b89071aae</id>
<published>2023-12-03T22:05:29Z</published>
<updated>2023-12-11T02:42:15Z</updated>
<title>fix welcome message</title>
<link rel="alternate" type="text/html" href="commit/573382e878c41f7684b2544e9862b69b89071aae.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit 573382e878c41f7684b2544e9862b69b89071aae
parent acf3448fc0a4e4066a858ae02bc6340ec0ae53d7
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Sun,  3 Dec 2023 14:05:29 -0800

fix welcome message

</content>
</entry>
<entry>
<id>acf3448fc0a4e4066a858ae02bc6340ec0ae53d7</id>
<published>2023-11-18T21:38:14Z</published>
<updated>2023-12-11T02:42:12Z</updated>
<title>fixes #3 - support &quot;streaming&quot; command evaluation</title>
<link rel="alternate" type="text/html" href="commit/acf3448fc0a4e4066a858ae02bc6340ec0ae53d7.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit acf3448fc0a4e4066a858ae02bc6340ec0ae53d7
parent 64d851fab8598d35c4a98bf549d376d8cafabe91
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Sat, 18 Nov 2023 13:38:14 -0800

fixes #3 - support &quot;streaming&quot; command evaluation

</content>
</entry>
<entry>
<id>64d851fab8598d35c4a98bf549d376d8cafabe91</id>
<published>2023-01-24T04:25:35Z</published>
<updated>2023-02-05T03:28:29Z</updated>
<title>fixes #2 - add gbfy CLI with REPL interface</title>
<link rel="alternate" type="text/html" href="commit/64d851fab8598d35c4a98bf549d376d8cafabe91.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit 64d851fab8598d35c4a98bf549d376d8cafabe91
parent 2c51bba3346c3d9d86bf58f85c9ee7a1861adf82
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Tue, 24 Jan 2023 04:25:35 +0000

fixes #2 - add gbfy CLI with REPL interface

</content>
</entry>
<entry>
<id>2c51bba3346c3d9d86bf58f85c9ee7a1861adf82</id>
<published>2023-01-22T17:00:14Z</published>
<updated>2023-02-05T00:23:53Z</updated>
<title>fixes #1 - precompute loop jumps</title>
<link rel="alternate" type="text/html" href="commit/2c51bba3346c3d9d86bf58f85c9ee7a1861adf82.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit 2c51bba3346c3d9d86bf58f85c9ee7a1861adf82
parent afc096e93c59690b90ddb4dc6b3bdeb6f4e7e31f
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Sun, 22 Jan 2023 09:00:14 -0800

fixes #1 - precompute loop jumps

</content>
</entry>
<entry>
<id>afc096e93c59690b90ddb4dc6b3bdeb6f4e7e31f</id>
<published>2023-01-08T21:38:54Z</published>
<updated>2023-01-14T18:42:06Z</updated>
<title>initial commit</title>
<link rel="alternate" type="text/html" href="commit/afc096e93c59690b90ddb4dc6b3bdeb6f4e7e31f.html" />
<author>
<name>david cochran</name>
<email>about.trout@gmail.com</email>
</author>
<content>commit afc096e93c59690b90ddb4dc6b3bdeb6f4e7e31f
Author: david cochran &lt;about.trout@gmail.com&gt;
Date:   Sun,  8 Jan 2023 21:38:54 +0000

initial commit

</content>
</entry>
</feed>
