Search Results: "sten"

30 December 2008

Julien Danjou: Rants about Lua

I've started using Lua some months ago, while looking for a more powerful way to configure awesome. At this time, around March 2008, Lua seemed to be the best language to integrate inside the core system of awesome. I still think that Lua was a good choice, but after 8 months, it shows some important drawbacks. I'll try to keep my explanation simple and to make you understand everything, even if you do not know Lua. I refer here to Lua 5.1 Design flaws Length operator Lua has a length operator on its objects, known as #. It can be used to get the size of various objects.
return #"lol" 3
This operator works for table, string, etc It's possible to define this operator by setting a __len meta-method on a userdata value. The problem is that you cannot redefine it on string or table objects, see:
> a =   "hello", "world"  
> return #a
2
> setmetatable(a,   __len = function () return 18 end  )
> return #a
2
Indeed, looking at the Lua core code:
     case OP_LEN:   
       const TValue *rb = RB(i); 
       switch (ttype(rb))   
         case LUA_TTABLE:   
           setnvalue(ra, cast_num(luaH_getn(hvalue(rb)))); 
           break; 
             
         case LUA_TSTRING:   
           setnvalue(ra, cast_num(tsvalue(rb)->len)); 
           break; 
             
         default:    /* try metamethod */ 
           Protect( 
             if (!call_binTM(L, rb, luaO_nilobject, ra, TM_LEN)) 
               luaG_typeerror(L, rb, "get length of"); 
           )   
             
           
       continue; 
      
You clearly see that tables and strings always use the internal length operator, never the __len meta-method. That's for me a design problem, which will cause more trouble. We'll see later. __index and __newindex metamethods Lua defines two useful metamethods, which are __index and __newindex. Both can be set on a table or any other object. __index will be called upon each read access to an undefined key on an object, and __newindex upon each write access. Example
> a =  
> setmetatable(a,   __index = myindexfunction, __newindex = mynewindexfunction  ) -- function are not defined, this is just an example
> a[1] = "hello" -- This will call __newindex metamethod
> return a[2] -- This will call __index metamethods
> return a[1] -- This will NOT call __index
The last line does not call __index meta-method because a[1] does exists. This is a problem when you want to use table as object, because sometimes you want to monitor access to the table elements. This can be easily worked around using a proxy system: you don't store things in the table you manipulate, but in another table.
> a =  
> realtable =  
> setmetatable(a,   __index = myindexfunction, __newindex = mynewindexfunction  ) -- function are not defined, this is just an example
Where meta-methods are something like:
function myindexfunction(table, key)
   return realtable[key]
end
function mynewindexfunction(table, key, value)
   realtable[key] = value
end
This way, our a table will always be empty, and realtable will have the data. At every read or write access to a, the meta-methods will be called. This is very convenient and widely used hack. But this has serious drawbacks: as we saw before, the length operator (#) cannot be redefined on a table. That means #a will always be 0, and you cannot get the table length anymore, except by defining another method or a special attribute. Also, Lua has several functions in the table library that are used to manipulate table in a easy way. The problem is that standard functions like table.insert or table.remove do raw accesses to the table. Meaning that if you do table.insert(a, 1, 1) it will insert the value 1 at the key 1 into a, without calling the __newindex meta-methods, breaking all your beautiful object-oriented model. Another solution is to use a userdata object, like done in the Lua newproxy function (which is under-documented). The problem is that it breaks all the other functions that are waiting for a table as argument, because they see a userdata, not a table. So this time table.insert is now more usable, which somehow fixes the problem, but not in the right way IMHO. However, this allows to use the __len meta-method. Development model The development model of Lua is, from my point of view, non-existent. There is no public version control system repository available, so there's no chance to really contribute to Lua. It seems only a defined set of people work on it and therefore, the development system is very closed to my eyes, in comparison of usual projects. Conclusion I still think Lua is a good choice, because it is very easy to integrate into any C program, and to expand to fulfill your needs. However, some bad design choices were made, and the poor and closed development model chosen does not allow to have a good overview of the future of Lua. This has been well stated by the authors themselves.

29 December 2008

David Moreno: Good looking Irb

Irb is a pain to work with when you don t know it enough. Fortunately, it can be configured extensively enough to make your Ruby interactive sessions much smoother. Pocahontas asked me to post my Irb configuration:
# ~/.irbrc
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:SAVE_HISTORY] = 5000
IRB.conf[:HISTORY_FILE] = "# ENV['HOME'] /.irb_history"
IRB.conf[:PROMPT_MODE] = :SIMPLE
require 'irb/completion'
require 'irb/ext/save-history'
require 'pp'
# load rubygems and wirble
require 'rubygems' rescue nil
require 'wirble'
require 'utility_belt'
# load wirble
Wirble.init
Wirble.colorize
Which makes Irb to look much much better: irb But it is not only coloring the features you are getting, but also Readline support, command history saving, tab completion, libraries loaded by default, persistent history with Wirble, etc, etc. as you can see yourself on the very self-explanatory configuration file. Enjoy. Update: I have to thank my co-worker Galin for pointing me most of these neat features.

