This my basic, no-frills blog. It contains both posts about math and other topics. Lately, they've mostly been about linux and vim.
I eventually intend to add in a tag and category based word-cloud so that the blog is easier to navigate.
18 Mar 2017
--\> I was trying to get tamil input to work on both my debian and arch
systems, since I wanted to use the tamil
lexicon to look up
words. There are two ways of doing this.
- Use xkb layouts. xkb supports tamil input natively, but they keymaps
are a little weird. I spent some time trying to figure out the
keymap it was using, but wasn't very successful. I'm guessing it's
using the Tamil 99 layout, that can be found
here.
- Input methods. This is the more powerful way of doing things,
especially because there are multiple tamil layouts available and
it's easy to switch between them. If you use xkb, you'd typically
have to restart X to install new layouts.
There are a bunch of input methods
- scim
- ibus
- nimf (korean, chinese)
- dasom (korean)
- fcitx (popular in taiwan)
- uim (japanese)
Of these, the scim and ibus are the most well known, and work well with
the m17n library. They're largely the same, but ibus is the default in
many desktop environments. This
guy thinks that ibus'
interface is a little better. I think one can't go wrong with either
one. I chose ibus.
Install the following packages
ibus-m17n, ibus-gtk, ibus-gtk3, ibus-qt4
There are ibus packages available for clutter too. For Arch Linux, I
followed their wiki.
You need to set a few environment variables:
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
On debian, it's a bit easier since you first install the im-config
package and then run
im-config -n ibus
which will write an .xinputrc
file. Debian has some dbus rules setup
that automatically set the GTK_IM_MODULE
and other environment
variables. So it doesn't appear to be necessary to insert the
environment variables into your .xinputrc
. In any case, it doesn't
seem to hurt whether you do it or not.
The Arch Wiki suggests inserting
ibus-daemon -drx
into my .xinputrc
. This doesn't work so well if you use a login or
display manager like lightdm. This is because the ibus daemon does not
like being started too early. A symptom of this was that tamil input
worked inside my terminal emulator, but not inside firefox.
I use lightdm and i3, and what works for me is to insert
ibus-daemon -drx
into my .i3/config
file as
exec --no-startup-id ibus-daemon -drx
For other desktop environments like xfce or cinnamon, use the system
that allows you to specify ibus-daemon as a startup program.
I use phonetic tamil input and it's absolutely amazing.
Remember to install tamil fonts! See this
page.
02 Apr 2016
I started getting errors in firefox recently complaining about Math Processing Errors
and problems loading imagefonts. It was sort of like this bug where a file called imagedata.js
was not getting loaded.
Mathjax shouldn't have to use imagefonts in any modern browser; mathjax was working perfectly in chrome for example. So what had happened was I'd unchecked the
Allow pages to choose their own fonts, instead of my selections above
under Preferences > Content > Advanced.
My firefox version is
Mozilla Firefox 45.0.1
It's also interesting to note that the usual packages in ArchLinux and Ubuntu don't package MathJax image fonts by default. These are however available in their github repository.
09 Jan 2016
After an update sometime ago, cups started to fail when trying to print to printers that were automatically detected. The printers address would show up as
dnssd://Brother%20DCP-L2540DW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-xxxx-xxxxxxxxx
When trying to print to such a printer, cups would give the following error:
Unable to locate printer 'BRWXXXXXX.local'
If you have avahi running, then you can run
lpinfo -v
to list all the network printers. This would show, for example
network ipp
network ipps
network socket
file cups-pdf:/
direct hp
network lpd
network http
network https
network smb
direct hpfax
network dnssd://Brother%20DCP-L2540DW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-xxxx-xxxxxxxxx
network lpd://BRW1008B19C71E2/BINARY_P1
The problem is that the correct libraries were not installed; see this askubuntu page. It tells you that you need to install the nss-mnds library. This is some sort of dns service that is necessary for cups to function. Once you install it using
pacman -S nss-mdns
Edit the file
/etc/nsswitch.conf
so that the hosts line contains.
hosts: files mdns_minimal dns mdns
24 Nov 2015
I was having trouble with lm-sensors, since it was only detecting cpu core temperatures. This meant that it wasn't detecting my hardware monitoring chip, as evidenced by
Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... No
Trying family `ITE'... Yes
Found unknown chip with ID 0x8620
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... No
Trying family `ITE'... No
The Super I/O chips usually provide advanced monitoring tools. A little searching found that the latest it87 driver supports the ITE chip with ID 0x8620. So I ran
git clone https://github.com/groeck/it87
cd it87
make
sudo make install
If this gives an error, make sure you have the kernel headers installed
sudo apt-get install linux-headers-$(uname -r)
Then I inserted the new kernel module with
sudo modprobe it87
Running
sensors
now shows
[code lang=text]
acpitz-virtual-0
Adapter: Virtual device
temp1: +27.8°C (crit = +105.0°C)
temp2: +29.8°C (crit = +105.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +32.0°C (high = +80.0°C, crit = +100.0°C)
Core 0: +31.0°C (high = +80.0°C, crit = +100.0°C)
Core 1: +32.0°C (high = +80.0°C, crit = +100.0°C)
radeon-pci-0100
Adapter: PCI adapter
temp1: +43.0°C
it8620-isa-0a30
Adapter: ISA adapter
in0: +0.06 V (min = +0.00 V, max = +3.06 V)
in1: +2.05 V (min = +0.00 V, max = +3.06 V)
in2: +1.97 V (min = +0.00 V, max = +3.06 V)
in3: +1.99 V (min = +0.00 V, max = +3.06 V)
in4: +0.01 V (min = +0.00 V, max = +3.06 V)
in5: +1.75 V (min = +0.00 V, max = +3.06 V)
in6: +1.55 V (min = +0.00 V, max = +3.06 V)
3VSB: +3.38 V (min = +0.00 V, max = +6.12 V)
Vbat: +3.00 V
+3.3V: +3.48 V
fan1: 1205 RPM (min = 0 RPM)
fan2: 0 RPM (min = 0 RPM)
fan3: 860 RPM (min = 0 RPM)
fan4: 819 RPM (min = 0 RPM)
fan5: 0 RPM (min = 0 RPM)
temp1: +33.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
temp2: -128.0°C (low = +127.0°C, high = +127.0°C) sensor = disabled
temp3: +24.0°C (low = +127.0°C, high = +127.0°C) sensor = Intel PECI
temp4: +33.0°C
temp5: +37.0°C
temp6: +45.0°C
intrusion0: ALARM
[/code]
18 Oct 2015
This was my PhD thesis.
My thesis was on first-passage percolation, a classical probabilistic model for a fluid flowing through a porous medium. Here is a simple description of the model: To each edge of the cubic lattice on $\mathbb{Z}^d$, we attach a random, positive number called the edge-weight, which represents the time it takes for the fluid to flow through the edge. Typically we focus on the planar $d=2$ case. Suppose we release some fluid at point A on the grid, the fluid flows and spreads through all the edges. We’re interested in the time it takes for the fluid to reaches a far away point B, and we’ll denote this $T(A,B)$. It’s easy to see that this function on $\Z^d \times \Z^d$ defines a random metric on the lattice (if the edge-weights are never $0$).
Although the model is easily described in one paragraph, it’s fairly hard to determine the statistical properties of the passage time. Computer simulations indicate that the model has very interesting and universal statistical behaviour. However, our mathematical understanding is so poor that we cannot even analytically determine the average of T(A,B). My thesis research involves of T(A,B), and using it to study various properties of the model.
There are two publications related to it. The first was a preprint on arxiv, posted in Nov 2013, that eventually turned into my thesis. The proof is rather long-winded, and steals homogenization theorems from the theorem to apply it to the discrete problem.
Arjun Krishnan. Variational formula for the time-constant of first-passage percolation. ProQuest LLC, Ann Arbor, MI, 2014. Thesis (Ph.D.)–New York University. http
The preprint from the arxiv had a huge update and cleanup (that I will post soon), and was accepted by Comm. Pure and Appl. Math. for publication. It corrects a few mistakes and typos in my thesis. It does not rely on any continuum homogenization theorems, and proves it directly.
Arjun Krishnan. Variational formula for the time-constant of first-passage percolation. 2015. http