Search Results: "ron"

24 September 2006

Brett Parker: Eclim...

I've been looking at getting eclim working on my laptop... haven't yet worked it out, can't get the eclimd to run as expected - it's looking very much like I might need to actually do a central install which means creating a package (stuff does not get installed on this machine in central locations unless it's packaged, hopefully for obvious reasons) so I may take some time out to package it over the next week or so. As far as Java IDEs go, eclipse is where it's at, but I don't like the UI and so, being able to use the useful bits of eclim from a text editor that I use for everything seems to me like a fantastic idea... especially now that I'm editing more Java than previously - my current dev environment it purely vim with a reasonable vimrc that sets expandtab, sw=4, ts=4 to fit with the company policy on java development - would occasionaly be useful to use eclipse to manage various things for me though - so that's why I'm looking at it (thanks for pointing me at it Joe!).

Benjamin Mako Hill: PyBlosxom and Comment Spam

Over the past few months, I've dealt with something of a blog spam nightmare on Copyrighteous: my blog running the PyBlosxom weblog software. Wiser and less stubborn individuals might given up on either PyBlosxom or the ability to receive public comments. However, I find PyBlosxom unique in its flexibility and great ReStructured Text support and am always frustrated with others' blogs that don't accept comments. At the end of the day, I couldn't bring myself to part with either. Historically, my blogspam protection has been to use a simple weak CAPTCHA and to have my blog software email me each time a comment is successfully submitted so that I can (with a built-in macro in mutt) delete each spam comment that slips in. This has worked well for the last couple years. This summer, Mika pointed out that my blog was full of Chinese link spam that I had not noticed or been notified about. Around the same time, I realized that my website had been dealt a massive spam penalty by Google and was basically not showing up in any search results. I have spent a significant amount of time over the last month repairing the damage and working to prevent it from reoccuring. I'm documenting this process here in the hopes that it might save other time and energy. Upon reflection, the situation could have been prevented the in three relatively easy ways -- all of which I have now implemented.
  • Had the PyBlosxom comment.py plugin's mail function been working properly, I would have known that I was being spammed.
  • Had PyBlosxom been configured to only make blog entries (and not comments) indexable by search engines, Google and others never would have seen the link spam.
  • Had I installed a stronger CAPTCHA, I might have blocked the spam from being submitted in the first place (although at the expense of the participation in comments by visually impaired users).
A month or so, hours of work, and a Google reinclusion request later, my website is beginning to show up in search entries again. Hopefully this message will help save others from a similar fate. Fixing PyBlosxom's Comment Notification The most critical problem was a bug in PyBlosxom's contributed comment.py plugin and its comment notification system. In short, the email based comment notification system failed silently if the body of the email -- which included the full text of the comment -- included any non-ASCII UTF-8 encoded text. I've filed a bug against PyBlosxom and included a patch that fixes this issue. However, since this is a rather critical problem and because PyBlosxom releases tend to be few and far between, it might be worth patching your system now. My patch is against version 1.3 but can easily be modified and applied to version 1.2. Hiding Comments from Search Engines The major reason that the successful spam became a problem was that it triggered Google's abuse detector, resulted in a spam penalty, and made all of the (non-spam) material on my website more difficult for others to find. A simple way to prevent this is to hide all comments from the search engines. I've done this by creating a new PyBlosxom flavor that shows comments (and allows them to be input) which is not indexed by search Engines and to remove comments altogether from the default indexable flavors. To do this, I removed all of the comment-* templates from html flavor and created a new flavor called comment.flav that included the comment templates. I also had to make the comment submit action point to the new flavor and to change the "Comments: N" link to point instead to .comment flavor rather than the .html. The rest of the template is simply symbolic links to the the HTML template. The next step is to ensure that the comment flavor is not indexed by search engines. I found two ways of doing this and did both. The first was to add a "no index" meta tag to the header of each .comment page. It looked like this:
<meta name="robots" content="noindex, nofollow">
This is necessary because the robots.txt standard, the normal way to tell search engines not to index a page, does not support wildcards. Luckily, Google (and others I imagine) do support an extension to Robots.txt that allows you to use wildcards. To take advantage of this, I created a robots.txt for mako.cc that blocks indexing all of the comment flavor. The following robot.txt did the trick for me:
User-agent: Googlebot
Disallow: /copyrighteous/*.comment$
An Improved CAPTCHA Ultimately, the best solution would be to keep the spam from showing up on the blog at all. The only decent PyBlosxom CAPTCHA is the "nospam" plugin by Steven Armstrong. It is a simple image-based CAPTCHA and I was running it when I was spammed. It uses PIL but generates purely number-based strings and does some minimum obfuscation. Basically, spambots were able to break the CAPTCHA and toward the end, I was receiving thousands of pieces of a blog spam a day. I've incorporated the PIL image generation code from Mediawiki's ConfirmEdit/FancyCaptcha extension into nospam.py with this patch which I have also sent to Steven Armstrong -- nospam.py's original author. It's much stronger. Apologies, of course, go to all of my vision impaired users. Image-based CAPTCHAs really are evil. In this situation though with many thousands of attempts of a day, the alternative is that I will turn off comments altogether -- the standard (and poor) lesser of two evils argument. Ultimately, I will write a python implementation of a new strong text-based CAPTCHA I've invented that uses commonsense knowledge and pulls off some cool data acquisition in the process. I presented this project at the Wikimania Hacking Days and at a Media Lab open house for AAAI 2006 where I got universally positive and useful feedback. CAPTCHA inventor and recent genius-grantee Luis von Ahn seemed to like the idea too. I'll write more about this on another day though.

Junichi Uekawa: I now have a local version that works with SOAP.

apt-listbugs can query bugs.donarmstrong.com for bug details.It's not released, yet.

Martin-&#201;ric Racine: meme: top ten UNIX shell commands

My results for this meme: history awk ' print $2 ' awk 'BEGIN FS=" " print $1 ' sort uniq -c sort -nr head -10
     73 sudo
     67 update-web
     53 ssh
     51 nano
     44 ls
     25 dir
     21 upgrade-daily.sh
     17 cd
     13 requestsync
     13 more
Among the more unusual sightings, update-web is a Bourne shell script to update my APT repository and synchronize my homepage, and upgrade-daily.sh is another one to upgrade my whole cluster in a semi-automated way. Meanwhile, requestsync is a really neat Python script by Martin Pitt to request the synchronisation of Debian packages into Ubuntu, automatically fetching Debian changelogs and other relevant information to justify the request.

23 September 2006

Steve McIntyre: Film Review / Comment: An Inconvenient Truth

Just seen this at the Arts Cinema in central Cambridge this evening. It's a well-presented documentary showing Al Gore's lecture tour where he talked about the problem of global warming. He delivers a compelling message, with a fair amount of data to back up his conclusions. I only had a couple of issues with the movie: In my opinion, the conclusions from the movie are quite clear:

Simon Richter: Efficiency

I've mentioned democracyplayer a few times now. I really think the platform has quite some potential, however a number of things have to be addressed. For example, the system load while a download is active is between three and four. I have a certain feeling that this is related to the threads that paint the wonderful spinning arrows. Unfortunately, the load does not decrease when I put another window in front. Or play a movie. Seriously, what happened to the art of stopping pointless threads?

Junichi Uekawa: Using soap in ruby.

In hacking apt-listbugs and getting something usable out ofdebian.org machines, and to fight against the inertia of notallowing direct access to db-h, I decided to give theSOAPbackend a try.Apart from the problem of non-existing documentation and non-functional implementation,with much help from Don Armstrong, I got something working.Due to the fact that only one HTTP request is required for obtaining the bunch of bug reports, it might be actually suited for apt-listbugs. I'm a bit worried about the load, tho'.soap4r was also very much painful to work with, with its lack of useful documentation.

Lucas Nussbaum: Random chat using XMPP/Jabber, anyone ?

A Random Chat applet hit digg recently. It allows you to chat with a random stranger visiting the website at the same time as you. It’s a good idea, but it would really be much better to have something similar based on Jabber (and maybe it could become a Jabber killer app’ ?) Some thoughts: So, is somebody interested in working on this ? It would be quite easy to do with XMPP4R or another Ruby library. (This was from my list of things that I would really like to see implemented, but I won’t have time to work on it myself) Related links:

Steve McIntyre: Tenerife conference (continued)

I already started describing my time at JSLULL, the Free Software conference at La Laguna in Tenerife. It's been a few days since, and I'm now back at home and ready to summarise the rest. I should apologise up front that my memory of people's names is awful... :-( The slides from the talk are on my website now, in case anybody is interested, and my photos are up too. The original plan for Tuesday afternoon was to run a small Bug Squashing Party in one of the computer labs at ULL, but unfortunately this week the main internet link from ULL to Madrid had failed. It's a little difficult to work on bugs when you can't even get to the list, so we changed tack. Instead, I led a small workshop for interested people, demonstrating how to create Debian packages. About 8 people got involved, taking turns to drive the keyboard, ask and answer questions. People were keen to learn; there is a very active group in the University running the labs and other machines, and they were hoping to create packages of some of their own software to make maintenance and installation easier. I'm glad to help! ULL We went out to one of the beaches near Santa Cruz that evening, then headed back into the city later on for drinks and dinner. We had a very animated conversation about the use of Free Software in schools and local government, with the Spanish people and Knut Yrvin from Skolelinux trading interesting stories about their experiences. On Wednesday morning, a group of us rented a car and headed inland to visit El Teide, the huge volcano that dominates the Tenerife skyline. It's the first time I've ever looked down on clouds from the passenger seat of a car! We headed almost to the top, and visited the desolate plain just down from the last summit. It looked almost like a lunar landscape, untouched by water... Clouds! Later on that day, I headed back to the hotel in Santa Cruz and then on to the airport to catch my return flight to England. Carlos (again) had given up his time to chauffeur me around, and we chatting about all sorts of things while he drove south. Unfortunately, the flight was delayed by several hours because of mechanical problems. I would have been happy enough to have simply waited at the airport, but Carlos was having none of it. :-) He insisted we should go and have dinner together; we went for drinks at a beach bar, then up to his home village for a lovely meal. Eventually I caught my plane at 2:30am, and got back to England just in time to catch the rush hour traffic on the M25. Me and Carlos I spent a lovely couple of days in Tenerife, spending time and making friends with the very enthusiastic local Free Software hackers. I'd love to go back again soon and see more of the place. Thanks to all the of the people involved, you were very welcoming!

22 September 2006

Scott James Remnant: Upstart can now replace sysvinit

Today I reached another milestone in the development of upstart, the packages in universe can now replace the existing sysvinit package. Before trying this, make sure your installation is up to date as we’ve had to split out some parts of sysvinit into a new sysvutils package. If you’re up to date, and want to try it out, install the upstart and upstart-compat-sysv packages from universe. Note that the first reboot after you’ve installed the packages (from sysvinit to upstart) will be a little tricky … use reboot -f. If your system boots and shuts down normally, everything’s working just fine. Note that both will be somewhat more quiet than you’re used to, unless you have usplash running. Throughout the rest of this entry, I’ll try to answer some of the questions and comments that I’ve received since the last post. Events As I talked about previously, upstart is an event-based init daemon. Events are the primary force for having your services and tasks started and stopped at the appropriate time and in the appropriate order. So what are events and where do they come from? (Note that this part is under development, so may change in later releases). Events are just simple strings that may be sent by any process when something it is tracking the state of changes. They have no state or longevity, and if, when queued, they do not cause any job state changes, then they have no effect unless they are sent again. Jobs can list which events cause them to be started if they are not already running and which events cause them to be stopped if they are running. Multiple start and stop events may be listed, in which case the first to occur changes the job until the next one occurs. upstart itself generates the following system events: The shutdown tool included in the package also causes one of the following events to be sent once the “shutdown” event has been handled: Jobs also generate events whenever they change state, this is the primary source of events for ordering: And as mentioned, any other process on the system may send events through the control socket or just by using initctl trigger EVENT. For now this is just the event string, however it’s intended that the event may include other details including environment variables and even file descriptors. Typical example To clarify how it all hangs together, here’s an example (using fictional names) of how the tasks and events can be arranged to provide race-free mounting of filesystems. By breaking this job into these small tasks, we can see how the pieces fit together. Because everything is now done on events, there are no race conditions; we know that any filesystem listed in /etc/fstab will be checked and mounted. The only reason they wouldn’t be is if there’s an error of some kind, and that means you have larger problems anyway and the system administrator would have a shell to fix it. Of course, the moment they finish checking the filesystem and mount it, the boot process would carry on. There’s no reason that any of these events need to be generated by the upstart daemon itself, it can receive them from any other daemon on the system such as udev, acpid, etc. This keeps the focus of the init daemon narrow. A large part of the future development will be working out exactly what kinds of events we want init itself to generate, what kinds we want to come from elsewhere, and what the contents of an event can be. Getting Involved If you want to get involved with trying to nudge the direction of upstart development, you can join the upstart-devel mailing list at http://lists.netsplit.com/ Or if you just want to grab the source code, tarballs are published at http://people.ubuntu.com/\scott/software/upstart/ and the bzr archive is at http://bazaar.launchpad.net/\keybuk/upstart/main

Scott James Remnant: Upstart in Universe

upstart is a replacement for the init daemon, the process spawned by the kernel that is responsible for starting, supervising and stopping all other processes on the system. The existing daemon is based on the one found in UNIX System V, and is thus known as sysvinit. It separates jobs into different “run levels” and can either run a job when particular run levels are entered (e.g. /etc/init.d/rc 2) or continually during a particular run level (e.g. /sbin/getty). The /etc/init.d/rc script is also based on the System V one (and is in the sysv-rc package), it simply executes the stop then start scripts found in /etc/rcN.d (where N is the run level) in numerical order. Why change it? Running a fixed set of scripts, one after the other, in a particular order has served us reasonably well until now. However as Linux has got better and better at dealing with modern computing (arguably Linux’s removable device support is better than Windows’ now) this approach has begun to have problems. The old approach works as long as you can guarantee when in the boot sequence things are available, so you can place your init script after that point and know that it will work. Typical ordering requirements are: This worked ten years ago, why doesn’t it work now? The simple answer is that our computer has become far more flexible: We’ve been able to hack the existing system to make much of this possible, however the result is chock-full of race conditions and bugs. It was time to design a new system that can cope with all of these things without any problems. What we needed was an init system that could dynamically order the start up sequence based on the configuration and hardware found as it went along. Design of upstart upstart is an event-based init daemon; events generated by the system cause jobs to be started and running jobs to be stopped. Events can include things such as: In fact, any process on the system may send events to the init daemon over its control socket (subject to security restrictions, of course) so there is no limit. Each job has a life-cycle which is shown in the graph below: The two states shown in red (“waiting” and “running”) are rest states, normally we expect the job to remain in these states until an event comes in, at which point we need to take actual to get the job into the next state. The other states are temporary states; these allow a job to run shell script to prepare for the job itself to be run (“starting”) and clean up afterwards (“stopping”). For services that should be respawned if they terminate before an event that stops them is received, they may run shell script before the process is started again (“respawning”). Jobs leave a state because the process associated with them terminates (or gets killed) and move to the next appropriate state, following the green arrow if the job is to be started or the red arrow if it is to be stopped. When a script returns a non-zero exit status, or is killed, the job will always be stoped. When the main process terminates and the job should not be respawned, the job will also always be stopped. As already covered, events generated by the init daemon or received from other processes cause jobs to be started or stopped; also manual requests to start or stop a job may be received. The communication between the init daemon and other processes is bi-directional, so the status of jobs may be queries and even changes of state to all jobs be received. How does it differ from launchd? launchd is the replacement init system used in MacOS X developed as an “Open Source” project by Apple. For much of its life so far, the licence has actually been entirely non-free and thus it has only become recently interesting with the licence change. Much of the goal of both systems appears initially to be the same; they both start jobs based on system events, however the launchd system severly limits the events to only the following: Therefore it does not actually allow us to directly solve the problems we currently have; we couldn’t mount filesystems once the “filesystem checked” event has been recived, we couldn’t check filesystems when the block device is added and we certainly couldn’t start daemons once the complete filesystem (as described by /etc/fstab) is available and writable. The launchd model expects the job to “sit and wait” if it is unable to start, rather than provide a mechanism for the job to only be started when it doesn’t need to wait. Jobs that need /usr to be mounted would need to spin in a loop waiting for /usr to be available before continuing (or use a file in a tmpfs to indicate it’s available, and use that modification as the event). This is not especially surprising given that Apple have a high degree of control over both their hardware and the actual underlying operating system; they don’t need to deal with the wide array of different configurations that we have in the Linux world. Had the licence been sufficiently free at the point we began development of our own system, we would probably have extended launchd rather than implement our own. At the point Apple changed the licence, our own system was already more suitable for our purposes. How does it differ from initng? Initng by Jimmy Wennlund is another replacement init daemon intended to replace the sysvinit system used by Linux. It is a dependency-based system, where upstart is an event-based system. The notion of a dependency-based system is interesting to talk about at this point. Jobs declare dependencies on other jobs that need to happen before the job itself can be started. Starting the job causes its dependencies to be started first, and their dependencies, and so on. When jobs are stopped, if running jobs have no dependencies, they themselves can be stopped. It’s a neat solution to the problem of ordering a fixed boot sequence and the problem of keeping the number of running processes to a minimum needed. However this means that you need to have goals in mind when you boot the system, you need to have decided that you want gdm to be started in order for it, and its dependencies, to be started. Initng uses run levels to ensure this happens, where a run level is a list of goal jobs that should be running in that run level. It’s also not clear how the dependencies interact with the different types of job, a dependency on Apache would need the daemon to be running where a dependency on “checkroot” would need the script to have finished running. Upstart handles this by using different events (“apache running” vs. “checkroot stopping”). Again while interesting, Initng does not solve the problems that we wanted to solve. It can reorder a fixed set of jobs, but cannot dynamically determine the set of jobs needed for that particular boot. A typical example would be that if the only dependency on the job that configures networking is the mount network filesystems job, then should that job fail or notbe a goal (e.g. because there are no network filesystems to be mounted) the result is that network devices themselves will not be configured. You could make everything a goal, and just use the dependencies to determine the order, however this is less efficient than just ordering the existing sysv-rc scripts (which can be done at install time). Another example is that often you simply don’t know whether something is a dependency or not without reading other configuration, for example the mount network filesystems may be a dependency of everything under /usr or may just be a dependency of anything allowing the user to login if it just mounts /home. The difference in model can be summed up as “initng starts with a list of goals and works out how to get there, upstart starts with nothing and finds out where it gets to.” How does it differ from Solaris SMF? SMF is another approach to replacing init developed by Sun for the Solaris operating system. Like initng it’s a dependency-based system, so see above for the differences between those systems and upstart. SMF’s main focus is serive management; making sure that once services are running, they stay running, and allowing the system administrator to query and modify the states of jobs on the system. Upstart provides the same set of functionality in this regard, services are respawned when they fail and system administrators can at any time query the state of running services and adjust the state to their liking. Will it replace cron, inetd, etc? The goal of upstart is to replace those daemons, so that there is only one place (/etc/event.d) where system administrators need to configure when and how jobs should be run. In fact, the goal is that upstart should also replace the “run event scripts” functionality of any daemon on the system. Daemons such as acpid, apmd and Network Manager would send events to init instead of running scripts themselves with their own perculiar configuration and semantics. A system administrator who only wanted a particular daemon to be run while the computer was on AC power would simply need to edit /etc/event.d/daemon and change “on startup” to “on ac power”. What about compatibility? There’s a lot of systems administrators out there who have learned how Linux works already and will not want to learn again immediately, there’s also a large number of books that cover the existing software and won’t cover upstart for at least a couple of years. For this reason, compatibility is very important. upstart will continue to run the existing scripts for the forseeable future so that packages will not need to be updated until the author wants. Compatibility command-line tools that behave like their existing equivalents will also be implemented, a system administrator would never need to know that crontab -e is actually changing upstart jobs. Does it use D-BUS?
“To D-BUS people, every problem seems like a D-BUS problem.” —Erik Troan
The UNIX philosophy is that something should do just one job, and do it very well. upstart’s one job is starting, supervising and stopping other jobs; D-BUS’s one job is passing messages between other jobs. D-BUS does provide a mechanism for services to be activated when the first message is sent to them, thereby starting other jobs. Some people have taken this idea and extended it to suggest that all a replacement init system need do is register jobs with D-BUS and turn booting into a simple matter of message parsing. This seems wrong to me, D-BUS would need to be extended to supervise these services, provide means for them to be restarted and stopped; as well as deal with being process #1 which means cleaning up after children whose parent’s have died, etc. It seems far simpler to arrange for D-BUS to send an event to init when it needs a service to be started, and focus on being a very good message passing system. The IPC mechanism used by upstart is not currently D-BUS because of various problems, however it’s always been expected that even if init itself doesn’t communicate with D-BUS directly, there would be a D-BUS proxy that would ensure messages about all init jobs and events would be given to D-BUS and D-BUS clients could send messages to init to query and change the state of jobs. What is the implementation plan? Because this is process #1 we are changing, we want to make sure that we get it right. Therefore instead of releasing a fully-featured daemon and configuration to the world, we’re developing it in the following stages:
  1. Principal development; at the end of this stage the daemon has been implemented and can manage jobs as described.
  2. Replacement of /sbin/init while running the existing sysv-rc scripts. This is the shake-down test of the daemon, can it perform the same job as the existing sysvinit daemon without any regressions?
  3. /etc/rcS.d scripts replaced by upstart jobs. These consitute the majority of tasks for booting the system into at least single-user mode, and contain many of the current ordering problems and race conditions. If the daemon solves the problems here, it will be a success.
  4. Other daemon’s scripts replaced by upstart jobs on a package-by-package basis; this will be an ongoing effort during which upstart will continue running the existing sysv-rc scripts as well as its own jobs. During this time the event system may be tweaked to ensure it truly solves the problems we need.
  5. Replcement of cron, atd, anacron and inetd. This will happen alongside the above and result in a single place to configure system jobs.
  6. Modification of other daemons and processes to send events to init instead of trying to run things themselves.
The current plan is that we will be at least part of the way into stage #3 by the time edgy is released, with that release shipping with upstart as the init daemon and the most critical rcS scripts being run by it to correct the major problems For edgy+1 we hope to have completed stage #5 and be at least part of the way into the implementation of stage #6. From the start of development of edgy+2, no new packages will be accepted unless they provide upstart jobs instead of init scripts and init scripts will be considered deprecated. What state is it in now? The init daemon has been written and is able to manage jobs as described above, receiving events on the control socket to start and stop them. This has now been uploaded to the Ubuntu universe component in the upstart package for testing before it becomes the init daemon. We welcome any experienced users who want to help test this; install the package and follow the instructions in /usr/share/doc/upstart/README.Debian to add a boot option that will use upstart instead of init. If your system boots and shut downs normally (other than a slightly more verbose boot without usplash running) then it is working correctly. Other types of events will be added as required during development and testing. Currently only a basic client tool (initctl) has been written, compatibility tools such as shutdown will be written over the next week or two before it replaces our sysvinit package.

Jeff Bailey: Losing the geeky edge...

I think I'm loosing my geeky edge. I noticed today that my cable ISP offers a 20Mb/sec down package to which I could subscribe. It's $15 a month more than my 10Mb/sec package. The problem is that I can't think of what I would use that kind of speed for. The line already cheerfully holds my internet phone calls without a blip or a drop and apt-get routinely tells me that it's doing 1MB/sec.

It's *almost* worth bumping down to the 7Mb/sec down package, since it would save me $30/month, and I'm fairly certain that I would never notice. When I started with Videotron, that's what I had anyway. They've just been slowly bumping up the speed without charging me more.

Biella Coleman: Open Minds

Barely 3 weeks into my time in Edmonton, I am off to NYC, so that I can attend the following conference: OPEN MINDS: CULTURAL, CRITICAL, AND ACTIVIST PERSPECTIVES ON PSYCHIATRY. I resisted going, in part because I travelled plenty this summer, in part because traveling is such a pain now, but mostly because it somewhat preverse to hop over to NYC in a day for 3-4 days when it took me a week of non-stop driving to get out here in the first place! But the allure of the conference was too strong, so back I go, down south and out east.

21 September 2006

Baruch Even: IDE Roundup

Des Traynor made a very nice roundup of various IDEs and development environments. These were collected from friends of his and it was quite a shock to find Notepad in there!

Clint Adams: The Creek of the Edmung Fitzcarraldo

Ola and Kari Dunk stared down the vale and the vale stared back with contempt. That would look so much better with a six-lane highway lined with strip malls! they declared, and plunged down the hillside until they came to the hobbithole of The Right Reverend Mr.-or-Mrs. Frump. Frump, they said, We're gonna build a six-lane highway lined with strip malls right through here! Aren't you totally excited or some junk? What? Right here? You want to demolish my hobbithole and my Creek of Piety? Frump demanded. Like, yeah, the Dunks replied. But you'll have a new, better house. We'll get you a double-wide trailer and bolt it to the side of an Arby's and it'll be totally radical. Um, that doesn't sound better, grumped Frump. Yeah, it'll be awesome, the Dunks continued. But if you don't like it, there's no problem. We'll just demolish your double-wide and get you a pre-fab polystyrene shack that you can staple to the side of a Borders. Anyhoo, you have no choice, so you might as well just embrace it! As they moved down the line, they encountered people who were willing to part with their homes for a promise of progress, and people who were more resistant than The Right Reverend Mr.-or-Mrs. Frump. Days passed, and on each day a few people would climb to the Dunks' ch teau and plead with them not to demolish their homes, and on each day some people would circuit the homes of the vale, offering various opinions. One group comprised Fulano, Mengano, and Zutano, and one one occasion this group bivouacked on the prow of the hobbitboat Sloop Johnny Five. When Frangelico Admiral Lady Bernard da Gamboa approached to confront the trespassers, Fulano shouted, Ha! Ha! You are being divisive and not a team player! and Mengano shouted, Ha! Ha! You are fucking assholes for being uncooperative and preventing us from getting a Filene's Basement! Why can't you just submit to the demolition and see what happens? It can't possibly be that bad! and Zutano said, Ha! Ha! This is not in actuality a sloop! and Frangelico Admiral Lady Bernard da Gamboa chased them overboard with a sugar cane. Up in the ch teau, the Dunks were negotiating real estate contracts. This is totally gonna be good for the vale! said the Dunks, and Fast Food Franchiser LeRoy said, Damn right it's gonna be good for the... for the what? and Corporate Conrad said, Look, we need to get this construction underway before the end of the fiscal year, or there's gonna be trouble, so let's get this done soon, a'ight? So the Dunks donned their Amulets of Eminent Domain and waltzed deftly into the vale and muttered, Look, um, we can't build this highway all by ourselves, so you're gonna have to help us. Fulano, Mengano, and Zutano cheered. Karel Novak, go help Ola and Kari, while we argue about politics on Usenet! they cheerfully suggested, and Karel Novak joined the Dunks. Frump and da Gamboa gestured obscenely toward the demolitionists. Janez Novak (no relation to Karel) screamed out, HOW CAN YOU BE SO RUDE TO YOUR FELLOW HUMAN BEINGS? THEY HAVEN'T DONE ANYTHING TO DESERVE THAT! THEY ARE JUST TRYING TO HELP YOU! ANYHOO, THERE HAS BEEN CONSTRUCTION IN THE VALE BEFORE; HOW DO YOU THINK YOUR HOMES WERE BUILT? , Jon Dilianger-Heys prepared a nice mushroom salad, and Corporate Conrad tapped her watch.

Axel Beckert: IrDA and Sound on the IBM ThinkPad 760ED

Since I currently have Debian Sarge and a quite actual kernel (2.6.17.13) successfully running on my 10 years old Pentium-1-ThinkPad bijou, I today thought I could see, if I get the builtin infrared port working. Since lspci and lshw didn’t help much to find out the details about the IR port, I looked at Werner Heuser’s tuxmobil for such information. And I was right: tuxmobil listed all the necessary informations: It’s an internal serial port infrared device on /dev/ttyS0 working without any special driver. It seems to only need the kernel modules irda, sir_dev and irtty_sir as well as probably also the Debian package irda-utils. I could immediately play around with gnokii after configuring it ot use the right serial port and the right drivers for my Nokia 6310i. Also sending SMS via xgnokii worked. It was funny to be able to play ringtones on the phone by clicking around on a virtual piano keyboard. Inebriated by the success with IrDA, I decided to go on and try myself with the notorious Mwave DSP sound and modem card, which came with some of the ThinkPad 760 versions including my ED version. This didn’t start as easy as IrDA since tuxmobil this time writes: But MWave and some other sound technologies won’t work or are very hard to get working, e.g. booting to DOS, loading a driver, then using the soundcard as a standard SB-PRO. So you might need a commercial sound driver. Well, I too often noticed that negative information about hardware support in Linux found on the net with a search engine often is outdated and the formerly badly missed hardware support is available nowadays. So even not giving up on a 404 for a promising site, I found the no more existing webpage of the Mwave Project for Linux in the WayBack Archive. There I found a still working link to Thomas Hood’s Debian GNU/Linux on IBM ThinkPad 600X page which mentions tpctl, the ThinkPad configuration tools for Linux. And happily, they’re included in Sarge as package tpctl. Another link still worked, too: The one to Dale Wick’s Thinkpad under Linux page, which tell’s what I’ve expected: Some of the information on tuxmobil seems to be outdated, although Dave’s page mainly concerns the modem functionality of the Mwave DSP. So I first installed tpctl on bijou, then tried to compile the ThinkPad kernel modules from package thinkpad-source with my both current kernels, 2.4.33.3 and 2.6.17.13 using make-kpkg. The modules built fine for the 2.4 series kernel, but failed on the two latest 2.6 kernels (2.6.17.13 and 2.6.18), I’m mainly running. So I switched over to playing around with the 2.4.33.3 kernel. The thinkpad modules loaded fine and I get access to a lot of the ThinkPad’s special hardware. But tpctl at least doesn’t work as expected regarding Standby and Suspend: It has no effect while requesting Suspend or Standby using apm still works fine. But nothing to see in direction sound, modem or mwave. So I had a closer look at documentation around the mwave module. Tried to find out appropriate I/O and IRQ settings for the module, but what I found in the Linux ACP Modem (Mwave) mini-HOWTO didn’t help. The module just didn’t load. Then I noticed that module seems to need an mwave daemon. A search in the Debian package repository found the package mwavem. No long thinking – installed it. But the installation script gave the same errors when trying to load the module. man mwavem(8) gave the reason: Only the 3780i chip is supported. Earlier Mwave DSPs, which were used for sound generation as well as modem functionality, are not supported. Also according to the kernel documentation for the mwave sound module, the only way to get it making some sounds seems to be to boot to DOS, load the Windows 95 drivers, then call loadlin and warm-boot Linux from DOS. So native Mwave sound on IBM 760 ThinkPads under Linux is really still a dream while the Mwave modem is said to work nowadays. I will continue my ThinkPad 760 journey with a closer look at the pcspkr driver and at eBay, where I’ll look for another 760 series ThinkPad, but with ESS1688 soundcard and no modem instead of the Mwave DSP, e.g. a 760L, 760LD, 760EL, 760ELD or maybe also a 765L. But I won’t do that today. It’s already much too late. Should have gone to bed about two hours ago…

Now playing: Auld Lang Syne (monophonic on the phone :-)

Adam Rosi-Kessel: Unity Rally in Roslindale

Massachusetts held its primary election yesterday and strangely enough, my preferred candidate for governor, Deval Patrick, won overwhelmingly, by a nearly two to one margin over both of his competitors. In past years, the primary election has been followed by a “unity breakfast” the next morning so all the losing candidates can pledge fealty to the winner. As the breakfast has become a tired tradition identified with “old politics,” they did away with it this year (perhaps at Deval’s urging). Instead, again to my surprise, they held a unity rally about a block away from my house in Adams Park (no relation) in Roslindale. Deval was introduced by Boston Mayor Menino, a politican who has somehow turned a complete lack of public speaking skills into an asset: Deval’s speech was pretty great. A little something for everyone, and genuinely engaging. I attempted to record it on my pocket MP3 player, but apparently I ran out of batteries early on so it’s not worth posting. Although Deval has been cast as the furthest left of the candidates, I was struck by his extremely moderate position on most issues. (Standardized testing: good, but needs improvement; economics: need to have several bottom lines, including a profit bottom line and a people bottom line; personal responsibility needs to be balanced with societal responsibility; etc..) Anyway, the crowd loved it: Apparently there was no experienced political handler present to orchestrate this event. Deval’s charismatic speech was followed by several less important and less eloquent speakers. Usually, you would want to build up from worst to best. In any event, Chris Gabrieli, the second place finisher, has rebounded instantly and was up there committing to work every day until November on getting Deval elected — I won’t be surprised if Gabrieli ends up in a development-czar role in a Patrick administration. The last place finisher (and original frontrunner) Tom Reilly was nowhere to be seen, a fact that I’m sure will be prominent in tomorrow’s reporting on the event. Where’s the unity without the Attorney General? Everyone’s bracing for a horrid onslaught of fear-mongering campaign ads from the Republicans. My hope is that Massachusetts citizens are a bit wiser than the rest of the country and it will backfire. I won’t hold my breath, however. (As a side benefit, I finally met Adam Gaffin, universalhubmeister, for the first time, as well as his eight year old daughter Greta. Greta is now famous for rejecting Deval Patrick’s plan for longer school days.)

20 September 2006

David Welton: Who calls what how?

We're having quite an interesting discussion on the Hecl mailing list about the semantics and syntax of the language (since it's in its early days, we get to do that!). I have some questions for those of you reading this, if you have time to comment. Hecl inherits a lot of things from Tcl, which is both a simple, and amazingly flexible language. One of the things that Tcl lets you do is modify the value of a variable. For instance, set x [list 1 2 3] ; lappend x 4;. However, what is at times confusing for people is that to get the value of a variable, you place a dollar sign in front of the variable: lindex $x 0 would return 1 for instance. To some people this is all quite intuitive, because commands that modify the variable take its name, which is then looked up in a hash table and fiddled with as needs be. So we have constructs like if $n == 10 incr n . To other people, especially those who come from the Perl and PHP worlds, variables always have a $ in front of them, so the Tcl way of doing things doesn't make as much sense. Even for experienced programmers, it can at times require a moment to recall how a particular command works. lappend foo ; lrange $foo ; lset foo ; lindex $foo and so on. On the plus side, this is all very easy to implement, and really isn't that difficult to figure out. One avenue I've pursued with Hecl is to be able to pass references around, instead of variable names, so that all commands just take "a variable": lappend $foo x instead of Tcl's lappend foo x, and so on. For the moment, I've also enabled proc's (user defined commands/functions) to receive references to variables passed to them, so they can modify them. This is both powerful, and dangerous:
set x 1
proc foo  v   
    set v [* $v 10]
 
foo $x
puts "foo is $x" ;# $x is now 10
(Well, not exactly, but that's the general idea). We are considering ideas like marking the variables that may be modified in the proc definition to reduce the danger of people shooting themselves in the foot. In any case, it increases consistency, because commands that modify values always take a $variable. That still leaves commands like set foo 10 (others are proc, foreach, and catch) that take variable names to be created, rather than $variable $references, so perhaps to someone who comes from the world of PHP, it's still not as clear as it could be. We're also considering some radical changes, for the sake of not excluding any particular direction: taking a more lisp/ruby/python like approach, and not using dollar signs for variables (except perhaps in string interpolations). This has some slight disadvantages in terms of requiring quotes around more things (in Tcl, you don't need to quote single world strings). This might result in code that looks something like this:
proc test  name code result   
   catch code res
   if   eq res result    
       ok name
     else  
       fail name res result
    
 
proc testfiles  files   
   global ok
   global failed
   # clear success/error list
   set ok [list]
   set failed [list]
   foreach f files  
   puts "Running $f"
       source f
    
 
Which isn't bad, although in some places, I think the added syntax of $ helps to make it clearer, at a glance, what's what. eq $res $result is just that much quicker to pick out. This is especially true if you stash a command name in a variable. In other words, set p puts ; $p "hello world" might be a bit a bit clearer than set p "puts"; p "hello world", but... it's definitely "eye of the beholder" territory, and depends on what you're used to! In any case, it's been a very interesting process, and I've greatly enjoyed the company of Alexandre Ferrieux and Wolfgang Kechel on the list, as well as my friend Salvatore Sanfilippo. They're all very bright guys with good ideas, which makes for lots of thought-provoking discussions. Where you come in, if you've made it this far... is what kind of syntax and semantics you prefer, and why? Call by name? By reference? Modifiable values? Tell me what you think!

Bernhard R. Link: Trademarks

If everyone thought that accepting bogus obligations just to be allowed to name something by it&aposs name, take a look at Eric Dorland&aposs blog or directly into the new problems.

My vote for this: Call it firesomething or mffbrowser or some other free name once and forall. With some luck somebody will then also write a nice patch to have a common Debian ca-certificate handling. (I&aposm sick of having to do anything twice, especially if it includes writing mozilla extensions adding a ca-certificate every time a user loads its config as I&aposm ignorant in all this stuff to know any better way). Having things as similar as possible in different environments is a nice goal, but having working solutions and the right to implement working solutions is much more important...

Dirk Eddelbuettel: EarthWallpaper.org script, anyone?

A few days ago, the Kottke blog pointed to earthwallpapers.org. While being a most excellent site, it makes uses of a newer version of flash that doesn't run on my computer. But as it happens, the flash programming is merely a shiny (and arguably fairly pretty) 'menu' to the various picture at the Flickr tag set for earthwallpapers. Better still, the author uploads daily additions, see today's in 1280x1024 pixels. Now, I don't really know much about Flickr, but didn't they open some sort of API? Is there a way write a quick Bash, Perl or Python script to have cron download the current picture as a desktop wallpaper?

Next.

Previous.