Search Results: "rak"

5 September 2008

Gunnar Wolf: Awesome!

For about eight years, I was a very happy WindowMaker user. It was very lightweight, aesthetically pleasing, and I had interiorized its behaviour and keybindings so much, I didn't feel I'd ever switch away. I periodically tried (forced myself even!) to use any of the other, more en vogue environments... Experimented using Gnome for a week, KDE for a week, XFCE for a week (so I would have enough time to learn their ways)... And always came back to my good, well-known wmaker.
In 2006, when we held DebConf6 in Mexico, I saw how other people worked with ion3. I fell immediately in love with it. Not because it is prettier, snappier or has nicer widgets than other window managers - but because it is enormously more usable. Quoting Tuomo Valkonen, the ion3 author,
Ion is not perfect and certainly not for everyone, but neither is any user interface. Usability is subjective.
Using a keyboard-oriented, tiling window manager represented -for the first time in 20 years (I had my first contact with a Macintosh in 1986)- a radical user interface change. For my way of working, I just don't need a desktop, I don't need having a background space or overlapping windows. What I need is a way to functionally organize the windows I have open at any given time, quickly switch between them (and not depending on the mouse, please!), maximizing screen space and all that. ion3 was godsent.
Now, in 2007 there was (yet another) huge flamefest. Valkonen basically does not want distributors distributing any version of ion3 that's not the latest, and introducing changes not approved by him - He basically demands ion to be non-free. So, it was moved to the non-free section of Debian where only Womble decided to keep giving it support. And, of course, by September 2007 Julien Danjou announced he had written another window manager: Awesome.
My main motivation for switching away from ion3 is that... I don't want to use non-free software. But I was very comfortable with ion3. It was only after I saw many other people using Awesome at DebConf8 I decided to bite the bullet and switch. It looked at least as comfortable as ion3.
But... Well, I cannot come up with better phrasing than what Joey said when he switched to Awesome, almost exactly a month ago. When changing between the mainstream window managers, the differences are mostly cosmetic. But with these really different window managers... I cannot but reproduce Joey's words:
I wish I had a good analogy to explain to my nontechnical readers what changing to a new window manager is about.
One way to think about it is that it's like driving a car down the road, and suddenly swapping the steering wheel and brakes out for a tiller and gear shifter. And having to downshift for braking until you learn that the brakes moved to the turn indicator lever. By trial and error.
But that's really only part of it. Another way to look at it is adopting a new philosophy. Or, in some cases a cult. (In some cases, with crazy cult leaders.) Whether they use Windows or a Mac, or Linux, most computer users are members of a big established religion, with some implicit assumptions, like "thy windows shall be overlapping, like papers on the desktop, and thou shalt move them with thy mouse".
So, changing to a new window manager is a process of being dumped into a different environment, where nothing works like you've come to expect, and trying to construct a mental model that you can use to make sense of it. But it's also a process of modifying that environment to behave the way you like.
And when done whole-heartedly, this doesn't just mean trying to make it like the environment you were used to before. It means trying to absorb the underlying philosopy of the window manager, and think up new ways of doing things, inspired by that philosopy, and modify the environment to allow doing those things.
So ideally, "I switched to a new window manager" doesn't mean "my screen has some different widgets on it now". It means "I'm looking at the screen with new eyes."
So, what's so different?
Besides learning some new keybindings (expected, of course), Awesome has several suggested layouts to help you organize your workflow, usually (although not always) consisting of a main area and a side area, tiled side by side (or one above the other, or several stranger ways). This sounds rigid, but it is incredibly comfortable - and I've only been an Awesome user for three days!
But what sets Awesome apart from basically anything else is the concept of tags. Whey you see an Awesome session, you recognize something similar to the very well known workspaces concept we have had in any Unix-like environment for many years, right? Well, but they are not workspaces. They are tags. What is the difference?
When I work with workspace, each of my windows can be in a different workspace. So in one, I'll have my mail-related stuff. In another one, I might be browsing. In another one, I have my development things, and I might be following some logfiles in yet another one.
Awesome allows you to use tags for categorization in much a more flexible way.
For example: I am mostly a web-oriented developer. I usually need four things when developing a system: A browser, Emacs, the log for my development server, and a console where I can peek and poke at my objects and interactions. Of course, cramming them all into the same screen makes no sense - It would be better to follow the good ol' desktop metaphore, and just switch the focus and raise the window, right?
In Awesome, I can have them all set to the maximum screen size - _and_ use the most common combinations as well. Each of the windows can be tagged to more than one workspace (and yes, this is immensely more flexible than the always visible hint on traditional WMs).
To begin with, I'll give each major process a tag to itself, to work full-screen. Emacs is on tag 1, my browser on tag 2. The log and the console share a terminal (i.e. via screen or terminator).
This console by itself is not too useful, so I'll set it to tag 4, and we will go back to it later.
So if I'm building a view or following online documentation, I will add tag 3 to both Emacs and the browser.
I'm also setting tag 4 to the browser - That allows me to use it next to my terminal, following the results of my website-clicking.
And, of course, tag 5 will be set to Emacs and to the console, so I can quickly check any quick API-related question that does not need the documentation or look at a newly written method.
By the way, have you noticed CapsLock is the most stupid key invented, ever? Ok, I gave a good use to it: It's called Mod4. Imagine it is just an extra Ctrl, Alt or Meta key.
So, Mod4-1 gives me Emacs. Mod4-2 gives me the browser. Mod4-3 gives Emacs+browser, Mod4-4 gives browser+console, and Mod4-5 gives Emacs+console. And, of course, the handy Mod4-0 gives me all of my open windows tiled side by side.
Even this is a pattern of being a newbie, I know - I could keep 4 and 5 free, and just tag several simultaneous tags to be active. How? Switch to tag 1 exclusively (Mod4-1), and activate tag2 as well (Ctrl-Mod4-2). There, I have Emacs and browser side by side. Want to get the console instead of the browser? Simple. Ctrl-Mod4-2 (toggle off tag 2), Ctrl-Mod4-3 (toggle on tag 3).
Anyway - As you can see, I am excited at finding a very new and nice tool to help me work better. Today I was playing a bit with the Awesome widgets, but that's something to be talked about later.
In Debian, we are at a crossing point: Awesome is just reaching ion3's popularity. And I'm adding my two main machines' votes to Awesome.
This is Awesome. Quoting (yes, one last quote) the official Awesome site, This gonna be LEGEN... wait for it... DARY!.

