Mutex vs. Semaphore
I just want to say that this sequence of blog posts by Niall Cooling is a great, detailed discussion about mutexes and semaphores.
I just want to say that this sequence of blog posts by Niall Cooling is a great, detailed discussion about mutexes and semaphores.
I’m currently reading Christian Benvenuti’s excellently written Understanding Linux Network Internals from O’Reilly which is helping to shore up my knowledge about how the networking stack is implemented in Linux. It’s a fantastic read so far, on course to match Linux Kernel Development by Robert Love, one of my all-time favorite books.
The following paragraph from Benvenuti’s book really made me step back and take a look at the bigger picture:
A device driver can also disable the egress queue before a transmission (to prevent the kernel from generating another transmission request on the device), and re-enable it only if there is enough free memory on the NIC; if not, the device asks for an interrupt that allows it to resume transmission at a later time. Here is an example of this logic, taken from the el3_start_xmit routine, which the drivers/net/3c509.c driver installs as its hard_start_xmit function in its net_device structure…
That passage is just brilliant. Count the occurrences of jargon there!
I guess i should read more arXiv papers to better understand how much larger the world actually is.
The following some XSLT sufficient to transform an OPML file into a list, ready for you to edit and post:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xhtml xsl xs">
<xsl:template match="body">
<ol><xsl:text>
</xsl:text>
<xsl:for-each select="outline">
<li> <a href="{@htmlUrl}" ><strong><xsl:value-of select="@text" /></strong></a> - your text </li><xsl:text>
</xsl:text>
</xsl:for-each>
</ol>
</xsl:template>
</xsl:stylesheet>
It isn’t 100% complete, but will get you a list of the form:
<ol>
<li><a href="URL"><strong>Title</strong></a> - your text</li>
</ol>
In a sane interface to an operating system, you can run the following to produce transformed output, given the XSL above and an OPML file:
$ xsltproc extract.xsl google-reader-subscriptions.xml
This was a post on the mailing list for the Moose object system for Perl:
Me on Twitter yesterday: “Had to hack Moose::Meta::Method::throw_error() to make it Carp::confess() to tell how an attribute constraint was being violated. Grrr.” and “T’was the attribute builder that did it.”.
This isn’t the first time that I’ve had to muck with throw_error() to tell what’s going on. Only showing the stack from the caller and up makes debugging harder.
Oh no. Is the Internet going to stoop to using Twitter for bug reports and requests for enhancements? I certainly hope not. 140 characters of gripe an RFE does not make.
At least he didn’t have to shorten his posts by removing random vowels.
I renovated some makefiles this week and found myself wanting to generate dependencies of a piece of code automatically from ‘gcc -M’. The existing Makefile had an explicit “make depends” step that would invoke ‘gcc -M’ for each of the source files. This is annoying because all generated Makefiles would have to be recreated if one file’s dependencies changed.
The GNU Make Manual has a section on automatically generating prerequisites, which only gets you part of the way.
I owe a good deal of gratitude to Tom Tromey and Paul D. Smith for creating and writing up instructions on how GNU Make can automatically generate dependencies for source files. They discuss even better ways of generating dependency files and build upon the GNU Make Manual method.
Thanks to Remko Tronçon for supplying a patch to mbsync to enable recursive synchronization.
mbsync supports bi-directional synchronization between a local Maildir structure and an IMAP server and is very pretty.
From the January 7, 2009 New York Times article, “Data Analysts Are Mesmerized by the Power of Program R”:
“I think it addresses a niche market for high end data analysts that want free, readily available code,” said Anne H. Milley, director of technology product marketing at SAS. She adds, “We have customers who build engines for aircraft. I am happy they are not using freeware when I get on a jet.”
Anne Milley, you’re doing it wrong.
I’ve started to use ratpoison on my netbook. I’ve made a script that displays a menu of power-related actions and the current state of the battery. Here is a screenshot:
[discharging 58%]
SLEEP
HIBERNATE
REBOOT
SHUTDOWN
LOCK
The script uses ratmenu to actually display the menu and uses dbus to send signals.
The most profound words I’ve seen today:
Subject: Re: [HACKERS] hstore improvements?
Date: Fri, 13 Mar 2009 17:35:29 -0400“David E. Wheeler”
writes:
> Is a more Perlish syntax out of the question?Yes. SQL is not Perl.
regards, tom lane