Simon Richter: No more advertisements.
No more advertisements.
Hooray, the registration keys for BlogPlanet just arrived.
Hooray, the registration keys for BlogPlanet just arrived.
from gimpfu import *
def process (file):
img=pdb.file_xpm_load("/home/enrico/tmp/cazzeggio/"+file+".xpm", file+".xpm")
pdb.file_png_save_defaults(img, img.active_layer, "/home/enrico/tmp/cazzeggio/"+file+".png", file+".png")
# (update) added to dispose of the image to avoid gimp swap to grow
pdb.gimp_image_delete(img)
for i in range(1, 10000):
process("img_%05d"%i)
Tested in the gimp python-fu console, it works, with the save and load progress
bar popping up all the time grabbing the focus from whatever I was doing.
There is a run_mode that can be passed to those file_xpm_load and
file_png_save_defaults, however python-fu is happy to let me know that I don't
need to bother about it. I searched, searched searched and I found out that
this really means that there's no findable way to tell Gimp functions to STFU
with python-fu.
Now, how do I run that script AND be still able to use my computer?
gimp has a nice --batch commandline option, from which it seems to only
understand scheme. It has a --batch-interpreter option, but I couldn't find
out any possible value that could make --batch understand python.
So, it seems that the only way to run python is to either register a plugin, or
type it in the python console. And no STFU.
So I tried Xnest, so that I could at least iconise the whole thing out of my
way. But it seems that xnest is denying connection from all clients I try to
run in it.
So I've run a VNC server. In the VNC server I run Gimp. Then I fire up the
Python console inside that Gimp. Then I paste the script in the Python
console. Then it starts working and I close the VNC client to get rid of the
popups.
Finally, this script helps me delete the big XPM files after they've been
converted to PNG:
#!/bin/sh
for i in *.xpm
do
if [ -e basename $i .xpm .png ]
then
echo rm $i
rm $i
fi
done
If there were easier ways to do what I did, please mail me and I'll document
them: no matter how I searched, I couldn't find any.
Update: it seems that in the Gimp python script, the image doesn't get
automatically garbage collected. As a result, the file
~/.gimp-2.2/gimpswap.whatever keeps inflating, so space is not really saved by
converting the XPM files to PNG, unless I restart Gimp from time to time.
Update: I found a function to deallocate the image: maybe that avoids the
growth of the Gimp swap.
"Geldof said he dreaded seeing lots of e-mails in his inbox, as they imposed an agenda on him, and disrupted his own plans for the day."This doesn't surprise me in general (is there a less likely email fan?) but does he have a point? Over time, I've moved to treating emails as letters, essays or at least office memos. It's easy to treat them as conversations, but they are not, in so many ways. You can say things in conversations that will haunt you if you ever write them down. In conversation, people accept that sometimes you'll make comments without proper review and reflection, but it's assumed that you have considered your emails, even though most people don't seem to. This is part of why I think the Debian private email "declassification" proposal is unethical if applied to past messages. People didn't expect to have such a wide audience. Similar musings from techdirt, the Register, the Inquirer and Business Week Maybe see also thread patterns from see shy jo which could help you skip though low priority email sooner, and Online forum usage and other addictions, from Steve Pavlina. I wondered if the problems were new to online. Forums can be a bit like newspapers, but while you get a whole day to read a newspaper and there's one hell of a lag on the letters page, you can get a forum update by clicking at any time (even though new editions may be smaller) and your talk-back appears instantly on most forums. - Then someone reminded me about "news junkies" who buy all the newspapers and watch or listen to rolling news. Maybe this isn't a new problem. How was it solved in the past?
I got dropped off on the campus at the main reception. There I was able to store my luggage and I was kindly directed to the Mountbatten building, home of the school of MACS. There I met Fairouz Kamareddine and two of my direct colleagues: Manuel Maarek and Krzysztof Retel. Fairouz quickly arranged that I got registered as a HW(Heriot-Watt) student, got my MACS account, the accommodation, etc.
With keys, luggage and instructions I took off to the Lord Thomson Hall to find my room. At 17:00 I was completely settled in already. I met my (all Chinese) four kitchmates (yes, it’s a strange word) and went back to the university refectory for dinner. My room is a quite small, at least, smaller than I am used to (about half the area), but it has a bathroom (with shower), gets cleaned weekly and all the heating is included… so I am not complaining.
I must say that the people on campus are very nice. I can ask anyone if I need to know something and I always get help or a kind reply. There are really a lot of foreign students here (about 25%) who all share the same fate.
geek-fr category in this blog. The old geek category was renamed to geek-en for consistency, and both are now subcategories of a new geek category. I think that means you’ll get articles in both French and English if you just read geek. Same applies for the RSS feeds, so you may like to update your feed readers and aggregators (I already updated Planet Debian).
The new geek-fr subcategory will contain articles in French, as you’d expect, and will probably be more related to French-specific events.
I’ll post another announcement in French in a few minutes.
I could give many more examples of subsystems in Debian that exist at different point in the spectrum between locked down unix permissions and a wiki. There seems to be a definite pull toward moving away from unix permissions, once ways can be found to do so that are secure or that allow bad changes to be reverted (and blame properly assigned). Cases of moving in the other direction are rare (one case of this is the further locking down of the Debian archive server and BTS server after the server compromise last year).I think Joey’s focus on “unix permissions” is a bit misleading; you could make the same argument more generally by talking about permissive and restrictive regimes. Permissive systems have the obvious risk of vandalism in various forms, whether deliberate and malicious like adding false information to wikipedia, or well-intentioned contributions that are low quality due to simple ignorance or carelessness. On the other hand restrictive systems have the somewhat subtler risks that good contributions will be turned away because the restrictions are more effort than they’re worth, and that the time it takes to administer the restrictions start detracting from the time to actually do the work in the first place. So obviously there’s a tradeoff. But as well as that, there are ways of easing both risks: the risk of vandalism can be overcome if the stuff isn’t relied upon too heavily and can be changed relatively easily – so problems in unstable aren’t much of an issue since they can be fixed in a day, and don’t affect people running mission-critical systems because they should be using stable or testing or similar. Likewise, managing restrictions can be distributed too: the new-maintainer process is a good example of that, in that a range of people are involved in helping people pass through the qualification round, and in that sponsorship allows people who haven’t passed through the main lot of restrictions to get their contributions in by going through a different process. One interesting approach, to my mind, is worrying less about permissions and more about space – so that different people with different ideas on how to do things can do them independently. That’s part of the idea behind usertags and usercategories: rather than having people try to find an imperfect compromise, let them work on the same stuff in the way they actually prefer. That reduces the risk of carelessness, in that you stop having any reason to bother other people, and also reduces the problem of restrictions, in that if you don’t have permission to work in someone else’s area, you can just setup your own area and work there. Perhaps the worst problem is if the drawbacks feed on each other: a restrictive system turns away contributions, which causes prospective contributors to get frustrated and hence careless, which then reinforces the reasons that the restrictions were put their in the first place and diminishes the chance they’ll be reconsidered. That’s a hard cycle to break, but it’s not one where anyone really wins. I’ll leave the last word to Joey:
Anyway, the point of this is that, if you survey the parts of dealing with the project where Debian developers feel most helpless and unempowered, the parts that are over and over again the subject of heated discussions and complaints, you will find that those are the parts of the project where unix permissions still hold sway. […] The challenge, then is to find ways to open things up to everyone, without throwing security out the window. It has to be done a piece at time, and some of the pieces that are left are the ones most resistant to this change.
New article: Using Xen 3.0 on Debian Sarge [Fixed the broken link]. Nothing much else happening today. I woke up around 11AM and was just going back to bed when the postman came to deliver a lot of stuff from my wishlistNow the question is “Do I watch some DVDs, or go back to bed like I’d planned?” Two new books too - The Picture of Dorian Gray, the only film to give me nightmares as a child, and ‘Tales from the perilous realm‘ which will almost certainly have its cover copied into a tattoo at some point in the new year
![]()
emacs-snapshot-debian directory from this arch repository and use it as the debian directory inside the Emacs source tree
Then I had to edit out the build instructions for the -nox variant
of Emacs, as it didn't build properly, and to be sure, added
this to the Emacs-gtk confflags section of debian/rules :
emacs_gtk_confflags += --with-xft=yesAfter that,
fakeroot dpkg-buildpackage -b in the source directory,
and some time later, Emacs packages with anti-aliased fonts.
There are some limitations: you need to set the font in your
~/.Xresources file like this:
Emacs*font: Monospace-8You may also want to fiddle with the
Xft.dpi and Xft.hinting
X properties to get the fonts to match your desktop environment.
OK, so it's a bit of effort, but worth it. Hopefully this patch will
mature and make its way into future Linux distributions.
obj.count += 1 [...] obj.count -= 1 [...] if obj.count == 0: obj.destroyInstead of the far more descriptive (and well-encapsulated):
obj.register_user() [...] obj.unregister_user() [...] obj.destroy_if_unused()(or any one of a thousand other similar idioms). This is a contrived example, of course, and a real example would involve doing at least a dozen operations on an object's public attributes from another class (which results in class-associated logic being located in other classes in the system) instead of putting it in a method and calling that (thus keeping all of the logic with the data it's manipulating -- which is the point of OOP). Anyone who writes code like the first example above and calls it OOP is kidding themselves. Of course, you could make the code even more ridiculous with getter/setters:
obj.setCount(obj.getCount()+1) [...] obj.setCount(obj.getCount()-1) [...] if obj.GetCount() == 0: obj.destroyIncidentally, if you ever see anyone turn the first example into the last example and say they're "improving encapsulation", please do the programming world a favour and kill them. kthx. On the other hand, Steinar, you say "I'm not denying that getters and setters for a few variables might make sense", which clouds the issue immensely. The idea of routing attribute access through a method is immensely useful. It even has it's own name -- the Uniform Access Principle. A few examples are in order (you might already have thought of these, Steinar, but who knows who reads my dribblings!):
The following is dedicated to Og Maciel, whose life apparently would be empty and meaningless without it.Yo te hablo de poes a y vos me pregunt s a qu hora comemos. Lo peor es que yo tambi n tengo hambre.
There was a couple Not an underwater couple that controlled the sea But a couple of people on land Who courted one another with the magic of haiku They sent haiku across the country Every day Until the philotes Brought them together physically Then the Great State of California Pronounced them legally wed Because it either didn't know Or didn't care That poetry is supposed to rhyme.
The following is dedicated to Og Maciel, whose life apparently would be empty and meaningless without it.Yo te hablo de poes a y vos me pregunt s a qu hora comemos. Lo peor es que yo tambi n tengo hambre.
There was a couple Not an underwater couple that controlled the sea But a couple of people on land Who courted one another with the magic of haiku They sent haiku across the country Every day Until the philotes Brought them together physically Then the Great State of California Pronounced them legally wed Because it either didn't know Or didn't care That poetry is supposed to rhyme.
Next.