<?xml version='1.0' encoding='utf-8' ?>
<!--  If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/  -->
<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:media='http://search.yahoo.com/mrss/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>&quot;I am only an egg.&quot;</title>
  <link>http://vorotylo.livejournal.com/</link>
  <description>&quot;I am only an egg.&quot; - LiveJournal.com</description>
  <lastBuildDate>Fri, 04 Dec 2009 13:29:27 GMT</lastBuildDate>
  <generator>LiveJournal / LiveJournal.com</generator>
  <lj:journal>vorotylo</lj:journal>
  <lj:journalid>9662003</lj:journalid>
  <lj:journaltype>personal</lj:journaltype>
  <atom10:link rel='hub' href='http://pubsubhubbub.appspot.com/' />
  <image>
    <url>http://l-userpic.livejournal.com/42431098/9662003</url>
    <title>&quot;I am only an egg.&quot;</title>
    <link>http://vorotylo.livejournal.com/</link>
    <width>100</width>
    <height>70</height>
  </image>

<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/68106.html</guid>
  <pubDate>Fri, 04 Dec 2009 13:29:27 GMT</pubDate>
  <title>motd</title>
  <link>http://vorotylo.livejournal.com/68106.html</link>
  <description>&lt;p&gt;Simon Peyton-Jones gracefully &lt;a href=&quot;http://article.gmane.org/gmane.comp.lang.haskell.cafe/67197&quot;&gt;shunts&lt;/a&gt; some haskell-cafe
&lt;a href=&quot;http://thread.gmane.org/gmane.comp.lang.haskell.cafe/67112/focus=67118&quot;&gt;thread&lt;/a&gt;:

&lt;blockquote&gt;
&lt;p&gt;Friends

&lt;p&gt;One of the absolutely best things about the Haskell community is that it is almost invariably respectful and usually friendly.  People often remark on this when they join the community.  Beginner questions are greeted with polite and helpful replies.  Category theory and elementary type errors show up in successive messages.  Etc.

&lt;p&gt;But thread is an exception.

&lt;p&gt;If you think someone is talking nonsense, I think the best policy is to ignore it or reply privately (not to the list); then the thread dies.  I find derogatory discussion of a particular person quite discouraging.  It is likely to be unjust, and it encourages more of the same.  It&apos;s like littering your own house.

&lt;p&gt;Respect, guys, please.
&lt;/blockquote&gt;</description>
  <comments>http://vorotylo.livejournal.com/68106.html</comments>
  <category>otd</category>
  <category>english</category>
  <category>haskell</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/68074.html</guid>
  <pubDate>Sun, 08 Nov 2009 21:19:02 GMT</pubDate>
  <title>cabal-install haddock documentation - another round of workarounds</title>
  <link>http://vorotylo.livejournal.com/68074.html</link>
  <description>&lt;p&gt;Today I&apos;ve found a way to
&lt;a href=&quot;http://hackage.haskell.org/trac/hackage/wiki/CabalInstall&quot;&gt;cabal-install&lt;/a&gt;
offline documentation &amp;ndash; with source hyperlinks! &amp;ndash; for a
Haskell package.

&lt;p&gt;(The &lt;a href=&quot;http://www.reddit.com/r/haskell/comments/9x38v/cabal_install_a_package_with_haddock_documentation/&quot;&gt;reddit
link&lt;/a&gt; was quite helpful by pushing me in right direction.)

&lt;p&gt;To obtain documentation &lt;em&gt;without&lt;/em&gt; source hyperlinks you just
  &lt;ul&gt;
    &lt;li&gt;run `cabal install&apos; with `--enable-documentation&apos; option ...or&lt;/li&gt;
    &lt;li&gt;enable `documentation&apos; parameter
    in &lt;tt&gt;~/.cabal/config&lt;/tt&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;Then reinstall the package with `cabal install --reinstall&apos;
command. Documentation will appear in
~/.cabal/share/doc/PACKAGE-VERSION/html/ directory.

&lt;p&gt;But if you want &lt;em&gt;proper&lt;/em&gt; documentation &amp;ndash; with `Source&apos;
links to the right of declarations &amp;ndash; try these commands
(replacing `iteratee&apos; with your favourite package):

&lt;pre style=&quot;overflow:auto; border:thin solid #808080&quot;&gt;
$ cd /tmp
$ tar -xzf ~/.cabal/packages/hackage.haskell.org/iteratee/0.2.4/iteratee-0.2.4.tar.gz
$ cd iteratee-0.2.4
$ cabal configure
$ cabal haddock --hyperlink-source

## NOTE:
##  * Make sure `documentation&apos; is *disabled* in ~/.cabal/config.
##  * Don&apos;t use `--enable-documentation&apos; in `cabal install&apos; command.
## Otherwise links to source code will be omitted from documentation.

$ cabal install --reinstall
&lt;/pre&gt;

&lt;p&gt;That&apos;s almost it. But source code pages will not be
syntax-highlighted, because &lt;tt&gt;hscolour.css&lt;/tt&gt; is missing. I&apos;ve
used a workaround:

&lt;pre style=&quot;overflow:auto; border:thin solid #808080&quot;&gt;
$ cd ~/.cabal/share/doc/iteratee-0.2.4/html/src
$ ln -s /usr/share/doc/ghc6-doc/libraries/Cabal/src/hscolour.css
&lt;/pre&gt;

&lt;p&gt;Now everything is sweet (i.e., documented and hyperlinked to
sources).

&lt;p&gt;This post is a reminder to myself, which may possibly help some
other haskeller.

&lt;p&gt;SEE ALSO

&lt;ul&gt;
  &lt;li&gt;Cabal
  ticket &lt;a href=&quot;http://hackage.haskell.org/trac/hackage/ticket/534&quot;&gt;#534&lt;/a&gt;:
  &lt;em&gt;cabal haddock should --hyperlink-source by default&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Cabal
  ticket &lt;a href=&quot;http://hackage.haskell.org/trac/hackage/ticket/517&quot;&gt;#517&lt;/a&gt;:
  &lt;em&gt;make cabal install command support haddock options&lt;/em&gt;&lt;br /&gt;
  (Opened 8 months ago. Patch available.)&lt;/li&gt;
  &lt;li&gt;Debian
  bug &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500924&quot;&gt;#500924&lt;/a&gt;:
  &lt;em&gt;Should have a system-wide hscolour.css&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
  <comments>http://vorotylo.livejournal.com/68074.html</comments>
  <category>english</category>
  <category>cabal</category>
  <category>haskell</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/67642.html</guid>
  <pubDate>Mon, 02 Nov 2009 21:41:06 GMT</pubDate>
  <title>Рекомендую почитать</title>
  <link>http://vorotylo.livejournal.com/67642.html</link>
  <description>Е.О. Комаровский, &lt;a href=&quot;http://durdom.in.ua/uk/main/article/article_id/1942.phtml&quot;&gt;&quot;Свиной&quot; грипп как зеркало, в котором видно всё&lt;/a&gt;...</description>
  <comments>http://vorotylo.livejournal.com/67642.html</comments>
  <category>health</category>
  <category>sane</category>
  <category>pr</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/67332.html</guid>
  <pubDate>Sun, 01 Nov 2009 18:16:39 GMT</pubDate>
  <title>Making Motorola playlists (.pla files), part 3</title>
  <link>http://vorotylo.livejournal.com/67332.html</link>
  <description>&lt;p&gt;&lt;em&gt;(See &lt;a href=&quot;http://vorotylo.livejournal.com/65043.html&quot;&gt;part 1&lt;/a&gt; and &lt;a href=&quot;http://vorotylo.livejournal.com/65462.html&quot;&gt;part 2&lt;/a&gt;.)&lt;/em&gt;

&lt;p&gt;Motorola SLVR7e L7e phone has FAT16 filesystem on its memory
card. Using wikipedia article on
&lt;a href=&quot;http://en.wikipedia.org/wiki/FAT16#Design&quot;&gt;FAT16 design&lt;/a&gt; we will
&lt;a name=&quot;goal&quot;&gt;locate&lt;/a&gt; .mp3 entries in the filesystem and try to
correlate them with .pla file (the playlist).

&lt;p&gt;FAT16 consists of boot sector (1 sector is 512 bytes), two File
Allocation Tables (FATs), root directory, and data region. &lt;em&gt;Boot
sector&lt;/em&gt; specifies various parameters of the filesystem. The ones
of our interest are:&lt;ul&gt;
  &lt;li&gt;[number of] sectors per cluster,
  &lt;li&gt;sectors per FAT,
  &lt;li&gt;maximum number of root directory entries.&lt;/ul&gt;
Note that FAT16 entries &amp;ndash; including boot sector parameters
&amp;ndash; are little endian.

&lt;p&gt;We will use this helper function to read values from the
filesystem:
&lt;pre style=&quot;overflow:auto; border:thin solid #808080&quot;&gt;
read_at() {
    case &quot;$2&quot; in
        1) t=&apos;C&apos;;;
        2) t=&apos;v&apos;;;
        *) echo &apos;Usage: read_at OFFSET SIZE&apos; &amp;gt;&amp;2; return 1;;
    esac
    dd if=/dev/sdb1 bs=1 skip=$1 count=$2 2&amp;gt;/dev/null | \
        perl -wspe &apos;$_ = unpack(&quot;&apos;$t&apos;&quot;) . &quot;\n&quot;&apos;
}
&lt;/pre&gt;

&lt;p&gt;And these are the boot sector values we need:
&lt;pre style=&quot;overflow:auto; border:thin solid #808080&quot;&gt;
$ read_at $((0xd)) 1   # sectors_per_cluster
32
$ read_at $((0x16)) 2  # sectors_per_FAT
239
$ read_at $((0x11)) 2  # max_root_entry
512
&lt;/pre&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p&gt;So far so good. Now let&apos;s skip over boot sector and FATs and go
right to the root directory.

