Search Results: "ag"

17 June 2006

Carlos Villegas: Benchmarking other distrubutions (SoC2006)

Hi, for the debian boot process project, the last days I looked at the SUSE, Mandriva and Fedora distributions to analyse their boot process. The most interesting so far was SUSE being LSB compliant and having insserv/startpar to set and ajust the dependencies for parallalel booting. The insserv/chkconfig combinations seems to do the same as FreeBSD's rcorder although rcorder checks dependencies in two stages: with root filesystem and with all mounted filesystems.

Fedora looks like a regular sysvinit process although it contains LSB information in the initscripts that is read by chkconfig to set dependencies in the /etc/rc.d directories. Nevertheless, the dependencies don't adjust to added/substracted scripts.

Finally Mandriva 2006 doesn't seem to have pinit/prcsys in their default configuration so it seems to have a standard sysvinit.

BTW, the first deliverable is being written in latex (with pdf and html versions generated together) and available here.

Julien Blache: The joy of a rushed python upgrade

Here’s what you get when your python maintainer is too busy working on Ubuntu, unwilling to team maintain the thing in Debian, and finally rushes an upgrade :
dpkg: error processing python2.4 (--remove):
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
zsh: abort sudo apt-get -f install
Not happy at all. Even the modular X.org transition went better than this. Oh, and CUPS is b0rked too. Less than 6 months before our target release date for Etch, this really doesn’t sound too good.

David Pashley: Invalid Characters in Encoding with JAVA

Imagine you've got some text you've been told is ASCII and you've told java that it's ASCII using:
Reader reader = new InputStreamReader(inputstream, "ASCII");
Imagine your surprise when it happily reads in non-ascii values, say UTF-8 or ISO8859-1, and converts them to a random character.
import java.io.*;
public class Example1  
   public static void main(String[] args)  
      try 
         FileInputStream is = new FileInputStream(args[0]);
         BufferedReader reader 
            = new BufferedReader(new InputStreamReader(is, args[1]));
         String line;
         while ((line = reader.readLine()) != null)  
            System.out.println(line);
          
        catch (Exception e)  
         System.out.println(e);
       
    
 
beebo david% java Example1 utf8file.txt ascii
I t rn ti n liz ti n
beebo david% java Example1 utf8file.txt utf8
I t rn ti n liz ti n
So, I hear you ask, how do you get Java to be strict about the conversion. Well, answer is to lookup a Charset object, ask it for a CharsetDecoder object and then set the onMalformedInput option to CodingErrorAction.REPORT. The resulting code is:
import java.io.*;
import java.nio.charset.*;
public class Example2  
   public static void main(String[] args)  
      try 
         FileInputStream is = new FileInputStream(args[0]);
         Charset charset = Charset.forName(args[1]);
         CharsetDecoder csd = charset.newDecoder();
         csd.onMalformedInput(CodingErrorAction.REPORT);
         BufferedReader reader 
            = new BufferedReader(new InputStreamReader(is, csd));
         String line;
         while ((line = reader.readLine()) != null)  
            System.out.println(line);
          
        catch (Exception e)  
         System.out.println(e);
       
    
 
This time when we run it,we get:
beebo david% java Example2 utf8file.txt ascii
java.nio.charset.MalformedInputException: Input length = 1
beebo david% java Example2 utf8file.txt utf8
I t rn ti n liz ti n
On a slightly related note, if anyone knows how to get Java to decode UTF32, VISCII, TCVN-5712, KOI8-U or KOI8-T, I would love to know.

Wouter Verhelst: It's life, Jim, but not as we know it.

