<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Musings of a renegade developer</description><title>Peace, Love and C++</title><generator>Tumblr (3.0; @paultag)</generator><link>http://blog.pault.ag/</link><item><title>playing with non-lintian lintian checks</title><description>&lt;p&gt;Crazy title, I know.&lt;/p&gt;

&lt;p&gt;Over the past $WHILE, I&amp;#8217;ve found myself checking for the same things. Some of these are fit for inclusion into lintian it&amp;#8217;s self &amp;#8212; others, not so much.&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s a rundown on what my lintian wrapper (tragically also called &amp;#8220;lintian&amp;#8221; and just higher up on my $PATH. I know it&amp;#8217;s a hack.)&lt;/p&gt;

&lt;p&gt;Since I only use lintian on .changes files - it pre-processes for some information that is stuffed in the changes.&lt;/p&gt;

&lt;p&gt;The first step is to get all the bugs that the package closes. It then takes these bugs, and queries the BTS to see what package they&amp;#8217;re filed against. If the bug is filed against a &lt;em&gt;different&lt;/em&gt; bug then the package&amp;#8217;s source, it&amp;#8217;ll emit a warning. It has a greylist for stuff like &amp;#8220;WNPP&amp;#8221;. This will fail if something&amp;#8217;s filed against it&amp;#8217;s binary package rather then it&amp;#8217;s source :)&lt;/p&gt;

&lt;p&gt;Next, the wrapper will get &amp;#8220;other&amp;#8221; info from the changes. It checks if the suite is in the blacklist (&amp;#8220;UNRELEASED&amp;#8221;, and &amp;#8220;testing&amp;#8221;, (stable for me as well, since I don&amp;#8217;t usually deal with SRUs often)).&lt;/p&gt;

&lt;p&gt;It&amp;#8217;ll also check for the changed-by and maintainer, ensuring they&amp;#8217;re the same. This will fail for co-maint&amp;#8217;d packages.&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;ve not guessed by now, this system relies on false-positives :)&lt;/p&gt;

&lt;p&gt;Nextly, if there are .debs in the Files, it&amp;#8217;ll go through and check the control of each. It&amp;#8217;ll print out a stanza with the short-description inside a template, to see if the description &amp;#8220;works&amp;#8221;.&lt;/p&gt;

&lt;p&gt;After that, it&amp;#8217;ll attempt to make HTTP requests to the Homepage (and eventually URLs in the description and VCS-Browse)&lt;/p&gt;

&lt;p&gt;If the package has &amp;#8220;python&amp;#8221; in the source name anywhere, or in any of it&amp;#8217;s binary packages, it&amp;#8217;ll trigger &lt;a href="http://jwilk.net/software/lintian4python" target="_blank"&gt;jwilk&amp;#8217;s lintian4python&lt;/a&gt; over the source as well.&lt;/p&gt;

&lt;p&gt;After this, it passes through to regular lintian.&lt;/p&gt;

&lt;p&gt;Oh, and it colorizes all the output :)&lt;/p&gt;

&lt;p&gt;Here is a (mostly lint-free) package:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/sBMXA.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;As you can see, it&amp;#8217;s very (&lt;em&gt;very&lt;/em&gt;) verbose, but i&amp;#8217;d rather cross stuff off a checklist then worry about something being off.&lt;/p&gt;

&lt;p&gt;Anyway, it&amp;#8217;s a work in progress. Not even a serious one, at that. It&amp;#8217;s a bunch of hacks put together, so I can&amp;#8217;t really endorse anyone else using this stuff. If you feel crazy enough to do so, all the tools are found on my &lt;a href="https://github.com/paultag/dot-bin" target="_blank"&gt;dot-bin repo on GitHub&lt;/a&gt;&lt;/p&gt;</description><link>http://blog.pault.ag/post/23702762096</link><guid>http://blog.pault.ag/post/23702762096</guid><pubDate>Thu, 24 May 2012 20:25:03 -0400</pubDate><category>lintian hax</category><category>debian</category></item><item><title>gcc 4.7 patchathon</title><description>&lt;p&gt;For no reason other then I had some time, I went on a patchathon against gcc-4.7 ftbfss while watching frasier&lt;/p&gt;

