Search Results: "ag"

16 November 2007

Ondřej Čertík: SAGE Days 6

From November 9 till November 15 I attended SAGE Days 6 in Bristol, UK. It was a conference and a coding sprint for the SAGE project, which wants to build something comparable to Mathematica, Maple, Matlab and Magma built only from open source components without reinventing the wheel. Sage also provides excellent novel implementations for many mathematical algorithms (not found in Mathematica/Maple etc.).

I was invited to give a talk about SymPy, which is a Python library for symbolic mathematics, that we are doing.

Here are my notes from each day:

Saturday: one, two
Sunday: one, two
Monday, Tuesday, Wednesday: one

Impressions

Very positive. I started SymPy two years ago, because I wanted to play with symbolic mathematics in Python, see for example my presentation I gave at this conference for details. SAGE at that time was just able to do some mathematics things, but it was very weak in calculus, which is the SymPy's main domain. This has changed last half a year, when SAGE people managed to wrap Maxima in Python (which I thought to be completely impossible), so I started to follow SAGE development more closely. After the SD6, I must say I became very excited about the project.

One problem with mailinglists, IRC and other online interaction is that it's very difficult for me to get an impression about the people and the project. Being able to meet the developers and discuss with them face to face gives me the impression very quickly and very accurately.

By far the biggest guarantee, why it is worthy for me to contribute to SAGE, is the project leader, William Stein. He is very rational and pragmatic (I like these two properties) and after many discussions with him, I came to realize that he has basically identical views on the important things as I do and were I on his place, I would do the same decisions as he did and does. That's very nice, because I can concentrate my energy on things that I like to improve and don't have to worry about other things, because I know he will do it right.

The other SAGE developers are experts and with similar attitude as William has. It's enthusiastic to be among people who make things happen. For example one of the authors of Cython, Robert, implemented during SD6 a very nice HTML output, that shows Cython code, with colors according to how many Python API calls are called on that particular line, and by clicking that line it shows the corresponding C code.

SAGE project has a high aim and it stricly goes for it, without looking too much to the right or left, and that's how it should be. And it does produce a lot of very useful and high quality stuff along the way, for example Cython (probably the best wrapper for C/C++ things now, only pypy could possibly beat it, but that's still more a research project) or the SAGE notebook, which looks like a Mathematica notebook, but better and in a browser (together with a revision history, sharing, SSL encryption, etc.).

The only little problem is that currently SAGE developers are all mathematicians and as is well-known, mathematicians looks at mathematic from a very different prospective than physicists. :) And so I need calculus, advanced calculus and only when this is working, and working well, I can build on it some more advanced features. SAGE currently goes a little the other way - it has a lot of advanced features, from number theory, modular forms, elliptic curves, etc., but the basic calculus still needs a lot of improvements. SAGE wraps Maxima, because Maxima is quite fast, very well tested, so it works well. It's difficult to extend and written in LISP and that's very bad. That's where SymPy could help - it's in Python, very easy to extend, but currently slower than Maxima (rewriting parts of SymPy using Cython, or even C directly, will make it faster, hopefully as fast as Maxima or faster).

It's not yet in Debian, but SAGE people are working on it. It's not an easy task unfortunately.

Conclusion

SAGE is a very promising young project and I think it will succeed to provide an open source alternative to Maple, Matlab, Mathematica and Magma.

Adrian von Bidder: SW and HW-RAID: Bus usage

I wonder why Russel doesn't touch on system bus usage in his excellent article. AFAIK there are three main scenarios: SW-RAID, “classical HW-RAID” (RAID controller which is on the system bus as a complete unit, discs behind it) and “Add-On HW-RAID” (RAID controller is a device on the system bus which controls the non-RAID disc controllers which are also on the system bus.) SW-RAID is clearly worse than classical HW-RAID in terms of system bus usage, but I'm not sure how the Add-On HW-RAID chips compare to that - If CPU to memory bandwidth is much higher than memory to bus bandwidth they might be even worse than SW-RAID (RAID 5/6: transfer data to RAID chip for checksumming and from there to the disc controllers compared to checksumming on the CPU which gives higher CPU usage but less bus load.) But this is guesswork, I don't have much experience in this field, so corrections welcome!

