Some things that force Go to call the C library for name resolution on Linux
Traditionally on Unix systems there is no official standard for howto do various sorts of network name lookups, or rather the officialstandard is 'call the functions in the system C library'. There isgenerally no actual specification for how name lookup works at thelevel that would permit you to create an independent implementation(although there is generally documentation on how to configure it).This presents a problem for people who are creating non-C languages;they must either arrange to call the C library (through the C
Getting xterm and modern X applications to do cut and paste together
I was all set to write a somewhat grumpy blog entry about getting xterm and Chrome to play nice with each other for cut and pastewhen I decided to re-test this systematically. Let me tell you,systematic testing and investigation changes quite a lot of blogentries around here, and this one appears to be no exception.
The basic background on this is that X basically has two levels of cutand paste, which I'll call a casual level and a serious level. Thecasual level is making ordinary
I still believe in shimming modules for tests
A commentator on my 2008 entry about shimming modules for testing recently asked if I still liked thisapproach today. My answer is absolutely yes; I continue to love thatPython lets me do this, and I feel that it ( or a variation on it ) is the best approach for mocking out partsof standard modules. There are two reasons for this.
The first is that I continue to believe in what I wrote in my oldentry about why I do this ; I would muchrather have clean
My views on the choice of Linux distribution
I have tangled and complicated feelings about the choice of a Linuxdistribution for myself and about the idea of changing distributions.So today I feel like trying to run down some of the complexitiesat play.
In more or less point form, because it's easier that way:
- Given that I use a basically completely hand-built custom environment(I compile my own copy of fvwm, for example), in theory I'mbasically indifferent to the actual Linux distribution or evenUnix OS that I'm using
The ArchLinux wiki has quietly become a good resource for me
I mentioned this on Twitter and it keepsshowing up in my entries ( eg ),so I might as well say it explicitly: increasingly, the ArchLinuxwiki is becomingone of my relatively highly trusted information sources, both forLinux specific information and also often for more general thingslike X. I don't yet search it first, but when it comes up in myweb searches I'm more and more inclined to stop looking at anythingelse.
I like the ArchLinux wiki for two reasons. First,
Goroutines, network IO streams, and the resulting synchronization problem
These days, I use my Go take on a netcat-like program for all of my casual network(TCP) service testing. One of the things that makes it convenientis that it supports TLS, so I can just do things like ' call tlsimap.cs imaps ' instead of having to dabble in yet another netcat-likeprogram. However, this TLS support has an important and unfortunatelimit right now, which is that it only supports protocols where youdo TLS from the start. A certain number
A surprise about cryptographic signatures
I won't say that I know a lot about cryptography, but I know acertain amount. What this really means is that every so often I getthe opportunity to be really surprised about something in cryptography.The most recent incident came about from reading Andrew Ayer's Duplicate Signature Key Selection Attack in Let's Encrypt .I had to read the article more than once before I really understoodthe problem, but here is the cryptographic thing that really startledme, boiled down:
A digital signature is not
The old-fashioned and modern ways to remap keys in X (some notes)
As I mentioned recently , I've been remapping mykeyboard in X for a very long time . In allof this time, I've been using the traditional and now old fashionedway of doing this, namely xmodmap . Xmodmap is now a deprecatedmechanism, although it still works; these days you usually want tobe remapping keys with setxkbmap .
You might wonder why X has two different programs for this. As youcould guess, it's the usual reason ; X added a new system for handling
What I like web templating languages for
In reaction to my entry on the problems with creating new (web)template languages , some of the peopleon Hacker News felt that the time of web templating languages was over due tovarious improvements in full programming languages. As it happens,I disagree. While there are situations where I would rather createHTML in code instead of through a template system, there are alsoplenty of situations where I would much rather use a template system.
In my opinion, templates work well in two interrelated situations.The first is
The (peculiar) freedom of having a slow language
Back in my entry on why speeding up (C)Python matters ,I said in an aside that there was a peculiar freedom in having a slowlanguage. Today I'm going to explain what I meant in that cryptic aside.
The peculiar freedom of having a slow language is the mirror imageof the peculiar constraint of having a fast language, which is thatin a fast language there is usually a (social) pressure to writefast code. Maybe not the very fastest code that you could, that'