&lt;p style=&quot;padding-left:40px&quot;&gt;&lt;tt&gt;root_directory_offset =
size_of_boot_sector + size_of_FATs =&lt;br /&gt;
&amp;nbsp;&amp;nbsp;= (1 + 2 * sectors_per_FAT) * 512 = (1 + 2*239) * 512 =&lt;br /&gt;
&amp;nbsp;&amp;nbsp;= 0x3be00&lt;/tt&gt;

&lt;p&gt;Here we are:
&lt;pre style=&quot;overflow:auto; border:thin solid #808080;    color: #ffffff; background-color: #000000;&quot;&gt;
0003BE00   &lt;span style=&quot;background-color:#ffffff; color: #000000&quot;&gt;4&lt;/span&gt;1 6D 00 6F 00 62 00 69 00 6C 00 0F 00 60 65 00   Am.o.b.i.l...`e.
0003BE10   00 00 FF FF FF FF FF FF FF FF 00 00 FF FF FF FF   ................
&lt;a name=&quot;dentry-mobile&quot;&gt;0003BE20&lt;/a&gt;   4D 4F 42 49 4C 45 20 20 20 20 20 10 00 00 00 00   MOBILE     .....
0003BE30   00 00 A8 38 00 00 62 79 2C 36 02 00 00 00 00 00   ...8..by,6......
0003BE40   41 64 00 00 00 FF FF FF FF FF FF 0F 00 41 FF FF   Ad...........A..
0003BE50   FF FF FF FF FF FF FF FF FF FF 00 00 FF FF FF FF   ................
&lt;a name=&quot;dentry-d&quot;&gt;0003BE60&lt;/a&gt;   44 20 20 20 20 20 20 20 20 20 20 10 00 64 62 8F   D          ..db.
0003BE70   4F 3B 4F 3B 00 00 62 8F 4F 3B 22 00 00 00 00 00   O;O;..b.O;&amp;#34;.....
0003BE80   E5 6D 00 70 00 33 00 70 00 6C 00 0F 00 CB 61 00   .m.p.3.p.l....a.
0003BE90   79 00 65 00 72 00 2E 00 6D 00 00 00 64 00 62 00   y.e.r...m...d.b.
0003BEA0   E5 50 33 50 4C 41 7E 31 4D 44 42 20 00 00 00 00   .P3PLA~1MDB ....
0003BEB0   00 00 6F 39 00 00 0B 51 0B 39 07 06 FD 01 00 00   ..o9...Q.9......
0003BEC0   E5 4C 00 4F 00 47 00 2E 00 67 00 0F 00 E7 7A 00   .L.O.G...g....z.
0003BED0   00 00 FF FF FF FF FF FF FF FF 00 00 FF FF FF FF   ................
0003BEE0   E5 4F 47 20 20 20 20 20 47 5A 20 20 00 64 57 95   .OG     GZ  .dW.
0003BEF0   3E 3B 3E 3B 00 00 57 95 3E 3B 61 02 15 2A 00 00   &amp;gt;;&amp;gt;;..W.&amp;gt;;a..*..
0003BF00   E5 45 43 53 45 50 7E 31 54 41 52 20 00 64 FB 0A   .ECSEP~1TAR .d..
0003BF10   21 3B 21 3B 00 00 FB 0A 21 3B 87 20 00 38 3F 06   !;!;....!;. .8?.
0003BF20   E5 4C 00 4F 00 47 00 2E 00 67 00 0F 00 E7 7A 00   .L.O.G...g....z.
0003BF30   00 00 FF FF FF FF FF FF FF FF 00 00 FF FF FF FF   ................
0003BF40   E5 4F 47 20 20 20 20 20 47 5A 20 20 00 64 0E 0B   .OG     GZ  .d..
0003BF50   21 3B 21 3B 00 00 0E 0B 21 3B 84 39 F6 23 00 00   !;!;....!;.9.#..
0003BF60   E5 7A 00 00 00 FF FF FF FF FF FF 0F 00 9D FF FF   .z..............
0003BF70   FF FF FF FF FF FF FF FF FF FF 00 00 FF FF FF FF   ................
0003BF80   E5 52 00 65 00 63 00 53 00 65 00 0F 00 9D 70 00   .R.e.c.S.e....p.
0003BF90   2E 00 68 00 74 00 6D 00 6C 00 00 00 2E 00 67 00   ..h.t.m.l.....g.
0003BFA0   E5 45 43 53 45 50 7E 31 47 5A 20 20 00 00 9A A2   .ECSEP~1GZ  ....
0003BFB0   1F 3B 1F 3B 00 00 9A A2 1F 3B 99 20 B9 04 00 00   .;.;.....;. ....
0003BFC0   E5 45 43 59 43 4C 45 52 20 20 20 17 00 9C 5C 89   .ECYCLER   ...\.
0003BFD0   44 3B 44 3B 00 00 5D 89 44 3B 42 55 00 00 00 00   D;D;..].D;BU....
0003BFE0   E5 55 54 4F 52 55 4E 20 49 4E 46 07 18 00 00 74   .UTORUN INF....t
0003BFF0   38 2D 44 3B 00 00 00 74 38 2D 4E 55 AA E7 00 00   8-D;...t8-NU....
0003C000   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C010   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C020   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C080   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C090   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C0A0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C0B0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C0C0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0003C0D0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
&lt;span style=&quot;color:yellow; background-color:blue&quot;&gt;   TWEAK 3.01: /dev/sdb1          (LOOK)   posn=0x3BE00    size=0x3B86FE00   &lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;You see the output of
&lt;a href=&quot;http://www.chiark.greenend.org.uk/~sgtatham/tweak/&quot;&gt;tweak&lt;/a&gt;
hex editor. &amp;nbsp;&amp;lt;ADVERTISEMENT&amp;gt;Very nice tool indeed. Due to
its lazy nature it can open huge files instantly, supports
cut-n-paste, searches for byte sequences, and has Emacs-like
shortcuts. By the author of PuTTY.&amp;lt;/ADVERTISEMENT&amp;gt;

&lt;p&gt;Root directory is
just &lt;em&gt;``a &lt;span style=&quot;font-style:normal&quot;&gt;Directory Table&lt;/span&gt;
that stores information about the files and directories located in the
root directory. It is only used with FAT12 and
FAT16&apos;&apos;&lt;/em&gt;.&lt;sup&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/FAT16#Overview&quot;&gt;[src]&lt;/a&gt;&lt;/sup&gt;
&amp;nbsp;Rootdir&apos;s hex dump is hardly readable (yet) but we can mount and
list it:

&lt;pre style=&quot;overflow:auto; border:thin solid #808080&quot;&gt;
$ mount /mnt/winstick
$ ls -AlgG /mnt/winstick
total 32
drwxrwxrwx  3 16384 2009-10-15 20:59 d
drwxrwxrwx 17 16384 2007-01-12 17:11 mobile
&lt;/pre&gt;

&lt;p&gt;This `mobile&apos; directory was created by phone when it formatted
memory card, and `d&apos; was made by me.

&lt;h4&gt;Dentries&lt;/h4&gt;

&lt;p&gt;A directory table consists of directory entries
or &lt;em&gt;dentries&lt;/em&gt; as
&lt;a href=&quot;http://lxr.linux.no/#linux+v2.6.31/include/linux/dcache.h#L89&quot;&gt;kernel
source&lt;/a&gt; calls them. &lt;em&gt;``Each entry records the name, extension,
attributes (archive, directory, hidden, read-only, system and volume),
the date and time of creation, the address of the first cluster of the
file/directory&apos;s data and finally the size of the
file/directory. Aside from the Root Directory Table in FAT12 and FAT16
file systems, which occupies the
special &lt;span style=&quot;font-style:normal&quot;&gt;Root Directory Region&lt;/span&gt;
location, all Directory Tables are stored in the Data
Region.&apos;&apos;&lt;/em&gt;&lt;sup&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/FAT16#Directory_table&quot;&gt;[src]&lt;/a&gt;&lt;/sup&gt;

&lt;p&gt;Dentry for `mobile&apos; directory has offset
&lt;a href=&quot;#dentry-mobile&quot;&gt;0x3be20&lt;/a&gt;, and `d&apos; is at
&lt;a href=&quot;#dentry-d&quot;&gt;0x3be60&lt;/a&gt;. If you follow the addresses, you can
see that DOS file names are uppercase, contrary to the output
of &lt;tt&gt;ls&lt;/tt&gt; command. Let&apos;s ignore this fact for a while.

&lt;p&gt;At this point you may wonder how do all these dentries relate to
our
&lt;a href=&quot;#goal&quot;&gt;original intention&lt;/a&gt; to locate .mp3 files. The
answer is &amp;mdash; &lt;em&gt;indirectly&lt;/em&gt;. :) Dentries are kind of road signs that
one can follow to get from root to destination file. Each dentry has a
&quot;pointer&quot; to its contents &amp;mdash; number of first cluster, encoded in
two bytes starting at 0x1a (dentry&apos;s offset).


&lt;p&gt;&lt;em&gt;To be finished...&lt;/em&gt;</description>
  <comments>http://vorotylo.livejournal.com/67332.html</comments>
  <category>fat16</category>
  <category>hacking</category>
  <category>english</category>
  <category>motorola</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/67154.html</guid>
  <pubDate>Sat, 24 Oct 2009 22:29:00 GMT</pubDate>
  <title>Быстрый нудный пост (про проблемы с Иксами)</title>
  <link>http://vorotylo.livejournal.com/67154.html</link>
  <description>&lt;h4&gt;Итак, проблема&lt;/h4&gt;