Ross Burton: The End Of Homeopathy?

Dr Ben Goldacre hits the jackpot, moving from a column on Saturday's Guardian to a cover story in Friday's Guardian. It's a very balanced and reasoned argument against homoeopathy for people who don't understand what a fair trial is, how placebo works, or just how stupid homoeopaths sound when they try and explain it. It's down to permeated nano-particles, apparently. I recommend reading the article to anyone who thinks that homoeopathy is better than placebo or agrees that homoeopathy has a place in treating AIDS and malaria. Or people like me, who like watching homoeopathy get slapped down. For the medical geeks out there, there is the companion article in the Lancet too.

Russell Coker: Software vs Hardware RAID

Should you use software or hardware RAID? Many people claim that Hardware RAID is needed for performance (which can be true) but then claim that it’s because of the CPU use of the RAID calculations. Here is the data logged by the Linux kernel then the RAID-5 and RAID-6 drivers are loaded on a 1GHz Pentium-3 system: raid5: automatically using best checksumming function: pIII_sse
  pIII_sse  :  2044.000 MB/sec
raid5: using function: pIII_sse (2044.000 MB/sec)
raid6: int32×1    269 MB/s
raid6: int32×2    316 MB/s
raid6: int32×4    308 MB/s
raid6: int32×8    281 MB/s
raid6: mmxx1      914 MB/s
raid6: mmxx2    1000 MB/s
raid6: sse1×1    800 MB/s
raid6: sse1×2    1046 MB/s
raid6: using algorithm sse1×2 (1046 MB/s) There are few P3 systems that have enough IO capacity to support anywhere near 2000MB/s of disk IO and modern systems give even better CPU performance. The fastest disks available can sustain about 80MB/s when performing contiguous disk IO (which incidentally is a fairly rare operation). So if you had ten fast disks performing contiguous IO then you might be using 800MB/s of disk IO bandwidth, but that would hardly stretch your CPU performance. It’s obvious that CPU performance of the XOR calculations for RAID-5 (and the slightly more complex calculations for RAID-6) is not a bottleneck. Hardware RAID-5 often significantly outperforms software RAID-5 (in fact it should always outperform software RAID-5) even though in almost every case the RAID processor has significantly less CPU power than the main CPU. The benefit for hardware RAID-5 is in caching. A standard feature in a hardware RAID controller is a write-back disk cache in non-volatile RAM (RAM that has a battery backup and can typically keep it’s data for more than 24 hours without power). All RAID levels benefit from this but RAID-5 and RAID-6 gain particular benefits. In RAID-5 a small write (less than the stripe size) requires either that all the blocks other than the ones to be written are read or that the original content of the block to be written and the parity block are read - in either case writing less than a full stripe to a RAID-5 requires some reads. If the write-back cache can store the data for long enough that a second write is performed to the same stripe (EG to files being created in the same Inode block) then performance may double. There is one situation where software RAID will give better performance (often significantly better performance), that is for low-end hardware RAID devices. I suspect that some hardware RAID vendors deliberately cripple the performance of low-end RAID devices (by using an extremely under-powered CPU among other things) to drive sales of the more expensive devices. In 2001 I benchmarked one hardware RAID controller as being able to only sustain 10MB/s for contiguous read and write operations (software RAID on lesser hardware would deliver 100MB/s or more). But for random synchronous writes the performance was great and that’s what mattered for the application in question. Also there are reliability issues related to write-back caching. In a well designed system an update of an entire RAID-5 stripe (one block to each disk including the parity block) will first be performed to the cache and then the cache will be written back. If the power fails while the write is in progress then it will be attempted again when power is restored thus ensuring that all disks have the same data. With any RAID implementation without such a NVRAM cache a write to the entire stripe could be partially successful. This means that the parity block would not match the data! In such a situation the machine would probably work well (fsck would ensure that the filesystem state was consistent) until a disk failed. When the RAID-5 recovery procedure is used after a disk is failed it uses the parity block to re-generate the missing data, but if the parity doesn’t match then the re-generated data will be different. A disk failure may happen while the machine is online and this could potentially result in filesystem and/or database meta-data changing on a running system - this is a bad situation that most filesystems and databases will not handle well. A further benefit of a well designed NVRAM cache is that it can be used on multiple systems. For their servers HP makes some guarantees about which replacement machines will accept the NVRAM module. So if you have a HP server running RAID-5 with an NVRAM cache then you could have the entire motherboard die, have HP support provide a replacement server, then when the replacement machine is booted with the old hard drives and NVRAM module installed the data in the write-back cache will be written! This is a significant feature for improving reliability in bad corner cases. NB I’m not saying that HP is better than all other RAID vendors in this regard, merely that I know what HP equipment will do and don’t know about the rest. It would be good if there was a commodity standard for NVRAM on a PC motherboard. Perhaps a standard socket design that Intel could specify and that every motherboard manufacturer would eventually support. Then to implement such things on a typical PC all that would be required would be the NVRAM module, which while still being expensive would be significantly cheaper than current prices due to the increase in volume. If there was a significant quantity of PCs with such NVRAM (or which could be upgraded to it without excessive cost) then there would be an incentive for people to modify the Linux sotware RAID code to use it and thus give benefits for performance and reliability. Then it could be possible to install a NVRAM module and drives in a replacement server with Linux software RAID and have the data integrity preserved. But unless/until such things happen write-back caching that preserves the data integrity requires hardware RAID. Another limitation of Linux software RAID is expanding RAID groups. A HP server that I work on had two disks in a RAID-1 array, one of my colleagues added an extra disk and made it a RAID-5, the hardware RAID device moved the data around as appropriate while the machine was running and the disk space was expanded without any down-time. Some similar things can be done with Linux, for example here is documentation on converting RAID-1 to RAID-5 with Linux software RAID [1]. But that conversion operation requires some down-time and is not something that’s officially supported, while converting RAID-1 to RAID-5 with HP hardware RAID is a standard supported feature.

