Search Results: "ah"

20 June 2007

Ross Burton: Sound Juicer Love Hour

Does anyone fancy hacking for an hour on a neat little feature for Sound Juicer, as a way of learning the code base a little? This shouldn't take more than an hour or so, and would be good for the world. When Musicbrainz can't find the track listing for a CD, it automatically queries FreeDB and will attempt to return something from the garbled nonsense that FreeDB generally contains. The user cannot tell the difference, unless they notice that the track listings are badly formatted, the album artist is incorrect, or the encoding is wrong. The user will not notice any trivial issues, fix any obvious problems and then rip the CD, or just give up now if the encoding is wrong. This is bad. What should happen is that Sound Juicer should subtly point out to the user if the data is proxied from FreeDB, so that they can import it into MusicBrainz where more data can be added and verified. What I'd like to see is a little pane appear if a CD is from FreeDB (SJ knows this already) with a link to the relevant import URL, so the user can quickly import it once for the benefit of everyone else who rips the album in the future. Does anyone fancy hacking this? As I said, it sounds like an hour of coding for someone who can code GTK+ but hasn't touched SJ before. NP: This Book Is About Words, Ahmad Szabo

David Moreno Garza: Edinburgh

So, yeah, I’m in Edinburgh right now. For those of you who have asked, here is a little track of my adventures in the previous days: After all, I had made it to DebConf7.

19 June 2007

Scott James Remnant: What we'll get in feisty

This post is a sequel to my “What I want in edgy+1” post, which was written when the developer summit was first announced. Now that the summit (and the following company All Hands meeting) is over, and we’re all back home, this seems as good a time as any to review what was discussed and get a good idea of what feisty might look like. I’ve touched on the problem of predicting time-based releases before. It’s both the gift and the curse of a time-based release schedule that work not completed in time can be deferred to a later release. So take the following with a pinch of salt, some of this may still not make it. General Themes The general theme of dapper was to be a release that could be supported for a long term, conservatism was the goal. We did do some quite exciting work under the hood, such as the switch away from hotplug to a fully udev based system, but in general it wasn’t innovative or ground-breaking. Edgy was intended to be more ground-breaking, but the practical matter of having only a few months to develop it and our own pride in shipping something that still worked meant that it turned out as a shinier, improved dapper. So what’s feisty going to be like? Judging from the discussions at UDS, and the specifications that have been written, the general theme of feisty is to lead the way again with new technologies. The Desktop For the users, perhaps the most obvious change will be the active use of 3D acceleration to draw the desktop where hardware can support it (the issue of binary drivers has not yet been resolved). Windows are more visually distinct from each other through shadows behind them, and transparency for the non-active windows. The relationship between different workspaces/viewports is much clearer as the transition is animated on a cube or sliding pane. And for the bling crowd, window s can wobble, burn, explode or dissolve. There are two different compositors being considered at this point, compiz and beryl; we’re likely to decide which to use at Feature Freeze based on how well they’ve been fixed, developed and supported until that point. Underneath the hood, the configuration of the X server will be simpler and more robust; so even the worst case will not leave you confined to a console without any help. Networking Networking in feisty should be a much more pleasurable experience. The Network Manager project, which has been waiting on the side lines for a couple of releases, may finally get a shot at being in the default installation. For the average user, this makes switching between wired and wireless networks, including setting up WEP and WPA much, much easier. And what if there’s no network infrastructure around? Out of the box support for RFC 3927 link-local networks, and multi-cast DNS resolution (aka. Zeroconf), means that you just need to agree on a network name with others around you to be able to communicate. Of course, once you’re on a network, you still need to be able to share files and access local services. The integration of the Avahi project gives you one-click access to other people’s shared music or files; and lets you share your own, should you choose to do so. Customisations One of the most encountered problems with edgy was it being difficult to install various common packages that aren’t part of the default installation, especially codecs. Projects such as Automatix attempt to tackle this, but can cause problems with upgrading to later releases. Some effort will be going into feisty to make performing these common customisations much simpler, including being able to install codecs or viewers by just trying to open the file. Boot Sequence A long-running project within Ubuntu has been to get the boot and shutdown sequences as fast and efficient as possible. At the time we started, it was common for a Linux distribution to boot in a mere two or three minutes. If you thought edgy booted fast, wait until you see feisty. Feisty is the release where we take full advantage of Upstart, not only bringing the system up as fast as possible but also more robustly than we can do today. And if that weren’t enough, it should look slicker too; without some of the nasty flickering and mode changes that happen today.

