Search Results: "Simon Richter"

14 September 2007

Simon Richter: ARM porting

I'm thinking about setting up an ARM developer machine, with a twist: I want to have JTAG accessible remotely. Obviously, that is a bit of a security risk if applied to a normal machine, so I'd probably build some system allowing you to upload and run images.

Simon Richter: "Free" markets

Over in alt.anarchism rages a discussion on the "efficiency" of markets, mostly circling around the medical sector as an extreme example (lots of government interference). Since this is Usenet, we haven't found consensus on the definition of a free market yet. The definition I learned in school was that free markets are fully transparent, i.e. buyers and sellers both have the necessary knowledge to determine a product's quality and are aware of the other market participants. The proponents of anarcho-capitalism contend that a free market is one that is devoid of regulation. These definitions are pretty much opposites in highly specialised fields (such as medicine), as patients usually lack the expertise to recognise "quality", so market regulations are established to promote transparency and establish a free market. So, which definition were you taught? Update: corrected the name of the group.

13 September 2007

Simon Richter: So much for plans

I need to learn about posting plans. As was to be expected, this didn't work out the way I wanted to. Step one of my plan was rearranging everything so I could work without the laptop, which means moving the Pegasos back into my room. Since I still need it as a DSL router until I find a better solution, and there is no cable between the modem and my room, I thought about using the wireless network for that (the AP is right next to the modem). So I switched off VLAN mode everywhere (the AP cannot mix tagged and untagged traffic on one port, and the modem cannot do VLAN tagging either), and plugged a zd1201 USB network adapter into the Pegasos. Worked so far with an Ad-Hoc network, now let's make it talk to the AP. Fire up wpa_suppos^H^Hlicant, see the mess. After some googling I found out the problem: the zd1201 Linux driver does not support WPA. As my flatmate might need the network tonight and cables around the place are bad for moving in, I shall make it work in the most ugly way imaginable: with WEP. This means: if you drive by my place and crack one of the networks with WEP, you only risk a 50% chance of ending up in my honeypot. I wonder if I should write a shell script that occasionally "negotiates" a new key with the AP by setting it over SNMP.

Simon Richter: Things I do after spending a day in front of a computer

Okay, apart from finishing the move from the laptop back to the Pegasos (I compiled d2x-xl yesterday, today is reserved for the more serious stuff), this evening will be dedicated to cooking and my other pet project, xcontrol. So, it will be risotto, wireless networks and autobuilders, in no particular order. In other news, I've been running an archive rebuild to find out which packages actually implement the build-arch and build-indep targets. Out of the first 70, I've counted 11. Since so many packages would be affected, a mass filing of wishlist bugs is probably not the way to go, so I guess I'll set up a web page with the results (after making my autobuilder more robust; it still gets too easily confused) and try to shame people into updating their packages.

12 September 2007

Simon Richter: 8-)

My new flatmate just got his keys, and brought an entire box of that excellent Jasmine tea that I couldn't find in any of the "Asia shops" around here. Please imagine a picture of a cat with wide open eyes captioned "I is happy, and very awake" in this space.

11 September 2007

Simon Richter: --boxes

Sadly, I have to return the laptop a friend loaned me for the past months (thanks again, dude), which means I'm going to use the mighty Pegasos for daily work again. This means I have to find a DSL router. My preference would be that this box also keeps the Debian mirror, so those Japanese NAS boxes running Debian seem ideal. So the plan for the next weeks shall be ordering one (the first real-world test for my language skills) and making it work.

10 September 2007

Simon Richter: This is why we can't have nice things.

A group of Debianites is currently working on machine-readable copyright files for Debian packages. Since I have to do this work anyway, whether the result is structured or not, I thought I could make uclibc a guinea pig for that too (it already is for xcontrol). That is harder than it sounds, though. The package consists of about 2,000 files, and each of them has multiple copyright holders who each imposed their own licence terms. A fun year lies ahead.

Simon Richter: Living on the edge

of the bell curve, that is. This comic made my day.

9 September 2007

Simon Richter: I can has my sanity back plz?

Due to popular demand, there is now a new version of mISDN in experimental. The usual warning applies: it will break your system, it will not work out of the box and whatever you do to make it not Oops your kernel during boot will probably no longer work with the next upload. YMMV. HTH. HAND. You are demanding an explanation? Well, there are a few problems with this package that are not trivial to solve. The most visible of them is that it provides drivers for a bunch of ISDN cards that are also supported by the mainline kernel. The hotplug subsystem handles this situation totally gracefully and simply loads all of them. Now if that wasn't nasty enough by itself, mISDN also wants to set up the entire stack when a hardware driver is loaded. All the modules that aren't there at this point are replaced by NULL pointers. As there is no formal dependency on the modules providing layers 1-3, I invite you to guess the stability of your kernel at this point. Upstream has an init script that parses XML files.

4 September 2007

Simon Richter: Three... Two... One... Zero.

