Wednesday, January 27. 2010
When building both cedet-1.0pre4 and -pre6 on Windows with cygwin and a fairly recent emacs 23.1-based Emacs-W32, a whole boatload of errors suddenly disappear when you make the following changes:
- in Makefile, change "EMACS=emacs" to "EMACS=runemacs"
- For good measure, also set "SHELL=bash", which is usually commented out
It goes without saying that it's a really good idea to disable any Cygwin version of emacs if you want to use Emacs-W32, too.
Sunday, December 20. 2009
I'm preparing for an intercontinental move over the next few months so my apologies but there will be even less posting going on here than usual. Nevertheless I haven't forgotten the blog and things will return to normal eventually.
So for temporary entertainment and my own "don't forget these links" extended storage solution, here are a bunch of interesting Emacs and C++ links I came across in the past few weeks:
Interesting presentation showing various compilers' ability to optimise code.
emacs-fu blog post on making Emacs buffer names unique using Uniquify. I like this much better than the regular <number> scheme.
Interesting article on C++ by Peter Seibel. His new book is definitely on my Amazon wishlist; I've got Practical Common Lisp and rate it highly, plus I've heard a lot of good things about this particular book.
Very cool article by Walter Bright about porting OptLink from Assembler to C. I've used Optlink in the past when I used Zortech C/C++ and Symantec C++ and it was impressively fast. It's good to see that Walter is trying to preserve the technology employed in it. Plus of course I'm a sucker for slightly weird projects.
Tuesday, October 6. 2009
highlight-changes-mode – as the name implies, it highlights changes that you make to a file. I do find it useful for the typical scenario of checking out a file, making a couple of smaller changes to it and then having to diff it to work out what you actually changed. As mentioned over at Emacswiki it doesn’t play too nicely with font-locking but I’ll try out some of the suggestions in the “Taming Highlight-Changes-Mode” section on this page. nxml-mode – my preferred mode for editing XML. Of course it would be better if I could be bothered to create schemas for some of the files I’m editing but even without them, it does a pretty good job. As it’s trying to parse the XML that you write, it’s very helpful when it comes to highlighting mismatched tags or auto complete tags. ido-mode – I’ve only recently started to use it and I’m still trying to work out if it is useful enough for me or if the improved file finding capability does bother me more than it helps. Yes, I know it can do a lot more but so far I’m only using the improved file finding and buffer switching. I really rate the buffer switching which is the main reason I leave it turned on. Not really a mode, but I like using bm.el for visible bookmarks. I don’t use bookmarks that often but the package is extremely useful when I do need them.
Tuesday, August 18. 2009
In a previous post I described that a few months ago, I moved the third party elisp code under version control to make it easier to move it between machines and ensure a consistent configuration across them. The one remaining problem to solve was putting the configuration files (.emacs and .gnus.el) under version control. One of the approaches I really liked was described by Nathaniel Flath but I figured that it was too heavyweight for my needs. What I ended up doing was to move the configuration files into version control and then simply change the basic dot-files to load the file from the subdirectory that is under version control. My .emacs now reads like this:
(load-file "~/emacs-lisp/dot-emacs.el")
Not the most elegant and automated version but it works for me.
Thursday, July 23. 2009
His latest essay contains some thoughtful analysis of the effect of interuptions due to meetings etc on (programmer) productivity. I've put "programmer" into brackets as I'm pretty convinced that this applies to most creative work, all of which requires continuous concentration to stay "in the zone".
Friday, July 3. 2009
I had another of these annoying mixed-mode DOS/Unix text files that suffered from being edited in text editors that didn't agree which line ending mode they should use. Unfortunately Emacs defaults to Unix text mode in this case so I had an already ugly file that wasn't exactly prettified by random ^M characters all over the place.
I also don't have the cygwin tools on the machine that I was seeing this problem on, I couldn't just run unix2dos or dos2unix over the file and be done with it, but at least I had emacs on that machine. So, emacs to the rescue again...
First, I used query-replace to get rid of the ^Ms in so the file was turned into a "proper" Unix text file. The trick here is that you need to use control-Q to quote the control character. In my case on a Windows box, the key sequence was M-Shift-% Control-Q Control-M and then use the empty string as a replacement value. Job done, we've now got a proper Unix mode text file. Well, after almost wearing out the 'Y' key but of course you can use replace-string instead.
In order to turn the Unix mode text file into a Dos mode one, run the command set-buffer-file-coding-system with the parameter undecided-dos and save the resulting file. Job done.
Wednesday, May 20. 2009
For someone who supposedly sucks at math this is a pretty good blog post on math, computers and wonderful issues you can run into: Coding Horror: Why Do Computers Suck at Math? The links, especially "What Every Computer Scientist Should Know About Floating-Point math" are well worth reading, too.
Sunday, May 3. 2009
I've finally bit the bullet and stuck my various Emacs third-party
libraries under version control in subversion. I don't normally modify third-party packages that I use but this allows me to quickly sync my Emacs configurations between machines. In order to make this work as smoothly as I intend it to work, there is one job left to do and that
would be to create a common dot-emacs file that gets loaded by the local variants so I can have both some basic common customisations and machine-specific configurations at the same time.
While collecting all the Emacs packages that I want to put under version control I've also updated the weblogger mode that I use for my initial blog posting when I'm posting out of Emacs - the workflow looks something like writing post in Emacs using weblogger.el, post to the blog as a draft, then do the final editing and cleaning up in Serendipity's built-in editor. The version of weblogger.el I'm using is the version by Tom Robinson that's mentioned on EmacsWiki. I'm not using weblogger mode exclusively - I've also got the ScribeFire extension for Firefox installed, which is very handy if I just want to throw out a quick post linking to someone else's blog post - but I do like the combination of weblogger mode with Flyspell-mode and Auto-fill as they add up to a very useful text-only blogging solution.
Monday, April 6. 2009
First, an interesting article by Bart Smaalders on how not to improve the performance of your applications. We have to keep reminding ourselves that at least some of the received wisdom of performance-oriented programming is no longer applicable on modern architectures. It also highlights nicely that the best performance optimisation is to sit down and think about the algorithm instead of attempting to squeeze out another couple of milliseconds by optimising the existing code. This problem is going to get worse the closer we get to the widespread availability of many-core systems (with many being noticeably larger than  .
Robert X. Cringley discusses Google's take on optimisation. Quite interesting as hardware cost is normally cheaper than programmer cost, hence the more usual approach of throwing another few blades at the problem. As some companies have found, the increased density of the hardware available might allow you to stick more processing power into your existing rack space, but the data centres build 5-10 years ago often aren't designed with that level of power consumption and heat in mind, so even if you have the physical space to house the hardware, the aircon might wave the white flag well before the racks are full.
Wednesday, March 25. 2009
I just saw this article on Herb Sutter's blog: RIP: SD Conferences « Sutter’s Mill
This is not good. I've attended SD West several times in the past and always enjoyed it. A good place to recharge your batteries after a year of working in your own little niche. I actually didn't attend this year's conference as the conference program looked rather cut down compared to the previous years and I couldn't really see enough interesting sessions to justify the cost of flying out there. I had hoped for a better programme at the autumn conference in Boston, but that now turns out to be a misplaced hope. A pity.
RIP SD, you've changed my life in more ways than a mere programming conference should...
In other, better news, Scott Meyers has been awarded the Dr Dobbs 2009 Excellence in Programming Award. Congratulations!
Wednesday, March 18. 2009
After the second Information Week with Dr Dobbs Report put in an appearance a few days ago I'm pretty much convinced that I will not renew that particular subscription as I certainly don't feel like I am part of the target audience anymore. This is a pity as I certainly was part of the target audience of Dr Dobbs Journal in the past.
Given that I have seen my favourite programming magazines disappear over time - first C++ Report, then C/C++ Users Journal, now Dr Dobbs - and am now a little short of my monthly reading fix, does anybody have a recommendation for a good programming magazine that covers a wide range of topics?
Saturday, February 28. 2009
I've blogged about the the demise of Dr Dobbs Journal as a print publication before. As I am a subscriber, the promised replacement in form of an issue of Information Week with Dr Dobbs report tacked on recently turned up in the mail. No emails regarding a new digital edition so far, though. I hope these emails havn't been caught in a spam filter, so if anyone has heard anything regarding a new digital issue, please let me know.
Anyway, back to the Dr Dobbs Report section in Information Week. Unfortunately the section - which is about virtualization - seems to be targeted at the same audience that the rest of IW is targeted at, namely CIOs and the like. I diligently read through it but there was only very little in there that I'd consider useful for a working programmer like me. That is a pity as the normal Dr Dobbs always contained a few articles that I found interesting, even if they weren't necessarily applicable to my day to day work. It doesn't come as a great surprise, but obviously I'm not massively pleased to have yet another good programming publication pulled out from underneath me and either not replaced at all (as with the C/C++ Users Journal - I don't think the promised additional content materialised in Dr Dobbs) or replaced with something rather unsuitable.
I'm hoping that there will be a digital issue soon and that it's back to its usual quality, otherwise I guess that this will be another subscription that goes into the bin. For the time being I'll be sticking to Communications of the ACM, ACM Queue and c't for my CS, programming and hardware fix...
While I can understand from a business point of view that magazines which do not generate enough revenue to make enough of a profit to stay alive have to be closed down, I'm beginning to wonder where developers will get information about new concepts from - book sales are down, there are fewer programming related magazines, etc. I don't really think that blogs are the answer to that either - there is only so much you can put into an blog post unless you're Steve Yegge, and while it's a good way to pick up fixes for immediate problems from blogs, Stack Overflow and through the usual Google searches, I think we're losing a valuable distribution mechanism here.
Thursday, February 26. 2009
I've believe I'm mentioned before that a lot of the projects I work on are cross-platform. Several of them are developed mainly on Linux with only a few changes are being made on Windows. On one of these projects I noticed that several test that are part of its test suite were failing when run on Windows but worked fine on Linux. Not only that, but they also failed with odd error messages.
Strangely enough they were failing in the test setup routines, all of which worked perfectly well on Linux. Not that they were massively complicated either, as they were just loading a configuration file or two. Nevertheless the load operation worked fine on Linux and promptly failed on Windows.
Continue reading "Subversion fun with symbolic links"
Wednesday, February 25. 2009
Alex Ott was kind enough to point me in the direction of an article he wrote on how to get started with CEDET. It's called A Gentle introduction to Cedet and I would certainly recommend reading it if you're interested in massively improving your Emacs/C++ environment. Of course the same goes for the other languages supported by CEDET but being mainly a C++ developer, this is of course where my main interest lies.
I guess I'll be downloading the development version of CEDET in the next couple of days then.
Looks like I unfairly blamed my update of weblogger-mode for stripping
out < and > from my HTML-formatted blog posts when I submit them
using the xml-rpc interface and thus rendering any sort of HTML formatting more than
slightly useless.
After some additional testing, it now seems that this is happening with
other clients as well, at least when I'm submitting new posts to the
blog. I think I should bite the bullet and update Serendipity to the
latest release and then test again. And if it still doesn't work some
PHP debugging might be in order. Oh well, looks like I blamed the wrong tool then...
|