Scott James Remnant: Slippery Slopes

One of the most interesting thing about slippery slopes is how you never seem to be standing at the top of them, looking down. The slope seems fine at the top, and it’s only once you start down it that you realise this could end up with some broken limbs. When Ubuntu was formed, Debian were having a debate about how to treat GFDL documentation. It was their opinion that the GFDL was inherently non-free, and they’ve since taken steps to remove all such licensed documentation from their main distribution. We took a more pragmatic approach, and decided that it maintained the spirit of freedom, and thus we continue to this day to ship that documentation in our main distribution. A similar discussion resulted in the handling of data files such as graphics, icons, fonts, etc. We decided that such things didn’t necessarily need to ship with corresponding source code, as frequently they don’t have any such thing or when they do, it’s just as easy to modify the data file directly. The slope didn’t seem at all slippery back then. Then came the issue of firmware, binary blobs in the kernel which are uploaded into a flash (or similar) chip in the hardware. Could we distribute these? On one hand, these blobs have always existed, they just used to be in ROM in the hardware; the move to firmware doesn’t change that. On the other hand, they’re machine code and if we had the source, we could improve the hardware as well. And what if we didn’t distribute them? Our users would be stuck without being able to use some fairly (to them) critical parts of their computer. In the end, the argument that firmware isn’t inherently any less free on the disk than in the ROM won, so we opted to continue to ship it. Perhaps that slope is a bit slippery, but we’ve got a good foothold. Of course, at that point somebody notices the binary “Hardware Access Layer” in the Atheros WiFi card driver. It’s not firmware, it’s run on the host processor, and is separate to “comply with FCC law”. (The ipw3495 driver has a binary daemon that allegedly performs the same legal function). Again, if we don’t distribute that, a large section of laptop users will not be able to use their WiFi cards. A compromise was reached; because the driver is necessary we’d ship it, but in a special restricted component that makes it absolutely clear that it’s not completely free. Users could choose to remove that component and any packages from it, to keep their system untainted. Ok, foothold wasn’t as strong as we thought; tumbled a bit, but we’re definitely on solid ground now! That’s what we thought, anyway. Unfortunately it seems that there’s a point a little bit lower down the slope which has a fantastic vista. The views from there are just incredible, people are saying, much prettier than where we are now. The only trouble is that we’re not sure there’s a foothold down there, if we try for the better view, we could end up broken at the bottom. I’m talking, of course, about the NVIDIA binary X driver. (Some reports/blogs/etc. indicate we’re also considering the ATI fglrx driver, this isn’t true – that driver doesn’t support AIGLX, so it’s not being considered.) We’ve shipped this driver in our restricted section, but not enabled it by default. It’s been there for people who want it to switch on, if they know how, but the default driver has always been the free (albeit obfuscated) one in the Xorg distribution. The problem is that users do not need this driver, they can get decent enough 2D graphics support from the free(ish) driver. In the long term, they may even get decent 3D graphics support from the nouveau driver effort. What’s the problem then? Simple, other operating systems use the 3D GPU to make the desktop seriously beautiful. If Linux doesn’t catch up and do the same, then we’ll be considered obsolete again. And just to drive the point home, some of our Linux friends shipped similar support in their last releases. They don’t enable the NVIDIA binary driver, but this means that a large percentage of their user base can’t get the bling without manual hackery. We needed a way to catch up with both the commerical operating systems and other Linux distributions; we have a policy of not doing our own software development, but only packaging what others have developed, so the only way for us to get ahead was to package something that others wouldn’t. Which brings us back to the NVIDIA binary driver. If we install that by default, we’ll be bringing a 3D desktop to more people. And we’ll gain a step ahead of the other distributions. Will our users care? To be brutally honest, I think the answer is no! In fact, I suspect our users will largely love us for this decision. Most probably already install the NVIDIA driver anyway, because they think it’s better, or because (sadly, like me) they have a card combination not supported by the free one. Will this make any difference to the effort to get NVIDIA to free up the driver, or at least the specs? Sorry, but to be honest again, I don’t think it’ll make one little difference. Linux distributions have been refusing to install it for years, and yet NVIDIA haven’t budged in their position. Perhaps a new tactic is required. Maybe if we do install it, we’ll be more likely to be chosen by OEMs as we can actually support the hardware they install. Then later, we may be able to actually affect their decision as to what hardware they install, and maybe then NVIDIA will pay attention. Will this change the perception of Ubuntu in the Linux developer community? I’m not sure about this one, I think that those who already feel strongly about the distribution of binary drivers are probably already pretty grumpy at us distributing things like the Atheros and ipw3495 drivers. I suspect this will change the opinion of a lot of people who’ve been on the fence until now, probably equal in both directions. Will we be able to sleep at night? Despite all of the above, personally I still think that installing and using the nvidia driver by default, when the nv driver would do, is the wrong decision. If the nv driver doesn’t work, I’m willing to accept the nvidia driver being used; provided that there’s some message informing the user what’s happened, why it has happened, and which alternate graphics cards they can purchase if they aren’t willing to accept a non-free binary driver. If the nv driver is good enough for 2D, I would prefer that we instead disabled the 3D desktop effects for this group of users (by default). A similar message could explain why this is disabled, again which alternate graphics cards provide this by default, but also provide a button for the user to enable it if they wish. While we should make the correct moral decision for the defaults, we shouldn’t stand in the way of users who wish to make a different decision for themselves. Later as the nouveau driver becomes stable, we may be able to activate 3D support for nvidia users by default. I think that preserves our current foothold, we’d only activate it if there is no free alternative. Where there is, we’d be educating users about why they may wish to consider alternatives to NVIDIA in future, while at the same time not getting too much in their way if they want to see the better view down the slope. Unfortunately it’s not my decision, and I suspect that the lure of the bling will win out. With any luck, we’ll find a foothold there, and the fallout of doing so won’t be too bad. I’m just worried that once we compromise on this, we’ll start compromising on other things … would we replace Firefox with a non-free web browser that rendered web pages “better”? The slippery slope only gets steeper from here on …

