Some bits of how Bash and GNU Readline's "bracketed paste" mode behaves
Recent versions of Bash and GNU Readline now default to specialhandling of pasting into them , in whatis called "bracketed paste" mode. This mode requires you to explicitlyhit Return in order to have the pasted text accepted, and allowsyou to edit the paste before then. This simple description mightleave you wondering how bracketed paste mode interacts with variousother things, and as it happens I have done some experiments here(out of curiosity, since bracketed paste mode is not for us ).
First, although it
Using journalctl's ability to show only one service
When I wrote about sending all syslog messages to one file , one of my reasons for it wasso that I didn't have to hunt through assorted syslog files to findout just where a program's log messages went. However, even whenyou put all messages in one place, you still have to pick out themessages you care about from all the rest. Lately, I've realizedthat on systemd based Linux systems, this is working too hard andthere's a much easier way using
When you do and don't get stuck query results from a down Prometheus
A while back I wrote about Prometheus and the case of the stuckmetrics , where after my home desktop crashed, metrics from its Prometheusinstance would be 'stuck' at constant values for a while. Thishappens because Prometheus will look backward a certain amount oftime in order to find the most recent sample in a time series. Whenmy machine crashed, Prometheus obviously stopped writing samples,so for the next roughly five minutes the most recent sample thatwas returned by queries was the last pre-crash one.
The
I have mixed views on new DNS top level domains (TLDs)
Over on Twitter I said something relatedto new TLDs. I have some views on what I said that are for anotherentry , but for now I want tosort out some views on new TLDs in general.
New top level DNS domains come in two flavours; there are countryTLDs (and country-like ones) and what are officially called genericTLDs ,things like ".online" and so on. Adding new country TLDs is obviouslyrequired and is sensible, and I feel this is also the case for
Anonymous ("transparent") structures are a good thing in programming languages
I recently wrote about learning how C unions can be used to createoptional namespaces , by creative use of bothanonymous unions and anonymous structs. However, the problem inthat entry is not that modern C has anonymous unions and structs(officially added in C11, a GNU extension before then, and beforethat a Plan 9 one). I think that what we could call "transparent"structures are a good thing in any language, not just C (Go hasthem too, and probably other languages as
Unix APIs are where I first saw C #define used to rename struct fields
In my entry on learning that you can use C unions for groupingstruct fields into namespaces , Imentioned that the traditional version of this was done with #define to create convenient short names for fields that were actually hiddendeeper in a struct than they appeared. I didn't come up with this ideaon my own; instead, I'm pretty sure that where I first saw this was inUnix APIs. More exactly, in the actual implementation of Unix APIs, asvisible in C header files. Most
Learning that you can use unions in C for grouping things into namespaces
I've done a reasonable amount of programming in C and so I like tothink that I know it reasonably well. But still, every so often Ilearn a new C trick and in the process learn that I didn't know Cquite as well as I thought. Today's trick is using C unions to group struct fields together, which I learned about through this LWNarticle ( via ).
Suppose that you have a struct with a bunch of fields, and youwant to deal with some
Hardware and (Linux) driver quality can be invisible to non-specialists
We have been happy with Intelnetwork hardware for a long time, especially under Linux. We've hada long and happy relationship with various generations of Intel 1Gnetworking chipsets and cards, and then a more recent good historywith Intel 10G-T chipsets, in our current generation of fileservers and some other machines (usually via add-oncards). Intel 10G-T cards have also been mostly problem free onvarious versions of OpenBSD (we had a weird issue or two with
XHTML pages cause problems for some Firefox addons
These days, XHTML is pretty much a dead issue on the web. Butbrowsers still support it and some people do serve real XHTML webpages ( for example ).What I've noticed on the occasions that I visit these web pages isthat their being XHTML can cause problems for some of my Firefoxaddons . The most common addon that I noticeproblems with is FoxyGestures ,partly because I believe it has to inject things in order to drawgesture trails and partly because I use it all the time.
(
How Go maps store their values (and keys)
Recently on Twitter I mentioned my entry on why it matters thatmap values are unaddressable , and got athought provoking reply from Sean Barrett :
Knowing none of the details & not being a go programmer, I wouldhave guessed that map values aren't addressable because they're in adynamically-sized hash table so they need to get relocated behind theuser's back; getting the address of a value slot would break that.
This made me realize that I actually had no idea how Go maps storetheir