The latest version of d2x-xl works quite well, so I've started packaging it. Since it needs the data from the commercial game to work, it will probably end up in contrib. The interesting thing is that there is another project, Into Cerberon, working on a Doom 3 mod with free game data -- it would be interesting to see whether both projects could be combined in order to get a completely free game. Difficulty: Into Cerberon is planning for a triangle based engine while d2x-xl thinks in cubes. Update: Into Cerberon use the Doom 3, not the Quake 3 engine. Thanks "zulu9" for noticing. Also, Josh alerts me of some interesting (cough) licensing issues around this code. As I'm still busy wading through the uclibc source compiling a proper list of attributions and licenses (ftp-master thinks a blanket statement "If you link against this, the LGPL applies to you, if you look at the files, please see each individual file" is not enough -- I can somehow see their point, but it takes ages to do that) that will have somewhat lower priority. I know why I rewrite things from scratch rather than fix them these days...

1 September 2007

Simon Richter: Me, myself and I

Some people have hinted that while my blog started out with the occasional bit about my life, or at least a personal opinion, during the last months it has all been technical content, and most of it rants about a particularly stupid piece of technology. So, I guess I need to get a life (again). NP: Kylie Minogue - "Disco Down"

31 August 2007

Simon Richter: Carbon emissions

Russell thinks that trading emission "rights" individually would decrease emissions. The global emission market has shown quite the opposite happening, countries that have no industry and did not contribute to the problem now sell their rights to industrial countries, with the net effect being as if all these countries suddenly became industrialized over night. I don't think anything different would happen at an individual level. The fundamental problem is this: emission rights trading happens only when buying rights is cheaper than actually reducing your emissions. When this is relatively cheap, you remove any incentive to develop better processes in individual companies; if it is more expensive, most industries will remain at the status quo (no emission trading) while those where it still makes sense fiscally now have an alternative, which diminishes the market for technology companies specializing in filtering technology and process optimization (i.e. it becomes even more expensive to behave environmentally conscious). At the same time, the cost of buying these rights from individuals will be passed on to the consumer, the only way to get this money back will be to sell off their emission rights. From a macroeconomic perspective, no money ever changes hands, but you have effectively transferred the individual emission rights over to the industry. Looking at individuals, you are penalizing those that behave environmentally conscious and neither use their "rights" nor sell them. So, emission rights trading is a really bad idea.

24 August 2007

Simon Richter: componentization tutorial #1: understanding what we are trying to do

This is the first post of a series on componentization, starting with a brief explanation of the problem(s) we are trying to solve. I expect some familiarity with programming in general, but no specific knowledge of any particular system; the terms "DLL" and "shared library" are used interchangeably. When you are writing a DLL, you are essentially committing to support whatever interface you are exporting forever. So it better be good on the first try. DLL hell is what happens if it was not good, and you end up making an incompatible change. The obvious way an interface can be "not good" is when you need to touch the header files that define it in order to implement some new functionality. You can get away with a few things, like the addition of new functions, if you can somehow make sure that users will always have a recent enough version of your DLL around, but in general any change to the interface is going to be incompatible. The traditional Unix way of solving the issue has been renaming the library. When you link a program against a shared library on a system that uses the ELF format, the linker looks inside the library for the SONAME field, which tells it what name the library wants to be known under, and the program will then attempt to load this file at startup (which usually is a symlink to the latest compatible version). This "official" name of the library usually contains a number (sometimes more than one), and when there is an incompatible change, you simply change that number, and the new version of the library can be installed in parallel with the old. There are additional mechanisms, like symbol versioning support, that allow a single library to provide different "versions" of exported functions, and have the program specify the desired version for each symbol. To run a system like this, one generally needs to keep track of programs' dependencies; this generally happens in the package manager with more (Debian) or less (Red Hat) support from package build scripts. If you built your system from scratch, you end up doing this work yourself. That's why you had highly paid system administrators in the old days, and very short shell scripts to replace them (with various degrees of success) in the current age. In the Windows world, things have been a bit different, because except in large installations, you generally do not have a clueful, benevolent system administrator who will take care of these things; rather, you have users that expect your software to work without having an insight into the inner workings. In general, software developers have not been taking chances and simply shipped all the DLLs they needed along with the main program. When they installed these DLLs into the same directory as the program, things were fine, if they installed them into the WINDOWS directory, not so much, because when you had two conflicting versions of the same DLL, you had to decide which one to keep, and a program that would only work with the one that you threw away would simply fail in curious and interesting ways. This is the original definition of DLL hell — you cannot do it right. To make matters worse, this is not the only way an interface could change. When you define a platform, you write up an "Application Binary Interface" (ABI) document that details conventions that should be followed; for example, the ARM processor does not have a dedicated stack pointer register, so the ABI document for Linux on ARM says that R13 is to be used as a stack pointer, functions may thus expect it to point to memory that is readable and writeable, and memory with an address lower than the stack pointer is considered "free". When the function is done, it is supposed to jump to the address in R14, which happens to be the register the ARM's "Branch with Link" instruction sets to the address of the instruction following it. If the function takes arguments, the ABI says where to find them, and if it returns a value, it also tells where to place that. For everything not in the ABI document, the compiler author gets to choose. The ABI document usually attempts to be rather minimal, so it defines how C functions are to be called, and calls it a day. Anything not in the C standard is not guaranteed to work between different compilers (or even different versions of the same compiler). That includes C language extensions such as the "long double" data type, language features in C++ and Java such as namespaces, nested types and exceptions, and the data structures used by the C library's malloc() function. The latter makes life difficult even for pure C programmers, as it disallows releasing memory from a different module than the one it was allocated in, because the different modules may link to different C libraries. In essence, this means you are not supposed to export anything from a DLL that is not a C function, and even then, there are additional requirements. You could in theory export data objects, but that is discouraged, as it exposes an implementation detail. Now, we're in a bit of a dilemma here. There is lots of interesting code out there that is not necessarily written in C, we'd like to reuse it and we don't want stuff to break. The Linux approach so far has been "we simply pretend the problem does not exist", and this has been working to a large extent, simply because everyone uses gcc, and when the ABI extensions the gcc people had made changed, recompiling everything that uses these extensions makes the problem go away. This has several drawbacks. For one, it mandates that the tools used to rebuild everything and keep the installation consistent be written in C or handle the transition gracefully (for the curious who have a Debian system handy: look at libapt-pkg's SONAME), and it also requires that we have the full source code for everything not just available but buildable in an automated way. Within the context of a Linux distribution, both of these are true, so we have survived the last major ABI transitions without too many losses. So we need an extension of the ABI document that specifies how modules written by different people and compiled with different compilers can interact. These are commonly called component models, and, to quote Andrew Tanenbaum, "[t]he good thing about standards is that there are so many to choose from". Next: "componentization tutorial #2: CORBA and COM"

