Search Results: "ed"

27 October 2010

Daniel Stone: how do i progammatically invoke aero peek on a window?

Whenever someone asks how to force their window to be raised to the top in X, because their program is so great that their users shouldn't be allowed to even see other programs, the answer looks a lot like the Windows equivalent:
Yes, I realize you wrote a program so awesome that all other programs pale in comparison, and that part of your mission is to make all the other programs literally pale in comparison to your program. Sorry. Maybe you can meet up with that other program that is the most awesome program in the history of the universe and share your sorrows over a beer.

Matthew Garrett: Other things

Yes, of course this took far too long to work out.

Joey Hess: three thousand lines of Haskell

Three thousand lines of code is not a huge program, but it is enough to get a pretty good feel for a language. Now that I've completed my first real Haskell program I feel that I've gotten over several of the humps in the learning curve and am starting to get a good feel for it. Actually, I've written closer to five thousand lines, since there were several big refactorings. One was when I stopped manually threading my program state around and added a StateT monad. I did know from the beginning I would need one, but it seemed easier and a better learning exercise to let the program start out with a vesigial tail and gills before growing up into a modern Haskell program. (I suppose it's still written in baby-Haskell, really..) Another refactoring came when I realized I needed to use a custom data type, not String, to represent keys. That was a great experience in type-based refactoring. Being able to keep typing ':make' and landing on the next bit of code that needed fixing was great, and simply adding that one type exposed several non-obvious bugs. I found myself writing code that is much more solid and reusable than normally comes easily. And yet it's also very malleable. Actually, pulling out better data types and abstractions can get a bit addictive. When I realized that I had a similar three-stage control flow being used for each of git-annex's subcommands, and factored that control flow out into a function that used the 3 data types below, I felt I'd gone down that rabbit hole perhaps far enough for now.
type SubCmdStart = String -> Annex (Maybe SubCmdPerform)
type SubCmdPerform = Annex (Maybe SubCmdCleanup)
type SubCmdCleanup = Annex Bool
(That will allow for some nice parallelism later though, and removed dozens of lines of code, so was worth it.) Since git-annex is a very Real World Haskell type program, there is a lot of impure code in it. I could probably do better at factoring out more pure code. I count 117 impure functions, and only 37 pure. Anyhow, from my perspective of a long-time perl programmer, some other random impressions..

Joey Hess: announcing git-annex

First there was mr, then etckeeper. Now git-annex completes my triptych of software tools that use git in ways that were never intended. Git's original tagline was "the stupid content tracker". Git-annex inverts that, by managing files with git, without checking their contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, checksumming time, or disk space. I've been working on git-annex for two weeks, and have been trusting my data to it for a week. Not a little data, but terabytes spread amoung multiple archival drives, file servers, laptops, and portable USB drives. In situations too complex for unison or rsync to be of much use. Applying git to this problem in an unconventional way has simplified things enormously. At this point it should be very usable, and solid. A package will be uploaded to Debian shortly; or git clone it.

Joey Hess: announcing git-annex

First there was mr, then etckeeper. Now git-annex completes my triptych of software tools that use git in ways that were never intended. Git's original tagline was "the stupid content tracker". Git-annex inverts that, by managing files with git, without checking their contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, checksumming time, or disk space. I've been working on git-annex for two weeks, and have been trusting my data to it for a week. Not a little data, but terabytes spread amoung multiple archival drives, file servers, laptops, and portable USB drives. In situations too complex for unison or rsync to be of much use. Applying git to this problem in an unconventional way has simplified things enormously. At this point it should be very usable, and solid. A package will be uploaded to Debian shortly; or git clone it.

Alexander Reichle-Schmehl: A big thank you to those involved in power management development