26 December 2008

John Goerzen: ID3 tags

For Christmas, I got Terah a Sandisk Sansa m240 MP3 player off Woot. A very basic and small device, but just what she needs. There s a catch. It appears to only recognize ID3 tags in v1 format. (Some online sources claims it also recognizes v2.3, but not v2.4, but my testing shows it doesn t.) It turns out that very few, if any, modern media management tools support ID3v1. I tried Rhythmbox, Listen, Banshee, Amarok, and several others. Not one of them even had an option for ID3 version. A couple had an option for what to use when encoding from CD if I knew the magic undocumented gstreamer incantation. But they promptly deleted the ID3v1 tag whenever the information for the track was modified. I eventually wound up writing a script for Terah to run that calls eyeD3 to convert the tags to v1. But with all the devices out there that grok v1 only, I am really rather shocked at the lack of software support for it these days.

Chris Lamb: Unfortunately, we get parallel octaves at the end

A reel from Glenn Gould's 1955 recording of the Goldberg Variations contains the following dialogue between the 22-year-old pianist and the recording engineer after a take of the 30th variation, a quodlibet:
By the way, I have a quodlibet of my own which came to me in the bathtub the other night. One of these days I will be asked to perform on the fourth of July, I'm sure, and when I do I figured out that by leaving out the repeats in the Star Spangled Banner and starting your entry on the thirteenth bar of God Save The King and then playing God Save the King over again and altering the harmony in the second half of The King to modulate to the supertonic region, it has the most marvelous effect. Listen to this.. (202KiB Ogg Vorbis).

24 December 2008

Amaya Rodrigo: Self-steem issues?

Peace for threeWhen a cat is on your lap or very close to you, it means there is no better place for him in the whole world. And cats are very smart. And demanding. They are absolutely free souls and natural born gourmets.

But where is the tip? Just around the corner, read on.

Listen to the world around you, the more related to nature the message is, the more important and meaningful is the wisdom coming with it.

19 December 2008

Joerg Jaspert: new.html

I just committed a larger change to the tool that generates our NEW queue overview page. It now lists some more data, like the Changed-By field, the Sponsor (if any) and the Fingerprint of the signature on the .changes file. To be able to sanely list all that, the html had to be redone a little. As I do love HTML and CSS, that was all no problem for me - I just did my usual Tiiiiiiiiiiiiinnnnnnnnnchhhooooooooooo yell and Martin luckily listened again. :)

18 December 2008

Wouter Verhelst: Manoj Srivastava resigning

