Ways that I have lost the source code for installed programs
When I compared Go to Python for small scale sysadmin tools , I said that one useful property for Pythonwas that you couldn't misplace the source code for your deployedprograms. This property recently hit home for me when I decidedthat maybe I should rebuild my private binary of my feed reader for reasons beyond the scope of thisentry, and had to try to find the source code that my binary wasbuilt from. So here is an incomplete list of the ways to lose (insome sense) the source
I frequently use dependencies because they enable my programs to exist
I was recently reading Drew DeVault's Dependencies and maintainers ,which I encourage you to read too (it's short). To me, the climax ofDeVault's post is the following:
[...] The idea of depending on a library I’ve never heard of,several degrees removed via transitive dependencies, maintained bysomeone I’ve never met and have no intention of speaking to, is absolutely nuts to me. [...]
I can't speak for anyone
The drawback of having a dynamic site with a lot of URLs on today's web
Wandering Thoughts , this blog, is dynamically generated froman underlying set of entries ( more or less ).As is common with dynamically generated sites, which often have adifferent URL structure than static sites ,it has a lot of automatically generated URLs that provide various waysof viewing and accessing the underlying entries, and of course itcreates links to those URLs in various places. Once upon a time this wasgenerally fine and I didn't think much about it. These days my attitudehas changed and I'
What 'is' translates to in CPython bytecode
The main implementation of Python, usually called CPython , translates Python source code into bytecodebefore interpreting it. How this translation happens can makesome things fast, such as how local variables are implemented . When I wrote in yesterday's entry that having ' is ' as a keyword can make itfaster than if it was a built-in function because as a keywordit doesn't have to be looked up all the time just in case youchanged it, I wondered how CPython actually translated ' a is b
The place of the 'is' syntax in Python
Over on Twitter, I said :
A Python cold take (given how long it's taken me to arrive at it):'is' should not be a keyword, it should be a built-in function thatyou're discouraged from using unless you really know what you'redoing. As a keyword it's too tempting.
Python has two versions of equality , in == ,which is plain equality, and is , which is object identity; ' a is b 'is true
What we do to enable us to grow our ZFS pools over time
In my entry on why ZFS isn't good at growing and reshaping pools , I mentioned that we go to quite some lengthsin our ZFS environment to beable to incrementally expand our pools. Today I want to put togetherall of the pieces of that in one place to discuss what those lengthsare.
Our big constraint is that not only do we need to add space to poolsover time, but we have a fairly large number of pools and whichpools will have space added to them is unpredictable. We
Some unusual and puzzling bad requests for my CSS stylesheet
Anyone who has looked at their web server's error logs knows thatthere's some weird stuff out there (as well as the straightforward badstuff). Looking at the error logs for Wandering Thoughts recently turned up some people who apparently have unusual ideas ofhow to parse HTML to determine the URL for my CSS stylesheet.
Wandering Thoughts has what I think of as a standard element in its for my CSS stylesheet:
Continue reading...
Finding out what directories exist with only basic shell builtins (a Unix shell trick)
Back in the old days of multi-architecture Unix environments , generally no two Unix vendors couldagree on what should be in your $PATH . The core of /bin and/usr/bin was the same, but everyone had their own additionaldirectories ( Solaris had a lot of them ).In addition, different local computing groups had different viewson where local programs should go; /usr/local/bin, /local/bin,/opt//bin, /
Some notes on Python's email.header.decode_header()
I've recently been investigating some oddly encoded MIMEContent-Disposition headers that were turned up by our Python-based system for recording emailattachment type information . As part ofthis I wanted to decode those RFC 2047 encoded-words , obviously usingPython because that's what we were using to start with.
Under normal circumstances, you're apparently supposed to read ina whole email message into an email.message.EmailMessage and then dig through it. I did not have a whole email
Some effects of the ZFS DVA format on data layout and growing ZFS pools
One piece of ZFS terminology is DVA and DVAs, which is short for DataVirtual Address. For ZFS, a DVA is the equivalent of a block numberin other filesystems; it tells ZFS where to find whatever data we'retalking about. The short summary of what fields DVAs have and whatthey mean is that DVAs tell us how to findblocks by giving us their vdev (by number) and their byte offset into that particular vdev (and then their size). A typical DVA might say that you
Menu