31 August 2008

Christian Perrier: Will Kartik win?

The 500000th bug day is coming. Some of you may remember the contest I launched last year for people to bet on the day bug #500000 would be reported. The bug rate in Debian is about 1000 bugs in 6 days from my survey. So, as we're now at about #497300, bug #500000 should happen in 14 days. It seems that Kartik Mistry is about to win the contest. Indeed, he will if the bug is reported between Sept. 11th and Sept. 17th which probability is very high. Folks, prepare to send cheers to India! Unless the bug rate increases a lot and Miguel "xerakko" Gea wins. Miguel, I watch you: no MBF for you! I definitely lost when Aug. 22nd came. I was betting on a small rate increase which indeed did not happen. You can start now computing the #600000 bug day. There *will* be a contest for it...unless I launch one for bug #1000000...:-)

12 August 2008

MJ Ray: Don t Attack Your Users

It seems to me like basic business common sense not to attack your software’s users, because they’re people who might fund your future development work, when they want some new feature adding or some adaptation making. We should hope that this audience will become co-promoters, co-developers or co-producers of free and open source software in the future. Indeed, one of the basic lessons at our webmaster cooperative is to try to direct enquiries about software we’ve co-produced to somewhere useful, even if the question isn’t really much to do with us (because it’s about some part we didn’t produce or it’s something we’re no longer funded to work on), or even if we suspect the questioner has done something very silly. This approach has worked well so far. So, just don’t attack your users. It’s not on. Don’t do it. This basic lesson of not attacking users doesn’t seem to have been learned in software industries in general. Most software comes with a very restrictive “End User License Agreement” that seems to treat the user as if they are a potential criminal and grabs as many rights as possible for the software producer. I expect that Microsoft’s new post-Windows operating system will continue this approach and that the user-tracking possibilities of internet-centred operation will be exploited as far as legally possible. Hopefully, we’ll continue to see pre-installed Linux growing strongly in UK as Bristol Wireless describe. However, this pales into insignificance compared to many media companies. One of the worst offenders is Bristol-based TV Licensing who send us a “pay up or else, you potential criminal”-style letter each year. If there’s ever a reform that makes BBC subscription voluntary, they will probably reap the seeds of hatred that TVL have sown by attacking their audience. I have quite a lot of admiration for people like Martyn Drake who are fighting a noble fight in things like TV Licensing - the war begins! but I wonder whether media companies will learn not to attack their users before they cease to exist.

30 July 2008

Juan Luis Belmonte: Open Source people life cycle


