w Boris Johnson
to look him up at Wikipedia, or
m Wilmot ON
to see Google's map, or
to see Wiktionary's definition for this Chinese word.
Doesn't that just brighten your day? 🔆
|You're viewing pyesetz's journal|
Create a Dreamwidth Account Learn More
(Hi, porsupah! Thanks for stopping by again! You are the only person who has commented on my journal this year. In previous years, xolo was often the only commenter, but he seems to have left LJ now.)I decided in April that my Dell D620 laptop needed an OS upgrade. The major issues were:
Now it’s time to say So long! to Linux Mint Debian Edition with Cinnamon 201303 (“Jessie”) and say Hello! to Linux Mint 17.3 with Cinnamon (“Rosa”). I’ve been down this road before, so my hard drive is already partitioned into “/home” for files that should survive an OS upgrade, “/” for the OS, plus “/windows” for my dual-boot Windows 7.
April 28th: Finally get around to it: repartition /home to be 13 GB smaller, download Linux Mint 17, write it to a USB stick, boot it up, then let it install itself onto the new partition. Then reboot back to the familiar old system.
June 5th: Boot up the new “Rosa” system for the first time, after first saving copies of all the dot-files in my home directory (since Rosa will upgrade them and then Jessie won’t understand them anymore). Install some of my favourite Linux packages (emacs, wget, etc) and remove a few I don’t need (hplip, cups, bluez, etc). Then back to the old “Jessie” system, which still has those three problems forcing me to upgrade.
June 23rd: Time to get serious. The laptop’s ＦＮ keys for controlling volume and backlight do not work when logged in to Rosa/Cinnamon as ‘root’ (which I always do but it’s been deprecated for years). I futz around with it for a bit, but eventually decide to “act normal” and log in as an unprivileged user (this means that I can’t use my main Emacs session to edit system files). Firefox 47.0 works better with Reditr, although memory leakage is still excessive. Thunderbird cannot see my mail archives and Opera has lost my RSS feeds, but I decide that Rosa is good enough to use for now.
June 26th: Opera 38.0 is not very good. It has a wacky multi-level
menu system that can no longer be turned off, making bookmarks much less
accessible than they used to be. Also it seems that all support for RSS
feeds has been removed. Looks like Opera will need to be demoted to my
“backup browser”, even though Firefox does not have good support for search
accelerators (with Opera I could type in the address “w Boris_Johnson” and
instantly get a Wikipedia bio on this famous person, or type “e ProScan” to
get eBay listings for matching products).
I can’t figure out how to pull the list of RSS feeds from Opera’s data files, so I boot up Jessie (after switching my home directory to the saved dot-files) and start Opera to export the feeds as an OPML file. Back in Rosa (switching dot-files again), I start manually adding feeds from the OPML file to Thunderbird, then discover a poorly-documented feature Edit → Account Settings → Feeds → Manage Subscriptions → Import, which just happens to accept an OPML list of feeds to add. Those manually-added feeds are now duplicates, so I delete them.
Firefox has a tool called “Subscribe” (it’s hidden by default). It strongly promotes the use of Live Bookmarks for RSS feeds, but once you tell it to use /usr/bin/thunderbird instead then it Just Works™. Clicking on a link in Thunderbird opens the web page in Firefox, so these programs seem adequately integrated for my needs.
June 27th: Merge the old email archives into Thunderbird 38.8.0. This is a royal pain because disk space is now very tight on /home and so I can move only a few emails at a time. I delete the saved dot-files, which frees up a lot of space, but means I can no longer go back to Jessie. While I’m at it, I clean up the email archives for my seven years at Company 𝔾. It feels good to put that thing to bed, although it would be better if I had managed to find a replacement job by now.
June 28th: Java no longer works in the browser. This has been
deprecated for months, but I have IcedTea installed and it clearly
does start, but then a blank screen appears instead of the Java app. Same
behaviour in both Firefox and Opera. This is a problem. I use
to put trailing-stop protection on my stock trades, but it’s written in Java
and is now obsolete. I can still use
which is mostly plain HTML, but that is for “investors” rather than “traders”
and doesn’t offer trailing-stop orders. I could use
which is a .net app, but then I would have to reboot into Windows any
time I want to do something with the stock market.
But wait! One of the advanced new features of Linux Mint 17 is supposed to be improved support for VirtualBox. Maybe I could run StreetSmart Edge inside a paravirtualized Windows system inside a GUI window under Linux, just like all the cool kids do nowadays! It’s never worked for me before, but I try installing VirtualBox. It needs a Windows installation disk, so I download the Windows 8.1 evaluation as an .iso file, then write it to a USB stick. VirtualBox cannot reuse my /windows partition and needs several GB to create a simulated hard drive for windows, so I delete the .iso file to make room. Then it turns out that VirtualBox cannot use the USB stick and wants to simulate the installation disk using the .iso file, so I download it again. But Windows 8.1 refuses to boot inside VirtualBox, because my CPU is an old Centrino Duo which doesn’t have the VT-x instructions that Windows 8.1 requires when running in paravirtualized mode.
So I download the Windows 7 Starter .iso from this slightly-shady site, figuring that I’ll reuse the product key from my dual-boot Windows. But my officially-licenced product key is not accepted because it’s for Windows 7 Home Premium rather than Windows 7 Starter. So I get a key from this rather-shady site, which is accepted. But Windows 7 won’t install itself because it insists that the simulated hard drive needs at least 6 GB of space. (I remember when operating systems would fit on a single floppy disk! I used to use a computer whose entire hard-drive capacity was only 0.005 GB! So get off my lawn!) I decide to free up some space by deleting old Company 𝔾 stuff. The most useless stuff is non-final versions of slideshows for conference sessions, which surely I will never look at again (nor will anyone else). I try using an Emacs keyboard macro to select the non-final versions from a list of all conference-data files, but the list is long and the macro runs slowly. So I write a Lisp function to prune the list, which runs in an instant. It occurs to me that this is the first “computer program” I have written in many months.
June 29th: Windows 7 installs successfully inside the simulated computer, but it cannot access the
Internet. Google finds many people with similar problems, but most of their
“solutions” don’t work. It turns out that the default networking settings
for VirtualBox are not compatible with Windows 7, even though
there’s a drop-down menu with “Windows 7 (32-bit)” selected
so VirtualBox will know what kind of OS it’s supposed to be
supporting. The correct answer is to tell VirtualBox to use the
”Bridged Adapter” methodology and simulate the ”Intel PRO/1000 MT Desktop
(82540EM)” type of networking device, which is so old that even Windows 7 knows
how to deal with it.
StreetSmart Edge installs successfully and runs well. The “Live Chart” function correctly updates once per second to show the latest prices on Wall St. But the rest of my system lags a lot while VirtualBox is running. I improve this some by telling VirtualBox to simulate a computer with only 0.75 GB of RAM. (I spent most of my career writing software for computers with only 0.00003 GB of RAM, although those programs couldn’t do any fancy graphics.) I only have enough hard-drive space to store one “snapshot”, so I set it to resume to the moment when StreetSmart Edge asks for my username and password. I’m getting warnings that there’s *only* 1 GB of space available, so I invoke the wizard command “tune2fs -m 2” (kids, don’t try this at home), which reduces the /home partition’s safety margin from 5% to 2% and frees up another 2 GB of space.
June 30th: Begin writing up this document, which requires examining the log-files from the old Jessie partition. Some of the ”facts” documented above might be inaccurate because I didn’t keep careful records as I went along; sorry.
July 1st: Time to get rid of the old Jessie partition to free up 12
GB. To move partitions around on a hard drive you must boot from someplace
else, but my usual USB stick was overwritten with Windows 8.1, so I download
Linux Mint 17.3 again (meanwhile, Linux Mint has released version 18.0).
Write it to the stick and boot it up. Remember that I haven’t set up Rosa
to act as its own web-server yet, so save a copy of Jessie’s /etc
to Rosa in case I need it. Then use gparted to delete Jessie,
make /windows be 1 GB bigger, and put the rest of the released space
into /home. This requires moving 21 GB from one spot on the hard
drive to another, which takes half an hour. Despite all the warnings that
this could make my hard drive unbootable, Rosa boots up just fine. Windows
also boots correctly, after first spending a lot of time on chkdsk
which finds no problems.
So now all that’s left is to remove Jessie from the boot menu, since that menu item no longer points anywhere. I use the wizard command “grub-mkconfig” for that. All done! Happy Canada Day!
I had a drawdown a few weeks back, for which the standard response is “stop trading and start analyzing”. So I wrote an analyzer program, because — unlike stock-trading — that’s something I actually know how to do. My program looks at weekly historical data for a stock and uses rules to calculate what the buy and sell prices would have been; from those it computes, for each week, how long the stock would have been held if bought then and what the profit would have been. That was the easy part.
Then I added calculations for various technical indicators such as MACD. Doing this required that I learn how those indicators really work. MACD is especially difficult because it is the difference between two exponential moving averages, and EMAs are very sensitive to round-off error. I don’t know how people managed to calculate these things back in the olden days of pencil and paper: if you make an arithmetic mistake in your EMA, it will continue to screw up your results for more than a year afterward.
To avoid having to write a graphing module for my program, I tried to make my indicators produce the same values as the indicators at StockCharts.com so I can use their free charts to display my results. This was mostly successul except that I think their values for Parabolic SAR are bogus and I refuse to match them; whenever a stock has a wide-ranging week following by several narrow-range weeks, from then until the next stop-out the pSAR values shown on their charts are just way too low in my opinion. But I got everything else to match, down to at least one decimal place and usually two.
Now the creative part: I assigned limit values for each indicator. If the indicator was on the wrong side of its limit, that meant the stock should not be bought. For each week, if none of the indicators said “do not buy”, then my program would pretend to buy the stock and see how it would have done. Then I used a technique much like simulated annealing to adjust the limit values for maximum gain. Result: only 1% of weeks were selected for purchase and those weeks yielded a 6% gain on average. Then I doubled the number of stocks being analyzed (from 50 to 100). Result: average purchase yielded a loss! So I tweaked the limit values some more and got the average gain up to 4% per purchase.( additional boring verbiage )
Well, there's the Furry Fandom. I have received some LJ comments I should answer. The KW furmeets continue, but I think I'll wait for warmer weather before attending another of those—they meet *outside* at a plaza and then stand around in the cold deciding which restaurant to go into.Computers
My laptop is working reasonably well, but the suspend/resume performance is disappointing: Linux takes 14 seconds to resume, while Windows gets it done in two seconds. Unfortunately, the Linux-on-TOUGHBOOK community is much smaller than the Linux-on-ThinkPad community I used to be in, so it's much harder to find and copy the fixes that others have discovered. Linus recently blogged about how soul-crushingly hard it is to figure out the root cause of a suspend/resume failure and how much better life is after you do it. (And don't miss his post about Christmas toys!)
My laptop has 512 MB of RAM, which is considerably more than any other computer I've ever owned, but still it seems not to be enough. When I run Emacs, Opera, Kmail, and OpenOffice all at the same time, there's a whole lotta page-swapping goin' on—so I avoid running OpenOffice. Apparently all those cute 3-D desktop effects that I've enabled eat up a lot of RAM. Some sources say that the CF-Y5 laptop is picky about specific chips on memory-expansion cards and only certain cards will work (the ones *they* sell, of course), while other sources say that any old 172-pin PC2-4200 microDIMM DDR2-533 card will work. These days a 1 GB card costs about $80. I'm so old, I remember paying $1000 for a 5 MB hard drive!
More problems: occasional failures to repaint one of the GNOME panels after resume, and occasional failures in the gnome-system-monitor app which just stops updating until I change something its “Properties” panel. My guess is that some inter-process signal is getting lost due to timing issues. I just want to repaint the screen, but I searched all over Google and couldn't find a simple repaint-the-screen app for X11. The old twm window manager had a "repaint" menu function, but apparently that isn't supposed to be needed anymore. So today I received an email from the “emacs-devel” list where somebody complained that Emacs was leaking memory and as proof they provided their output from the xrestop command. I don't have that command installed, but I *do* have one called xrefresh which begins with the same letters. Duh! So now I've set up a menu command for repainting the screen (the problems haven't come up since, so I don't know yet whether this command will fix anything).
And why are there no screenshots for gnome-system-monitor, anywhere on the web, that show its "closed" form where it pretends to be perfmeter? (See perfmeter screenshot halfway down the page.) It's like some sort of conspiracy or something...Politics
Speaking of conspiracies, did you know that the Bush Administration ended last Friday? That was the last workday for most Bushies, who turned in their badges and went home for the last time. The government is running on skeleton staff during this MLK Jr. weekend until Tuesday's inauguration.
So Obama flew from Washington to Philadelphia so he could then take the train back. One pundit, at a loss to explain why the Commander-in-Chief-elect did this, suggested that “His magic carpet was presumably out of order.” Obama’s official explanation had something to do with following in the footsteps of Abe Lincoln, who killed 600,000 of his own countrymen in an avoidable war, suspended Habeus Corpus, depropertized the slaves of Southern landowners without eminent-domain compensation, and wrote some really nice speeches.
Look, I'm all in favour of having Hope for Obama to bring some Change that the whole world can Believe In, but the guy is obviously a power-mad lunatic just like anyone else crazy enough to run for the presidency. His nuclear-weapon policy makes perfect sense for a guy who is eagerly looking forward to being in possession of the nuclear football, that magic talisman of Presidential Power, the One Ring of invincibility, the only reason (that I can think of) why nobody ever dared to arrest Bush despite his national-TV admissions of criminal acts. And WTF is going on with Obama's TARP policy? So he doesn't want transparency in government after all?
Have I mentioned that I do not like Perl? Yes, I think I have. Well, I'll say it again. Non-programmers should skip this post, which is just a long drawn-out whine about how Perl makes computers unnecessarily difficult to operate.
Today's job: install Bugzilla. Bugzilla has a neato feature where you can send it email and it will make a pretty bug report out of whatever you say. How do I know that? Wikipedia said so back in October (and I have a citation in an email to prove it), but there's no mention of it there now and no mention in the Bugzilla configuration manual. It's in the API manual.
So there’s this program that's supposed to read the email, which means I have
to tell the email system that all email received on behalf of some
nobody-would-ever-guess-it address should be processed by this program rather
than being held for someone to read. My laptop
uses postfix, so all I have to do is add this line to file
“/etc/aliases” and then recompile the aliases database:
Where the | character means “run this program when mail is received for email@example.com”.
Okay, now send a test message to the special address. Fail: Permission denied. Set the ‘execute’ permission bit on the program file. Fail: Permission denied. Allow userid ‘nobody’ to access the program’s parent directory. Fail: Can’t find module Bugzilla.pm. Add a use lib statement to the program—didn't anybody test this thing? Fail: Can't find module Email::Reply.
Well, I guess that’s a reasonable error.
Bugzilla’s checksetup.pl script had warned me that module
Email::Reply was missing but optional. It even told me the exact command
needed to install it:
/usr/bin/perl -MCPAN -e 'install "Email::Reply"'
Piece of cake! So I intone the command as instructed. Fail: Can’t access server ftp://ftp.perl.org/CPAN. It's down for Christmas. But ftp://cpan.org is up and has the same data—and Perl helpfully tells me the comand to use to give it an alternate server: 'o conf urllist push ftp://myurl/'. But it doesn’t tell me *where* to enter this command! I try /usr/bin/perl -MCPAN and enter the command o conf urllist push ftp://cpan.org/. Fail: Bareword found where operator expected. Maybe quotes around the URL? Fail: Syntax error. Okay, I don’t speak Perl (apparently the correct answer is q[ftp://cpan.org], which is both ugly *and* materially different from what was said in the hint) so I add a line to /etc/hosts to make outgoing requests to "ftp.perl.org" actually get sent to "ftp.cpan.org" (try *that*, Windows® mavens!). This produces a cascade of error messages (because cpan.org is not equivalent to perl.org, but to perl.org/CPAN, so all the URL paths are wrong) but somehow it manages to download the file anyway!
Okay, now send the test message again. Fail: Permission denied, file /etc/bugzilla3/localconfig This is going to be a problem. The program is getting run as userid ‘nobody’ but all of Bugzilla’s files are restricted for access by userid ‘www-data’. I try fiddling around with the permissions a few times, but Fail fail fail: denied denied denied. I set the sticky-userID bit on the program. Fail: cannot exec sperl. Install Ubuntu package “perl-setuid”. Fail: Insecure dependency on chdir at line 31 of email_in.pl. Didn’t anybody test this thing? How can it possibly work without setuid, and how can it possibly work *with* setuid if they didn’t write it with the extra care required for such programs? The reason why it is calling chdir() is because it wants to include some subprograms from the same directory where email_in.pl is stored. In other words, it is assuming that the current directory is part of the library include path, which is absolutely not true for setuid programs.
So clearly this program is not supposed to be setuid. Postfix has a way to set the userid for subprograms that it runs, but I can’t figure out how to do that for programs specified using | in /etc/aliases. Maybe I should just install this thing on Company 𝔾’s server, which uses qmail instead of postfix. So I install Bugzilla there and configure it the same as on my laptop, including the feature “automatically compress BMP attachments to bugs as PNG”. Fail: Can’t find Perl module ImageMagick.
Okay, again this missing module is identified by checksetup.pl, which tells me to use one of those -MCPAN commands to install it. By now, perl.org is back up, so I don't have that problem again. It offers me a selection of mirror-servers and I select “carroll.cac.psu.edu” because it's first on the list. Oops! Apparently PSU doesn’t really have the CPAN files anymore—I get a cascade of errors and instructions to use "o conf urllist" again. Well, I know *that* won't work, so I scroll back through my Emacs shell buffer to find where it said “commit: wrote /usr/lib/perl5/5.8.8/CPAN/Config.pm” and then I edit that file to name one of the other mirror-servers. It successfully downloads the module but then Fail: cannot compile. Install Fedora package “ImageMagick-devel”. Fail: cannot find directory /usr/include/ImageMagick. Fuck CPAN and just install Fedora package “perl-ImageMagick”. Success!
So next I should try getting that program email_in.pl running under qmail on the company’s server, but it’s too late at night now. Fail: programmer time exhausted.
|(click to embiggen)|