...or so Spock said. Apparrently. Yesterday, for some reason, I was reading something on Wikipedia. Don't ask me what I started with, I don't remember; however, my journey through Wikipedia eventually got me to the Rare Earth hypothesis, the Principle of Mediocrity, and other related things. Both are subjects relating to whether or not there would be life on other planets. The latter claims that this is, in fact, quite likely; the Principle of Mediocrity basically says that "Earth is a relatively ordinary planet orbiting a relatively ordinary star in a relatively ordinary galaxy which is one of countless others in a giant universe, possibly within an infinite multiverse". This is supported by a number of astronomical findings. The contrast to that, the Rare Earth hypothesis, claims that Earth is, in fact, not a very ordinary planet. That to be able to reach a point where complex multicellular can have evolved—such as on Earth—such a high number of variables have to have the exact right value, with in many cases such low margins for errors, that while possible, the likelihood that life would exist on other planets is very low. They were both interesting reads. However, there is one thing to which I did not find an answer: Why does it have to be Earth-like life? As I understand the theory of our origins, life began on the Planet Earth in a relatively stable body of unclean water—known as the "Oersoep" in Dutch, though I couldn't find the English term for that—on which the sun shone; that sunshine made the elements of the "oersoep" react with eachother so that it eventually formed single-cell life, which then evolved into multi-cellular life, and so on. Even today, the sun still shines on Earth, and almost all energy in use on Earth can in some way or another be attributed to something that once received sunlight; I suspect the only exception to that is nuclear energy. As I understand the Rare Earth hypothesis and the Principle of Mediocrity, both seem to assume the basic premise that the only way in which life could evolve is the way in which it evolved on Earth; that is, you need direct sunlight so that you can have some chemical reactions. You cannot have too much ultraviolet, gamma, or x-ray radiation, because that would kill life. You cannot have too many impacts of extraplanetarian bodies, such as comets or asteroids, because these impacts and the resulting fallout would destroy life. I did not find any argument for that assertion, however; and what I don't see is why it would be necessary. We could define the "oersoep" as some sort of a "stable chaos": a bunch of chemical elements and a varying external influence (sunlight) means that you have a brewing and reacting bunch of matter, where the composition of the matter is constantly changing; however, at the same time, when viewed over a large amount of time, not much did in fact change. The varying external influences have a regular and stable rhythm; the sun appears in the morning and disappears in the evening. The sun shines longer in summer than it does in winter. While it is not the same all the time, there is predictability. If a number of chemical elements react with eachother in a certain way on one day, then they will react the same way again the next day. If this happens for years on end, you may have a series of reactions that is more or less reproducible, where the final result of all the chemical reactions turns out to be the original starting point again. At least almost so. Such a series of chemical reactions could be called "life", especially if it occurs within a small group of chemicals that sticks together, like a cell. While a body of unclean water with regular sunshine certainly is one way to get to a series of repetitive chemical reactions, I fail to see why it would have to be the only possible way. If there were a planet composed mainly of Helium (rather than Hydrogen and Carbon, as on Earth) but also containing a bunch of other elements (so that they can react with eachother) with a star that sends out lots of gamma radiation and an atmosphere which blocks sunlight (I don't know whether Helium can do that, but let's assume it can), then I do not see why it would not be possible for life to evolve on such a planet which would be based on Helium rather than Carbon and Water, and which would require gamma radiation to survive but would die when brought into prolonged contact with light, just like we will die when brought into prolonged contact with gamma radiation. Another example could be a planet where every year a comet of approximately the same composition impacts on the same place on the planet's surface. Such an impact would regularly stir up the chemical elements on this planet, and could provide the needed energy to produce the chemical reactions required to sustain life. If any life were to evolve on this planet, not only would it be able to survive such constant extraplanetary impacts, it would also require these impacts to continue in order to survive. I haven't been able to find any information on that. It would seem that either I'm missing something very basic, or that nobody has thought of this before—and I would find that highly unlikely. So, anyone who's been thinking longer than me about this subject (that is to say, just a few hours) who could enlighten me? Of course, one answer could be to say that God created all life, and that the evolution theory is only a theory, which is not grounded in any reality. But make a comment to that effect on my blog, and I will moderate it away. After having a good-hearted laugh at it.

Martin F. Krafft: Parsing arguments in a shell script

Since shell is a rather unpredictable programming language, which seems not to allow manipulation of variables in parent processes, parsing arguments has always been a bit cumbersome. For instance, check out lines 74 through 123 of /usr/bin/deb-reversion (package devscripts) for the way I used to do things, which involves a sort of state machine to handle options taking arguments. Just last night, I came up with another means, and while it felt like an incredible hack at the time, I am starting to like it. This method can be combined with getopt, I just use it to parse guessnet test lines in /etc/network/interfaces right now:
eval $(while [ -n "$ 1:- " ]; do
    case "$1" in
      mac) echo MACADDR="'$2'"; shift;;
      essid) echo ESSID="'$2'"; shift;;
      ie) echo IE="'$2'"; shift;;
      *)
        echo "$ME: E: invalid argument: $1" >&2
        exit 1;;
    esac
    shift
  done   exit $?)   exit $?