First lets talk about freedom. Is not an utopia, freedom can be conquered in a lot of little bits of our life, just because we are not always free somewhere or somehow. We cant forget that there are billions of other things you can do to feel the freedom. You lose your freedom when if you stop looking for it. We can also talk about technology. It is everywhere, satellites, tvs, cell phones, internet, computers, games, microwaves, dvd… Is part of our life. What happen if we mix this all together? Well let’s talk about … me? Fourteen years old. My parents bought a computer , with his Windows 98. Everything works till it brokes. I brought it to a technician, and I had to spent all of my pocket money. So I promised my self not to bring my pc again to a technician. That made me a bit more free, I learned how to fix it and then I was able to do what I want with the machine, so I had the way to fix it without spending money. Great!. The magic tool exists is knowledge. In a couple of years, nothing in that windows was enough so, I started very light to read some about that thing called “linux” affiliate to some news account. But i was 17 when I started to use half linux and half windows. Things weren’t very trivial and I hadn’t broadband, so I had a quite big amount of CDs with different distros, and when i want to use my winmodem, I used suse, for little funny games redhat, and other times, mandrake, Caldera… I didn’t know how anything was working, but was funny and each time easier to deal with it. So the first step in open source was experimenting, sometimes a bit frustrating but… is part of the game. When the broadband was up to my pocket. I got my connection, and started to learn from forums, online tutorials, irc… Debian, seven Debian CDs. … that day I wasn’t conscious, what that will supose for me, and my future. I’ve annoyed a lot of people with questions, read a lot of tutorials, spent hours learning of other people experiences… But all of that is something that one day you will give it back to someone else, is the cycle. One day is you who helps other to begin with his distro, or compiling an app, or making his sound card to work. I’ve studied computer engineering and I’ve been in touch with free software the last 5 years, I don’t have to pay for my software, i can do with it what I want. One more step is promote it. Convincing people, telling how wonderful it is, and how many people you’ve met, and how you can enjoy it, and what advantages are ready for you and for free. 6 years using linux, make me to work as system administrator and i love it. So the free software one day let me to earn money and build my life. Now the last part. CONTRIBUTE! Is the best part, documentation, developing, translating, whatever you want, you can do things for people as people has done for you. A popular sensation when you begin, is that there a lot of gurus, and you are not able to be in this world, everywhere are levels, you can be an user, a contributor, or just become a fan :) Experiment, Use, Share, Work, Contribute. But never finish, is an inphinite cycle where you can always learn from everybody and you have a lot to teach the other. Isn’t that the freedom?. Enjoy it.

28 July 2008

John Goerzen: Cuil looks useless

So lots of technology sites are all excited about the launch of cuil.com, yet another in a long line of companies that the hype says could dethrone Google.

I went to cuil.com and searched for Amtrak.

It came up with hits for various routes, a historical society, etc. Everything except the actual homepage of Amtrak, amtrak.com, which has the most useful information about Amtrak.

#1 hit on Google.

If Cuil can't get that right, why bother?

14 July 2008

Joey Hess: awesome

After many years with ion, I've switched to using the Awesome window manager. This took three tries; the latest try seems to have stuck. I wish I had a good analogy to explain to my nontechnical readers what changing to a new window manager is about. One way to think about it is that it's like driving a car down the road, and suddenly swapping the steering wheel and brakes out for a tiller and gear shifter. And having to downshift for braking until you learn that the brakes moved to the turn indicator lever. By trial and error. But that's really only part of it. Another way to look at it is adopting a new philosophy. Or, in some cases a cult. (In some cases, with crazy cult leaders.) Whether they use Windows or a Mac, or Linux, most computer users are members of a big established religion, with some implicit assumptions, like "thy windows shall be overlapping, like papers on the desktop, and thou shalt move them with thy mouse". So, changing to a new window manager is a process of being dumped into a different environment, where nothing works like you've come to expect, and trying to construct a mental model that you can use to make sense of it. But it's also a process of modifying that environment to behave the way you like. And when done whole-heartedly, this doesn't just mean trying to make it like the environment you were used to before. It means trying to absorb the underlying philosopy of the window manager, and think up new ways of doing things, inspired by that philosopy, and modify the environment to allow doing those things. So ideally, "I switched to a new window manager" doesh't mean "my screen has some different widgets on it now". It means "I'm looking at the screen with new eyes."

10 July 2008

Robert McQueen: GUADEC, Telepathy and a Party on a Boat

For everyone at GUADEC, there’s a boat party sponsored by Collabora this evening. Our sponsorship was confirmed after the program was printed so it’s listed anonymously, but it’s mostly sponsored by Collabora, of course with huge thanks to Baris and his team for the organisation, and local sponsors for food and discounted beer. The boat leaves from Kabatas at 9pm today (Thursday). It’s actually pretty close to the 3rd anniversary of Collabora’s incorporation, so I think we could call this our birthday party. :D I gave my presentation earlier today about using Telepathy to make collaborative applications. My slides are available, as well as the apps I demoed, which are the python VNC demo based on telepathy-python’s examples, Elliot’s Tic Tac Tube game, and Guillaume and Alban’s quick hack to Empathy and Vinagre to share your desktop over a stream tube. I was followed up by Senko’s presentation (slides also available) which had an overview of the libraries and APIs currently available to embed Telepathy functionality in applications on the desktop. The talks were all recorded so hopefully some videos will turn up on-line too. Speaking about collaborative stuff with Telepathy, we’re really keen to hear from the authors of applications like Abiword, Inkscape, Vinagre, Jokosher, Tomboy, Gobby, etc, to find out how we can help you integrate with Telepathy, what features you need before you can get started, or just try and convince you that it’s a good idea. :) If you’re at GUADEC, come and grab one of the Collaborans or drop by on #telepathy on FreeNode and tell us what you’d like to do and how we can help. Yesterday after the talks on Soylent and the People project, Travis and I met up with the guys behind the People project (Ali Sabil and Johann Prieur) and some of the Online Desktop team (Owen Taylor and Marina Zhurakhinskaya). We sketched out a way of plugging together Telepathy, People, Soylent and the Online Desktop to deal a lot better with meta-contacts on the desktop, providing “first-class” people objects. It all looks pretty promising and hopefully we’ll all find some time to make moves towards our vision. This afternoon at 3:30pm, Olivier is also presenting our work on Farsight 2, which is really cool stuff and should include some exciting demos of the multi-person video conferencing stuff we’ve been doing. More generally, GUADEC is awesome. I’m having a great time in Istanbul (despite it being pretty hot for a pale-faced Brit like me), and enjoying the sights and sounds of such an interesting city and culture. I’ve caught up with many of the usual suspects (like Lennart, who never turns down the chance to turn up at a conference and sample the local bars and clubs), and had some great discussions.