I went on IRC to ask a simple technical question earlier today. I wasn't going to ask it in the #debian-devel channel, since it was a samba question rather than a debian-related one; but since my IRC client was still running, and had that channel active, I couldn't help but notice some discussion about "what-ifs" when there isn't a secretary, and who gets to do what then. Surely this was idle speculation, I thought? But that can sometimes be fun, so let's look at the backlog, and see... That's when I found out that this wasn't, in fact, idle speculation. Oh dear. Well, that's the end of an era, I guess. Not that it wasn't totally unexpected; when I learned that Neil McGovern had become "assistant secretary", I already suspected that Manoj was going to resign eventually, and he does confirm that suspicion in his resignation email. However, the suddenness of it certainly was unexpected. Here's a tip of the hat for everything Manoj has done for Debian so far. I can only wish to be at your level. What does distress me, however, is a part of Manoj's email, in which he mentions some people had been trying to get him kicked from the project:
As to the people who emailed me that they are putting together a petition for the DAM to have me removed from the project, I hear you too. I am going to spend the next few days evaluating how important the project is to me, and whether I should save you the bother or an expulsion process.
Well, Manoj, if my voice means anything to you: ignore those people, and stay a happy Debian Developer. You became project secretary not too long after I became Debian Developer, and over the years I've learned to respect you as a person with great integrity for your work, who would always do what you considered to be "the right thing". Even when I disagreed with you on what "the right thing" is (and there have been cases of this happening, including this particular vote, although I wasn't very active in the discussions), I have never been able to pinpoint our disagreement on you abusing your position as secretary in order to win the argument, or some such. You have been consistent and (where necessary) predictable in performing your duties as project secretary, and that is a great compliment. I can only hope we'll see those same virtues in our next secretary. As for that expulsion process, please do not tell us who those people were, for I do not like seeing people made utter fools of in public.

Raphaël Hertzog: Release Lenny GR

This is the worst vote that has come up since I m part of Debian. And Manoj the secretary has refused to listen to the remarks of many developers about the misleading titles/summaries, about the unjustified 3:1 ratio, and worst of all, about the mixing of multiple questions in a single ballot. I have ranked misleading options ( Reaffirm social contract at least) lowest and below Further discussion and sorted all the other options according to my preference, and ranked some of them equally when the choices answer different questions (where I can not prioritize any preferred outcome). I m not yet sure if I put Further discussion first or not. There s some hope that the vote will be cancelled and redone with separate ballots but I ve lost trust in Manoj s abilities to do his job properly. I m sure he s convinced that he s doing the right thing but that doesn t help at all, on the contrary. It also means we probably should fix the constitution to make it crystal-clear how the secretary should decide whether 3:1 ratio is needed for a given resolution or not. Not really the kind of thing I enjoy within Debian, but that s the price to pay if we want to continue to work together. On this and much more I agree with Russ Alberry. Update: Manoj resigned as secretary. I want to thank him for having taken this hard decision. And I sincerely hope he doesn t resign from Debian completely as our strength is also in our diversity of opinions. Partagez cet article / Share This

17 December 2008

Russ Allbery: Asking the wrong question

I'm posting way too much to debian-vote right now, which I realize and which I'm going to try to cut back on. (I at least did start the lintian.d.o upgrade process today, so I got non-discussion Debian work done.) The reason why I keep reacting, though, is that I'm finding it frustrating that people seem to be asking the wrong question for resolving the firmware freeness argument. We currently have a strong disagreement over what the implications of the Debian Social Contract and DFSG should be for our release process. Some Debian Developers believe that releasing lenny as-is requires a special exception to the Social Contract. Some Debian Developers believe that releasing lenny as-is is consistent with the Social Contract. We've tried and failed to achieve consensus. That's the first point of my frustration: some people don't seem willing to accept that this has happened. They are apparently having a hard time understanding how anyone couldn't agree with them, and are therefore repeatedly reopening the discussion on which we don't have consensus. Once it's clear that consensus doesn't exist, this is very counter-productive. The discussion is futile, which frustrates people, and then in that frustration they become increasingly angry and harsh. Once consensus fails, all interesting decision-making processes start. A decision-making process basically reduces to "who decides?". When you have a dispute and consensus is not possible, some body has to make a decision. If people believe in the decision-making process, they can then support, or at least live with, the decision because they respect the process, even if they disagree with that particular outcome. The most important output of a decision-making process is closure: you stop debating and move on. If that doesn't happen, the decision-making process has failed, even if it makes a decision. Why does this all matter and why am I going on at such length about it? It's simply this, which I think is so important I'll highlight it:
Even people who strongly disagree on some issues can work together cordially and well in the same project provided that they can agree on a decision-making process in those areas where they disagree.
Agreeing on how decisions are made in Debian is important because that's how we continue to work together when we disagree (and we will disagree). If we can agree on how disputes are resolved, we can all respect and honor the outcome even if it isn't what we would have wanted, and then move forward. If we don't agree on how disputes are resolved, we'll keep re-arguing them rather than accepting the outcome. The discussions will get more heated, more people will get upset, and more people will not have fun working on Debian. What I've been trying to analyze on debian-vote is the "who decides" part of this question. We have a decision-making process outlined in the Debian constitution for non-technical decisions (of which this is one). That process is somewhat scattered through the document, but bringing it together in one place, it seems to go like this:
  1. Developers are empowered to make decisions about their own work. That means that, according to the constitution, the primary people who get to decide how the SC and DFSG should apply are every Debian Developer in the tasks on which they're working.
  2. The project leader can define an area of ongoing responsibility and delegate to a developer or a group of developers responsibility for making decisions in that area. There are two relevant delegations here. The ftp team has the delegated authority to determine what packages may enter Debian given, among other things, licensing and DFSG issues. The release team has the delegated authority to decide what goes into the next stable release and when that release happens. (Let's put aside quibbles over whether or not that authority was formally delegated; I think that we can all agree in practice that it's close enough.) The ftp team has accepted the relevant firmware packages into Debian main and hence have made a decision in their area of responsibility. The release team, through the lenny-ignore tag, has decided that the relevant packages can be part of the next release. Those are delegate decisions that have already been made, and neither of those teams seem to want to change their mind.
  3. The final decision-making body in this case, therefore, is the developers at large, who can override any delegate decision via a GR. That's what Robert Millan proposed, although he doesn't seem to have realized he was doing that, and it's not marked as such on the ballot.