Simon Richter: make:1 - msbuild: 0

It is the year 2007. The entire world has build tools that look at the modification dates of files to decide whether a certain build step needs to be run. Well, except for a small town somewhere near Seattle. A bug report for that has been opened almost a year ago, only to be closed a month later with a resolution of "cannot be resolved" in light of the new guidelines on bug reporting that state that no bug reports for intrusive changes will be honoured for Visual Studio SP1. I'm slightly tempted to write an open-source reimplementation of msbuild and place it under the GPL. What I won't do is answer to Their job advert.

23 August 2007

Simon Richter: #debian-superh

I just registered that channel on oftc. With currently three people (one being idle since 11 days, one being the OFTC admin that allowed me to register it despite not being the first person on the channel and one being myself), there is still some potential for growth.

20 August 2007

Simon Richter: Non-standard compiler extensions

Normally I don't like them, because the people using them write non-portable code. In some cases however (mostly when writing stuff other people would write in perl), I'd like things like __attribute__((mode(QI))) to work, and not claim that while the compiler perfectly well understood what I was trying to do, it can nonetheless not help me around writing my own support for 128 bit types. At least MSVC is no better, __int128 has the exact same behaviour. Bleh.

19 August 2007

Simon Richter: Hacking

Some more hacking and the xcontrol aware "checkbuilddeps" command is nearly done. I have no idea whether using apt to access the package database was a good idea -- those bits that deal with it are hardly readable. On the other hand, directly reading the status database is frowned upon. Hooray for more abstraction layers. In other news, there is now a wiki page for xcontrol.

16 August 2007

Simon Richter: first draft of xcontrol uploaded

The first version, 0.0.1, doesn't do too much yet -- all it can do is transform its own xcontrol file to a control file that doesn't contain cross compilation hints. If you want to take a look and don't have NEW queue access, check it out in my Debian home dir/dump. The next step is probably going to be template package handling, as that is the next thing I need for mISDN. So it is feature request season now. What control fields would you like to see added?

15 August 2007

Simon Richter: IPv7 will be...

... much like IPv6, except they finally decide to move the checksums to the end of packets to make it easier to handle them in hardware. It's not as if there hasn't been any precedent for that.

Simon Richter: VCS merges

Matthew, the situation you describe can be avoided by creating an explicit relationship between the values that need to change together, either by computing those that can be computed, or by having the build process error out at some point if you did something wrong. For example, I can use either char const *const keywords[] =

    "foo",
    "bar"
;
unsigned int const num_keywords = sizeof keywords / sizeof *keywords;
(for more correctness, use "(&keywords[1] - &keywords[0])" as the divisor), or you can explicitly tell the compiler how many keywords you expect, using unsigned int const num_keywords = 2;
char const *const keywords[num_keywords] =

    "foo",
    "bar"
;
What we lerned in our database courses is true in other places as well: redundant information has a habit of going out-of-sync, so we should avoid it (=> db normalisation), or create a connection between the redundant bits (=> foreign keys).

Next.

Previous.