9 July 2008

Joey Hess: carving scooters

This is not exactly new, but it was new to me.. A guy on a trikke is zooming around downtown today. The swerving motion is bit of a traffic hazard, but it looked like fun, and pretty efficient. It's basically inline skates for those who lack balance. With brakes.

27 June 2008

MJ Ray: Firefox 3, day 10: security flaw 2, more banks, looking for a new browser

Well, I was hoping to get Yet Another Blog Reorg done before posting this, but it just hasn't happened, so here are a few more thoughts on Firefox 3 on this ol' blog. In fact, I'll probably finish the FF3 series here before I switch over. I was in central London on Tuesday and suffered both the rudeness and the black snot (which no-one else I know seems to suffer) so maybe that's why I've been underachieving this week. I've had London lethargy. I had a report about online banking that doesn't work with FF3. NPBS will move into the hall of shame, sadly. I'm almost certain I warned them months ago that their online banking was doing Javascript stunts that aren't going to work forever. I emailed them and haven't heard back since. Back to the browser: I share the contempt for the Firefox 3 and SSL problems and I like the new URL bar too. However, I am finding the FF3 seems to use more CPU (and so power) than FF1.5 and there seems to be some frustrating delays in FF-clipboard communications, so I'm looking at other browsers. Conkeror looks interesting. Still Gecko (useful for work) but stripped down. I spotted another post about microformats, which I mentioned in my last post, about the BBC dropping support for microformats [John Resig] and I also noticed just how good SVG and Minimalist Markup looks in FF3 [Sam Ruby] - I'd love to try it, but my IE-using clients probably wouldn't understand and I hate making single-browser special editions.

26 June 2008

Uwe Hermann: Configure Firefox/Iceweasel 3 to be more secure / usable / bearable

Today seems to be Firefox/Iceweasel 3 Bashing Day on Planet Debian, so let me join the fun :) I agree with most other people that the default Firefox/Iceweasel 3 config is not ideal, so here's what I did to fix it. Some of these items improve performance, some remove annoyances, some remove privacy issues, some remove security issues. Not everything here may be desirable for people other than me. General Preferences Select "Edit / Preferences". Main: Tabs: Content: Privacy: Security: Advanced:

16 June 2008

Edd Dumbill: We're all ops people now