Now that this has happened, we all vote whether or not to override the delegate decision. The only option on the ballot that does so, by my reading, is the first one, so if the first option does not win the GR, the delegate decision is not overridden and both the ftp-master and release team decisions stand. This is why Further Discussion means we continue the release as previously planned. We have a decision-making process, which has been followed, and the current decision is to release including those packages. In order to change that decision, it has to be overridden. A result of Further Discussion on a GR means that GR does nothing, and hence the decision stands. The second point of frustration is the decision that option four on the ballot (delegate to the release team the power to make decisions about how DFSG issues affect what is included in the release) needs a 3:1 majority. They have already been delegated the authority to do that as part of their delegated authority to manage the release. The effect of option four on the project is therefore identical to Further Discussion; the only difference is whether we make a positive statement or fail to make a negative statement. It makes no sense to treat it as supersession of a foundation document when it just supports the existing decision-making process in the constitution. A third point of frustration is the apparent feeling that foundation documents like the DFSG are outside of the normal decision-making process described in the constitution. I can find no evidence of this in the constitution, but more fundamentally, the people arguing this are not stating what decision-making process they believe does apply other than "my view of the DFSG is obviously the only reasonable one and hence you should follow it." This reduces to a plea for consensus, which we've already established that we don't have, and hence, as mentioned above, is horribly unproductive to keep raising. There will never be a policy document that is so clear that everyone will agree on its implications in every situation. I find it much more useful to analyze governance processes by looking at who decides disputes rather than looking at position statements. The decision-making process is what will determine the outcome of all the really interesting cases.

12 December 2008

Julien Danjou: Using a Bluetooth headset under Linux

is a no. It just does not work. I mean, it does work if you want to listen to music using mplayer in 8 KHz quality, but don't even think to use it to phone using SIP. I've first tested with bluez 3 which is part of Debian. It roughly work, but sometimes it stops working and you have to restart hcid, or to clean its cache. Not very stable. I've then tried using bluez 4, compiled from scratch. It works much better, i.e. I can run mplayer a thousand of times without having it stopping to work, but I'm totally unable to use it with twinkle or ekiga. And I don't even talk about ekiga still unable to set a custom ALSA output. I even try to hack it via gconf-editor! That's really a shame.

11 December 2008

Russell Coker: Toy Helicopter