Michal Čihař: Lets automate the work

Fixing bugs in code and committing it to VCS usually also means that you need to interact somehow with BTS you use to let it know that the bug has been fixed. This is manual work which could be done by some clever commit scripts, right? All what is needed is just spend some time to set it up. Most of my development currently goes to Gammu/Wammu which uses own Mantis bug tracker. It is already a bit prepared for integration with VCS, but I never found their documentation sufficient. Fortunately somebody wrote tutorial on integrating Mantis and Subversion, which made it quite easy to set up. All what was needed was to put little commit hook into SVN. Now the logical step was to make it also for Debian packages. A bit of Googling revealed discussion on debian-devel. Unfortunately no example for SVN, but ripping out needed things from Manoj's script for Arch was quite easy and I made my own commit hook. While looking at this, I also found wonderful tool called debcommit, which commits changes to Debian package using changelog entries as commit message. I still wonder how many useful tools are hidden to me. The only thing I don't know is why Google didn't show me yesterday svnlog, which seems to have support for Debian BTS out of the box. Maybe I just entered slightly different keywords than today when trying to find the mentioned thread on debian-devel.

15 November 2007

Adeodato Sim : A copy-cat strike?

So, uhm, somebody around here must have felt inspired by the French, because this very morning I noticed in the bus a note announcing a strike starting tomorrow. It will last a week. The disagreement seems to come from a difference in salaries between the workers of the company that connects Alicante with nearby towns, La Alcoyana, and the company that runs buses within the city, Masatusa. Accoring to this article (in Spanish), in La Alcoyana they earn up to a 40% less. This seems to happen because Alicante’s Town Council is responsible for transports within town, but it’s the Regional Government that regulates how La Alcoyana should operate. They say they will keep a 60% of the buses, which sounds like a lot to me (how much is it in France, Christian?). We’ll see how it goes.