A couple of month ago, my step-father-in-law encountered quite some problems with the Windows installation on his Notebook and therefore showed a great interest in dem Linux da. So we installed him a Debian in a dual-boot setting. It was interesting to see how a basic school teacher (who is technical interested, but has no deeper technical knowledge of computers) worked with Linux, what problems he found, and how he solved them. But a big obstacle for him to work more or less entirely with Linux has always been power management problems with his notebook. To be more precise: While it was always possible to send his notebook into suspend or hibernate, it was also always impossible to wake the notebook up again. It seems that the (non-free but needed) NVidia driver was a part of the problem. Last weekend we again tried to solve the problem by installing the latest backported kernel and updating the NVidia driver, but failed again. So we decided, that with the squeeze being frozen for quite some time, it would be safe to upgrade his Notebook to that system. And believe it or not: It works! We can suspend the notebook without any problems and it will wake up again! And to his (and our) special delight waking the notebook up is a lot faster, than it used to be with his Windows (Vista?) installation. Not to mention that for some reason a suspended Linux-System seems to consume less power (he lend some kind of energy consumption measuring device from his power company to track energy saving potential, and while playing around, we also measured his notebook), than the suspended Windows on the very same system! I don't know why, but finally the installation of dem Linux da was a complete success :) So kudos to those who worked on that area :)

Raphaël Hertzog: What Debian & Ubuntu topics would you like to read about?

A woman enjoying this blogAfter having looked back at the first months of this blog, I also want to look forward and see how I can improve its content. If you re a Debian/Ubuntu user and/or contributor, I want this blog to be a truly useful resource for you. What kind of articles would you like me to write? I have lots of ideas but I can t do everything. I ll share some of them so that you can discuss them: Pleases discuss and share your ideas in the comments. Don t limit yourself to the above list, you know better than me what you need: tell me what kind of documentation was lacking in your daily usage of Debian/Ubuntu, or what could have been better explained while you tried to contribute to Debian/Ubuntu. While I set no limits on Debian/Ubuntu topics that I accept to cover, my main focus is around documentation for end-users and/or contributors. If you prefer you can also send your feedback with Identi.ca, Twitter or leave a comment in the entry for this article in my facebook page.

Flattr this Share/Bookmark 11 comments Support my work

Jonathan Wiltshire: Engagement

Last week I went to the sea side, and came back with a fianc e. Bliss.
Comments flattr this!

Alexander Reichle-Schmehl: (Delayed) Release Critical Bug report for Week 42

The bug webinterface of the Universal Debian Database currently knows about the following release critical bugs:
In Total:700
Affecting Squeeze:291
Squeeze only:72
Remaining to be fixed in Squeeze:219
Of these 219 bugs, the following tags are set:
Pending in Squeeze:16
Patched in Squeeze:44
Duplicates in Squeeze:24
Can be fixed in a security Update:15
Contrib or non-free in Squeeze:8
Otherwise fixed in Squeeze:27
Ignoring all the above (multiple tags possible), 125 bugs need to be fixed by Debian Contributors to get Debian 6.0 Squeeze released. However, with the view of the Release Managers, 173 need to be dealt with for the release to happen. Please see Interpreting the release critical bug statistics for an explanation of the different numbers. Connection to alioth.debian.org closed. PS: Due to an unscheduled downtime, last weeks statistics have not been published. But better late than never, here are the current statistics.

Gerfried Fuchs: Report from openSUSE Conference

Like you most likely know, I've been at the openSUSE Conference last week. I've been representing Debian through a talk about Debian - The Project and its Resources, covering services and resources that are usable and useful for other distributions too. The invitation to submit talks were sent to various projects and distributions because of the set topic on Collaboration across Borders for the conference. My impression was that very few distributions have followed the invitation, I am only aware of some Fedora people that have attended. Vincent Untz from GNOME gave a combined keynote with Cornelius Schumacher from KDE. The abstract of my talk and the slides are available from the conference website. The talk was well received and interested people also asked about some of the services like how our buildd network works, or whether the screenshots service has support for localized images too, or if it would be expandable for more general usage of non-Debian based distributions. One topic raised was with respect to the whohas tool: A mapping layer/tool/database for package names. We divert from upstream naming schemes for consistency reasons, like with our library, Perl and Python naming schemes. Other distributions have similar approaches but a different naming scheme. To make inter-distribution tools really useful it would require to have some layer that is able to map the package name from one distribution to another one. One idea for it that was thrown in was to use upstream homepage, but not all packages do have proper homepages, some only live in some git repository, others would either like to link to sourceforge's project page instead of the project's homepage, and other tricky issues. Something unique is clearly called for here and needed to get stored in the package's metadata. Apart from my talk and the occasional mentioning of openSUSE is on my desktop, but I run Debian on my server I noticed that the beverage of openSUSE is their own beer. Taste is a tough topic, personally I rather prefer our Debian wine. And I missed the chance to seduce them into playing Mao, I forgot to bring playing cards along. I hope to get a second chance at anoter event.