When this is done, any (or none) of the three variables MACADDR, ESSID, and IE are defined in the shell script's environment. If an argument is required, I can do checks following the loop, or use getopt to parse $@ before looping over its components. Of course, the last line really does make it look like a hack, but it works and it's flexible... If I now look at /usr/share/guessnet/test/test-wireless, I wonder how Thomas Hood managed to get things working, specifically because he sets variables inside a while loop, and then uses them outside of the loop -- exactly the sort of construct that drove me nuts previously. Maybe it has to do with my religious use of set -u, maybe not. In any case, I am simply not willing to investigate.

Peter Van Eynde: Oaxaca teachers strike

During the post-debconf6 trip we stayed in Oaxaca and in my flickr images you will have noticed the striking teachers. People that visited the place may be interested in the fact that Indymedia reports that the government removed the sit-in with force.

Clint Adams: The forty-dollar bill didn't matter no more

Wouter, why haven't you ranted about deficiencies in denemo?

Axel Beckert: WML builds and runs on cygwin

For a long time the Website Meta Language (WML) did not build on cygwin, but nobody knew why or how to fix it. At the end of last year, the WML maintainer changed to Shlomi Fish and one of his goals was to get WML run under cygwin. Many probably didn’t expect it to really happen since WML developement has stalled for the last three or four years, but the Subversion 2.0.x maintenance branch of WML now builds and works on Windows under cygwin. This shows that there is really something going on in the WML developement again. Congrats and thanks to Shlomi!

16 June 2006

Tollef Fog Heen: Ubuntu dapper for SPARC released