I have just bought myself a toy helicopter. I had been tempted to buy one for a while and when I saw them on sale for $30 I couldn’t resist. My helicopter is model FJ-702 from Flyor, it is controlled by infra-red and is designed for indoor use only. It seems that the trick to flying one is to control the rate of ascent and descent. If the helicopter rises too fast then it may bounce off the ceiling which results in it swaying uncontrollably and crash-landing. If it is allowed to descend too fast then it becomes impossible to slow the rate of descent, I suspect that this is the settling with power [2] problem that is documented in Wikipedia. The helicopter is very fragile, I broke one of the skids and part of the tail assembly before I learned how to control it properly. Probably the main thing to look for when buying a model helicopter is a solid design - some time after buying (and breaking) my helicopter I visited the shop which sold it and heard the owner advising other customers to buy the $45 model which is apparently more solid. It seems that an ideal design would be a frame made of spring-steel (not to make it springy but to avoid it breaking when it hits). I recommend flying in a room with a carpeted floor, bouncing off a solid surface such as a wood floor will break a helicopter. Controlling a helicopter is really difficult. The models that I have tried and seen demonstrated all have serious problems with unwanted rotation. My helicopter and the others I have seen have coaxial rotors to avoid rotation without a tail rotor. According to the Wikipedia page a lot of energy is used by a tail rotor [1], as there has been obvious difficulty in designing the helicopter with adequate power (in terms of the light and weak frame and the short battery life) it seems that they didn’t use the tail rotor design to save energy. It’s a pity that instead the designers couldn’t have skipped the flashing LEDs etc. One strange thing is that one pair of blades can have their angle changed (which appears to be similar to the “semirigid” design shown on the wikipedia page). I’m not sure how increasing the angle of one blade while simultaneously decreasing the angle of it’s pair will do any good. I expect that this has something to do with the fact that the helicopter will rotate at different rates when under different amounts of vertical thrust. This incidentally makes it almost impossible to maneuver the craft. It has a tail rotor on a vertical axis to control forward and reverse movements, but the extreme difficulty in keeping it facing in one direction makes this almost useless. I wonder what the minimum size at which a gyro-stabiliser becomes practical. But as Wikipedia doesn’t document the existence of an autopilot for full size helicopters the chance of getting one for a toy is small. In summary, while I have had $30 of fun, I think that a more solid helicopter would be a better investment.

9 December 2008

Lucas Nussbaum: The Project membership procedures GR

So, the call for vote on the “Project membership procedures” GR was sent. Since I took part in the discussions that lead to that GR, I feel obliged to explain my point of view. What this GR isn’t about
This GR isn’t about the merits of Joerg Jaspert’s proposal. I personally don’t think that the changes he wants to implement are what we need in Debian, but even if I fully agreed with those changes, I would still disagree with the process that led to those changes. Also, this GR isn’t about Joerg Jaspert himself. I deeply respect him and his awesome work for Debian. And I’m sure that this vote could have been triggered by decisions announced by someone else. What this GR is about
I think that the question we are asked to vote on is:
Some people in Debian have a special role, and special privileges. Does it allow them to change important aspects of our project, without the approval of all the other developers?
Or, put differently:
Where is our limit between Doocracy and Democracy?
I’m all for listening to developers who contribute(d) a lot. I think that most people, when skimming through posts in a big thread on -devel@, will look for posts from people who did a lot of work for Debian, or who usually post interesting ideas. However, that doesn’t mean that those people should feel empowered to decide changes to important parts of our project, without first discussing those changes with all other developers, and making sure that those changes are consensual. So, I hope that we will send a clear message that says: you are very welcome to propose changes, but please make sure that they are properly discussed within the developers before they are implemented. Joerg’s initial mail on d-d-a, with a few s/decision/proposal/, and a final question phrased like “Any comments? Suggestions? Other ideas?”, could have been the start of an interesting discussion about how we can integrate non-developing contributors in Debian. And if too many developers disagreed, we could have had an opinion poll (it would be great to have an infrastructure for running polls inside Debian, like what Jeroen did three times a long time ago), or even a GR, like we did for Debian Maintainers. For this actual vote, there are two similar options on the ballot (choices 1 and 2, respectively “amendment text A” and the original text on the vote page). I proposed this amendement (choice 1) because the original text is unclear, and mixes several different questions, forcing voters to answer several (secondary) questions at once, like: The amendment aims at going straight to the point. And yes, it is only asking the DAMs, but if the developers ask the DAMs not to do something, and the DAMs do it anyway, we clearly have a bigger problem. I believe that the way those decisions were announced was a mistake (that unfortunately none of the people involved have been willing to admit), not that the DAMs are trying to take-over Debian, so there’s no need for a stronger wording.

8 December 2008

Joey Hess: mpd proxy

