ANSI Art

November 14, 2017

Since we now have minimal ANSI support, we can use it. Of course, for cute things such as changing text color (red for error, green for OK, etc.), but that’s not very amusing. Let’s make some ANSI ART!!1!

Read the rest of this entry »


ANSI soit-il.

October 24, 2017

There’s no easy way of getting a console-based color output with standard C++. Of course, you can use ncurse, which does pretty much everything, but that is also quite tedious to use. But if you need just a little bit of color, ncurse is pretty overkill. Fortunately, if you have an ANSI capable terminal, that’s much easier.

Read the rest of this entry »


X marks the spot

March 3, 2015

I’m presently finishing a large text typeset in LaTeX. Of course, in many places I just put a note to “fill later” and moved on with the rest of the text. But now, I must hunt them down and fill the holes.

Good for me, I had the idea of writing a LaTeX command that not only marked the spot in the rendered page, like this:

fillme

…but also, by using the command itself, marked the spot in the source code itself. Otherwise, I’d have to find all the “fill me later” “add more” and whatnots.

The command itself is really not that complicated:

\usepackage{pifont}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

\definecolor{bloodred}{HTML}{B00000}

\newcommand{\fillme}[1]{\textcolor{bloodred}{\smash{\ding{54}}}\message{Forgotten fillme on input line \the\inputlineno}} % 54 big fat X

The command takes an argument, which is ignored, but is quite convenient to leave the future you a message:

\fillme{blurb something about leibniz vs newton}

The command depends on the packages pifont for the dingbat and xcolor to define a nice dark red. The command itself does two things. One is to typeset a blood red X in the generated document so that it is conspicuous. The other is to output a message that can be parsed automagically by a script, making their eradication easier.


Swatches!

January 6, 2015

I’ve been using fountain pens for a long time, but I only recently began to appreciate ink. Yes, there are more colors than black and blue-black.

swatches-small

One of the more difficult thing is to choose a color that actually pleases you. Of course, you can browse online stores to get ink, but the colors presented in the swatches are not all that fateful to the actual color you will get out of your fountain pen. Sometimes you have a nice surprise, sometimes you’re disappointed.

Read the rest of this entry »


Bad Graphs!

July 17, 2012

One of the good things of the peer review process is that if you publish, you’re eventually going to have to review papers for conferences or journal in your (perceived) area of expertise. Sometimes you get pearls such as “the resulting results of algorithm X are resulted” (true story), or “the dynamics of the attorney of yes no plasmodium” (also true), but sometimes bad science comes from the bad presentation of results.

This is also a (essentially true) story. So I’m reviewing a paper that proposes some kind of method for predicting the value of (some) parameter that minimizes some error function. The method is fast, but not analytic. The graph in the paper looks something like:

Read the rest of this entry »


Simple Color Management with Gnome

June 7, 2011

Some time ago, I complained about laptops having sucky screens, but it seems there is a way to deal with rather bad colors in Gnome.

Read the rest of this entry »


Bad Laptop Colors: Why?

February 16, 2010

In Calibrating your LCD for Better Results I presented a few techniques to adjust your LCD so that you get better colors, even though it’s not a perfect calibration.

I have a couple of laptops and their screens aren’t all equal. Not all all. The Vaio gives beautiful, vibrant colors. The Dell Mini 10 HD also gives rather cromulent colors. The E6500, on the other hand, is dreadful. Not the whole computer of course, because otherwise it’s a rather good machine. But the screen is just disappointing. And the thing is, you can’t adjust anything besides the brightness—which defaults to blinding bright. What would it take to make such a screen acceptable?

Read the rest of this entry »