Ten years ago, most of us wouldn't have dreamt we'd be managing terabits of storage, tens of megabits of bandwidth, arrays of network-distributed services. The height of a programmer's worry would likely be choice of UI toolkit or finding the right way to indent code, and the height of consumer concern deciding which room to put the new computer in. Now the problems associated with managing large networks are becoming real for everyone, right down to the consumer level. Stupendously large amounts of computing resource are available at an instant. Your household probably has more than a terabyte of storage already. Issues such as single sign-on are going to hit home over the next year, as networked computing and entertainment devices profilerate. Features such as Apple's Time Machine will be increasingly vital — software that makes traditionally gnarly sysadmin tasks consumer-friendly. The rebranding of .Mac into "Mobile Me" is also a step in this direction. The impact on developers As software developers, we also have to cope with the effects of this resource-richness. For small sums of money we can get access to large computing clusters, geographically redundant hosting services. Our programs have left the desktop and found their new home on the web. System administration issues loom large upon us, security concerns lurk auspiciously in the corners of our minds. Although the cost of infrastructure has dropped radically, other costs remain high and are going to stay that way. System administrators are not only grumpy, they demand high wages. Commercial software license fees spiral out of control: traditional per-CPU licensing models make little sense when you can quickly bring up tens of machines. The cost in power is already troubling large companies, and there's no reason to suspect the problems won't ripple down. Help is at hand from a variety of technologies. If they don't yet make massive resource management trivial, they at least make it possible. Some of these also inhabit the weird territory of being both the source of a problem and a solution at the same time: virtualization, for example. Distributed revision control systems Distributed revision control is a technology whose time has finally come in popular circles, thanks in part to Linus Torvald's Git system. DRCS has several important impacts on today's developer: All these trends lower the barrier to entry, increase collaboration and agility of development. You can the value of this as more software tools become free. Selling such tools is rapidly becoming a thing of the past, the advantages of sharing enable the developers at the sharp end to get their jobs done quicker. However, such increased agility and, well, messiness leave other problems to solve, which the next two technologies address. Virtualization Hardware-as-a-service, infrastructure-as-a-service, call it what you will. The ability to create what we used to call entire machines, pick them up and move them around the network is revolutionary, and it's something that will have a real impact on regular developers. The benefits are at several levels. Configuration management Computing is a zero-sum game, and despite our increased ability to create and distribute software, problems still exist. We just pushed them to the next level. In good part, this next level is the problem of configuration management. We now have networks and clusters of (virtual) machines, software so agile we need six decimal places to describe its revision levels, and network and authentication paths that are starting to tangle. How do we manage that? One thing developers crave is repeatability. That's why we love our makefiles, autoconf, Ant, rake and so on. It's the one time even the most imperative-minded programmer writes declarative code. We like to say "let the world be like this." Our new sprawling world lacks this feature, and the best of our old toolkits — .debs, RPMs — address things only at the level of packages in a single environment. So developers must look to the world of operations, a territory we probably thought we needn't enter. In this world the new "make" is called Puppet. You write recipes to describe how things ought to be, and Puppet will make it so. I've been spending some time digging into Puppet, and feel excited by the confidence it's giving me. Now my applications exceed single source trees, and single machines, it gives me the means to tie the whole together. This article was going to be solely about Puppet, but that will have to wait now for another time. It's likely you'll have played with virtual machines and distributed revision control, but have you tried Puppet yet? Give it a spin, and let your mind wander over the benefits for your organization and development approaches. Conclusions
For developers and users alike, our world is changing. Hardware, connectivity and increasingly software is becoming cheap or free. The solidity of the old things we put value on — real things you can touch like disks — is eroding. What really matters is our data, our creations, and their communication. If they don't quite yet exist in a universal "cloud" yet, they're certainly getting frisky. As vendors provide solutions for consumers to manage their new domestic infrastructure, developers must look to network-aware toolkits and operations techniques to manage and get the best from their emergent infrastructures. Also on this topic: Join the conversation about this post

15 June 2008

Joey Hess: no escape

So my Esc key broke today. Maybe due to high humidity last night -- the laptop was generating a lot of spurious lid open events earlier. New keyboard ordered, etc, nothing too unusual given the crummy nature of laptop keyboards (Fujitsu's in specific). The interesting thing though, is that even though I've remapped Caps Lock to generate Escape for now, this threw my typing off to an amazing extent. I don't just have trouble typing ^]:wq in vim. I have trouble typing arbitrary sentences in programs that don't use escape at all. Why? I don't touch type the way people are taught to in school, with fingers on the home keys. I touch type the way you learn to by typing a lot, ad-hoc, until your hands learn exactly how to type the common things you throw at them. This includes being able to type ^]:wq as fast as I can type "joey". My home keys are, approximatly:
Tab Q S X Space       Down . ; ' Enter
(Space and Down are covered by my thumbs.) This might seem a bit weird, but as a programmer, I hit tab a lot, and, enter lots of semicolons, periods, and quotes. As a human on the WWW, I scroll down a lot. As a command-line user, Enter is a key I hit a lot. That's my guesses why my fingers go there. This wasn't planned, it evolved. In fact, I have other home key locations, that are used for other activities too. Now that I'm typing in a lot of text here, my WPM has increased a lot, because my hands have moved closer to the center of the keyboard. Something like this.
      W E F V    J I O  
Although every time I've checked, it's been a slightly different set of keys. My hands know where they are, and seem to make pretty good guesses about where I'll want them in the next word and pick a different "home row", depending. Also, if I'm scrolling around a lot, my left hand switches to:
                      Left Up Right
Point being that this is all very dynamic, and unconcious, and very adapted to this exact keyboard. Learning a new keyboard will take me days of fumbling, that are reminiscent of someone describing switching from QWERTY to DVORAK. And, it turns out that even moving a single key like Esc is close to switching to an entire new keyboard. Needing to reach down to Caps Lock for Esc threw everything else off subtly, even when I wasn't typing that key. Clearly this is not the best way to type. It's just my way. :-/

26 May 2008

Joerg Jaspert: Mountainbike

[Non-Debian and even non-IT related post ahead, in case you want to skip them] Since some time I try to regularly take some time off of the PC and actually use my bike again. (Those pictures are old, some things have changed since then. Like, I have a different, larger, set of brakes now). After a break of more than a year (more like 1.5 - 2 years, I think), it was a pain. The first few rides haven’t been much fun, and after some 10 til 15km I was exhausted and felt bad. But now, where I found a semi-regular schedule and do the torture two or three times a week I actually feel better. And get away with longer rides. A few days after I started I bought myself a nice “Bicycle computer”, a Garmin Edge 305 - “Garmin’s GPS-enabled personal trainer and cycle computer.” Im not doing any kind of special training with it, but its still nice to see heartrate, pedal cadence and all the other information it offers (which is a lot). And to see how you improve over time. Still, my main motivation to carry it with me is really to be able to see where I went (I only made some of my entries public :) ). And maybe, at some time, somewhere, load waypoints to it and then follow those. The included GPS chip is pretty good, keeping a good signal accuracy even in terrain where you just wouldn’t expect it to have any signal. Now, if google maps would have recent images, not ones that are years old, some tracks wouldn’t look that weird. On other news - I’ve lost 10kg weight since February. Damnit. Update: If you are from (around) Fulda and also like that OpenStreetMap thing, Enrico just uploaded my tracks there. Now it needs someone doing the post-processing to make them useful, and Enrico says you should go here and have fun. So if you have time, know the roads, feel free to look there. I guess Enrico keeps uploading new tracks from me, whenever there are some. Comments: 2

