flak rss random

parallel tree running

For the first version of where’s all the code I did a simple tree walk to find all the code, one file at a time. But I wrote it in go, a supposedly concurrency friendly language, so it seemed the obvious thing should be to walk the tree in parallel. This went great, until it didn’t, but then it ended up okay.


Posted 16 May 2022 02:23 by tedu Updated: 20 May 2022 16:41
Tagged: go programming

the three line single binary compiler free blog

A silly experiment that quickly ended up deep in the rabbit hole.


Posted 21 Apr 2022 08:17 by tedu Updated: 21 Apr 2022 08:17
Tagged: go programming

cgo does clear errno

C functions commonly, though not universally, provide information about a failure through the global variable like errno. Provide, not indicate. If there’s no error, as indicated by the function’s normal return value, the value and meaning of errno is unreliable.


Posted 15 Apr 2022 17:07 by tedu Updated: 15 Apr 2022 17:51
Tagged: c go programming

comparative unsafety

I wrote some rust code. I used unsafe. It was unsafe. After months of contemplating this unfortunate result, I’ve found someone else to blame.


Posted 17 Aug 2020 13:53 by tedu Updated: 17 Aug 2020 18:24
Tagged: go programming rust


A while back somebody posted some “amazing” images which were black and white except for the stripes that were colored. So, not black and white, but the point was to demonstrate that vision is highly perceptual and the brain will interpolate from what’s there. I thought this might be fun to play around with. I guess it kinda works, but I think some of the demo images were selected carefully.


Posted 15 May 2020 16:41 by tedu Updated: 15 May 2020 16:41
Tagged: go programming project www

go regexp.Replace notes

I had some code which did some repeated regexp.Replace operations. This is not the best way to do things, but it worked. It wasn’t noticeably slow, but just from inspection there’s some inefficiencies. It’s possible to speed to things up without rewriting it substantially, at some cost to clarity.


Posted 02 Dec 2019 11:39 by tedu Updated: 02 Dec 2019 11:39
Tagged: go programming

please note gosumdb caches 410

Starting with go 1.13, the go.mod proxy server is enabled by default. Part of, or adjacent to, the proxy is also a checksum database. It caches things, and in particular it caches negative results, which may be surprising or frustrating. One option is to avoid it entirely, but should you use the proxy, it has some caveats.


Posted 24 Oct 2019 05:02 by tedu Updated: 24 Oct 2019 05:02
Tagged: go software

some gerc notes

gerc (good enough revision control) is a partial reimplementation of mercurial. Between got and bitbucket, it seems source control is back in the news. Here are some scattered notes about gerc and its development. It’s not complete or recommended for use, so don’t expect much.


Posted 21 Aug 2019 15:50 by tedu Updated: 21 Aug 2019 15:50
Tagged: go programming project

rewriting everything in go

I’ve been a rather happy lua user for a few years. In particular, the luajit implementation. But as part of an ongoing overhaul of this and that, I decided to rewrite all my lua code in go. Or wait, let me rephrase that.


Posted 11 Mar 2019 03:25 by tedu Updated: 11 Mar 2019 15:42
Tagged: flak go

package of the moment: tview and tcell

I wanted to make an interactive terminal interface for something. Usually I just bang out some vt100 escapes to move the cursor around, color this, erase that. It’s crude but effective as long as the number of screen elements is kept to a minimum. This time, though, I decided on a slightly more disciplined approach, and so I was looking for a library that might assist in drawing views of various sizes, and input fields, and buttons. The works. In go.


Posted 18 Feb 2019 17:58 by tedu Updated: 09 Apr 2019 21:05
Tagged: go software