flak rss random www

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.

more...

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

dechroma

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.

more...

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.

more...

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.

more...

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.

more...

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.

more...

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.

more...

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

griping about go

I mostly like go, but after working with it a bit more I realize there are a few jibs of which the cut I do not like.

more...

Posted 07 Feb 2019 15:11 by tedu Updated: 07 Feb 2019 15:11
Tagged: go programming

toying with gomacro

I had some go code I wanted to quickly iterate on. Go compiles pretty quickly, but not instantly. Like 2 seconds. In some places, I can use gopher-lua, which gets me pretty close to 0 second iteration delay, but there’s a big up front development cost. It’s useful for scripting an existing program and adding custom behavior, but less useful for experimenting to see what happens when I do X. What I need is an actual interpreter for go, not an interpreter in go.

more...

Posted 19 Jan 2019 02:38 by tedu Updated: 19 Jan 2019 04:10
Tagged: go programming

easy gopher-lua bridge

I have some go code that I’d like to be a little more flexible at runtime. Like a config file, but maybe with some conditional logic based on string matching. If this sounds like a proxy deciding which filtering functions to apply based on URL, that’s a good guess.

more...

Posted 04 Dec 2017 23:02 by tedu Updated: 04 Dec 2017 23:02
Tagged: go lua programming