&lt;p&gt;Тормозит отрисовка окон: scroll и при перетягивании мышью.
(Изначально &quot;проблем с Иксами&quot; было больше, но я вам про них не
расскажу, чтоб не сбить нарратив.)

&lt;h4&gt;Решение&lt;/h4&gt;

&lt;p&gt;Поставить драйвер NVIDIA.

&lt;h4&gt;Реализация&lt;/h4&gt;

&lt;p&gt;...Затрудняется тем, что драйвер из пакета `nvidia-kernel-source&apos;
&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523879&quot;&gt;не
собирается&lt;/a&gt; для ядер старше 2.6.26. Я его пропатчил, как мог (чтобы
собрался с двумя директориями linux-headers-*-686 и
linux-headers-*-common, и &lt;a href=&quot;http://lwn.net/Articles/2.6-kernel-api/&quot;&gt;свежим API&lt;/a&gt;), но
Xserver отказался с запускаться с тем, что получилось.

&lt;h4&gt;Решение&lt;/h4&gt;

&lt;p&gt;На работе времени мало. Значит, надо принести туда исправный
ноутбук из дому, а глючную Тошибу взять на выходные на &quot;debug с
пристрастием&quot;.

&lt;p&gt;...Пятничным утром, благородно дав мне возможность ввести в строй
замену (перебросить почту, всё такое), ноутбук-с-тормозящими-исками
перестал реагировать на клавиатуру. За что был выключен кнопкой (в
последствии &amp;mdash; неоднократно).

&lt;h4&gt;Новые симптомы&lt;/h4&gt;

&lt;p&gt;Xserver перестаёт реагировать на клавиатуру. Мышка лазит, но толку
с неё. &quot;Подвисаем&quot; по-разному: один раз не смог даже username вбить
при входе в сессию, другой раз только успело xterm нарисовать; обычно
&amp;mdash; вскоре после начала работы.

&lt;h4&gt;Отладка&lt;/h4&gt;

&lt;p&gt;Есть два полезных документа: &lt;a href=&quot;http://www.x.org/wiki/Development/Documentation/ServerDebugging&quot;&gt;ServerDebugging&lt;/a&gt;
на Xorg Wiki и Xserver &lt;a href=&quot;http://webcvs.freedesktop.org/xorg/xc/programs/Xserver/hw/xfree86/DebuggingHints?view=co&quot;&gt;Debugging
Hints&lt;/a&gt;. Они убедили меня поставить пакет с отладочной информацией,
`xserver-xorg-core-dbg&apos;.

&lt;p&gt;После этого оставалось:&lt;ul&gt;
  &lt;li&gt;дождаться зависания иксов,
  &lt;li&gt;зайти с другого компьютера по ssh,
  &lt;li&gt;&lt;tt&gt;gdb /usr/lib/debug/usr/bin/Xorg `pgrep X`&lt;/tt&gt;,
  &lt;li&gt;увидеть бесконечный цикл внутри модуля `nv&apos; (пакет `xserver-xorg-video-nv&apos;).&lt;/ul&gt;

&lt;h4&gt;Победа&lt;/h4&gt;

&lt;p&gt;Исправляем в /etc/X11/xorg.conf драйвер с &quot;nv&quot; на
&quot;vesa&quot;. Рестартуем xdm (всё в том же ssh).  И прекрасно работаем
&amp;ndash; стабильно и достаточно быстро &amp;ndash; с vesa драйвером.

&lt;h4&gt;Резюме&lt;/h4&gt;

&lt;p&gt;Посылаю драйвера nv и nvidia в виртуальную задницу. (Сидеть им там
не пересидеть, в 3D игры я не играю.)