An idea I've had for a while is to write a proxy for MPD. I have mpd servers scattered around, and lots of clients I use on my laptop, and it was getting annoying to manually point each client at whatever server I was listening to at the time. The proxy would get in between the client and servers, and redirect all the clients to whatever server I told it to use. One interesting question is whether the MPD protocol can deal with a client suddenly speaking to a different server with a different state. The protocol is mostly stateless, but the proxy would need to send the password each time it changed to a different server. There could also be trouble if clients cached info about the database, etc, as they wouldn't see the new info from the new server. I bailed and took a quick and dirty workaround to that problem. My mpd proxy disconnect all clients when changing to a new host. Clients then reconnect, re-sending passwords, and clearing any caches. So the implementation is not all it could be (and is not ready to be added to mpdtoys yet), but here it is: mpdproxy Needs simpleproxy installed to work, set MPD_PORT=6601 to make clients use it, and to change the server it connects to, just echo foo >~/.mpdhost. I'm pretty happy with the result -- now I can use mpc and mpdtoys like mpstore without worrying about specifying a host, and sonata lets me know what's playing everywhere.
On to pondering better things, like discovering nearby mpd servers automatically with mdns..

Andrew Pollock: [tech] RHEL doesn't have sysfsutils?

I'm reading the Red Hat I/O Performance Tuning Guide, because hey, it's all Linux, and I might just learn something. So far, I've learned that RHEL doesn't have sysfsutils. How very weird.
Unlike the /proc/sys/ file system, the /sys/ file system does not have a utility similar to sysctl that can make such changes persistent thoughout (sic) system reboots.
and
However, as mentioned in Section 4, Selecting a Scheduler , any tuning made though echo commands to the /sys/ file system is not persistent throughout system reboots. As such, to make any scheduler selection/request queue settings persistent throughout system reboots, use /etc/rc.d/rc.local.
Of course, for all I know, this information may be out of date with respect to the current release, but Debian's had sysfsutils since November 2003.

7 December 2008

Muammar El Khatib: Simple Life + Debian + Science

Two days ago, I arrived from Choron which is one of the most beautiful beaches of Venezuela. There, It was held the "II Congreso de Fisicoqu mica Te rica y Computacional" (Congress of Theoretical and Computational Physical Chemistry). The congress was really nice because it was a meeting which included quantum chemists from Venezuela and from another countries. I went there in a bus that was assigned by La Universidad del Zulia for me and other attendees. What does this have to do with the title of this post? Well, I had the chance to share time with people (my co-workers) that in some way they live the life in a simpler way than me. For example, they don't care using Linux, Windows, or Mac. They don't care listening to Salsa or whatever other music. They don't care using semi-empirical methods or Ab Initio ones. They don't care studying organic compounds or inorganic ones... So I had a reflexion: should I have to be a little bit more flexible with my points of view? Should I stop being that critic with every field that I study or I am part of? By the moments, looking at what I have been able to achieve being how I am, I think I shouldn't turn. But I accept it was good to see and share time with people that live life a little bit simpler (and I am aware that I have to improve some stuff about me).

There was a poster section where there were lots of interesting Physical Chemistry works that are being carried out in different parts of Venezuela. My poster was related to the linear and non-linear optical response of the nitrogen basis of DNA, RNA and their tautomers in Gaseous phase . It was interesting to see that most of the computational calculus servers, Grids, and clusters were running Debian instead of systems based on Red Hat which have been for long time widely used in the world of sciences in Venezuela :-) I hope to see more and more laboratories of my country using Debian with the pass of the time. However, the implementation of Debian has increased a lot in this field. In the laboratory that I am part of, almost all the machines uses Debian as environment to carry out quantum calculus.

6 December 2008

Jon Dowland: masterpieces

This week, BBC Radio 1's Zane Lowe played four records in their entirety as part of his "masterpieces" feature, uncensored and without interruption. These were
  • The Stones Roses - The Stone Roses
  • Rage Against the Machine - Rage Against the Machine
  • Pink Floyd - Dark Side of the Moon
  • The Prodigy - Music for the Jilted Generation
Yesterday I was browsing the iTunes music store and I noticed that these albums had jumped into the top ten best selling for their respective categories. It looks like giving the album away on air has convinced people to go out and buy the records. You can listen to the shows up to a week after they broadcast, using the BBC's "listen again" facility, now rebranded and incorporated into "iplayer".