&lt;p&gt;This log is really for my own use :)&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;Blocked &lt;a href="http://bugs.debian.org/667409" target="_blank"&gt;667409&lt;/a&gt;, &lt;a href="http://bugs.debian.org/667394" target="_blank"&gt;667394&lt;/a&gt; and &lt;a href="http://bugs.debian.org/667393" target="_blank"&gt;667393&lt;/a&gt; with newly filed bug &lt;a href="http://bugs.debian.org/668700" target="_blank"&gt;668700&lt;/a&gt; in libcrypto++ (regarding providing gcc-4.7 invalid headers)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Patch sent in for &lt;a href="http://bugs.debian.org/667418" target="_blank"&gt;667418&lt;/a&gt; (wvstreams)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Patch sent in for &lt;a href="http://bugs.debian.org/667415" target="_blank"&gt;667415&lt;/a&gt; (wmhdplop)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Patch sent in for &lt;a href="http://bugs.debian.org/667334" target="_blank"&gt;667334&lt;/a&gt; (pwlib)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Patch sent in for &lt;a href="http://bugs.debian.org/667333" target="_blank"&gt;667333&lt;/a&gt; (ptlib-wolf)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Patch sent in for &lt;a href="http://bugs.debian.org/667327" target="_blank"&gt;667327&lt;/a&gt; (populations)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Filed serious bug &lt;a href="http://bugs.debian.org/668698" target="_blank"&gt;668698&lt;/a&gt; against cxxtools for providing a broken header&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Filed serious bug &lt;a href="http://bugs.debian.org/668700" target="_blank"&gt;668700&lt;/a&gt; against libcrypto++ for providing a broken header&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://blog.pault.ag/post/21083720029</link><guid>http://blog.pault.ag/post/21083720029</guid><pubDate>Sat, 14 Apr 2012 10:44:01 -0400</pubDate><category>patchathon</category><category>frasier</category><category>debian</category><category>bugs</category></item><item><title>Intent to become a Debian Developer</title><description>&lt;p&gt;Howdy!&lt;/p&gt;

&lt;p&gt;I&amp;#8217;d like to officially state (for the record) that it is my intent to apply to become a Debian Developer within the next &lt;code&gt;$TIMEFRAME&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Currently soliciting advice and opinions before &lt;code&gt;nm.d.o&lt;/code&gt; comes back online :)&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s a big step, but it&amp;#8217;s a natural one.&lt;/p&gt;

&lt;p&gt;Gametime?&lt;/p&gt;</description><link>http://blog.pault.ag/post/18102048632</link><guid>http://blog.pault.ag/post/18102048632</guid><pubDate>Wed, 22 Feb 2012 20:12:21 -0500</pubDate><category>debian</category><category>dd</category><category>news</category><category>pretty-cool</category></item><item><title>Mapping the Ubuntu Community</title><description>&lt;p&gt;In playing with some tools I&amp;#8217;ve run into at &lt;code&gt;$work&lt;/code&gt;, I&amp;#8217;ve tried loading in some Ubuntu datasets in some fun and interesting ways.&lt;/p&gt;

&lt;p&gt;Today, I&amp;#8217;ve chosen to map all Ubuntu Members with a public lat/lon, sized by Karma.&lt;/p&gt;

&lt;p&gt;The sizes relate to if the Karma is greater then:&lt;/p&gt;

&lt;p&gt;1: 10&lt;/p&gt;

&lt;p&gt;2: 50&lt;/p&gt;

&lt;p&gt;3: 100&lt;/p&gt;

&lt;p&gt;4: 500&lt;/p&gt;

&lt;p&gt;5: 1000&lt;/p&gt;