Scott James Remnant: Something for everybody

According to the current issue (#93) of Linux Format, Ubuntu 7.04 (“Feisty Fawn”) is “…a dull release for Ubuntu, leaving Fedora to storm ahead…” (p. 23) whilst “shaping up to be one of the most innovative Linux distro releases of the year.” (p. 38) Especially amusing for myself is that, with Upstart, they “seldom notice any difference in boot speed” (p. 42), yet “Ubuntu 7.04 boots up in record time, leaving other Linux distros in the dust.” (p. 22) (As anyone who’s ever read anything about Upstart will know, Ubuntu still uses the SysV-rc scripts so there should be no difference in speed at this point. Funnily enough, they identified the reason Ubuntu boots fast in the same issue; “Changing the /bin/sh symlink to point to Dash instead of Bash can significantly shorten boot times” (p. 33) – unfortunately they simultaneously claim that Dash is only “almost POSIX compliant”, without explaining why they think it isn’t.) In this modern world, the lack of any editorial direction or basic research into what’s being printed is quite refreshing.

18 June 2007

Biella Coleman: The Pale Trinity

Get these boys some sun…

Steve Kemp: I was up above it

went to Teviot, the main Debconf7 venue, with Megan for a while. Picked up a couple of people and then left for a night in the pub. After chatting to the barmaid, Emma, who wanted her Ubuntu laptop fixed. Looks like that is sorted now. Met Ian Jackson, who surprised me by being both younger and shorter than I expected. Met Hannah, who killed Alfie, and who wasn't pregnant. Excellent night. I also hacked on xen-tools and tracked down copyright bits for debootstrap. Now to bed, via The Hobbit. The tattoo I expect people will recognize when it comes to sauna-time. In other news - I don't have a bear but now I own sandals. TODO: Print groupie badges for people.

17 June 2007

Meike Reichle: What I learned during my thesis ...

Right, so as announced I finished my thesis this week. Its translated title is (if anyone want to know)

"Design and Implementation of a Model for the Retrieval of Free/Libre Open Source Software using a Case-Based Reasoning System".

Writing it certainly was an educational experience but I am still happy it's done now. Especially the last weeks where rather unfunny, more so since about ten days before my deadline we had a massive heat wave here in Lower Saxony. Now that it's done I am still waiting for enthusiam to kick in. So far weariness still prevails. Maybe also because finishing my thesis does not yet end my studies. We also have to do written and oral examinations which will take place in July and after. So at the moment I spend my days mostly sleeping and trying to muster up enough wanderlust for my trip to DebConf7. (At the moment the prospect of traveling long distance with trains and cheap flights and then be surrounded by a few hundred happy people is still rather daunting.) Anyway, in order to give an impression of my last weeks and months and to sum this all up, a list of random notes, taken during the last weeks, of what I learned while writing my thesis:

16 June 2007

Aigars Mahinovs: You are next!

We need you ...You are next! Tokkee and I are doing the mugshots this year and we need your cooperation. Mugshots are a great way for people to link the name to a face and remember that link even after several years. Liw did this as his project last year and it was great success - many people have now a better way to link a persons IRC nickname to their face which in turn reduces the tension in communication as you can very easily know who is the person you are speaking to.
There are people who avoid the mugshots and i wanted to ask them to reconsider. Mugshots is not a beauty pageant - in Debian people are judged by their merits. Mugshots are useful tools in future on-line communications, tools that could reduce the aggressiveness and flammability in the Debian IRC and mailing lists.
It is not the holy grail, but it helps. So I ask every participant of Debconf - help us make this mugshot gallery complete by contributing your own picture. And thank you very much to the many people that already did.
If you want to have your mugshot taken then listen out to when mugshot sessions are taking place - we take all mugshots in front of the cafeteria door, usually during the food times, so you have easy time finding me and tokkee there. UPDATE: First 120 mugshots are uploaded here. Next mugshot shooting session will be tomorrow - on the 18th of June, during scheduled lunch and dinner.

Aigars Mahinovs: World of Warcraft in Linux using Wine

Many manuals of installing and using World of Warcraft (or simply WoW) in Linux using Wine (Windows emulation) are outdated and provide lots of complex instructions for old Wine version. The truth is very simple:
  1. Take a recent Wine version. Any version from this year (2007) will do. Debian and Ubuntu users can either use the wine from the latest releases of the distros or use the winehq.org repositories.
  2. Install WoW via the usual installer
  3. Edit $WOW/WTF/Config.wtf and add following lines:

    SET gxApi "OpenGL"
    SET SoundOutputSystem "1"
    SET SoundBufferSize "100"
  4. Run ‘wine regedit’ and set HKEY_CURRENT_USER->Software->Wine->OpenGL->DisabledExtensions to “GL_ARB_vertex_buffer_object” (you will need to create this string value)
That is it! You can now simple run ‘wine WoW.exe’ and play the game. Updates also work perfectly. The speed is a bit faster then in the other operating systems and (just like in MacOs X) you can have all your software opened on one virtual desktop, WoW on another and switch between them instantly.

Andrew Pollock: [debian] Huzzah!

09:26 < DC7schedule> New arrivals: Andrew Pollock
(the time is PDT) The backpacker's seems nice enough. There's an Australian themed pub a few doors down that sells Twisties and Burger Rings! Heaven! I'm in the hacklab at the moment, playing "put the face to the name". I can't believe I've been a DD for 4 years and this is my first Debconf.

14 June 2007

Daniel Stone: avivo and donations

Just a quick note to say a huge thanks to everyone who's offered support (financial, hardware-wise, or just verbal) to the r5xx project -- we really appreciate it. A couple of FAQs:

  • Thanks! Where can I send money?
  • Sadly, money isn't the issue: we have jobs/university theses/lives to tend to. We just lack for time right now.

  • Thanks! Where can I send hardware?
  • If you have a card that you won't be needing back (we may lose or fry it), please email myself (daniel@fooishbar.org) and J r me (j.glisse@gmail.com), detailing what you have, and we'll get back to you if it'll be useful to us.

  • Will this work with the X2xxx cards (r6xx)?
  • Yeah, pretty much. It just needs someone to hack up the small amount of code to deal with it.

  • What's happening with X1650 and above (r530/r580)?
  • Most of the code is written, however, initialisation doesn't happen correctly for some reason.

  • What's happening with 3D support?
  • It should be relatively simple to implement from the existing driver, as the engine is believed to be extremely similar, but we want to get the basics working before we start attacking things like this.

  • Which tools do you guys use?
  • For tracing the video BIOS, we use a hacked version of xresprobe: vbetool will instrument the BIOS quite well. For tracing fglrx, we use a hacked version of valgrind: run it against the X server, making sure that it is not suid root. For getting impatient and playing with registers, we use avivotool.

  • Where does the development happen?
  • On IRC, #dri-devel seems to serve somewhat as the ATI development centre. This gets fairly well coalesced into The Irregular Radeon Development Companion, however, so you may prefer to just follow that.

  • Shouldn't all this be on a wiki page somewhere?
  • Yes, but I have to get up in less than four hours.

    Once again, thanks for the support, from all of us. It's been great.

    Stefano Zacchiroli: yay for debconf7

    Yay, I'm here Lot of things happened preventing me to post the obligatory "yay for debconf" on Planet earlier (just to mention one: my DSL provider was incredibly fast in disabling my connection, and godog who remained at home is probably thanking them for that as well...). Anyhow ... I'm here! Meeting again all of you guys is terribly cool, thanks you all!! Ah, by the way, since people are asking: no, I didn't come here by motorbike. Actually I started planning the trip a while ago and summing up the needed money. When, counting in euros, I reached the 4th digit I stopped counting and decided to came by plane :(

    Aigars Mahinovs: Debconf7 photos

    My blog server has been down ever since I left off to Edinburgh for the 7th Debian conference. Since then I have been busy taking photos of everything and everyone here AND I am not alone in that. Enjoy!

    Andrew Pollock: [life] Back to being a SINK (for ~17 weeks anyway)

    Sarah's approaching the 23 week mark. So far the pregnancy has been going swimmingly. The obstetricians are still freaking out (although a bit less), but nothing's happened to warrant it. We went to see the cardiologist today, and Sarah's aortic root is no bigger than it was prior to conception. He did indicate that he didn't think having any further children was a good idea (despite there being no problems to date). He was saying that we should probably expect to not have a choice, and have to have a Caesarean section delivery. If we did have a "natural" birth, it wouldn't be all that natural - he'd be wanting for an assisted delivery (probably involving suction) after the first stage of labour. None of this is really the way I'd envisaged or wanted my child to come into the world, but you can't really argue with the doctors, and I'm not the one having the baby, so my personal preferences are really just that. Young PJ, (Pollock Junior) as we've been calling him, is proving to be very active. He's doing lots of kicking, and I can feel some of them as well now. Sarah's employment contract was up for renewal, and they wanted to renew it for another 6 months rather than try to convert her to full-time. Given that she'd have to take some time off mid-way through the new contract to have the baby, we thought that it made more sense for her to just cease working now and take it easy for the remainder of the pregnancy. So she's now a lady of leisure (and loving it) again as of Monday.

    Andrew Pollock: [life] Marfan's Syndrome

    Ever since Sarah started seeing Dr Liang at the Stanford Marfan Syndrome and Related Aortic Disorders Clinic for her aortic aneurysm, I've been meaning to write something about them and the condition to try and get them onto the first page of Google when doing a search for the disorder. So here it is. Whilst Sarah doesn't have Marfan's Syndrome, one of the symptoms is aortic aneurysm/dissection, which Sarah has a family history of. So that makes cardiologists that specialise in this field the best people to talk to.

    13 June 2007

    Biella Coleman: Oprah collecting health insurance stories

    I promise to write about something else very soon, but I have to post this given what I have just written. Ms Oprah is seeking Healthcare Insurance Company Experiences
    Tell us about an experience you had with your healthcare insurance company. Please write in only if you are willing to appear on national television.
    I am sure my story is babycakes compared to the scary stuff that is actually happening out in the so-called “Land of the Free.” Like people being denied some cancer treatment, them dying, and then some of the head honchos feasting on their major organs, but hey, I submitted anyway.

    Eddy Petri&#537;or: Whacky ideas, my addition...

    PriorityIncreaseIfBinariesFromTheSameSource:

    It would be really useful if a -dev package's priority would inflate proportionally with every binary package originating from the same source as the dev package.

    This way I would never see this[1]:

    # LANG=C apt-get install libxmu-dev libagg-dev libgstreamer0.10-dev libgtkglext1-dev libmad0-dev libxul-dev libdirectfb-dev libkonq4-dev libcurl3-gnutls-dev libcaca-dev libboost-date-time-dev libavcodec-dev libavformat-dev libming-dev
    Reading package lists... Done
    Building dependency tree... Done
    The following extra packages will be installed:
    kdelibs4-dev liba52-0.7.4-dev libacl1-dev libarts1-dev libartsc0-dev libasound2-dev libaspell-dev libattr1-dev
    libaudio-dev libavahi-qt3-dev libcucul-dev libcupsys2-dev libdc1394-13-dev libdts-dev libfam-dev libfam0
    libgl1-mesa-dev libglu1-mesa-dev libgsm1-dev libgtkglext1 libidn11-dev libjack0.100.0-dev libjasper-1.701-dev
    liblcms1-dev liblua50-dev liblualib50-dev libmng-dev libmozjs-dev libmpeg3-dev libnspr4-dev libnss3-dev libogg-dev
    libopenexr-dev libqt3-headers libqt3-mt-dev libraw1394-dev libsasl2-dev libslang2-dev libtheora-dev libtiff4-dev
    libvorbis-dev libxslt1-dev libxt-dev mesa-common-dev qt3-dev-tools xlibmesa-gl-dev
    Suggested packages:
    libasound2-doc aspell-doc libqt3-i18n qt3-doc libraw1394-doc
    Recommended packages:
    fam gstreamer0.10-doc libqt3-compat-headers
    The following packages will be REMOVED:
    gamin libgamin0
    The following NEW packages will be installed:
    kdelibs4-dev liba52-0.7.4-dev libacl1-dev libagg-dev libarts1-dev libartsc0-dev libasound2-dev libaspell-dev
    libattr1-dev libaudio-dev libavahi-qt3-dev libavcodec-dev libavformat-dev libboost-date-time-dev libcaca-dev
    libcucul-dev libcupsys2-dev libcurl3-gnutls-dev libdc1394-13-dev libdirectfb-dev libdts-dev libfam-dev libfam0
    libgl1-mesa-dev libglu1-mesa-dev libgsm1-dev libgstreamer0.10-dev libgtkglext1 libgtkglext1-dev libidn11-dev
    libjack0.100.0-dev libjasper-1.701-dev libkonq4-dev liblcms1-dev liblua50-dev liblualib50-dev libmad0-dev libming-dev
    libmng-dev libmozjs-dev libmpeg3-dev libnspr4-dev libnss3-dev libogg-dev libopenexr-dev libqt3-headers libqt3-mt-dev
    libraw1394-dev libsasl2-dev libslang2-dev libtheora-dev libtiff4-dev libvorbis-dev libxmu-dev libxslt1-dev libxt-dev
    libxul-dev mesa-common-dev qt3-dev-tools xlibmesa-gl-dev
    0 upgraded, 60 newly installed, 2 to remove and 0 not upgraded.
    Need to get 21.6MB/22.2MB of archives.
    After unpacking 108MB of additional disk space will be used.
    Do you want to continue [Y/n]?



    [1] these are gnash's build deps, in case you're wondering

    12 June 2007

    Antti-Juhani Kaijanaho: Benja on denotational semantics

    My friend Benja Fallenstein got carried away in the comment section of my latest post on recursion and wrote a tutorial on how it all relates to denotational semantics. It’s a shame it is buried somewhere in the comments, so I am reposting the comment here with Benja’s permission. The tagline is, Denotational semantics tutorials. It s the new monad tutorials!
    Benja Fallenstein writes: Having read and understood [the] entire post, I can now summarize Antti-Juhani s complaint in a way that programmers with no theoretical background will understand: The definition is an infinite recursion. Sure, it s self-referential, but since it recurses forever, it doesn t actually define what recursion is! :-) That said, I find it kind of a pity to introduce all this theory without talking about why it nicely models the real world. Antti-Juhani argues that this pretty much the definition of popularized science, but I have to admit that, as definitions go, I like recursion: see recursion better. :) So let me have a quick go. [UPDATE: Didn t turn out to be quick at all. This is, in fact, as long as Antti-Juhani s original post. Proceed at your own peril.] All of this comes from denotational semantics, which is concerned with what expressions in a programming language mean and which ones mean the same thing. For example, 7 denotes the number seven, 7+2 denotes the number nine, and 5+4 also denotes the number nine. Now, here s the knotty problem. If we have f(x) = if x = 0 then 1 else x*f(x-1) then f(4) denotes the number twenty-four, but what does f(-2) denote? So, denotational semantics introduces a new, special value, recurses forever. An expression of type integer either denotes an integer, or, like f(-2), it denotes recurses forever. Now, about these partial orders. (Reminder: A partial order says, for every pair (x,y) of elements of a certain set, that x is smaller than y, equal to y, larger than y, or incomparable to y.) Here is Benja s guide to what the partial orders of denotational semantics mean: Let s say that you write a program where, in one place, you can plug in either x or y. If you can write such a program that prints foo when you plug in x and prints bar when plug in y, then x and y are incomparable. If you can t do that, but you can write a program that prints foo when you plug in y, and recurses forever when you plug in x, then x is smaller than y. If every program you can write will do the same thing whether you plug in x or y, then x and y are equal. (We ignore details like out-of-memory errors and *how long* a program takes to do something.) Examples: - 5 and 7 are incomparable. Proof: if ___ == 5 then print foo else print bar . - f(-2) f(2). Proof: if ___ == 2 then print foo else print foo if you plug in f(-2), this will loop forever, if you plug in f(2), it ll print foo . - (5+2) = 7. Whatever program I write, it will do the same thing, no matter which of these expressions I plug in. Now, with expressions of type integer, the resulting partial order is: Recurses forever is smaller than everything else. All other values are incomparable. Recall from Antti-Juhani s post that the bottom element ( ) is defined to be the smallest element of a mathematical universe (if such a beast exists). Since recurses forever is smaller than everything else, it s the bottom element of this universe. That s what denotational semantics calls it. (Haskell, too.) Of course, this partial order is kind of boring (the technical term is flat ). It gets more interesting when we consider functions. In general, we can talk about functions from values of type S to values of type T, where we already know the partial orders of S and T. In particular, we can talk about functions from integers to integers. Now, if you can find an x and a program that prints foo when you plug in f(x) and bar if you plug in g(x), then you can write a program that prints foo when you plug in f, and bar when you plug in g. (Exercise! ;-) ) Further, denotational semantics wants applying a function to a parameter and then doing something with the result to be the *only* way you can get information about a function. No f.get_function_name, please. (If your programming language has that, you can t map the functions of your programming language 1:1 to the functions of denotational semantics.) By my rule above, this implies that f = g if and only if f(x) = g(x) for all x. Since formal theories can t have fuzzy stuff like my rule, denotational semantics takes this as the *definition* of the partial order on functions. The bottom element of this mathematical universe, then, is the function that always returns bottom, no matter what it is given or in other words, a function that recurses forever, no matter what parameter you pass to it. (Side note. Denotational semantics allows only monotone functions that is, if x = y, then f(x) = f(y) for all f, x, and y. That s an example of how all these definitions allow us to make formal statements about the real world. In the real world, if you can find a function f and a program that prints foo when given f(x) and bar when given f(y), then you have a program that prints foo when given x and bar when given y so if f(x) and f(y) are incomparable, then x and y must be incomparable, and the other way around, if x and y are comparable, then f(x) and f(y) must be comparable, too. (This reasoning doesn t exclude the case that x = y and f(x) >= f(y). If you really care, prove it yourself. :) ) This ends the side note.) Recall, now, Antti-Juhani s definition of recursion: An equation of the form x = some expression (which may contain x), interpreted as a recursive definition, defines x to be the smallest value satisfying this equation. The models constructed in denotational semantics have the property that for any equation of this form, the set of values satisfying it does have a smallest element, so x is well-defined no matter what the equation is. It s important to note that this does not mean that x has to be bottom, because there are equations to which bottom is not a solution. Let s look at a slightly simpler example than the one Antti-Juhani gave. f(x) = if x = 0 then 0 else f(x-1) We have f(0) = 1, but bottom(0) = bottom, so f can t be bottom. The equation has more than one solution, though. It is satisfied by a function that returns 0 for x >= 0 and returns bottom (recurses forever) for x 0; but it is also satisfied by a function that returns 0 for every input. And by an infinite number of functions that return 0 for some negative inputs and bottom for others. We want the first of these solutions, of course, because that s what we get if we interpret the equation as a computer program, and computer programs are what we re trying to model. But we re in luck: The first solution is smaller than all the other ones, because for all inputs, they either return the same value, or the solution we want returns bottom and the solution we don t want returns 0 (and bottom 0). The point of it all is, of course, that when we interpret an equation as a computer program, we always get the least value satisfying the equation (if we use a partial order that follows my rule, above). And that, my friend, is denotational semantics.

    Evan Prodromou: 23 Prairial CCXV

    I'm listening to The Current on CBC and they're interviewing the product manager for Google Maps about the Street View feature. The question: "Couldn't this technology be used by terrorists?" Let's go ahead and answer this oft-repeated question once and for all: of course it could. Practically any technology or information source that's useful to the general public would be useful to terrorists. Terrorists benefit every day from self-service gas stations, sliced bread, walk/don't walk signs, and pocket dictionaries. All these advances, and many more, have helped terrorists in their daily lives and in their evil plans. They also help the rest of us. There are very few technologies or infrastructure improvements that are useful to Good People that aren't also useful to Bad People. It would probably hamper the work of terrorists if we tore up the public roads, forbade the sale and transport of household cooking oil, and mandated inconsistent and illegible spelling in all print publications. It would also cause the rest of us a lot of inconvenience and harm. Of course, the converse is not true: there are plenty of technologies that are only useful for doing very bad things. The question we should ask with any technology is, "Does it have enough general-purpose usefulness to offset possible misuses?" Rigging every railroad bridge in North America with dynamite and a convenient nearby plunger is an initiative that has very little utility for anyone with good intentions. Enhanced mapping tools? Probably not in the same class. We live in a world where evil folks use the tools of everyday living to take civilian lives. If we turn our technological society back to the Neolithic, it's not going to change that -- it's just going to take longer for people riding donkeys to come brain us with stone axes. I don't think it's worth it. tags:

    Next.

    Previous.