20 May 2008

Andrew Pollock: [life] Zurich to Prague

Been rather busy, so I haven't had a chance to continue recording the trip... We got into Zurich (albeit late), without incident. Immigration was the biggest joke ever. There was no paperwork at all, and we just handed our passports to the guy, who just looked at them casually, and waved us through. No stamp, no scan, no nothing. It was a bit disappointing really. We got our rental car, and drove around aimlessly for a bit, until the GPS got lock, and then headed for Prague. We went through Austria, where the guy at the border did give our passports a more thorough inspection, more because we were confused and were waving them at him. He also gave us a stamp. The woman from Hertz told us we needed to buy some sort of highway sticker for the car to drive in Austria (wow it's hard to type "Austria", "Australia" just keeps coming out from muscle memory), so we bought one of them and stuck it on the windscreen, and then promptly entered Germany. The autobahns in Germany are wicked! Everyone's screaming along at a ridiculous pace. The fastest I got up to was 180 km/h. The roads themselves were surprisingly quiet, and only two lanes. We stopped off for dinner somewhere in Germany, and finally arrived at the hotel in Prague at about 1am on Sunday morning, so it took about 7 hours instead of the 6 that we'd estimated. We got to bed by about 2am. I woke up at about 10am, then went back to sleep until about 2pm. We finally ventured out for a bit of exploration at about 3pm on Sunday. One observation about Czechs: they seem like a pretty dour bunch. Here we were wandering around, being all wide-eyed and touristy, smiling at everyone, and they'd just scowl back at you, no matter how hard we tried to get a smile out of them. After that initial wander, we discovered that there was a Metro station right across the road from the hotel in another direction, so we caught that to go and check out Prague Castle. The Metro system is another one of those great subway systems that I love. It ran regularly, so you didn't need to concern yourself with a timetable. The ticketing was a bit bizarre. It seemed totally honor-system based. There were no barriers to stop you getting in or out. It was fairly late by the time we got to Prague Castle, so we just wandered around the grounds, took a look inside Saint Vitus's Cathedral, and caught an orchestral performance in Saint George's Basilica, then headed back to the hotel. Everything at Prague Castle was pretty mind-blowing. The size of grounds. The view. Saint Vitus's Cathedral. The Cathedral was huge. When you stepped inside and looked up... words can't describe it. It was amazing. Unfortunately, we didn't bring a camera with us, so we don't have any photos from the Sunday excursion, but Sarah went back this afternoon, and her photos are here. I think the thing that struck me the most was that here were some seriously old buildings - older than my home country, and they were in amazingly good condition. They really built things to last back in the day. The weather so far has been pretty miserable, and if the forecast is anything to go by, will remain miserable until we drive out on Saturday. We've survived, language-wise. The default language of the hotel staff seems to be English, and most random people we've had to interact with seem to speak English. I feel really arrogant and rude just speaking in English to people without first asking if they speak English, but I'm also getting really sick of starting every conversation with "Do you speak English?" The printed language is by and large indecipherable. The currency, which in English is called a "crown" is crazy. One US dollar buys about 16 Czech Koruny, and the prices are ridiculous. A glass of wine at the hotel is maybe 250 CZK. Granted, the hotel prices are obscene, but seeing triple-digit prices for a glass of wine seems totally bizarre. The prices in general seem pretty steep. Sarah said she got a 2 koruny coin in change today. We've got no idea what you'd actually use that for. Last night, after the conference had finished for the day, we wandered off in a different direction again, and wandered through the grounds of Vy ehrad Castle. The Cathedral of Saint Paul and Peter has an amazing graveyard in it, including the grave of the composer Dvorak. We grabbed some dinner at a nearby restaurant, which was substantially cheaper than the hotel restaurants. Again, we forgot to take a camera with us.