5 December 2008

Martin F. Krafft: Symbian, IPv6, SIP: lack of testing, no QA, no surprise

Trying to put my new Nokia E71 to use, I was positively surprised to see that it has an IPv6 stack. Even though the integrated web browser does not care about it and insists on IPv4, it still made me happy to realise that Symbian (manufacturers of the OS) aren t totally missing the beat of time. But when I tried to get the builtin SIP client to speak to my Asterisk PBX, I ran my head against a wall. It didn t take me long to find out why it wasn t working, though:
<--- SIP read from 192.168.14.62:5060 --->
INVITE sip:echo@sip.madduck.net SIP/2.0
Route: <sip:sip.madduck.net;lr>
Via: SIP/2.0/UDP [2001:41e0:ff12::xyy:zzff:feaa:bbcc]:5060;branch=[...]
From: <sip:e71@madduck.net>;tag=i4a43mn949hc7vu5633b
To: <sip:echo@sip.madduck.net>
Contact: <sip:e71@[2001:41e0:ff12::xyy:zzff:feaa:bbcc]>
[...]
User-Agent: E71-1 RM-346 110.07.127
[...]
o=Nokia-SIPUA 63396745194593125 63396745194593125 IN IP6 2001:41e0:[...]

This is Asterisk s debug dump of the SIP INVITE packet, which initiates a connection. You will note that it arrives via IPv4, since Asterisk does not speak IPv6 and thus doesn t listen on IPv6. You will also notice that the Nokia phone doesn t give a flying food, but puts its IPv6 address into the headers. That s like writing a letter to your grandmother and telling her to answer by e-mail. You can choose between IPv4 and IPv6 for GPRS connections, but not for Wifi. There is also no way to turn off IPv6 altogether, at least none that I found. This really makes me wonder about the development process at Symbian, which must exclude testing and QA, or else I could not explain how such braindeadness could make it into a published product. On the other hand, we are all well aware of the lack of quality in software products that come force-bundled with hardware, like phones or plain computers. After Nokia acquired Symbian, they open-sourced the operating system (thanks, Penny, awesome girlfriend, for reminding me. Happy now? grin). After a bit of searching, I am pretty convinced that this was just marketing buzz, because I failed to find any information on how to obtain the code or how to put it onto the phone, six months later. I am not sure how to move on. I can either return the phone (wouldn t be the first time I had to return a Nokia E series phone for lack of quality), switch from Asterisk to some IPv6-enabled VoIP software (like FreeSwitch, which has not been packaged for Debian yet, mostly because the FreeSwitch guys are acting up about the changes Debianisation would require), or find some hack around this limitation. Ah, the joys of being an early adopter NP: Neil Young: On the Beach Update: Faidon Liambotis, who was also influential in my decision for the E71, found the problem: the phone s DNS cache. sip.madduck.net used to be a CNAME pointer to the machine running the asterisk server, wall.oerlikon.madduck.net, which also has an AAAA (IPv6) record. I thought about this myself and removed it, but the problem persisted. Faidon suggested to use the IP instead, which worked, and a reboot of the phone cleared the cache and allowed me to use the DNS name again, which is now a plain A record to the same host. As soon as DNS no longer advertises the IPv6 address, the phone s SIP stack no longer gets confused.

28 November 2008

Gintautas Miliauskas: Silly translations

Since I do some work on software translation, I have seen my fair share of silly translations (in my case from English to Lithuanian). Here's my latest find: in Gmail there is a choice of chat list for every person in the address book, and there are four options: Auto, Always, Never, and Block. The Lithuanian translation of the option "Auto" is ... "Automobiliai" which means "Cars". Took me a while to figure out what happened the first time I saw it. This ranks right next to the already classic wizzard button translation "Kitas", "Kitas", "Suomi " for "Next", "Next", "Finish" (translated back to English that would be "Next", "Next", "Finnish" as the language of Finns) and my personal favourite: Finnish translated as "Finikie i " (Phoenician). FWIW I tried to apply for access to Gmail translations (there are many more inconsistencies, mistakes and screwups in there), but it seems that Google is not interested. I wonder if they have any translation quality control at all.

27 November 2008

Eric Warmenhoven: cado, cadere, cecidi, ?