/debian permanent link Comments: 3 Flattr this

26 October 2010

Matthew Garrett: Fun facts

Number of contributors to gnome-shell code (ie, the js and src directories)40
Number of contributors to gnome-shell code who work for Red Hat8
Percentage of gnome-shell code written by Red Hat by lines91%

Which, I'll admit, does make it look like gnome-shell is controlled by the sinister Red Hat shadowman that rejects external contributions in order to keep a tight reign on the project and prevent Canonical from improving the desktop Linux experience. Let's check Unity.

Number of contributors to Unity code (ie, the unity and unity-priv directories)10
Number of contributors to Unity code who work for Canonical10
Percentage of Unity code written by Canonical by lines100%

Yup, it's a conspiracy.

Steinar H. Gunderson: Blog move

I moved my blog to another host and another pyblosxom version. Apologies if I flood Planet Debian. :-)

Jos? Parrella: Stumbling with Mono and C# applications in Linux

In the past, I ve helped customers run native Windows applications using emulation (wine) and/or virtualization, and in few cases, native support for C# by open source projects such as Mono. But, as it s been said, there are great benefits of having source code, and I recently worked around an issue in Mono by recompiling a whole .NET project in Debian. So here s a brief guide reviewing the issues that I found and how I solved each one of them leading to a natively-compiled C# application that runs seamlessly in Debian and Windows, and please remember I m not a C#/.NET/Mono developer: That said, I had a great time fiddling with this C# application and Mono on my Debian Sid laptop. I was able to properly compile without errors nor framework-related warnings, using an IDE such as MonoDevelop, and have a full-featured native binary that s interoperable.

Matthew Garrett: On copyright assignment

If the freedom to fork is good, if the person performing a fork should have all the rights and freedoms of the original upstream and if copyright assignments are reasonable in free software, how do I fork a project that requires copyright assignment, use an identical copyright assignment agreement and allow patches to be submitted to both my fork and the original upstream? Perhaps one of my axioms is incorrect?

Christian Perrier: Running geek results

OK, I still have to load my photos of Debconf10 somewhere. Shame on me. My gallery is broken (no longer allows uploads, even local ones!). Still, do you remember that we somehow mentioned that a small bunch of geeks did run together a local race at Debconf10? Indeed, a dozen of Debconf10 attendees did participate to the Van Cortland Track Club Summer Series run of Thursday August 5th. And all of us completed this 5km cross-country run in Van Cortland Park, in Bronx, turning it into the most international attendance of this local race. We now have the official results.. So please congratulate No l K the for finishing 17th scratch, 2nd in his category...or Gaudenz Steinlin being 32th only 41 seconds after No l. Or Iustin 107th, Gregory, 113th, Luca (and kilt) 140th, Maxy 163th, Marga 167th. Even /me though I finished 5 minutes after that Kevin british guy who I ran with the week-end before, dammit. Or whoever I'm forgetting (we were more than this, IIRC). Geeks can run. Fast, for some of them (I still need to have No l telling me about his last marathon).

Jelmer Vernooij: OpenChange server and SOGo

There's more good news on the OpenChange front. Julien has been working together with Wolfgang and Ludovic from Inverse recently to leverage the server-side support in OpenChange to provide native Exchange server support in SOGo. A couple of days ago we announced that there now is an initial version that allows the use of Outlook against a SOGo server through OpenChange.

<object data="http://www.youtube.com/v/oSZJ95YeXYE?fs=1&amp;hl=en_US&amp;hd=1" height="385" type="application/x-shockwave-flash" width="480"><param name="movie" value="http://www.youtube.com/v/oSZJ95YeXYE?fs=1&amp;hl=en_US&amp;hd=1"><param name="movie" value="http://www.youtube.com/v/oSZJ95YeXYE?fs=1&amp;hl=en_US&amp;hd=1"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"></object> (alternatively you can find the screencast here) As far as I know, this is the first time it's possible to actually use Outlook clients with a non-Microsoft Exchange-compatible server without the need for plugins on the Outlook side. And it's all Free Software. Of course, this is just a preview, and not something we'd recommend everybody to run in production yet. But it's exciting to finally see this come together. We already have OpenChange packages in Debian and Ubuntu but I hope I can help get SOGo packaged for both distributions as well.