&lt;p&gt;Из полезного: настроил русский язык в текстовой консоли. (Всего-то и
надо `console-cyrillic&apos; поставить.)

&lt;p&gt;Пост получился ослепительно нудным, но я предупреждал. &amp;nbsp;Удачи!</description>
  <comments>http://vorotylo.livejournal.com/67154.html</comments>
  <category>debian</category>
  <category>x11</category>
  <category>nvidia</category>
  <lj:security>public</lj:security>
  <lj:reply-count>5</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/67051.html</guid>
  <pubDate>Mon, 19 Oct 2009 12:59:30 GMT</pubDate>
  <title>Hackage is down</title>
  <link>http://vorotylo.livejournal.com/67051.html</link>
  <description>&lt;p&gt;&lt;pre style=&quot;overflow:auto; border:thin solid #808080&quot;&gt;
$ nc -w5 -vz haskell.hackage.org
haskell.hackage.org: forward host lookup failed: Host name lookup failure
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Let&apos;s tune
to &lt;a href=&quot;http://www.haskell.org/haskellwiki/IRC_channel&quot;&gt;#haskell&lt;/a&gt;
IRC channel...&lt;/p&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p style=&quot;overflow:scroll; border:thin solid #808080; max-height:200px&quot;&gt;&lt;tt&gt;
&lt;b&gt;$ wget -qO- &apos;&lt;a href=&quot;http://tunes.org/~nef/logs/haskell/09.10.19&quot;&gt;http://tunes.org/~nef/logs/haskell/09.10.19&lt;/a&gt;&apos; | \&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;grep -i hackage&lt;/b&gt;&lt;br /&gt;
00:00:07 --- quit: hackagebot (Remote closed the connection)&lt;br /&gt;
00:01:07 --- join: hackagebot (n=hackageb@joyful.com) joined #haskell&lt;br /&gt;
00:23:44 &amp;lt;ksf&amp;gt; can&apos;t the galois guys at least put up a page that says that hackage is down?&lt;br /&gt;
00:25:18 * arcatan waits for ishackageup.com&lt;br /&gt;
00:27:46 &amp;lt;RichardO&amp;gt; hackage is down?&lt;br /&gt;
00:29:56 &amp;lt;dmwit&amp;gt; Down with Hackage!&lt;br /&gt;
00:31:16 &amp;lt;ksf&amp;gt; Ha! It&apos;s her! lambdabot hacked hackage and uses it to plot her plans for world domination, faster!&lt;br /&gt;
01:10:50 &amp;lt;Baughn&amp;gt; So, um.. hackage...&lt;br /&gt;
01:54:41 &amp;lt;huntse&amp;gt; So I have the day off work with a cold, perfect for some haskell hacking and hackage is down. *sigh*&lt;br /&gt;
02:05:12 &amp;lt;endojelly&amp;gt; hackage down?&lt;br /&gt;
02:05:47 &amp;lt;fasta&amp;gt; Someone implement HTorrentHackage, please.&lt;br /&gt;
02:05:50 &amp;lt;ziman&amp;gt; but there&apos;s the alternative hackage vith the reverse deps...&lt;br /&gt;
02:30:12 &amp;lt;aleator&amp;gt; Hmm.. http://hackage.haskell.org/ is down :(&lt;br /&gt;
02:31:20 &amp;lt;paolino&amp;gt; still, is there anyone with a tarball of hackage or part of it ?&lt;br /&gt;
02:34:09 &amp;lt;ziman&amp;gt; http://bifunctor.homelinux.net/~roel/hackage/packages/hackage.html&lt;br /&gt;
02:50:27 &amp;lt;jkff&amp;gt; Oh hell, hackage is still down...&lt;br /&gt;
02:50:32 &amp;lt;endojelly&amp;gt; http://hackage.haskell.org/platform/2009.2.0.2/haskell-platform-2009.2.0.2.tar.gz&lt;br /&gt;
02:51:39 &amp;lt;ivanm&amp;gt; jkff: let me go check hackage for one... :p&lt;br /&gt;
02:51:51 &amp;lt;mux&amp;gt; but hackage seems ot be down&lt;br /&gt;
02:52:12 &amp;lt;jkff&amp;gt; ivanm: Well, I already see parsedate, and it has a darcs repo outside hackage. Let&apos;s see if it can handle bytestrings..&lt;br /&gt;
02:55:17 &amp;lt;ivanm&amp;gt; endojelly: since hackage.haskell is down... how can I check? ;-)&lt;br /&gt;
02:57:34 &amp;lt;HugoDaniel&amp;gt; what is wrong with hackage ? :(&lt;br /&gt;
03:07:01 &amp;lt;ivanm&amp;gt; dancor: check hackage :p&lt;br /&gt;
03:17:06 &amp;lt;mylh&amp;gt; hi all :) anyone knows what have happend to hackage? I&apos;ve been on vacation last week now i&apos;m back and it doesn&apos;t works&lt;br /&gt;
03:18:44 &amp;lt;endojelly&amp;gt; Downloading the latest package list from hackage.haskell.org&lt;br /&gt;
03:57:03 &amp;lt;Raevel&amp;gt; hackage status?&lt;br /&gt;
03:57:39 &amp;lt;mylh&amp;gt; Raeve: hackage is down for me&lt;br /&gt;
03:57:43 &amp;lt;ivanm&amp;gt; STOP ASKING ABOUT HACKAGE!&lt;br /&gt;
03:58:39 &amp;lt;ivanm&amp;gt; and then people will ask &quot;is hackage still down?&quot;&lt;br /&gt;
04:04:22 &amp;lt;Raevel&amp;gt; oh , i rememberd i had all the hackage packages i need on my server \o/&lt;br /&gt;
04:04:35 &amp;lt;Cale&amp;gt; Why is hackage down?&lt;br /&gt;
04:08:54 &amp;lt;mxc&amp;gt; as someone who lives in SE Asia now, and has been called a bad person many times in the past, why is hackage down now?&lt;br /&gt;
04:11:12 &amp;lt;huntse_&amp;gt; mxc: hackage is down because someone captured all the special magical haskell fairies that keep it running.&lt;br /&gt;
04:23:24 &amp;lt;endojelly&amp;gt; soooo... what *is* wrong with hackage?&lt;br /&gt;
04:25:19 &amp;lt;Saizan&amp;gt; @topic-cons &quot;Hackage is down, server problems.&quot;&lt;br /&gt;
04:25:19 &amp;lt;lambdabot&amp;gt; I do not know the channel &quot;Hackage&lt;br /&gt;
04:25:29 &amp;lt;Saizan&amp;gt; @topic-cons #haskell &quot;Hackage is down, server problems.&quot;&lt;br /&gt;
04:25:29 --- topic: set to &apos;[&quot;\&quot;Hackage is down, server problems.\&quot;&quot;,&quot;The Monad.Reader issue #14 out now: http://themonadreader.wordpress.com/&quot;,&quot;#haskell-in-depth launched!&quot;,&quot;Haskell News:  http://reddit.com/r/haskell&quot;,&quot;The Haskell programming language&quot;,&quot;http://haskell.org&quot;,&quot;Paste:  http://moonpatio.com&quot;,&quot;Logs: http://tunes.org/~nef/logs/haskell/&quot;]&apos; by lambdabot&lt;br /&gt;
04:28:14 &amp;lt;profmakx&amp;gt; what happened to hackage&lt;br /&gt;
04:31:40 &amp;lt;profmakx&amp;gt; broken hackage is no good :(&lt;br /&gt;
04:39:17 &amp;lt;jkramer&amp;gt; Is hackage down?&lt;br /&gt;
04:49:41 &amp;lt;mercury^&amp;gt; Saizan_: Now would be the moment for me to bitch about hackage being down. :&amp;gt;&lt;br /&gt;
04:58:08 &amp;lt;ivanm&amp;gt; Saizan_: cohackage? :p&lt;br /&gt;
04:58:44 &amp;lt;Saizan_&amp;gt; ivanm: cohackage is the one that downloads packages from you :)&lt;br /&gt;
05:00:51 &amp;lt;HugoDaniel&amp;gt; hackage :(&lt;br /&gt;
05:01:37 &amp;lt;profmakx&amp;gt; we need hackage mirrors!&lt;br /&gt;
05:01:39 &amp;lt;HugoDaniel&amp;gt; i can mirror hackage&lt;br /&gt;
05:26:54 &amp;lt;dmwit&amp;gt; raim0_: Hackage is down just now, so unless your distro has a package for it...&lt;br /&gt;
05:32:40 &amp;lt;Axman6&amp;gt; when hackage is back up &amp;gt;_&amp;gt;&lt;br /&gt;
05:35:26 &amp;lt;dmwit&amp;gt; raim0_: Nah, I just mean installing the latest GHC and cabal-installing the packages you want straight from Hackage.&lt;br /&gt;
05:36:22 &amp;lt;dmwit&amp;gt; I thought Hackage wouldn&apos;t even let you upload packages with -Werror enabled.&lt;br /&gt;
05:37:21 &amp;lt;dcoutts&amp;gt; ksf: that&apos;s why we banned -werror on hackage&lt;br /&gt;
05:52:42 &amp;lt;raim0_&amp;gt; dmwit: how do I install cabal as the cabal-install&apos;s bootstrap.sh tries to fetch needed package from the hackage&lt;br /&gt;
05:53:17 &amp;lt;dcoutts&amp;gt; raim0_: you&apos;re out of luck until hackage is back online&lt;br /&gt;
05:55:48 &amp;lt;Axman6&amp;gt; raim0_: do you think someone&apos;s getting paid to look after hackage?&lt;br /&gt;
06:08:39 &amp;lt;burp&amp;gt; hackage can&apos;t have high requiremenets, it&apos;s all static, right?&lt;br /&gt;
06:10:54 &amp;lt;byorgey&amp;gt; medfly: for hackage, or in general?&lt;br /&gt;
06:12:19 &amp;lt;medfly&amp;gt; I suppose that for hackage.&lt;br /&gt;
06:13:53 &amp;lt;fnord123&amp;gt; how much traffic does hackage get?&lt;br /&gt;
06:33:38 &amp;lt;fasta&amp;gt; You can always do Hackage over Freenet.&lt;br /&gt;
06:50:17 &amp;lt;yitz&amp;gt; when hackage come back up. sigh.&lt;br /&gt;
06:53:41 &amp;lt;SamB_XP_&amp;gt; dcoutts: what does it take to mirror hackage ?&lt;br /&gt;
06:53:56 &amp;lt;SamB_XP_&amp;gt; dcoutts: do we need to switch to hackage2 ?&lt;br /&gt;
07:03:37 &amp;lt;nha_&amp;gt; hmm hackage is still down?&lt;br /&gt;
07:03:48 &amp;lt;ksf&amp;gt; as a peer, you could say &quot;pull all packages that are signed by that author or the other&quot;. in such a way, an official hackage could pull everything from registered authors, without limiting others to distribute their stuff.&lt;br /&gt;
07:17:38 &amp;lt;ksf&amp;gt; hackage.haskell.org could distribute between the mirrors, and then some special domain could be used for the real master server that you can push to.&lt;br /&gt;
07:18:08 &amp;lt;SamB_XP_&amp;gt; ksf: that&apos;s called you mean master.hackage.haskell.org?&lt;br /&gt;
07:19:20 &amp;lt;yitz&amp;gt; jystic1: nowhere, until hackage comes back up. :(&lt;br /&gt;
07:21:15 &amp;lt;SamB_XP_&amp;gt; fasta: we still need some better way of authenticating packages than &quot;it&apos;s on hackage.haskell.org&quot; ...&lt;br /&gt;
07:23:06 &amp;lt;ksf&amp;gt; SamB_XP_, he might happen to trust main hackage, and hackage.haskell.org will only offer stuff from trusted keys.&lt;br /&gt;
07:31:31 &amp;lt;FunctorSalad&amp;gt; anyone upped the hackage tarball yet? ;)&lt;br /&gt;
07:35:36 &amp;lt;SamB_XP_&amp;gt; JaffaCake: can you get MSR to set up a hackage mirror?&lt;br /&gt;
07:36:19 &amp;lt;ksf&amp;gt; as is hackage.&lt;br /&gt;
08:04:55 &amp;lt;yairchu_&amp;gt; I can&apos;t understand why hackage is broken, wasn&apos;t the bailout supposed to prevent this?&lt;br /&gt;
08:12:42 &amp;lt;sproingie&amp;gt; still no hackage i see&lt;br /&gt;
08:13:08 &amp;lt;roconnor_&amp;gt; http://bifunctor.homelinux.net/~roel/hackage/packages/hackage.html&lt;br /&gt;
08:14:13 &amp;lt;nothingmuch&amp;gt; is hackage.haskell.org down?&lt;br /&gt;
08:16:24 &amp;lt;nothingmuch&amp;gt; http://bifunctor.homelinux.net/~roel/hackage/packages/archive/cabal-install/0.6.2/cabal-install-0.6.2.tar.gz # 404&lt;br /&gt;
09:12:50 &amp;lt;pumpkin&amp;gt; pity hackage is dead&lt;br /&gt;
10:20:25 &amp;lt;a_guest&amp;gt; what has happened to hackage.haskell.org??&lt;br /&gt;
10:20:42 &amp;lt;c_wraith&amp;gt; hackage has been down over 24 hours, now&lt;br /&gt;
10:20:48 &amp;lt;a_guest&amp;gt; for me, hackage.haskell.org, is down&lt;br /&gt;
10:23:23 &amp;lt;a_guest&amp;gt; I can&apos;t read the api doc because of hackage down&lt;br /&gt;
10:24:48 &amp;lt;shapr&amp;gt; Anyway.... what&apos;s up with Hackage?&lt;br /&gt;
10:25:38 &amp;lt;tommd&amp;gt; @quote hackage&lt;br /&gt;
10:25:39 &amp;lt;lambdabot&amp;gt; dons says: [on whether a library is wanted] *yes* put it on Hackage!&lt;br /&gt;
10:25:41 &amp;lt;tommd&amp;gt; @quote hackage&lt;br /&gt;
10:25:42 &amp;lt;lambdabot&amp;gt; dcoutts says: remember, if it&apos;s not on hackage it doesn&apos;t exist!&lt;br /&gt;
10:30:36 &amp;lt;dons&amp;gt; Heinlein is fscking the disks on hackage&lt;br /&gt;
10:35:29 &amp;lt;codm`&amp;gt; Hey, so is hackage lost?  Was hoping a server just needed to be rebooted on Monday morning.  But still no hackage, and nothing on haskell.org explaining the situation.&lt;br /&gt;
10:54:25 &amp;lt;paolino&amp;gt; any news on hackage ?&lt;br /&gt;
10:54:44 &amp;lt;FcoX&amp;gt; (hackage is down? oh! I was blaming my ISP!!)&lt;br /&gt;
10:55:48 &amp;lt;roconnor_&amp;gt; http://bifunctor.homelinux.net/~roel/hackage/packages/hackage.html&lt;br /&gt;
11:23:54 &amp;lt;FunctorSalad&amp;gt; there are too many type-level integers on hackage&lt;br /&gt;
11:24:35 &amp;lt;Berengal&amp;gt; FunctorSalad, the solution is simple: Write your own (then upload it to hackage so others don&apos;t face your problem)&lt;br /&gt;
11:43:37 &amp;lt;HugoDaniel&amp;gt; hackage anyone ? :D&lt;br /&gt;
11:43:56 &amp;lt;HugoDaniel&amp;gt; (maybe if i keep pressuring hackage might start working...)&lt;br /&gt;
11:56:44 * heatsink searches the logs for &quot;hackage&quot; instead of asking&lt;br /&gt;
12:00:05 &amp;lt;heatsink&amp;gt; Wow, hackage was a popular subject yesterday.&lt;br /&gt;
12:10:47 &amp;lt;sproingie&amp;gt; we should provide daily torrents of the hackage tarball&lt;br /&gt;
12:17:54 &amp;lt;FunctorSalad&amp;gt; still no hackage torrent?&lt;br /&gt;
12:19:43 &amp;lt;Berengal&amp;gt; Man, haskell is awesome (even with hackage down)&lt;br /&gt;
12:20:11 &amp;lt;sproingie&amp;gt; i have a week-old or so tarball of hackage&lt;br /&gt;
12:27:04 &amp;lt;tommd&amp;gt; dcoutts: Has anyone proposed an API matcher to enforce versioning on Hackage?  Something that will compare function names / types and decide if the package follows versioning rules.&lt;br /&gt;
12:29:12 &amp;lt;tommd&amp;gt; But I&apos;m always wanting to hack on hackage-server more.&lt;br /&gt;
12:33:34 &amp;lt;yakov&amp;gt; what is up with hackage?&lt;br /&gt;
12:48:42 &amp;lt;HairyDude&amp;gt; is hackage down?
&lt;/tt&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://www.reddit.com/r/haskell/comments/9vi18/so_how_bout_that_hackage_eh/&quot;&gt;&lt;img src=&quot;http://www.reddit.com/static/blog_snoo.gif&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description>
  <comments>http://vorotylo.livejournal.com/67051.html</comments>
  <category>news</category>
  <category>haskell</category>
  <lj:security>public</lj:security>
  <lj:reply-count>2</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/66580.html</guid>
  <pubDate>Sun, 18 Oct 2009 18:14:13 GMT</pubDate>
  <title>Болею</title>
  <link>http://vorotylo.livejournal.com/66580.html</link>
  <description>&lt;blockquote&gt;С лицом, измученным и серым,&lt;br /&gt;
На белой смятой простыне,&lt;br /&gt;
Как жертва бешеной холеры,&lt;br /&gt;
Лежит коленками к стене.&lt;br /&gt;
Протяжно стонет, как при родах.&lt;br /&gt;
Трясется градусник в руках.&lt;br /&gt;
Вся вековая боль народов&lt;br /&gt;
Застыла в суженных зрачках.&lt;br /&gt;
По волевому подбородку&lt;br /&gt;
Струится за слезой слеза.&lt;br /&gt;
Он шепчет, жалобно и робко:&lt;br /&gt;
&quot;Как ты с детьми теперь &amp;ndash; одна?..&quot;&lt;br /&gt;
В квартире стихли разговоры&lt;br /&gt;
Ночник горит едва-едва.&lt;br /&gt;
Темно. Опущены все шторы.&lt;br /&gt;
У мужа &amp;ndash; тридцать семь и два...&lt;/blockquote&gt;

&lt;p&gt;Это про меня.

&lt;p&gt;(Списал &lt;a href=&quot;http://www.babyblog.ru/com/smile/415640&quot;&gt;отсюда&lt;/a&gt;. Автор
неизвестен.)</description>
  <comments>http://vorotylo.livejournal.com/66580.html</comments>
  <category>illness</category>
  <category>fun</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/66553.html</guid>
  <pubDate>Tue, 13 Oct 2009 22:44:12 GMT</pubDate>
  <title>Fixing dosbox arrow keys</title>
  <link>http://vorotylo.livejournal.com/66553.html</link>
  <description>&lt;h4&gt;Problem&lt;/h4&gt;

&lt;p&gt;Arrow keys don&apos;t work in &lt;a href=&quot;http://www.dosbox.com/&quot; title=&quot;DOS emulator&quot;&gt;dosbox&lt;/a&gt;-0.72 .

&lt;h4&gt;Details&lt;/h4&gt;

&lt;p&gt;`&lt;tt&gt;dosbox -startmapper&lt;/tt&gt;&apos; shows that `left&apos; key has become
`right alt&apos;, `up&apos; &amp;mdash; `print screen&apos;; `down&apos; and `right&apos; keys are
not recognized.

&lt;h4&gt;Solution&lt;/h4&gt;

&lt;p&gt;Unset `usescancodes&apos; in your ~/.dosboxrc.

&lt;pre style=&quot;border: thin solid #808080&quot;&gt;
$ cat ~/.dosboxrc
[sdl]
usescancodes=false
&lt;/pre&gt;

&lt;p&gt;NOTE: This bug may be fixed in 0.73 (there is evdev mentioned in
the &lt;a href=&quot;http://sourceforge.net/project/shownotes.php?release_id=685514&amp;amp;group_id=52551&quot;&gt;changelog&lt;/a&gt;).

&lt;h4&gt;See also&lt;/h4&gt;

&lt;p&gt;Debian bug
&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549611&quot;&gt;#549611&lt;/a&gt;</description>
  <comments>http://vorotylo.livejournal.com/66553.html</comments>
  <category>debian</category>
  <category>games</category>
  <category>english</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/66292.html</guid>
  <pubDate>Mon, 12 Oct 2009 13:54:59 GMT</pubDate>
  <title>Very Public или Всесмывающий поток семантики</title>
  <link>http://vorotylo.livejournal.com/66292.html</link>
  <description>&lt;p&gt;В C++ не хватает степеней &quot;публичности&quot; для элементов классов. В [больном на голову] коде часто встречается такое:

&lt;pre style=&quot;overflow:auto; border: thin solid #808080&quot;&gt;
&lt;span style=&quot;color: #a020f0;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #228b22;&quot;&gt;Foo&lt;/span&gt; : &lt;span style=&quot;color: #a020f0;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #228b22;&quot;&gt;Bar&lt;/span&gt; {
&lt;span style=&quot;color: #a020f0;&quot;&gt;public&lt;/span&gt;:
  &lt;span style=&quot;color: #a020f0;&quot;&gt;enum&lt;/span&gt; &lt;span style=&quot;color: #228b22;&quot;&gt;One&lt;/span&gt; { &lt;span style=&quot;color: #b8860b;&quot;&gt;one&lt;/span&gt; = 1 };
  &lt;span style=&quot;color: #a020f0;&quot;&gt;enum&lt;/span&gt; &lt;span style=&quot;color: #228b22;&quot;&gt;Two&lt;/span&gt; { &lt;span style=&quot;color: #b8860b;&quot;&gt;two&lt;/span&gt; = 2 };

&lt;span style=&quot;color: #a020f0;&quot;&gt;public&lt;/span&gt;:
  &lt;span style=&quot;color: #0000ff;&quot;&gt;Foo&lt;/span&gt;(&lt;span style=&quot;color: #228b22;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #b8860b;&quot;&gt;n&lt;/span&gt;);
  &lt;span style=&quot;color: #a020f0;&quot;&gt;virtual&lt;/span&gt; ~&lt;span style=&quot;color: #0000ff;&quot;&gt;Foo&lt;/span&gt;(); &lt;span style=&quot;color: #b22222;&quot;&gt;// &lt;/span&gt;&lt;span style=&quot;color: #b22222;&quot;&gt;the empty body is &lt;abbr title=&quot;to conform Corporative Coding Standards&quot;&gt;defined elsewere&lt;/abbr&gt;
&lt;/span&gt;
&lt;span style=&quot;color: #a020f0;&quot;&gt;public&lt;/span&gt;:
  &lt;span style=&quot;color: #228b22;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #b8860b;&quot;&gt;val&lt;/span&gt;;

&lt;span style=&quot;color: #a020f0;&quot;&gt;protected&lt;/span&gt;:
  &lt;span style=&quot;color: #a020f0;&quot;&gt;enum&lt;/span&gt; &lt;span style=&quot;color: #228b22;&quot;&gt;Three&lt;/span&gt; { &lt;span style=&quot;color: #b8860b;&quot;&gt;three&lt;/span&gt; = &lt;span style=&quot;color: #b22222;&quot;&gt;/* &lt;/span&gt;&lt;span style=&quot;color: #b22222;&quot;&gt;a lot */&lt;/span&gt; one + two };
};
&lt;/pre&gt;

&lt;p&gt;&lt;abbr title=&quot;усовершенствованный C++&quot;&gt;C+++&lt;/abbr&gt; должен понимать, что перечисления One и Two &amp;mdash; публичные, конструктор и деструктор &amp;mdash; очень публичные, а переменная(-член) &amp;mdash; совсем публичная(-чный).</description>
  <comments>http://vorotylo.livejournal.com/66292.html</comments>
  <category>c++</category>
  <category>job</category>
  <category>sarcasm</category>
  <lj:security>public</lj:security>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/65976.html</guid>
  <pubDate>Sat, 10 Oct 2009 21:37:41 GMT</pubDate>
  <title>Write, think, learn</title>
  <link>http://vorotylo.livejournal.com/65976.html</link>
  <description>&lt;p style=&quot;align:center&quot;&gt;``&lt;a href=&quot;http://www.ai.uga.edu/mc/WriteThinkLearn.htm&quot;&gt;How
to Write More Clearly, Think More Clearly, and Learn Complex Material
More Easily&lt;/a&gt;.&apos;&apos;&lt;br /&gt;
Wonderful presentation by Michael A. Covington.

&lt;p&gt;I like it up to the last slide (&lt;em&gt;especially&lt;/em&gt; the last slide).

&lt;p style=&quot;font-size:x-small&quot;&gt;[ via Chung-chieh Shan&apos;s blog
&lt;a href=&quot;http://conway.rutgers.edu/~ccshan/wiki/blog/posts/Write_think_learn/&quot;&gt;entry&lt;/a&gt; ]</description>
  <comments>http://vorotylo.livejournal.com/65976.html</comments>
  <category>semantics</category>
  <category>english</category>
  <category>pdf</category>
  <lj:security>public</lj:security>
  <lj:reply-count>3</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/65638.html</guid>
  <pubDate>Sat, 10 Oct 2009 20:48:20 GMT</pubDate>
  <title>()</title>
  <link>http://vorotylo.livejournal.com/65638.html</link>
  <description>Надо же! Оказывается, доклады на тему ``Business-Critical System
vs. Your Favourite Functional
Language&apos;&apos; &lt;a href=&quot;http://community.livejournal.com/fprog/3667.html&quot;&gt;популярны&lt;/a&gt;.</description>
  <comments>http://vorotylo.livejournal.com/65638.html</comments>
  <category>fprog</category>
  <category>void</category>
  <category>twitter</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/65462.html</guid>
  <pubDate>Tue, 06 Oct 2009 15:20:33 GMT</pubDate>
  <title>Making Motorola playlists (.pla files), part 2</title>
  <link>http://vorotylo.livejournal.com/65462.html</link>
  <description>&lt;p&gt;&lt;em&gt;(See &lt;a href=&quot;http://vorotylo.livejournal.com/65043.html&quot;&gt;part
1&lt;/a&gt;.)&lt;/em&gt;

&lt;p&gt;As long as .pla file is binary, we will view it in hex. Here&apos;s a
hex dump of a playlist containing first three tracks
of &lt;a href=&quot;http://en.wikipedia.org/wiki/Led_Zeppelin_IV&quot;&gt;Led Zeppelin
IV&lt;/a&gt;:

&lt;pre style=&quot;overflow:auto; border:thin solid #808080&quot;&gt;
$ hd lz4.pla
00000000  00 03 00 01 00 00 00 00  01 40 00 04 00 00 3d 60  |.........@....=`|
00000010  01 40 00 0e 00 00 3d 60  01 40 00 02 00 00 3d 5f  |.@....=`.@....=_|
00000020
&lt;/pre&gt;

&lt;p&gt;This playlist is named `lz4.pla&apos;. We will refer to it below.

&lt;h4&gt;Header&lt;/h4&gt;

&lt;p&gt;I&apos;ve created several playlists &quot;manually&quot; and noticed that the
second byte is always equal to the number of tracks in playlist (`03&apos;
in lz4.pla). Bytes with offsets 0 and 2&amp;ndash;7 are the same for all
playlists I&apos;ve seen. Thus we can guess the format of .pla
file &lt;em&gt;header&lt;/em&gt;:

&lt;p style=&quot;padding-left:40px&quot;&gt;&lt;tt&gt;00 &amp;lt;nn&amp;gt; 00 01 00 00 00 00&lt;/tt&gt;,

&lt;p&gt;where &amp;lt;nn&amp;gt; is number of tracks in playlist.

&lt;h4&gt;Entry&lt;/h4&gt;

&lt;p&gt;Playlist header is followed by &lt;em&gt;entries&lt;/em&gt; &amp;mdash; 8-byte-long
track specifications. There are as many entries as there are tracks
in a playlist (lz4.pla file has three: address ranges 0x8&amp;ndash;0xf,
0x10&amp;ndash;0x17, and 0x18&amp;ndash;0x1f).

&lt;p&gt;When we open playlist in Motorola, we see the names of tracks
included. But there is no chance for 8 bytes of .pla entry to contain
the name of track: the third track is displayed as `03 - The Battle of
Evermore&apos; making a string of 27 characters.

&lt;p&gt;Thus, we can assume that .pla entry encodes &lt;em&gt;position&lt;/em&gt; of
.mp3 file within the underlying filesystem.

&lt;p&gt;&lt;em&gt;&lt;a href=&quot;http://vorotylo.livejournal.com/67332.html&quot;&gt;Continued...&lt;/a&gt;&lt;/em&gt;</description>
  <comments>http://vorotylo.livejournal.com/65462.html</comments>
  <category>hacking</category>
  <category>english</category>
  <category>motorola</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/65043.html</guid>
  <pubDate>Thu, 01 Oct 2009 21:04:10 GMT</pubDate>
  <title>Making Motorola playlists (.pla files), part 1</title>
  <link>http://vorotylo.livejournal.com/65043.html</link>
  <description>&lt;p&gt;&lt;img align=&quot;right&quot; src=&quot;http://www.amitbhawani.com/Images/M/Motorola-SLVR-L7e-Small.png&quot; title=&quot;&quot; alt=&quot;Motorola SLVR L7e&quot; width=&quot;200&quot; height=&quot;220&quot; /&gt;

I&apos;ve got Motorola SLVR L7e mobile phone. The device is capable of
playing MP3 audio files, and I use this feature occasionally.&lt;/p&gt;

&lt;p&gt;Once a musical album is uploaded to phone&apos;s microSD, it is better to
create &lt;em&gt;playlist&lt;/em&gt;, otherwise playback will stop as soon as the
first track finishes.&lt;/p&gt;

&lt;p&gt;And while uploading albums is very simple (you just copy
directories like you do with ordinary USB memory stick), creating playlists
on L7e is &lt;em&gt;pain&lt;/em&gt;.&lt;/p&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p&gt;You go to `Multimedia/Sounds&apos; menu item, choose `New Playlist&apos;,
then `Audio Files&apos; and start selecting those belonging to your
album. There are two inconveniences: 1) tracks are not sorted (i.e.,
you see the list of `03.Baz, and `01.Foo, and `02.Bar&apos;), and 2) the
list includes all the tracks stored on your memory card (and 1Gb flash
may contain &lt;em&gt;lots&lt;/em&gt; of them).&amp;nbsp; Thus making a playlist is a
laborious process of consulting track listing (from computer folder or
wikipedia) and hunting tracks that are scattered over a huge list.&lt;/p&gt;

&lt;p&gt;You think you&apos;ve added files and you are done?&amp;nbsp; Not so fast.
You need to &lt;em&gt;reorder&lt;/em&gt; them now. That&apos;s right, remember they
were unsorted in the previous step. And here is Motorola playlist
files&apos; reordering procedure: choose playlist, select `Options&apos; then
`Reorder&apos;, go to track #1, select and pull it to the top, put it
there; go to track #2, place it right after the first; repeat until
it&apos;s time for pressing `Done&apos;.&lt;/p&gt;

&lt;p&gt;Phew!&lt;/p&gt;

&lt;p&gt;But what a hell, &lt;abbr title=&quot;excluding Motorola programmers&quot;&gt;none
of human beings&lt;/abbr&gt; deserve being involved in such a stupid
activity! What &lt;em&gt;are&lt;/em&gt; these playlists?..&lt;/p&gt;

&lt;p&gt;The result of suffering is a .pla file, stored in `mobile/audio&apos;
directory. The file is easy to see, copy, and delete, but it&apos;s not
quite obvious how to create it -- the darn file is binary with format
unknown.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href=&quot;http://vorotylo.livejournal.com/65462.html&quot;&gt;Continued...&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
  <comments>http://vorotylo.livejournal.com/65043.html</comments>
  <category>english</category>
  <category>motorola</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/64928.html</guid>
  <pubDate>Tue, 29 Sep 2009 19:52:29 GMT</pubDate>
  <title>LtU-Kiev: Haskell experience</title>
  <link>http://vorotylo.livejournal.com/64928.html</link>
  <description>&lt;p&gt;В эту субботу &lt;a href=&quot;http://groups.google.com/group/ltu-kiev/web/meeting-2&quot;&gt;LtU-Kiev
собирается&lt;/a&gt;, вы в курсе?&lt;/p&gt;</description>
  <comments>http://vorotylo.livejournal.com/64928.html</comments>
  <category>pr</category>
  <category>ltu-kiev</category>
  <lj:mood>social</lj:mood>
  <lj:security>public</lj:security>
  <lj:reply-count>7</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/64752.html</guid>
  <pubDate>Sat, 26 Sep 2009 20:23:21 GMT</pubDate>
  <title>whois ltu-kiev</title>
  <link>http://vorotylo.livejournal.com/64752.html</link>
  <description>&lt;p&gt;Что такое &lt;a href=&quot;http://groups.google.com/group/ltu-kiev&quot;&gt;LtU-Kiev&lt;/a&gt; и как оно началось?

&lt;p&gt;&lt;a href=&quot;http://lambda-the-ultimate.org/policies&quot;&gt;The main thing
uniting us is our interest in programming languages.&lt;/a&gt;..</description>
  <comments>http://vorotylo.livejournal.com/64752.html</comments>
  <category>void</category>
  <category>ltu-kiev</category>
  <lj:security>public</lj:security>
  <lj:reply-count>13</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/64506.html</guid>
  <pubDate>Thu, 10 Sep 2009 20:17:26 GMT</pubDate>
  <title>[joke alert]</title>
  <link>http://vorotylo.livejournal.com/64506.html</link>
  <description>&lt;p&gt;Try this command in your xterm (don&apos;t worry, it&apos;s harmless):

&lt;pre style=&quot;border: solid thin #808080&quot;&gt;(trap &apos;xrandr -o normal&apos; 0; xrandr -o inverted; sleep 20)&lt;/pre&gt;

&lt;p&gt;(-:

&lt;p&gt;[Inspired by `&lt;a href=&quot;http://www.debian-administration.org/articles/201&quot;&gt;Changing X11 resolution on the fly&lt;/a&gt;&apos; article.]</description>
  <comments>http://vorotylo.livejournal.com/64506.html</comments>
  <category>english</category>
  <category>fun</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/64235.html</guid>
  <pubDate>Mon, 07 Sep 2009 14:09:33 GMT</pubDate>
  <title>%-/</title>
  <link>http://vorotylo.livejournal.com/64235.html</link>
  <description>&lt;p&gt;(Re: &lt;a href=&quot;http://vorotylo.livejournal.com/63744.html&quot;&gt;Daily WTF to Ultimate Refactoring?&lt;/a&gt;)

&lt;p&gt;Чувствую себя лейтенантом Рипли, которая забежала с зажжённым
огнемётом в склизкую колонию &quot;чужих&quot; с благородной целью (сделать на
этом месте солнечную лужайку с бабочками), но постепенно начала
осознавать масштабы. &amp;nbsp;Подлая &quot;матка&quot; загадила яйцами &lt;em&gt;невообразимые&lt;/em&gt; площадя...</description>
  <comments>http://vorotylo.livejournal.com/64235.html</comments>
  <category>wtf</category>
  <category>refactoring</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/63744.html</guid>
  <pubDate>Fri, 04 Sep 2009 08:51:05 GMT</pubDate>
  <title>Daily WTF to Ultimate Refactoring?</title>
  <link>http://vorotylo.livejournal.com/63744.html</link>
  <description>&lt;p&gt;It ain&apos;t easy to profile 2.6K SLOC program made of 3 functions.

&lt;p&gt;PS: I&apos;ve narrowed the problem: 99.1% time is spent in one of these functions; just 1000 lines of code.</description>
  <comments>http://vorotylo.livejournal.com/63744.html</comments>
  <category>english</category>
  <lj:security>public</lj:security>
  <lj:reply-count>3</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/63652.html</guid>
  <pubDate>Thu, 06 Aug 2009 07:53:12 GMT</pubDate>
  <title>``Gromit, that&apos;s it! Cheese!&apos;&apos;</title>
  <link>http://vorotylo.livejournal.com/63652.html</link>
  <description>&lt;p&gt;Using Debian&apos;s &lt;em&gt;required&lt;/em&gt; package, you can learn a lot about French cheeses:

  &lt;pre style=&quot;overflow:auto&quot;&gt;
  $ aptitude changelog login | awk -F\&quot; &apos;/The &quot;.+&quot; release/ {print $2}&apos;
  Tome des Bauges
  Chevrotin
  Banonet
  Banon
  Chambérat
  Le Puant Macéré
  Rocamadour
  Morbier
  Bleu des Causses
  Bleu d&apos;Auvergne
  ...&lt;/pre&gt;

&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;p&gt;Without Debian the command would be longer:

  &lt;pre style=&quot;overflow:auto&quot;&gt;
  wget -qO - http://packages.debian.org/changelogs/pool/main/s/shadow/current/changelog.txt | awk -F\&quot; &apos;/The &quot;.+&quot; release/ {print $2}&apos;&lt;/pre&gt;
</description>
  <comments>http://vorotylo.livejournal.com/63652.html</comments>
  <category>debian</category>
  <category>english</category>
  <lj:security>public</lj:security>
  <lj:reply-count>3</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/63247.html</guid>
  <pubDate>Fri, 10 Jul 2009 12:48:58 GMT</pubDate>
  <title>utility of the day</title>
  <link>http://vorotylo.livejournal.com/63247.html</link>
  <description>&lt;p&gt;&lt;a href=&quot;http://gcc.gnu.org/onlinedocs/gcc/Gcov.html&quot;&gt;gcov&lt;/a&gt; -
coverage testing tool

&lt;p&gt;&lt;a name=&quot;cutid1&quot;&gt;&lt;/a&gt;
&lt;pre style=&quot;overflow: auto; border: thin solid #808080; color: #000000; background-color: #9bcd9b;&quot;&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; text-decoration: underline;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;:Source:&lt;/span&gt;&lt;span style=&quot;color: #00cd00; font-weight: bold; text-decoration: underline;&quot;&gt;/tmp/1.c&lt;/span&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; text-decoration: underline;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;:Graph:1.gcno&lt;/span&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; text-decoration: underline;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;:Data:1.gcda&lt;/span&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; text-decoration: underline;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;:Runs:1&lt;/span&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; text-decoration: underline;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;:Programs:1&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:void foo()&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #00cd00; background-color: #9bcd9b; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:{&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #00cd00; background-color: #9bcd9b; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:  printf(&quot;int:\t%ld\n&quot;, (long) sizeof(int));&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #00cd00; background-color: #9bcd9b; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:  printf(&quot;long:\t%ld\n&quot;, (long) sizeof(long));&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #00cd00; background-color: #9bcd9b; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:}&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        -:    &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;9&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:void bar()&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #ff0000; background-color: #9bcd9b; font-weight: bold;&quot;&gt;#####&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:{&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #ff0000; background-color: #9bcd9b; font-weight: bold;&quot;&gt;#####&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:  printf(&quot;size_t:\t%ld\n&quot;, (long) sizeof(size_t));&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #ff0000; background-color: #9bcd9b; font-weight: bold;&quot;&gt;#####&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:  printf(&quot;void*:\t%ld\n&quot;, (long) sizeof(void*));&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #ff0000; background-color: #9bcd9b; font-weight: bold;&quot;&gt;#####&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;13&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:}&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        -:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;14&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        -:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;15&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:int main()&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #00cd00; background-color: #9bcd9b; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;16&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:{&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #00cd00; background-color: #9bcd9b; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;17&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:  foo();&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        -:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;18&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:/*   bar(); */&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #00cd00; background-color: #9bcd9b; font-weight: bold;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;19&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:  return 0;&lt;/span&gt;
&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;        -:   &lt;/span&gt;&lt;span style=&quot;color: #b8860b; background-color: #9bcd9b;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: #000000; background-color: #9bcd9b;&quot;&gt;:}&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;The lines marked with `#####&apos; were never executed.

&lt;p&gt;Compile with `--coverage&apos; and run yer program:
&lt;pre&gt;
  $ vi /tmp/1.c
  $ cd /tmp
  $ gcc --coverage -g -Wall -W -o 1 1.c
  $ ./1 &amp;gt;/dev/null
  $ gcov /tmp/1.c
  File &apos;/tmp/1.c&apos;
  Lines executed:63.64% of 11
  /tmp/1.c:creating &apos;1.c.gcov&apos;
&lt;/pre&gt;


&lt;p&gt;GCC only.

&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; &lt;tt&gt;gcov&lt;/tt&gt; with &lt;tt&gt;`-b&apos;&lt;/tt&gt; option measures &lt;em&gt;branch coverage&lt;/em&gt;.

&lt;p&gt;See also:
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://aleccolocco.blogspot.com/2009/08/sqlite-lesson-in-low-defect-software.html&quot;&gt;SQLite: A Lesson In Low-Defect Software&lt;/a&gt; blog post
    &lt;li&gt;&lt;a href=&quot;http://www.sqlite.org/talks/wroclaw-20090310.pdf&quot;&gt;the presentation&lt;/a&gt; it mentions
    &lt;li&gt;and the corresponding &lt;a href=&quot;http://www.reddit.com/r/programming/comments/9e64t/sqlite_a_lesson_in_lowdefect_software/&quot;&gt;reddit discussion&lt;/a&gt;
  &lt;/ul&gt;</description>
  <comments>http://vorotylo.livejournal.com/63247.html</comments>
  <category>tips</category>
  <category>otd</category>
  <category>programming</category>
  <category>english</category>
  <category>tools</category>
  <lj:security>public</lj:security>
  <lj:reply-count>4</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/63129.html</guid>
  <pubDate>Sun, 05 Jul 2009 10:42:34 GMT</pubDate>
  <title>&quot;d-a-i&quot; sequences explained</title>
  <link>http://vorotylo.livejournal.com/63129.html</link>
  <description>&lt;p&gt;Well,
the &lt;a href=&quot;http://vorotylo.livejournal.com/62671.html&quot;&gt;promised&lt;/a&gt;
explanations.

&lt;p&gt;The screenshot
shows &lt;a href=&quot;http://github.com/vvv/work-log/tree/master&quot;&gt;work-log.el&lt;/a&gt;
debugging session. The &quot;a-a-i-i-d&quot; patchwork you see there is a work
log model (more on this below). A work log is a sequence of dates,
active entries, and inactive entries (the latter include comments);
see example
&lt;a href=&quot;http://github.com/vvv/work-log/raw/d13c93ed06feffaa94a53cc7f4071c0a8c5c5efa/sample.log&quot;&gt;here&lt;/a&gt;.
In short: resolved tasks == inactive, pending ones == active, that&apos;s it.

&lt;p&gt;Now. `work-log-hide-inactive&apos; function (`C-c C-h&apos;) lets user
concentrate on open tasks, making inactive &quot;noise&quot; invisible.

&lt;p&gt;The first implementation of the hiding function did hide resolved
tasks but also left some dates with no entries at all hanging
void. Like this:

&lt;pre style=&quot;overflow: auto; border: thin solid #808080; color: #000000; background-color: #9bcd9b;&quot;&gt;
&lt;span style=&quot;color: #bc8f8f;&quot;&gt;2009-07-03&lt;/span&gt;

  http://lib/it/processMMS: update scenarios&apos; table

&lt;span style=&quot;color: #bc8f8f;&quot;&gt;2009-07-02&lt;/span&gt;

&lt;span style=&quot;color: #bc8f8f;&quot;&gt;2009-07-01&lt;/span&gt;

  import `recsep&apos; to CVS
&lt;/pre&gt;

&lt;p&gt;Note the &quot;hanging&quot; 2009-07-02.

&lt;p&gt;Okay. Let&apos;s omit the boring details (head scratching, pencil
sketching, and a couple of &quot;aha!&quot; moments) and &lt;em&gt;goto&lt;/em&gt; right to
the way I debugged the damn function...

&lt;p&gt;Here the simplified model of a work log suffice: a &lt;em&gt;&quot;d-a-i&quot;
  sequence&lt;/em&gt; -- sequence of [&apos;d&apos;, &apos;a&apos;, &apos;i&apos;, &apos;-&apos;] characters, where
  &apos;d&apos; represents date, &apos;a&apos; -- active entry, and &apos;i&apos; --
  inactive. Hyphen (&apos;-&apos;) is either empty line or the continuation of
  previous entry (a task entry in real log can consist of several
  lines).

&lt;p&gt;All we need to do is change a bit the hiding function (substitute
regexps, replace `forward-line&apos; with `forward-char&apos;, and show the
&quot;hidden&quot; regions in inverted color instead of actually hiding them)
and run it on a bunch of dai-sequences.

&lt;p&gt;Testing input is easy to generate:

&lt;pre style=&quot;overflow: auto; border: thin solid #808080; color: #000000; background-color: #9bcd9b;&quot;&gt;
&lt;span style=&quot;color: #a020f0;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #228b22;&quot;&gt;Data.List&lt;/span&gt; (permutations)

&lt;span style=&quot;color: #0000ff;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #b8860b;&quot;&gt;=&lt;/span&gt; putStrLn &lt;span style=&quot;color: #b8860b;&quot;&gt;$&lt;/span&gt; concatMap (&lt;span style=&quot;color: #b8860b;&quot;&gt;\&lt;/span&gt;(x,y) &lt;span style=&quot;color: #b8860b;&quot;&gt;-&amp;gt;&lt;/span&gt; x&lt;span style=&quot;color: #b8860b;&quot;&gt;++&lt;/span&gt;y) (xs &lt;span style=&quot;color: #b8860b;&quot;&gt;`zip`&lt;/span&gt; repeat &lt;span style=&quot;color: #bc8f8f;&quot;&gt;&quot;-&quot;&lt;/span&gt;)
    &lt;span style=&quot;color: #a020f0;&quot;&gt;where&lt;/span&gt; xs &lt;span style=&quot;color: #b8860b;&quot;&gt;=&lt;/span&gt; concat &lt;span style=&quot;color: #b8860b;&quot;&gt;$&lt;/span&gt; permutations [&lt;span style=&quot;color: #bc8f8f;&quot;&gt;&quot;a&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bc8f8f;&quot;&gt;&quot;a&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bc8f8f;&quot;&gt;&quot;i&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bc8f8f;&quot;&gt;&quot;i&quot;&lt;/span&gt;, &lt;span style=&quot;color: #bc8f8f;&quot;&gt;&quot;d&quot;&lt;/span&gt;]
&lt;/pre&gt;

&lt;p&gt;Given &quot;i-d-a-d-i-d-a-i-&quot; we get:

&lt;pre style=&quot;overflow: auto; border: thin solid #808080; color: #000000; background-color: #9bcd9b;&quot;&gt;
&lt;span style=&quot;color: #9bcd9b; background-color: #000000;&quot;&gt;i-&lt;/span&gt;d-a-d-&lt;span style=&quot;color: #9bcd9b; background-color: #000000;&quot;&gt;i-&lt;/span&gt;d-a-&lt;span style=&quot;color: #9bcd9b; background-color: #000000;&quot;&gt;i-&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;Do you see a hanging date? The hidden (black) region in the middle
should cover preceding date (&apos;d-&apos;) but it does not.

&lt;p&gt;Well, you got the idea. Once the testing routine was established, it was easy
to fix the bug.

&lt;pre style=&quot;overflow: auto; border: thin solid #808080; color: #000000; background-color: #9bcd9b;&quot;&gt;
&lt;span style=&quot;color: #9bcd9b; background-color: #000000;&quot;&gt;i-&lt;/span&gt;d&lt;span style=&quot;color: #9bcd9b; background-color: #000000;&quot;&gt;-&lt;/span&gt;a-&lt;span style=&quot;color: #9bcd9b; background-color: #000000;&quot;&gt;d-i-&lt;/span&gt;d&lt;span style=&quot;color: #9bcd9b; background-color: #000000;&quot;&gt;-&lt;/span&gt;a-&lt;span style=&quot;color: #9bcd9b; background-color: #000000;&quot;&gt;i-&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;Q.E.D.

&lt;p style=&quot;text-align:center&quot;&gt;* * *

&lt;p&gt;Yes, and while you&apos;re here, I&apos;d like to recommend this post:&lt;br /&gt;
  &lt;a href=&quot;http://sdk.org.nz/2009/02/25/why-unit-testing-is-a-waste-of-time/&quot; style=&quot;padding-left:10px&quot;&gt;Benefits
  of automated functional testing (was: Why unit testing is a waste of
  time)&lt;/a&gt;

&lt;p&gt;Have fun!</description>
  <comments>http://vorotylo.livejournal.com/63129.html</comments>
  <category>english</category>
  <category>work-log</category>
  <category>testing</category>
  <lj:security>public</lj:security>
  <lj:reply-count>2</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/62860.html</guid>
  <pubDate>Sat, 04 Jul 2009 07:10:44 GMT</pubDate>
  <title>word of the day</title>
  <link>http://vorotylo.livejournal.com/62860.html</link>
  <description>&lt;pre&gt;$ dict braino
2 definitions found

From The Free On-line Dictionary of Computing (4 April 2009) [foldoc]:

thinko
braino

   &lt;jargon&gt; /thing&apos;koh/ (Or &quot;braino&quot;, by analogy with &quot;typo&quot;) A
   momentary, correctable glitch in mental processing,
   especially one involving recall of information learned by
   rote; a bubble in the stream of consciousness.

   See also &lt;a href=&quot;http://catb.org/jargon/html/B/brain-fart.html&quot;&gt;brain fart&lt;/a&gt;.  Compare &lt;a href=&quot;http://catb.org/jargon/html/M/mouso.html&quot;&gt;mouso&lt;/a&gt;.

   [Jargon File]

   (1996-04-20)


From The Jargon File (version 4.4.7, 29 Dec 2003) [jargon]:

braino
 /bray&apos;no/, n.

        Syn. for thinko. See also brain fart.
&lt;/pre&gt;</description>
  <comments>http://vorotylo.livejournal.com/62860.html</comments>
  <category>words</category>
  <category>jargon</category>
  <category>english</category>
  <category>wotd</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/62671.html</guid>
  <pubDate>Fri, 03 Jul 2009 23:32:17 GMT</pubDate>
  <title>`work-log-hide-inactive&apos; via &quot;d-a-i&quot; sequences</title>
  <link>http://vorotylo.livejournal.com/62671.html</link>
  <description>&lt;p&gt;It works!

&lt;p style=&quot;overflow:auto&quot;&gt;
  &lt;a href=&quot;http://www.ljplus.ru/img4/v/o/vorotylo/dai.png&quot;&gt;
    &lt;img src=&quot;http://www.ljplus.ru/img4/v/o/vorotylo/dai.png&quot; width=&quot;800&quot; height=&quot;500&quot; alt=&quot;[screenshot] work-log.el development&quot; /&gt;&lt;/a&gt;

&lt;p&gt;Sorry, but no explanations right now -- I&apos;ll better have some sleep...

&lt;p&gt;Anyway, the picture is nice, isn&apos;t it? :)