The other day I was looking at the statistics collected from my web server logs, and saw that easily more than 80% of people who find my website are looking for my Latin vocab learning tools. They’re pretty basic, but I found them to be somewhat helpful when I was learning Latin. I’m seriously considering expanding it a bit, adding conjugation/declension drills, making it a little prettier, etc. Anyway, tonight, I got a nice email from a woman who uses the vocab tools, and noticed that there was a problem with fourth principal part of the Latin verb ‘cado’, and it sent me on a somewhat fruitless search for what the right word is. (A quick primer for those not familiar with Latin verbs: most verbs have four principal parts, which can be used for conjugation. The fourth principal part is the perfect passive participle, e.g. “to have been heard”.) So then, what is the perfect passive participle of ‘cado’, which means “to fall”? Before I get into that, consider for a moment what the translation to English would be. “To fall” is usually used as an intransitive verb (the transitive form is mostly obsolete), so “to have been fallen” doesn’t really sound natural. But the translation can be approximated to something like “to have been dropped” or “to have been struck down”. But what is the actual word that is used? On this there appears to be some disagreement. Wheelock’s Latin says that it’s ‘casurum‘, as does Wiktionary. However, Tyro’s Dictionary says that it’s ‘casum‘, as does All Verbs. Meanwhile, Whitaker’s Words says that ‘casurum‘ is “very rare”, from “later” Latin, and used in the Vulgate Bible, and says it should actually be ‘casusus‘. I still don’t know which one is correct, and suspect that all three are correct depending on the text that’s used. I can somewhat see how ‘casum‘ might have been correct at some point, but changed as it overlaps with the noun ‘casus‘, which is the noun “fall”, as in “that was a nasty fall”. Or vice versa. I tried to go searching through prose to see which was most commonly used, but most of what I found was from the Vulgate Bible and used ‘casurum‘. So, I’m still not sure which is actually the “best” word. I’ve changed the site so that it uses ‘casurum‘ to be consistent with Wheelock’s. So, does anyone definitively know, which is actually best, and what the etymology is?

24 November 2008

Matt Brubeck: 24 Nov 2008

The Timeless Way of Building: Diagnosis and Repair Architect Christopher Alexander's A Pattern Language is well known among programmers as the inspiration for the Design Patterns school of thought, but for some reason his other books are less widely read. My mother and father are both architects—"real" ones, not "software architects." :) My own amateur interest in the subject led me to read several of Alexander's books over the past couple of years. The Timeless Way of Building is the first volume of an open-ended series. (A Pattern Language is the second.) It is in this book that Alexander first lays out the idea of a pattern language. More importantly, he explains an entire theory and practice of design and construction, of which the pattern language is only one piece. Another piece of the Timeless Way is the practice of diagnosis and repair. Rather than a detailed plan of future projects, Alexander prefers to maintain a diagnosis of current problems. Each new project must be targeted at fixing these existing problem in the system: "At every moment we use the defects of the present state as the starting point for the definition of the new state" (p. 485). Alexander's goal is to create a type of spontaneous growth and order that is possible when change is incremental and decision-making authority is decentralized. Alexander was hired to produce a new type of master plan for the University of Oregon campus. The result was published as the third volume in the "Timeless Way" series: The Oregon Experiment. In it, he writes again about diagnosis and repair:
It is still not clear where global order will come from, without a master plan.… How is the problem solved in an organism? Essentially, the problem is solved by a process of diagnosis and local repair.… The master plan tells us what is right for the future. The diagnosis tells us what is wrong for the present. (p. 146–148)
In software, the same problems and conclusions have led to "agile" processes, which emphasize incremental change and flexible planning. But I haven't seen any software companies adopt a consistent practice of "diagnosis"—keeping track of what's wrong or unsatisfactory with the current system. This extends beyond defect tracking; it should include a constantly updated list of code that, although it works, is hard to understand, difficult to change, or otherwise likely to cause problems. (This should be easy to generate—every programmer knows certain parts of their code base that they dread working on for one reason or another.) This knowledge can then guide new development to include "repair" and address such problems before they become defects. I've applied this on a small scale to my own work, and now I wish I had used it at Amazon, where my team spent much more time maintaining and improving old code than writing new code.

Next.

Previous.