Julian Andres Klode: simple code clang creates 1600x faster executable than gcc

The following program, compiled with clang 1.1, runs 500 times faster than the gcc4.5-compiled code (in both cases with -O2):
#include <stdio.h>
#define len 1000000000L
unsigned long f(unsigned long a, unsigned long b) __attribute__((noinline));
int main()
 
    printf("%lu\n", f(0, 2*len));
    return 0;
 
unsigned long f(unsigned long a, unsigned long b)
 
    unsigned long sum = 0;
    for (; a < b; a++)
        sum += a;
    return sum;
 
Now, I would be interested to see what s happening here. I took a look at the assembler code both compilers create, but the only thing I found out so far is that gcc s assembly is easier to understand 50 lines (gcc) vs 134 lines (clang). If someone knows the answer, please tell me. Also see http://lwn.net/Articles/411776/ for a C++ version that calls f() via boost::thread. Update: I also reported a bug at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46186.
Filed under: General

David Welton: Kindle?

I'm thinking about getting a Kindle, and I thought I'd write down some thoughts, even if they're a bit jumbled, and invite commentary. Good: One thing I really like, living here in Italy, is that I would be able to get English language books instantaniously, and not pay shipping or import duties on them. Whatever disadvantages there may be, that is a huge advantage. Closely tied to that: if we ever move back to the US, shipping all our books will be very expensive. Having some of them in an electronic format would lighten that load considerably. It's fairly cheap. At $180, it's not something I'd want to treat carelessly, but it's significantly less expensive than various existing tables. Long battery life means it's not something you have to worry much about. E-ink looks like it's easier on the eyes than LCD screens. I'm not sure, but also its slow update speed might be a "feature not a bug" in the sense that you're not so easily distracted by the internet being just one click away. Bad: I love having real, physical books in my house. I grew up in a house full of books, and I want the same thing for my daughter. I like being able ot look through them, pick one up, and read about something. Real books are very convenient, as long as you're not lugging around hundreds of them. I like not having to worry too much about dropping them, about getting a bit of water on one or that sort of thing. You can cart them around in a backpack with little worry, take them to the beach, and so on. As far as I can tell, Knuth's books are not available for, nor would appear like they do on paper. That's the golden standard for me: once "The Art of Computer Programming" looks good on an e-reader, it will be really and truly ready. We're not there yet. It's not general purpose. Like I said above, maybe this is good for reading, but there are also times when it'd be nice to have a general purpose device, with email, maps, applications, and so on. A while back, Amazon announced some sort of beta program for a kindle SDK. I haven't heard much of anything since. So it looks like it's not really possible to code for it, which is a bit disappointing. I like to have that option available, even if I don't always exercise it. Unknown: The pricing: sometimes Kindle versions are cheaper (especially, in my case, considering shipping, and, potentially, import duties), but sometimes they aren't, which seems a bit unfair, given that you cannot sell the book if you don't like it. I'm not sure how it would work out for me in the aggregate. Digital Rights Management, or DRM, means you can't, say, sell someone a "used" ebook. This is, in some ways, understandeable, because it's not like an e-book degrades with time as a physical one might. Were it possible to sell on your old books, that might radically change the market. I could see that having both good consequences (cheaper books), but also negative ones for authors (less money). I suppose this topic merits a post or two, or even an entire book of its own, because it's a complicated subject without, in my opinion, "easy" answers. Suffice it to say, though, that there are some drawbacks, but I suppose it's also nice that Amazon "knows" which books I have, so even if I switch to a different reader, I still have my books. And it's good that authors can get paid to work on a book. Not having actually bought it yet, I have no idea how it actually 'feels' to read a book with one. I love curling up with a good book, something I certainly can't do with my laptop. The Kindle looks light and small enough that it could work, but maybe it's just too high tech and sleek to provide that same comfortable coziness. Or maybe I'm just a luddite where books are concerned?
Do you have one? Do you use it? For all kinds of books or just certain kinds (technical books, cheap 'fun' reads, whatever...)? What's the experience like?

Sergio Talens-Oliag: Debian Squeeze, PowerPC and the Linux Containers