17 May 2008

Joachim Breitner: FrakView: An Haskell Renderer for Iterated Function Systems

For a recent university seminar, I wrote a haskell program to render and edit iterated function systems (IFS), which generates a certain class of fractals, namely self-similar sets. I think the result is quite nice, so I m sharing the code.
FrakView screenshot
With FrakView you can view a rendering of the attraktor of the IFS, whith a choice of two algorithms (a straight forward, and a probabilistic), configurable depth and anti-aliasing. You can also modify the IFS by dragging the colored boxes with arrows you see on the screenshot. For the academically inclined, there is also support to visualize cylinder sets and otherwise explore the coding space of the IFS a bit.The program is written in haskell and uses gtk2hs, the gtk bindings for haskell. It might be interesting for other gtk2hs programmers to see how FrakView solves some issues: For example, it uses the CoroutineT monad transformer I recently blogged about check out the pausingForM_ function in GUI.hs. Also, the current state of the screen is in one algebraic data type (ScreenConfig) that supports equality checks, so when the user interacts, the code recomputes the new ScreenConfig (using getRenderer), but only redraws the screen if it differs from the previous. This is much easier and more robust than having to decide for each possible user interaction whether it changes what s on the screen.You can get the source from the FrakView darcs repository.

16 May 2008

James Morrison: Random thought

So qwerty was designed to avoid having two keys beside each other typed in a row. This was to avoid jamming keyboards. Dvorak decided this wasn't a useful design goal, so made his own keyboard. Anyway, this criteria to avoid jamming also makes qwerty better for small keyboards, since the jamming is now done between my fingers instead of the keys on a typewriter.

24 April 2008

Joachim Breitner: Pausable IO actions for better GUI responsiveness

For a university seminar I m currently writing a GUI program to view fractals based on simple iterated function systems (only similaritudes allowed). It supports three different drawing algorithms and you can edit the IFS by dragging squares around on the screen. But this post is not about this program (I might present it later), but how Haskell allowed me to solve a problem very nicely:The first instances of the code had a problem that a lot of GUI programmers know: The drawing of the fractal took quite some time, and during that time the gtk main loop is blocked and the program becomes unresponsive. At first I avoided this problem by manually splitting the drawing function (e.g. by repeatedly increasing the resolution) and kept re-drawing it at higher resolutions in an idle handler, so at least I could interact whenever one resolution has finished drawing. It worked somewhat but it was not easily done for the other, not pixel based, algorithms and it was ugly.So I wanted a way to (a) pause the drawing at any convenient point, to resume it later, and (b) safely abort the drawing if what I m drawing has changed and I need to restart.A common solution to this would be to do the drawing in a separate thread, so (a) is actually not needed, but I did not know if I can safely do (b), and I have heard that threads cause problems with gtk.So I tried to dig deeper for the hidden treasures of advanced haskell programming: I need a monad transformer! I expected the infamous ContT monad transformer to help, but I couldn t figure out how, and I started to create my own monad transformer, called CoroutineT.I tried to figure out what an action of type (CoroutineT IO a) should do, and I came up with this type signature:
pausingAction :: IO (Either (CoroutineT IO a) a)
which means that after the pausingAction is done, it is Either paused (and I get back another pausingAction to run when I want it), or it is done (and I get the result). Note that I m writing IO here, but it can be any monad.The definition of the datatype and the monad instance came mostly from trying to make this type work (yay to haskell s type system, less thinking required), and looks like this:
data CoroutineT m a = CoroutineT  unCoroutineT :: (m (Either (CoroutineT m a) a))  

instance (Monad m) => Monad (CoroutineT m) where
return v = CoroutineT (return (Right v))
a >>= b = CoroutineT $ do
r <- unCoroutineT a
case r of
Left paused -> return $ Left (paused >>= b)
Right unpaused -> unCoroutineT (b unpaused)
This translates to english like this: A call to return is not paused. When an action is already paused, further actions should be run after the paused action is resumed. When an action is not paused, further actions can happen now.Like every well behaving monad transfomer, I also need a "runCoroutineT" function to start the coroutine. I probably could have used unCoroutineT directly, but for my use case (GUI drawing) I did not need a return value, so this function is more handy:
runCoroutineT :: Monad m => CoroutineT m () -> m (Maybe (CoroutineT m ()))
runCoroutineT a = either (Just) (const Nothing) liftM unCoroutineT a
Nothing surprising here, basically just turning the Either into a Maybe. So it becomes clear how to do (b): We can just throw away the resume action returned by runCoroutineT (if any). The more interesting thing is how we do (a): We need a pause action of type (Coroutine m ()). But how should it work? I did not really try to understand why it works, but by looking at the types, I came up with this:
pause :: Monad m => CoroutineT m ()
pause = CoroutineT (return (Left (CoroutineT (return (Right ())))))
Yes, it sounds like some dance step instructions (read the second line out aloud!), but it works somehow.So here is some example code: I have a pausable IO action that counts from one to ten, pausing after each number. I also have function that resumes an pausable action up to n times:
example n = keepGoingFor n $ do
        liftIO $ putStrLn "This is the coroutine"
        forM_ [1..10] $ \i -> do
            liftIO $ putStrLn $ "Counting to "++ show i ++" while you keep calling it"
            pause
  where --keepGoing :: Monad m => CoroutineT m () -> m ()
      keepGoingFor 0 _   = putStrLn "Here I just abort the run"
      keepGoingFor n cor = do
        resume <- runCoroutineT cor
        case resume of
            Just runAgain -> keepGoingFor (n-1) runAgain
            Nothing       -> putStrLn "Finally stopped"