A bit later than the others, with a bit of manual hacking of debian-cd scripts as well as the publish-release script (so we didn't lose the other arches) and with a great effort from Fabio, Adam and Celso, Dapper for SPARC (with Niagara support) is now out. It got delayed due to the tg3 NIC on the T1000 and the kernel not playing to nicely together.

Michael Janssen: Random Technological Stuff

Programming, windows style
I'm now in the thick of a bunch of win32 programming at my Honeywell part-time job. I don't mind it that much, but I continue to be amazed that Microsoft's IDE is still the one used most often. The autocompletion is nice, but that's about the only good thing about it. I am continually annoyed that the IDE doesn't know which definition of a function I want to use, and only seems to pop up it's hints when it decides. Add this to the fact that most win32 libraries aren't apparently setup in a way so you can put their source in the repository, and I have a lot of admin work which I'm not particularly thrilled to do. 10% programming, 90% random crap. I'm beginning to understand why the average lines of code per day is so low. I can't really complain that much though, I knew the tools we'd be using when I accepted the job.

Programming, rails style
I have been working with Ruby on Rails lately, mostly to make some new web applications which aren't released yet. Things which are possibly in the works:

I also have a couple of smaller applications which won't really go anywhere, and an internal application upgrade from php. I really enjoy building web applications in the Rails framework, and I have honed my skills at Ruby enough that I actually use it for small scripts when I get frustrated with bash. I tend to do my Ruby Coding in TextMate and with Locomotive on the iBook, although I may do some on the Debian machine soon.

Evan Prodromou: 27 Prairial CCXIV

It's nice to be known. I was kind of surprised during Where 2.0 to talk to people who knew the Wikitravel name -- and my name, no less -- and came up and talked to me about it. Cool stuff! Speaking of cool stuff at Where 2.0 -- I was seriously bummed to see people walking around in Geowankers t-shirts during the conference. I don't know who made them, but the tagline was perfect: We put the 'l' in 'a/s/l'. Genius! I'm bitterly jealous.

John Goerzen: Disappointed with Dreamhost

I've been using Memset for many years to host my websites, Darcs repositories, etc. They provide virtual private servers. I've been happy with them overall, but as my RAM needs increase, things have been getting slower. As adding RAM to VPS plans is expensive no matter who the provider is, I decided to look for some other options.

I decided to try Dreamhost. They are a web hosting company with a clue. I don't get root on the box, but they do give me the next best thing. ssh access, a decent suite of preinstalled packages, and clueful admins. I signed up earlier this week and started rsyncing some things over. They have a $10/mo plan which gives 1TB of monthly transfer and 20GB of disk space. Much nicer than the going rate of about $40 for 40GB of monthly transfer and 5GB of disk space for a VPS.

The web side of things worked fairly smoothly, and the system seemed to perform well. Until today, that is. I noticed my site being extremely SLOW this morning. I logged into the system to see if it was some problem with my configuration. It wasn't, but the system load was -- get this -- over 100. I watched it for awhile and then fired off a support request. The load had been hovering between 20 and 80. It's now 9.5 hours later, load is hovering between 11 and 30, things are still somewhat slow, and I've not heard back from them.

Then, later today, their server started refusing connections on port 80. Turns out this was a sitewide outage, and seems to have lasted for 30-60 minutes. I signed up to receive an e-mail when it was fixed, but I never got it.

Also, their e-mail hosting has never worked for me. At first, it was bouncing my mail. I sent a support request about that, and the next morning they said they fixed it. Well, it was no longer bouncing mail, but it wasn't actually *delivering* it either. I told them that this morning, and still haven't heard back from them.

Now, with my memset account, I can't remember the last time I've had downtime. I've had slowness -- rivaling what dreamhost is having -- but actual downtime is exceedingly rare. And they seem to respond to trouble more quickly.

And the scary thing is that from all I've read, Dreamhost is really one of the best web hosting companies out there.

So, what do you all think? Should I continue going the "do it myself" route and host my site with a VPS (either with Memset or with JohnCompanies, another clueful host I've dealt with)? Or try to stick it out with Dreamhost? Or are there other clueful web hosting companies out there?

Right now, I'm of the "if you want it done right, do it yourself" mindset. Being able to save money, and also time by trusting someone else to keep the host patched and working only saves me angst if I can actually trust them to do that. Right now, I'm not so sure I can trust Dreamhost -- or any other web hosting company.

15 June 2006

Steve Kemp: Hate something, change something, make something better.

Today I mostly packaged a current version of ecartis, to avoid content-transfer-encoding weirdness (#176667). There is also a compiled version of the package for sarge should that be useful to anybody. I also updated the “blog” facilities on the Debian Administration website - this was after I wrote a very long entry - and was annoyed that it seemed to spam the associated planet site. Entries can now be truncated by the use of the magic “<cut>” tag. I imagine few people will need/want it, but I’m sure I’ll find it handy.

Erich Schubert: Buzzwords of the DotCom 2.0 area

I've been preparing slides for a small presentation on "Buzzwords of the Dotcom 2.0 area". It's still a work in progress, so far I've only written some lines on Ajax and P2P, more to come on Web 2.0 and social networking. The presentation is not intended for a tech audience, and I've been trying hard to avoid too much previous knowledge and such. But I can't really explain the difference between authentication and authorization there... I'd really appreciate feedback (except: "add a diagram", thats too obvious), especially on other buzzwords I should cover. I also plan to add some judgements on the benefits of the usefulness of these "technologies" for businesses. For example the release of an API can make you very well known, but you might have a harder time earning money, actually...

John Goerzen: How to solve "The following packages cannot be authenticated"

Users of Debian's testing or unstable distributions may be noticing messages from apt saying things like:

WARNING: The following packages cannot be authenticated!
foo bar baz
Install these packages without verification [y/N]?


I noticed today that google doesn't turn up good hits for the fix. The fix is really simple:

apt-get install debian-archive-keyring
apt-get update


That's it. You now have secure packages from Debian. Nice, eh?

Norbert Tretkowski: Party in Nuremberg

Yesterday in the evening we went to the Cinecitta, like every Wednesday. But this time the main reason wasn't the sneak preview... there was a biiiiiig videoscreen in the central bar, where we could watch the really exciting soccer game between Germany and Poland. We all were in high spirits, especially in the last five minutes of the game. When I drove home, there was still party in Nuremberg, german flags and happy people everywhere. Great.

Jonathan McDowell: Do GUI users never read stderr/stdout?

As previously mentioned I run evilwm as my window manager. The only way to spawn a new process in it is to hit Ctrl-Alt-Enter, which opens an xterm. So I have a single xterm that I use to launch whatever apps I need (I choose this. I'm aware of many options if I felt the need to point 'n drool to open apps.). I don't think application authors can do this much, judging by the amount of crap that gets output in this xterm. For example, today I installed evince (I normally use xpdf) to have a look. I launch it by typing evince, up pops the window, I go to the File menu and choose Close. What do I get output in my terminal? The following: (evince:4105): Gtk-CRITICAL **: gtk_tree_model_foreach: assertion GTK_IS_TREE_MODEL (model)' failed (evince:4105): Gtk-CRITICAL **: gtk_list_store_clear: assertion GTK_IS_LIST_STORE (list_store)' failed WTF? A 'critical' error for simply starting and exiting the app? It's not the only offender. liferea spews Unhandled property: 12 border-collapse messages, gajim defaults to calling aplay rather than aplay -q so you get a message every time it plays a sound. Does no one else care about this crud? Is it unreasonable if I file wishlist bugs every time I hit an app that does this? Should I just learn to live with it?

Gunnar Wolf: Objects and signals

So far, Ruby is the only language I have actually liked that imposes a mindset on you. I love Perl's approach of letting you do things your way, whatever you define by that - Ruby forces you to extensively use OOP. But, actually, it is so well implemented that it even makes sense. It is even fun! Of course, that paired to an excellent introspection ability leaves enough room to make the cleverest (and, yes, most obfuscated) code you can think of.
Well... But there are limits to everything, and I think I found a spot where all the nice separation and cleanness ends abruptely: When interacting to the always nasty outside world.
It might also, of course, have some relation to the fact that I'm too new also for writing GUIs - this is the first nontrivial one I do. And it shows, as it took me some time to properly understand the pairing between the nice Glade elements, how to make a decently modular system, how to properly handle UI (and internal) events... But I've been progressing quite nicely, and I hope to be able to show off my little app to a wider audience soon. At the very least, I hope to be able to show it to my boss by next week, as he is getting impatient ;-)
Ok, but where does it all break, according to me? One of the things I must monitor with this app is that a couple of processes spawned by it work happily in the background while I only show a nice interface to my users. Now, how is the best way to do this? Why, by trapping the SIGCHLD signal, of course! Whenever any of the processes in the pipeline die, the parent (controlling) process gets a nice CHLD signal. I trap it, restart the processes, and no harm done. And in Ruby, it looks quite natural:
Signal.trap(:CHLD) do
  @processes.each { p p.stop if p.active?; sleep 1; p.start}
done
How nice, how neat... How buggy :-/
It took me quite a few hours to get this right. And it should be obvious, of course... No matter where you declare a signal handler, there is no reason for you to believe it is tied to a particular instance, or for that matter, to a class. A signal handler breaks and jumps in the execution in the ugliest old-school way. Yes, if your signal handler consists of:
Signal.trap(:CHLD) do { puts self.class }
you will note that your good friend self is nothing but an Object.
Once I realized that, yes, things became reworkable, and I now think I am actually better off even OOP-aly than some hours ago - Some of the classes badly needed to adhere to the Singleton pattern and now work with less worries and ugliness. But, hey, it took me quite a while.
Anyway, lets see which new challenges Ruby+Glade2 still have for me. I am sure there will be plenty. And I haven't even started playing with GStreamer!

Simon Richter: Times are changing, yet stay the same

So, tonight I went back to the place that has been my living room for the past eight years - the Pulverturm - after half a year of work- and uni-induced absence. Not a lot has changed, so I felt at home again immediately. It's a total shame that this place is going to be closed at the end of the year. I hope I'm going to be able to organise another party of my own there at some point in this year.

14 June 2006

Joachim Breitner: XSA-Article available online

Just a quick follow up on my Cross-Site-Authentication Attack: My article for the German Linux Magazin which was translated for its English counterpart Linux Magazine is now available online. Before you ask: I did not chose the image there. I’m still waiting for the German version to be opened up, too, but that will probably not happen before October.At the GPN 5 last weekend (a conference compareable to the Chaos Communication Congress, only smaller) I have held a lightning talk on the XSA Attack. In preparation for that, I actually tried it on the internal wiki of the Entropia e.V., and despite the relatively high technical knowledge of its visitors, some fell for the trap. As that was the only preparation of the talk, I wonder how it was perceived. Comments and tipps with regard to the form are welcome.By the way: The German wikipedia page on XSA tells us that newer firefox browsers won’t allow such an attack to work, which is good.

Next.

Previous.