Two kids, their really busy mother and my paid job leave me without much time to blog or do Debian related work lately (well, at least on my free time, I do Debian related things at work, but mostly as a user, not as a developer). Anyway, a couple of weeks ago I decided it was time to upgrade my home servers to Squeeze and I did it, but it was harder than expected. At home I'm using two old laptops as servers, an old Aluminium PowerBook and an Asus EeePC; the Asus was installed to replace an older PowerBook (a really old one, BTW) that I was using as home server since my father gave it to me. The plan was to use OpenVZ on the Asus to move all the PowerPC services to a couple of Virtual Environments, but as I wanted to migrate and change almost all the services I never got enough free time to finish the job and when the old PowerBook hardware failed I replaced it with another PowerBook that I wasn't using anymore, but instead of reinstalling the machine I did a clean Lenny install using a kernel with support for linux-vserver (OpenVZ does not work on PowerPC) and transformed the old machine installation (it was an Etch installation at the time) into a Virtual Private Server that run on the new hardware. Having both systems running I upgraded the VPS to Lenny and, as usually happens, left the things as they were without consolidating the services into only one machine, as I initially planned. With this state of affairs I upgraded the Asus to Squeeze without much trouble (in fact I installed a kernel without OpenVZ support, as the services I use from this laptop were running on the host and not on a VE) and did the same with the PowerPC host, but to my surprise the linux-vserver VPS failed to start with a message that seemed to imply that the VServer support was not enabled. I should have filled a bug on the BTS then, but as I looked into how to solve the issue I found bugs saying that the meaning of the message was that I had no support for linux-vserver and I needed to start the VPS ASAP, as it was the machine that runs my SMTP server. Before doing a restore of my last backup I did some digging and found a lot of messages recommending to move OpenVZ and Linux-VServer virtual machines to LXC and decided to give it a try. First I built a container on the Asus and it worked OK, after that I did the same on the PowerPC, but the script failed; luckily the patch was trivial, the problem was on the /usr/lib/lxc/templates/lxc-debian script; it uses arch to get the Debian architecture, but for powerpc it gives ppc instead of powerpc, so it needs to be fixed on the script (Note to self: I have to submit bug + patch to the lxc package to fix it). After creating this container and trying it I tried to boot my old VPS with a LXC configuration: After a couple of tries I noticed that the system was not booting because it was missing the devices files needed; to fix it I copied the /dev directory of my first LXC test and using a chroot I also removed the udev packages from the container. After that last changes the machine booted as expected and all services were running OK. To summarize, I decided to do the move to LXC and fixed the configuration to boot the virtual machines on each restart: I know that LXC is still missing some functionality (I hate the way the container stop function kills everything instead of doing a run-level change, I guess I'll be using hacks until I move to a newer kernel with the proper support enters into Debian), but having the code on the mainline kernel is a great bonus and the user level utilities are good enough for my home needs... and I hope they'll arrive to a point where we'll be able to migrate the OpenVZ containers at work (we are using Proxmox and the support of the OpenVZ patchset is starting to worry us). On my next post: The Freak Firewall or The Story of a HA Firewall based on OpenBSD's pf running on Debian GNU/kFreeBSD hosts.

Ingo Juergensmann: Grub on RAID and Configuration

I've been running grub for quite a long time on my machine, but when I rebooted the other day, I noticed that there's currently a problem with the grub installation on my system: it doesn't boot anymore! ;) My machine has 3 drives, with an LVM for the data on a RAID5. Then there is another RAID1 for /boot. This worked all the years quite reliable with grub. Now grub complains that it can't find the kernel anymore. The reason seems to be (from /boot/grub/grub.cfg):
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=36213d56-67cf-428d-b801-4171fd9d6943 ro vga=775
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-amd64
For some reason I don't know there's a /boot in front of /vmlinuz... which prevents loading the kernel. There's a "set root='(md0)'" line in the config as well, but I assume that this is correct, because /dev/md0 is my /boot on RAID0. The rootfs is on /dev/md2, another RAID0. So, I can't set root='md2' because there's no /boot/grub directory in the first place. When I editing the linux and initrd lines in the boot prompt and remove the /boot, everything is fine and my system boots up just fine. Was there an intended change in grub-pc package that causes this behaviour or is ist just a plain bug?

Next.

Previous.