&lt;p style=&quot;text-align:center&quot;&gt;* * *

&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; the &lt;a href=&quot;http://vorotylo.livejournal.com/63129.html&quot;&gt;description&lt;/a&gt; of above screenshot.</description>
  <comments>http://vorotylo.livejournal.com/62671.html</comments>
  <category>emacs</category>
  <category>hacking</category>
  <category>elisp</category>
  <category>english</category>
  <lj:security>public</lj:security>
  <lj:reply-count>3</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/62327.html</guid>
  <pubDate>Mon, 22 Jun 2009 10:14:09 GMT</pubDate>
  <title>все профессии нужны</title>
  <link>http://vorotylo.livejournal.com/62327.html</link>
  <description>&lt;p&gt;Очень не хватает опыта работы в службе знакомств.

&lt;p&gt;Передо мной выложен ряд из 7 почти неотличимых чёрных носков. Нужно
разбить их на пары.</description>
  <comments>http://vorotylo.livejournal.com/62327.html</comments>
  <category>void</category>
  <lj:security>public</lj:security>
  <lj:reply-count>2</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>http://vorotylo.livejournal.com/62165.html</guid>
  <pubDate>Mon, 22 Jun 2009 08:03:48 GMT</pubDate>
  <title>CS152-Lecture_14-Kernighan.pdf</title>
  <link>http://vorotylo.livejournal.com/62165.html</link>
  <description>&lt;p&gt;Не могу удержаться, чтобы не порекомендовать:

    &lt;p style=&quot;padding-left:20px&quot;&gt;&lt;a href=&quot;http://www.eecs.harvard.edu/cs152/lectures/CS152-Lecture_14-Kernighan.pdf&quot;&gt;Brian Kernighan, &quot;Random Thoughts on Scripting Languages&quot; (PDF)&lt;/a&gt;

&lt;p&gt;Как говорила наша учительница русского языка и литературы:
``Бальзам на раны&apos;&apos;. А если проще -- ржак полнейший (достигается
умелой расстановкой цитат Ларри Уолла).

&lt;p&gt;Хакеры, наслаждайтесь!</description>
  <comments>http://vorotylo.livejournal.com/62165.html</comments>
  <category>programming</category>
  <category>fun</category>
  <category>insightful</category>
  <lj:security>public</lj:security>
  <lj:reply-count>4</lj:reply-count>
</item>
</channel>
</rss>