&lt;p&gt;6: 2000&lt;/p&gt;

&lt;p&gt;7: 7000&lt;/p&gt;

&lt;p&gt;8: 15000&lt;/p&gt;

&lt;p&gt;9: 25000&lt;/p&gt;

&lt;p&gt;10: 50000&lt;/p&gt;

&lt;p&gt;So, without further adieu, here&amp;#8217;re some maps!&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/9LaPY.png" alt="UK"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/Vp0Mu.png" alt="US"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/krYo7.png" alt="EU"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/bJ1gB.png" alt="EEU"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/2tLSo.png" alt="SA"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/xkiG1.png" alt="Globe"/&gt;&lt;/p&gt;</description><link>http://blog.pault.ag/post/17036484637</link><guid>http://blog.pault.ag/post/17036484637</guid><pubDate>Sat, 04 Feb 2012 12:04:15 -0500</pubDate><category>ubuntu</category><category>cartography</category><category>incomplete-data-set</category><category>debian</category></item><item><title>python-sunlight (or: get at some awesome US Political data programmatically)</title><description>&lt;p&gt;I&amp;#8217;ve spent a few days during work, after work and on the weekend working on &lt;a href="https://github.com/sunlightlabs/python-sunlight" target="_blank"&gt;python-sunlight&lt;/a&gt;, a unified API implementation of a few Sunlight services.&lt;/p&gt;