And here is the output of two different runs:
*CouroutineT> example 5
This is the coroutine
Counting to 1 while you keep calling it
Counting to 2 while you keep calling it
Counting to 3 while you keep calling it
Counting to 4 while you keep calling it
Counting to 5 while you keep calling it
Here I just abort the run
*CouroutineT> example 14
This is the coroutine
Counting to 1 while you keep calling it
Counting to 2 while you keep calling it
Counting to 3 while you keep calling it
Counting to 4 while you keep calling it
Counting to 5 while you keep calling it
Counting to 6 while you keep calling it
Counting to 7 while you keep calling it
Counting to 8 while you keep calling it
Counting to 9 while you keep calling it
Counting to 10 while you keep calling it
Finally stopped
So it does really works fine, and it proved very useful in my GUI drawing problem. For that, I created this nice control structure which works like mapM_, but calls pause every n iterations, and therefore hides the pausing stuff almost completely:
pausingForM_ :: Monad m => Int -> [a] -> (a -> CoroutineT m ()) -> CoroutineT m ()
pausingForM_ period list action = pausing' 0 list
where pausing' _ [] = return ()
pausing' n (x:xs) = do action x
if n==period then pause >> pausing' 0 xs
else pausing' (n+1) xs
I have put the complete module (including instances omitted here) in the darcs repository that might later also contain the fractal drawing program.

17 April 2008

MJ Ray: 21 today! MJR around the web...

Not done one of these round-ups for a while and I'm really pushed for time today, so here are some sites that I've written on:
  1. Property of a Lady Wicca on House
  2. Ross Burton: The End Of Homeopathy?
  3. Enough with the dried yoghurt covered raisins Korerorero: Just random ranting and raving
  4. How to host a free software advocacy event Free Software Magazine
  5. Raw Output: AGPL
  6. One for the Morning Glory: Facebook comments
  7. Sam Liddicott GPL3 Questions and Implications
  8. Drugs and an Election etbe
  9. New Tropicana images
  10. robmyers - Support BY-SA/SFDL Compatibility, Not BY-SA/FDL Compatibility
  11. Internet Psychology: Teenagers do not need our help online - we need them to help us oldies by Graham Jones, Internet Psychologist
  12. Wanting Your Opinions about Blog Comments and City Attorneys : David Lee King
  13. Zookoda - I Don't Recommend them Anymore
  14. Solar Water Heating :: ShowBlog
  15. Internet Psychology: Forget email - it's old hat by Graham Jones, Internet Psychologist
  16. Drake.org.uk: That's a wrap! Time to roll the end credits..
  17. Internet Psychology: Internet criminals are going to have a field day by Graham Jones, Internet Psychologist
  18. A Cambridge Co-operator: Rebranded Stores
  19. robmyers - Two Common Errors
  20. Lucas Nussbaum's Blog Blog Archive Where is the NM bottleneck?
  21. NM: FD is fixed - MadBlog

30 March 2008

Miguel Gea: Apertium

Last years, Francis Tyers has been working as Debian maintainer for Apertium packages and upstream (Apertium is an open-source machine translation platform), and I've been sponsoring it all this time.

Today, I've uploaded a new version for Apertium (3.0.7) that solves a few errors that has been blocking a new lang pair. This new pair is en-es. It's still in beta status, but the quality is quite good.

Now, we can see in Debian a lot of pairs:

  • English-Spanish
  • English-Catalan
  • French-Spanish
  • French-Catalan
  • Spanish-Romanian
  • Spanish-Portuguese
  • Spanish-Galician
  • Spanish-Catalan
  • Esperanto-Spanish
  • Esperanto-Catalan

    There are too a graphical user interface for Apertium (apertium-tolk) that is a useful test program for apertium-dbus.

    The present for apertium: support txt, html, rtf, odt, docx, wxml and xlsx documents.

    The future... more lang pairs (spanish-basque, catalan-romanian, spanish-occitan and catalan-occitan)... integration with OpenOffice and Iceweasel
  • 29 March 2008

    Miguel Gea: I'll be there.


    I'm going to DebConf8, edition 2008 of the annual Debian        developers meeting

    Next.

    Previous.