Julien Danjou: Time < work

It's official: I'm beginning to be a bit overloaded. Luk gently asked me about my status in the (stable) release management team. That just made a bit more guilty not doing that I'd like to do. Current TODO list involves: Now, the thing that will help: I'm house moving this week-end with no (real) Internet connection yet. I only managed to establish a VPN over port 53/udp on a hotspot from a pub near my new apartment with 25-30 KB/s bandwidth, which is better than nothing actually. I'm going to see what happens by the end of the year and if I'm able to catch up with everything. Otherwise I might need to drop some things :-( Life is too short.

Steve Kemp: It brings on many changes, and I can take or leave it as I please

On Tuesday I released a new version of rinse which now supports Fedora Core 8. On Wednesday I rebuilt xen-unstable several times, and reported a vaguely security relevant issue against the Exaile music player. I flagged that as important, but I'm not really sure how important it should be. True it works. True it requires DNS takeover, or similar, to become a practical attack, but .. serious or not? Today I'm wondering about "hiding" messages in debian/changelog files. Each changelog entry includes the time & date of the new revision. I tend to pick the last two digits of the timestamp pretty much as random. (ie. the hours and minutes are always correct, but the seconds is a random value). Given two digits which may be manipulated in the range 0-59 I'm sure a few small messages could be inserted into a package. But the effort would be high. (Hmmm timezone offset too?) And that concludes todays entry.

Kartik Mistry: Debian Tshirts

* Sometime ago, I thought, we should have T-shirt for Debian Project Day. I asked Pradeepto and he literally dragged me in pool of thoughts and he started things that had very happy end. Thanks to everybody who contribute so far. The design will be simple Debian logo plus ‘debian/rules’ below it (as we are going to lower the cost!). If you feel, if you can contribute in this, you have limited time! I should have blogged this earlier :(

Christian Perrier: [life] Horrific French Strikes

So, our country is again in one of its recurrent strike madness. Yesterday (Wednesday), unions of the public transportation companies (mostly SNCF for trains all over the country, RATP for Paris and suburbs metros/bus system and maybe a few transport companies in other cities) called for an unlimited strike. The point is protesting against the project of harmonizing the retirement systems of these companies with the system used in private companies (AND many public ones such as Onera who I work for). The French retirement financing system is facing the challenge of all participative systems (where the current workers pay for the current retired people, contrary to cpitalization systems where one spares one's own retirement money during one's work life....I hope this is clear with my broken English). As there are less and less workers and more and more retired peoplen the load on workers is becoming harder and harder while the retirement 'salaries' (what's the word for 'pension'?) can only be lower. As a consequence, in the standard retirment system in France, ppl now have to work for 42 years to get a full pension when they retire (theoretically we can at 60....but practically, this happens at 65). In the same time, workers at SNCF, RATP and a few others still have a special retirement system with only 37 years to work and the possibility to retire when reaching 55 for some of them (good ol' days of steam trains justify the work being "hard"). All attempts to change this have failed up to now because of the power of unions at SNCF/RATP/others and the power they have to screw out the entire country. Attempts in 1999 lead to huge strike with, at that time, a strong support by the general public (who feared for their own retirement system.....the strike also being a good way to protest against the general policitcs of the government at that time...as usual). Things changed now and the majority of ppl no longer support so-called privileged people to try hanging to their special retirement system....but of course, unions still have to show their power and, anyway, very few strikers may break things a lot.....and here we are with huge strikes. Yesterday, I managed to do it well with a good train coverage on my line (1 all-stops train per 30minutes) and running at both ends (good for health!). Today was a little bit jerkier with the scheduled train being cancelled and the next one 30 minutes later...and well packed..:-) Hopefully, for tomorrow, the situation should improve as negotiations between government and unions are planned (they were already but I guess that unions had to show their strength....and check whether the average people support them like it happened in 1999....which is actually a complete failure as the general feeling over French population is "enough!"). That's good as I'm not completely sure I can sustain running 12km every day.:)