&lt;p&gt;This is &lt;strong&gt;very&lt;/strong&gt; unstable, and not released yet (so please don&amp;#8217;t rely on it yet), but it will be shortly.&lt;/p&gt;

&lt;p&gt;Be sure to sign up for an &lt;a href="http://services.sunlightlabs.com/accounts/register/" target="_blank"&gt;API Key&lt;/a&gt;, and dump the key to &lt;code&gt;~/.sunlight.key&lt;/code&gt; &amp;#8212; there&amp;#8217;s a simple script to help with some of this in &lt;code&gt;bin/&lt;/code&gt;, but nothing solid yet.&lt;/p&gt;

&lt;p&gt;I do, however, encourage you to use it and play around with it, and report your bugs.&lt;/p&gt;

&lt;p&gt;Contributions (in the form of code) are also very welcome, so please do fork the project and play around with it.&lt;/p&gt;

&lt;p&gt;Just to give everyone a taste of how cool this is &amp;#8212; this will pull up a list of twitter IDs of people who mention &amp;#8220;free market&amp;#8221; more then anyone else according to the congressional record:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;from sunlight import capitolwords
from sunlight import congress

for person in capitolwords.phrases_by_entity(
    "legislator",
    phrase="free market",
    sort="count",
):
    n = congress.legislators( bioguide_id=person['legislator'],
        all_legislators="true" )
    if len(n) &amp;gt;= 1:
        n = n[0]
        if n['twitter_id'] != "":
            print n['twitter_id']
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And the output:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;RepRonPaul
stevekingia
SenSherrodBrown
JacksonLeeTX18
SenatorLeahy
ChuckGrassley
SenJohnMcCain
OrrinHatch
DanaRohrabacher
JudgeTedPoe
McConnellPress
edtowns
SenatorDurbin
SenatorSessions
SenatorHarkin
SenChrisDodd
russfeingold
RosLehtinen
sencarllevin
senjonkyl
Dennis_Kucinich
senatorsanders
SenatorReid
RepDanBurton
RepMikePence
SenSamBrownback
joebiden
FrankPallone
ToddAkin
senatorboxer
RepTrentFranks
JohnCornyn
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Have fun!&lt;/p&gt;

&lt;p&gt;Show off what&amp;#8217;cha got, and please let me know if you do something cool!&lt;/p&gt;</description><link>http://blog.pault.ag/post/16793842255</link><guid>http://blog.pault.ag/post/16793842255</guid><pubDate>Mon, 30 Jan 2012 20:45:00 -0500</pubDate><category>sunlight</category><category>python-sunlight</category><category>debian</category><category>awesome</category><category>newlib</category></item><item><title>Hey look! Openstates data!</title><description>&lt;p&gt;&lt;img src="http://i.imgur.com/fklMK.png" alt="Sweet!"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://stateimpact.npr.org/ohio/tag/hb-136/" target="_blank"&gt;npr&amp;#8217;s site&lt;/a&gt; is using some &lt;a href="http://openstates.org/" target="_blank"&gt;OpenStates&lt;/a&gt; data, the project I&amp;#8217;m currently working on at &lt;a href="http://sunlightlabs.com" target="_blank"&gt;sunlight labs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you feel like affecting change in US politics, and know Python, we could use some help (it&amp;#8217;s a F/OSS project!) over on &lt;a href="https://github.com/sunlightlabs/openstates" target="_blank"&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Keep being awesome!&lt;/p&gt;</description><link>http://blog.pault.ag/post/16381179200</link><guid>http://blog.pault.ag/post/16381179200</guid><pubDate>Mon, 23 Jan 2012 20:25:41 -0500</pubDate><category>openstates</category><category>sunlight</category><category>cool!</category><category>npr</category><category>ohio</category><category>cleveland</category><category>debian</category></item><item><title>Dual-screen setup with aligned bottom edges</title><description>&lt;p&gt;For the sake of anyone else who&amp;#8217;s fighting their screens, I&amp;#8217;ve got a script that will do this (but very very slowly)&lt;/p&gt;

&lt;p&gt;setup script&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;xrandr --output VGA1  --auto
xrandr --output LVDS1 --auto
xrandr --output VGA1  --rotate left
eval "`monconf`"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;monoconf script&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/env python
import subprocess
output = subprocess.check_output(["/home/tag/.bin/mon.ls"])
output = [ item.split() for item in output.split("\n") ]

mons = {}

for mon in output:
    if len(mon) &amp;gt; 0:
        if mon[1] == "connected":
            res=mon[2]
            res=res.split("x")
            for item in res[1].split("+"):
                res.append(item)
            res.pop(1)
            mons[mon[0]] = res

BOTTOM_LEFT = "LVDS1"
TOP_RIGHT="VGA1"

LEFT_WIDTH  = mons[BOTTOM_LEFT][0]
LEFT_HEIGHT = mons[BOTTOM_LEFT][1]

RIGHT_WIDTH  = mons[TOP_RIGHT][0]
RIGHT_HEIGHT = mons[TOP_RIGHT][1]

print "xrandr --output %s --pos 0x%s" % (
    BOTTOM_LEFT,
    (int(RIGHT_HEIGHT) - int(LEFT_HEIGHT)))
print "xrandr --output %s --pos %sx0" % (
    TOP_RIGHT,
    int(LEFT_WIDTH)
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and the mon.ls command&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;xrandr -q | grep "^[^\ ].*" | grep -v Screen
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;All of this is super hacky, but it works.&lt;/p&gt;</description><link>http://blog.pault.ag/post/16187362529</link><guid>http://blog.pault.ag/post/16187362529</guid><pubDate>Fri, 20 Jan 2012 16:35:30 -0500</pubDate><category>hack</category><category>useless-script</category><category>debian</category></item><item><title>json / vim love</title><description>&lt;p&gt;Use vim? Check out some sweet vim exrc stuff for editing one-line JSON files:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;autocmd BufRead,BufNewFile *.json set filetype=json
command Js silent %!jp
command Jc silent %!jcompress
autocmd FileType json Js
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://github.com/paultag/dot-bin/blob/master/jcompress" target="_blank"&gt;jcompress&lt;/a&gt; and &lt;a href="https://github.com/paultag/dot-bin/blob/master/jp" target="_blank"&gt;jp&lt;/a&gt; are both on my github. Have fun!&lt;/p&gt;</description><link>http://blog.pault.ag/post/15698933492</link><guid>http://blog.pault.ag/post/15698933492</guid><pubDate>Wed, 11 Jan 2012 20:30:42 -0500</pubDate><category>json</category><category>vim</category><category>exrc</category><category>debian</category><category>hack</category></item><item><title>libolla (from the useless script department)</title><description>&lt;p&gt;Hello, World!&lt;/p&gt;

&lt;p&gt;Today&amp;#8217;s hacks come remotely, on the first day of my long trek to Cleveland. As many debian readers know, debian URLs are usually transmitted over IRC or email with some snappy abbreviations. Usually, you&amp;#8217;ll see something like:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Feel free to check out information about frob at wiki.d.o/Frob&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or something like:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I have uploaded package bar onto mentors.d.n for review&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What bugs me most about this is that I have to expand URLs by hand. Which is lame. Enter &lt;code&gt;libolla&lt;/code&gt; (a fitting name as well as a graceful nod to my alma mater &lt;a href="http://jcu.edu" target="_blank"&gt;John Carroll University&lt;/a&gt;&amp;#8217;s crest).&lt;/p&gt;

&lt;p&gt;When LD_PRELOAD&amp;#8217;d, it&amp;#8217;ll intercept and expand calls to &lt;code&gt;getaddrinfo&lt;/code&gt; transparently. It seems to work fine on SSH, and chrome (but I can&amp;#8217;t test well, since I&amp;#8217;m not on a real line).&lt;/p&gt;

&lt;p&gt;This was all hacked up in a few hours I had to spare, and without any sort of internet love, so I&amp;#8217;m willing to bet there are some bits that can be cleaned up (after all, the name of the blog is &amp;#8220;Peace, Love and C++&amp;#8221;, not &amp;#8220;Peace, Love and C&amp;#8221; - I don&amp;#8217;t clam to be a c expert ;) )&lt;/p&gt;

&lt;p&gt;So, feel free to fork the project on &lt;a href="http://github.com/paultag/libolla" target="_blank"&gt;github&lt;/a&gt; (or as I can now do - &lt;a href="http://g.c/paultag/libolla" target="_blank"&gt;http://g.c/paultag/libolla&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Now, I just need to find a way to globally pre-load this for apps that I start in my DE. Should be easy enough fiddling with some env-var files.&lt;/p&gt;</description><link>http://blog.pault.ag/post/14926850948</link><guid>http://blog.pault.ag/post/14926850948</guid><pubDate>Wed, 28 Dec 2011 13:32:51 -0500</pubDate><category>clevecation-201[1|2]</category><category>debian</category><category>hack</category><category>useless-script</category></item><item><title>Another post from the "Useless Script" department</title><description>&lt;p&gt;A while back I wrote some nodejs that mish-moshed email and web 2.0 long-poll action into a very ugly, but fairly up-to-date showing of debian changes. That is over on my server &lt;a href="http://pault.ag:8080/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The code&amp;#8217;s fairly simple, so I also wrote a python consumer &lt;a href="https://gist.github.com/1400681" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Since it&amp;#8217;s so simple, I&amp;#8217;ve pasted it below, too.&lt;/p&gt;

&lt;p&gt;Feel free to use (but please not abuse) my server :)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/env python

import time
import urllib
import json

service = "http://pault.ag:8080/tail"
lastts  = 0

def loop():
        global lastts
        while True:
                f = urllib.urlopen("%s?since=%s" % (service, str(lastts)))
                msgs = json.loads(f.read())
                for x in msgs['messages']:
                        print x['text']
                        if lastts &amp;lt; x['timestamp']:
                                lastts = x['timestamp']

loop()
&lt;/code&gt;&lt;/pre&gt;</description><link>http://blog.pault.ag/post/13454348090</link><guid>http://blog.pault.ag/post/13454348090</guid><pubDate>Mon, 28 Nov 2011 10:03:59 -0500</pubDate><category>debian</category><category>debwatch</category><category>useless-script</category><category>cli-porn</category></item></channel></rss>