Kartik Mistry: Foss.in: Posters

* Cool. Amazing. Put all good words here <..>. Thanks to Kishore and Harikrishnan.

Ian Wienand: Truth in names

What is it with the price of cables? Even leaving aside patently absurd enhancements such as gold plated optical connectors, who is buying all these ridiculously overpriced Monster cables? Thus when purchasing a new cable today it was a pleasant surprise to find a cable company who are happy to state their business model prominently in their name: ConCord. The only thing that would have made it better was if their tag line was "we're screwing you for this cable, but at least we're telling you straight up". ConCord;
we're screwing you for this cable, but at least we tell you straight
up It reminded me of the apt rename of the UNSW student centre to the NewSouth Q, which I assume was done to more accurately describe its function as a gigantic queue (though they might as well have gone the whole way and called it the "NewSouth QForAnHourAndWellSayWeCantHelpYouAndYouNeedToStandInThisOtherQ").

14 November 2007

Romain Francoise: RFC: vi, the Esc key, and Ctrl-[

As many of you probably know, the vi editor has two main modes, and switching back to command mode requires sending the Escape character. This can be achieved either by using the Esc key (the top left key on most keyboards) or by using CTRL-[. The latter has the advantage that the [ key is much closer to the home row than the Esc key, and is thus faster to type. Despite that, pretty much all the vi users I know still use Esc, and I wonder why. I've heard that on some keyboard layouts (like the French azerty), CTRL-[ is actually impossible to type, but in my experience many Free Software people (like me) use the US layout even though it's not their local layout.

So if you have a few seconds, I'd appreciate your feedback (via a comment on this post, or an email). You have the following options:Thanks!

Eddy Petri&#537;or: Linux: plain weird network behaviour; Windows is OK

Update: problem fixed, thanks for the comments; it was MTU related issues.

Note: This is a long post, but I expect it to bring in some questions for many Linux people; I advise you to read this when you have enough time.


After the last events related to connectivity at home which have been lasting since Thursday evening and the weird fact that it seems that NAT doesn't work at home, but does at work for the same setup, I called the ISP's support and wasted 15 minutes trying to convince them at least to send a technical team with another modem just to test if that is the reason for the breakage.

Of course, talking to the ISP support and trying to convince them that there might be a problem on their side since NAT works with another provider but doesn't with them, was fruitless.

Tonight I was stuck and tried another approach, convinced I would confirm my suspicion that there is something wrong on ISP's side. Still I am not yet sure what to conclude from what happened.


So, to get a better view of what is going on, I'll describe the setup I have and what are its limitations and characteristics. People in a hurry can skip to the paragraph starting with "I tested" and stare in wonder at will.


So the connection I have is done through a DSL modem which gets the MAC of the network card connected to it and exposes that as its own to the ISP's network. This MAC seems to be quite persistent and special measures must be taken in order to be able to use another NIC to connect. The modem (or probably some machine in ISP's; the IP is 10.10.0.1) offers a DHCP address and everything should work fine.

Because of this "your MAC is my MAC" issue, when I connected the first time, I used an USB NIC since a broken router or some temporary failure would have allowed me to use the Internet connection directly from my laptop. I can say this decision has proven in time to be wise.

The router I used until now is a NSLU2 with Debian installed on it. The built in network interface always faced the internal network.

The router (which I call ritter) served as a NAT router for two machines inside the network, my laptop and my apartment mate's laptop. All until last Thursday, after which it never got back properly.



I tested (doing NAT on my laptop; the laptop shouldn't have been affected by the power problems):

Of course, I have n-checked that /proc/sys/net/ipv4/ip_forward was set to 1, the tables had policy ACCEPT and there were no extra rules, except the basic NAT-ting stuff, the routes were correctly set on both the clients and the machine doing the NAT.


All I could see is that:
  1. the machine doing the NAT was always working fine
  2. at work all NAT clients worked fine
  3. at home any of the NAT "clients" were
    1. able to resolve addresses while the DNS server was in ISP territory and another LAN
    2. ping the outside world (if ping was available - in D-I is not)
    3. hanging when trying to get a http page
    4. telnet-ting directly to the port 80 was ok (but I didn't try to "GET / HTTP/1.0")

So after all of this, I was thinking of trying to see if a new client (the laptop of my apartment mate, a Windows XP machine) would work using the connection at home. It didn't work.

Then I thought of trying to do "Internet Connection Sharing" as is called in Windows. Of course, there was some pain to find Windows XP drivers for the ASIX AX88172 network card (remember, the modem needed to see the MAC of that NIC), but I managed to find the proper one.


And, almost sure the NAT wouldn't work for this case either, I configured the new connection as a shared one. I didn't even disabled the firewall, as I was thinking I could take those down gradually.

I wasn't expecting this, not even by pure chance, but my laptop which was a NAT "client" now was able to browse, ping and do whatever was normal through NAT, while the Windows machine was doing the "Connection sharing".

I was utterly flabbergasted. And that was just the beginning.


I was expecting that the problem coincidentally went away, but after a minute I was proven otherwise. It still didn't work with Linux as the NAT-ting machine. I connected back the USB NIC to the Windows machine and I saw the same thing. NAT was just working.


At that point I was to observe an even more shocking fact: the IP that the Windows machine got was different from the one the Linux machine received, in spite of the fact that the network card was the same, so it would have made sense to get the same one. More than that, the IP that the Windows machine got was from an entirely different network, although it was a valid IP belonging to my ISP.

I was thinking that one reason why it works with Windows might be that there could be some TCP protocol twist that is differently implemented in Windows and the equipment from my ISP gets along better with the Windows network stack.


As a way to test that, I am thinking of forcing somehow the IP on the Linux machine to see if anything changes. But before doing that, I felt the urge to post these, maybe some kind soul will shed some light on this issue for me or drop a hint.

Another reason might be different DHCP servers answering, but I don't know how I can see in Windows who offered the lease.


If anyone has any clue why these weird things happen, please drop a line. I would greatly appreciate it. TIA.

Eddy Petri&#537;or: Lesson relearned: when Linux networking weirdess occurs...

My relearned lesson for the day: when Linux networking weirdness occurs in a NAT environment, remember to try MTU clamping.

Thanks to the comments by Justin and Sesse, I was fast-tracked to the core of the problems I have been experiencing since Thursday, MTU issues. What's worse (from my pov) is that I have encountered this issue before with the provider I had in Timi oara, but, since that ISP was using PPPoE and my current ISP in Bucharest doesn't, I never really made the connection. I even had a commented out iptables rule for MTU clamping in my firewall script.

The rule I am talking about looks like this:

iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -o $EXT_IF -j TCPMSS --clamp-mss-to-pmtu

or like the one I have been using (seems more logical to me):

iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu


Note that this is not a fix, but a workaround and the real problem is over-zealous admins or weird setups[1] which think that banning TCP fragmentation (or the entire ICMP traffic) is a way to secure networks.


Once again, thanks to everybody who read and/or commented about my issue.

[1] Sesse told me that in his case there was a transparent proxy involved when he exeprienced MTU weirdness.

Michal &#268;iha&#345;: Gammu test version 1.14.90

Okay, I messed it up. Recently released 1.14.0 still had some artefacts from SMS handling cleanup and it should be fixed now. Besides this, experimental (not tested) support for OBEX on Siemens phones has been added and Motorola users should be finally able to get their messages. Full list of changes: You can download from usual place: http://cihar.com/gammu/ I will try to stabilise to 1.15.0 as soon as possible, what effectively means feature freeze from now, so this testing series should be shorter than usual.

MJ Ray: Enterprise Week 2007: Tuesday, non-existant events

I was in Bristol for other reasons again yesterday (as I was last Tuesday too), so I popped along to the advertised Trade Fair at City of Bristol College - or at least I tried to. If it was running, it wasn't an open door event, apparently. I left the business department some info on Cooperatives-UK and -SW anyway. I'm a bit disappointed with Enterprise Week so far. It clashes with at least two other government-sponsored "Week" campaigns (one of them is Get Safe Online week, which I'll write more about next week) and only business networking groups seem to be pushing it heavily here. I'm reconsidering whether I'm going to go to events on Thursday or Friday as I'd intended. The Social Enterprise People: Opposites Attract is running at Ely tomorrow (Thursday) but I'm a little hazy on when it starts and finishes. Other than that, I've not had any responses to asking what events are happening. Is England not very enterprising in 2007?

Adeodato Sim : ctrlproxy may not be perfect, but I'm not looking back

Back when I had a computer 24/7 at home, I would irc from there, using irssi inside screen. Using the laptop at home worked fine, since there was no noticeable lag when typing, and I wasn’t away from home that often, so lag in such occasions was acceptable. Later on, I changed flats and the 24/7 computer could no longer run 24/7, so I moved irssi to a remote computer. Used as I was to no lag at all, this turned out too painful. I ended up with one remote irssi to read backlog, and one local irssi from the laptop, joining and parting as I turned it on and off, or changed networks. This was, er, suboptimal. Finally, Holger recommended me using an IRC proxy, ctrlproxy in particular. Basically you run it in any 24/7 computer, and then your irc client (not necessarily irssi, mind you) connects to it, instead of directly to the irc server. On connect, ctrlproxy sends you backlog since the last time you quit (but this can be disabled), and after that is transparent. For me, there’s no looking back, since I hate lag when typing, and I didn’t want to be joining and parting all the time. If you don’t mind lag, or always connect from networks with very low latency, well, consider yourself lucky.

Anthony Towns: Managing Debian Installs

For a while I’ve been trying to find some easy way to keep a few machines I admin behaving the way I want them too with minimal effort. They don’t really need much maintenance – but I would like something to help keep them all in sync. Basically, something like FAI, but much, much simpler – ideally something that takes five minutes to understand, and another five minutes to deploy; and leave the more complicated and powerful tools for when they’re actually needed. I figured what I really want was just a simple way to make a meta-package – one that doesn’t really provide any functionality, just tells apt/dpkg what I want installed (via Depends), and what I don’t want installed (via Conflicts) and adds any extra configuration stuff or local scripts that I decide I want. But doing that with a real Debian package is harder than I’m really comfortable with – I don’t want to have to worry about potential lintian errors, or rules files and debhelper commands, or writing a Makefile to get my files installed or whatever, I want something more trivial than that. Looking for meta-package creators, the only one I spotted that I thought looked likely was cdd-dev, described as “Custom Debian Distributions common files for developing meta packages”. Unfortunately it seems to just provide templates, which makes things quicker, but no less complex. Fortunately equivs (“Circumvent Debian package dependencies”) is actually used for metapackages these days, according to its maintainer on IRC and its long description:
This package provides a tool to create Debian packages that only contain dependency information. One use for this is to create a metapackage: a package whose sole purpose is to declare dependencies and conflicts on other packages so that these will be automatically installed, upgraded, or removed. Another use is to circumvent dependency checking. […]
That turned out to work much better than I remembered (from whenever I last tried it – back in ‘99 I guess?), with the only drawback being that I couldn’t add files easily. But that’s just a matter of creating a patch to equivs, which I then won’t have to worry about again. So having done that, I can now create a metapackage to do whatever I want by creating a file like:
Suite: client
Section: misc
Priority: standard
Package: ajs-client-stuff
Version: 20071114.1
Maintainer: Anthony Towns <aj@erisian.com.au>
Description: Metapackage for aj's client computers
 Depends on necessary packages, etc.
File: /etc/apt/sources.list.d/client.list
 deb http://mirror.localnet/debian etch main contrib non-free
 deb http://mirror.localnet/debian etch-proposed-updates main contrib non-free
 .
 deb http://security.debian.org/ etch/updates main contrib non-free
File: postinst
 #!/bin/sh -e
 .
 apt-key add - <<EOF
 [output of gpg --armour --export $KEY]
 EOF
 .
 ##DEBHELPER##
debhelper kindly takes care of getting the permissions right for me, and equivs will generate a full source package if I tell it to, which I can just upload to mini-dinstall and have a regular Debian repository just by writing a text file and running equivs-build. And my metapackage can add dependencies, conflicts, apt sources, cronjobs, scripts, configuration files, documentation, or whatever I happen to want – which means I can make it automatically update itself, and thus install any dependencies or remove any conflicts, which then means that modifying the config on all the machines is just a matter of updating the metapackage. And new installs is (hopefully) just a matter of doing a standard install and then adding the metapackage. Perfect. …even if it is really little more than a reinvention of rpm’s .spec files. :)

Michael Janssen: On happiness

I was viewing one of my most favorite speakers today, Lawrence Lessig, talk about copyright, giving a speech that is very similar to one that I have heard a few times online, but Lessig presents it so well that I end up watching it over and over again. This particular speech was given at TED. The nice thing about coming across a TED talk is that it is almost always enlightening in some way. Lessig's speech is enlightening enough, and it reminded me that I should watch something of his since he has switched to fighting corruption instead of copyright.

Another nice thing about the TED talks is that they are all sitting on the same site - so they are all interlinked with similar topics and they also include the new videos which are being posted fairly often. Sometimes I don't have time to watch more than one talk, but today I was blessed with a surfeit of time, so I clicked on another link which interested me. This talk was from Dan Gilbert and was coarsely about happiness, and more importantly synthetic happiness and how our brains work. It started with talk about the foundation of our evolved brains, of which the most important fact was considered the Impact Bias. Gilbert talked about the Impact bias as a primary result of the evolution of the mind from earlier man to modern man - it is the ability of our mind to predict the future without actually trying it. It is the reason why you have an aversion to a food that you haven't even eaten or don't think you will like a movie that isn't even released, or the opposite. I believe that the impact bias is very important to the psychology of human beings - while it may not actually be very important to the state of the world that you eat a pastrami sandwich today instead of a salad, it must mean something to you, or your life will end up seeming meaningless and insignificant. Gilbert focuses on the impact bias in the dual - that choices that we are given to make ourselves will eventually have an effect on our overall happiness. The experiments explained in the video show that, if a choice has been made, the user is more likely to be happy with that choice later, especially if the choice is an irreversible decision. In the talk he talks about simulated happiness and actual happiness, and that the mind is incredible at simulating happiness when placed in a situation where it did not come out for the better - some famous examples include people who are in jail for long times feeling that they are better for their incarceration after being released (or even while incarcerated). One important part which I think wasn't really touched upon by Gilbert was the fact that while the mind can produce synthetic happiness, in the long run the difference between synthetic and "real" happiness is actually rather small - over the long run all the happiness produced tends to even out, and the mind doesn't distinguish about really being happy or not. For a third point, it is a very interesting conclusion (and probably a significant jump) that most people strive to be happy overall, and most people succeed. This means that even though there are people in many different levels of happiness from an outside perspective, it is worthless to look at someone who is rich and happy and someone who is poor and happy and say that one must be happier than the other because they have more of the "real" and less of the synthetic happiness. Happiness is not a zero-sum game - everyone can be happy all of the time, and noone loses out. This may be an interesting ideal to reach for and may seem impossible to achieve considering all of the hate and rage which exists in the world today, but I believe that it is even possible yet - especially considering this "Happiness Bias" which seems to exist within everyone.

Next.

Previous.