Academic writing always assumes that its reader is an equal, not necessarily a first time reader. It also seems to assume that the author is an absolute authority on what he is writing, which I think is not only invalid much of the time, but also unnecessarily restrictive. Often I feel it would be nice to be able to admit one's uncertainty openly, not solely for the purposes of honesty but also to signal to readers a potential gap they could fill with their own perspective.
It's true that good academic writers already do this, but they do it sparingly. I believe the reason for this is that an academic publication primarily documents finished work. That is, it is the end result of a long process of experimentation, learning, questioning and revision. However, I feel a need to document my ideas at an earlier stage. What I've been doing up until this point is attempting to write my ideas in an academic style in the hopes that once they're complete I'll just have to come back to the document, polish it somewhat, and have a finished, publishable item. It's a nice idea in theory.
What invariably happens though is that I come to a point in the writing where I'm thinking one of two things: "I wish I could go into more background detail here, for my own sake as well as the reader's but that would that just be pandering to them, wouldn't it?" or "This work is incomplete but I've really got to get these ideas down. How exactly do I write that in an academically suitable way?" These perceived strictures hold back the writing. Wouldn't it just be better to get the ideas out there for comment as soon as possible?
Also, as much as I respect the formal peer review process, I think there is room for comment at a much earlier stage, at that point where being made aware that you have said something illogical or not well thought out is much less of a blow to the ego. I think online publishing would be an excellent forum for this kind of discussion.
But I can also see some cons to online publishing. Anyone can read and post their comments. I worry that the addition of the "masses" to my readership might dilute the quality of any feedback I get back. However, I'm heartened by the observation that although this happens to some degree on the mailing lists I participate in, it doesn't really affect my appreciation of them or how useful I find them.
To conclude this short message, I'm going to give this a shot. If it doesn't work I haven't lost all that much. I do worry (but only a little) that I could have the effect of damaging one's reputation. It can't be denied that the ego is heavily involved in the academic process. The present system of thought dissemination seems to favour those who hold back until their work is polished, but I'm arguing that there's a lot a value in a uncut gem.
]]>Read more about it here.
]]>So why is it that they may be one of the first things to disappear from a low-energy future? At first glance, it seems like my laptop uses next to no power, not much more than a lightbulb. Surely we could run these in the future by peddling a bicycle or something?
Sadly, this isn't the case. Computers a product of a high-energy society. Although the link isn't immediately apparent, part of the reason our modern society is able to be as complex as it is in terms of just raw information is its access to cheap energy. If computers are to survive into the future they will need to have characteristics apart from just being low energy consumers. If this were all that was required we'd have the problem in the bag; there is already active research into low power CPUs.
Unfortunately, the problem is deeper than that. We have to think about the issue of creating hardware components and how long they last. In today's consumer society we hardly think about these issues at all. Most of us buy a new computer once every two to three years; some of us do it even more regularly. Not only that, within the lifetime of a computer we often replace components such has ram and hard-drives. Sometimes this is simply because we're upgrading, but often it's because continued use of a particular component is courting disaster. For instance, it would be sheer madness to use a harddrive for more than two years without backing it up.
Does it bother anyone that books, those supposedly "primitive" information artifacts, are still the undisputed king when it comes to durability? CDs, DVDs, magnetics disks. None of these lasts all that long. It is only the fact that we introduce large levels of redundancy into our systems that ensures the survival of our data.
The problem with hardware it that it can't maintain itself. It has no ability to heal itself. The same is true for most software. But that's precisely the sort of characteristic that would make computing in a low-energy setting a possibility and not just a pipe-dream.
Part of the reason that scieties from the low-energy past were able to manage their resources was that most of the were bioligical in nature. Although some maintenance was necessary, it was of the most basic kind: watering and feeding.
So in summary I think research needs to be put into the following things:
I'd be very interested in hearing any comments people had on this.
]]>The first thing is that you can send a signal to xdvi (SIGUSR1) that will force it to reload a PDF. You can set up a Makefile (and bind it to a key in emacs) such that whenever you hit the key the latex source will be rebuilt and the signal sent to xdvi so that is displays the changes. This is communication from emacs to xdvi.
The second thing allows communication from xdvi to emacs. Apparently you can pass a flag to latex that will put source locations inside the generated dvi. Then, inside xdvi, you can control-click on figures to be taken back to the source location in emacs. This option is --src-specials.
Sometimes I believe that economic or accounting principles should be applied to the very process of knowledge acquisition and disemination. At the moment the process by which people decide whether to continue learning about something or stop and consolidate that knowledge seems very haphazard. I am not aware of a single formal model of this very basic activity.
That's not to say that one doesn't exist; I just don't know of any. It would be a weight off my shoulders if I could consult a model of "further research vs. consolidation and disemination of knowledge" in my dailing goings on. Using intuition alone may not be enough to get the trade-off right.
]]>C-h v - describe a variable
C-h f - describe a function
C-h k - decscribe a key binding
With C-h v and C-h f you can press tab to auto-complete and get a nice long list of the variable or function names. This is quite useful when poking around emacs with a view to learning more of its functionality.
More about rectangles
C-x r k
Kill the text of the region-rectangle, saving its contents as the "last killed rectangle" (kill-rectangle).
C-x r d
Delete the text of the region-rectangle (delete-rectangle).
C-x r y
Yank the last killed rectangle with its upper left corner at point (yank-rectangle).
C-x r o
Insert blank space to fill the space of the region-rectangle (open-rectangle). This pushes the previous contents of the region-rectangle rightward.
M-x clear-rectangle
Clear the region-rectangle by replacing its contents with spaces.
M-x delete-whitespace-rectangle
Delete whitespace in each of the lines on the specified rectangle, starting from the left edge column of the rectangle.
C-x r t RET string RET
Insert string on each line of the region-rectangle (string-rectangle).
Vernor Vinge. "A Deepness in the Sky" p 287.
"But you know about really creative people, the artists who end up in your history books? As often as not, they're some poor dweeb who doesn't have a life. He or she is just totally fixated on learning everything about some single topic. A sane person couldn't justify losing friends and family to concentrate so hard. Of course, the payoff is that the dweeb may find things or make things that are totally unexpected. See, in that way a little of Focus has always been part of the human race. We Emergents have simply institutionalized this sacrifice so the whole community can benefit in a concentrated, organized way."
]]>Here it is:

And here's the code:
squareReg :: Frac -> Region
squareReg side (Pt x y) =
let s = side/2
in x > -s && x < s && y > -s && y < s
--
-- Creates a region of circles. The circles are touching
-- and layed out in a square pattern.
--
-- e.g. ***
-- * *
-- ***
-- n denotes the number of circles to a side.
--
-- The top left-hand circle is a postive (True) region. The one next to
-- it is a negative region. This pattern continues around the edge.
--
twoSERReg :: Int -> Frac -> Region
twoSERReg n r =
posReg `diffR` negReg
where
s = (fromIntegral (n-1))*r
-- (-s,-s) is the position of the centre of the top
-- left circle
posReg = foldr1 unionR (map (circleRegAt r) (evens centres))
`unionR` squareReg (2*s)
negReg = foldr1 unionR (map (circleRegAt r) (odds centres))
centreVals = [-s, -s+2*r..s]
centres = [ (Pt x y) | x <- centreVals, y <- centreVals]
circleReg :: Frac -> Region
circleReg r (Pt x y) = (x*x + y*y < r*r)
--
-- Puts the circleReg at a particular point
--
circleRegAt :: Frac -> Point -> Region
circleRegAt r (Pt dx dy) = translate (Vec dx dy) (circleReg r)
twoSER :: Int -> Frac -> ImageC
twoSER n r = colourReg (twoSERReg n r) white blue
effect :: UI DisplayFun
effect = imageToDisplayFun $ do
n <- makeISlider "circles" (1,4) 1
return $ twoSER (2*n+1) 20
evens :: [a] -> [a]
evens = everySnd True
odds = everySnd False
everySnd :: Bool -> [a] -> [a]
everySnd _ [] = []
everySnd True (x:xs) = x:everySnd False xs
everySnd False (x:xs) = everySnd True xs
Of course I coded this so that you could increase the number of circles on each side of the logo using a GUI slider. Increasing the circles from three to five yielded the following cool generalisation of that effect:

How's that for an example of what Pan's capable of?
]]>BibDesk is a graphical BibTeX-bibliography manager for Mac OS X. BibDesk is designed to help organize and use bibliographic databases in BibTeX .bib format. In addition to manual typing, BibDesk lets you drag & drop or cut & paste .bib files into the bibliographic database and automatically opens files downloaded from PubMed. BibDesk also keeps track of electronic copies of literature on your computer and allows for searching your database through several keys.
BibDesk integrates well with TeX for creating citations and bibliographies. This integration includes a Citation search completion service, and drag & drop (cut & paste) support for adding citations to TeX files.
The features which really spring out at me are:
Here are some more of the funky aspects of this tool though.
%a1%T5%y.sseefried04OptimisingEDSLSYou can also export to HTML or RSS feeds. I may just do that.
]]>Harper and Pfenning. On Equivalence of Canonical Forms in the LF Type Theory
[04-Apr-2004]
Simon Peyton Jones. Tackling the Awkward Squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell
[01-Apr-2004]
Devil: An IDL for Hardware Programming
[19-Apr-2004]
Devil Definition
[09-May-2004/"]
Todd L. Veldhuizen. "Guaranteed Optimization for Domain-Specific Programming."
Has an excellent introduction on what a good general purpose language
environment for domain specific programming should look like.
Introduces a technique called "guaranteed optimization" that promises
to be good for domain specific programming. Most interestingly it
can subsume such things as property checking.
The paper states a couple of interesting things such as the fact that
type checking should not be "baked in" to the language but rather be
considered a domain specific property check of some description.
[04-Nov-2004]
(7) Tim Sheard. Languages of the Future.
(4) Stephanie Weirich. Type safe cast.
[20-Nov-2004]
(8) Peter Achten. "The Feasibility of Interactively Probing Quiescent
Properties of GUI Applications" (Unpublished - I reviewed it)
[22-Nov-2004]
(10) Arch D. Robinson. Impact of Economics on Compiler Optimization
[26-Nov-2004]
(10) Dawson R. Engler. Interface Compilation: Steps toward Compiling
Program Interfaces as Langauges.
[27-Nov-2004]
(10) Shigeru Chiba. A Metaobject Protocol for C++
(7) Samuel Z. Guyer and Calvin Lin. An Annotation Language for
Optimizing Software Libraries.
[8-Dec-2004]
(9) Sang-Ik Lee, Troy A. Johnson, Rudolf Eigenmann. Cetus - An
Extensible Compiler Infrastructure for Source-to-Source
Transformation.
[9-Dec-2004]
(9) Shriram Krishnamurthi, Matthias Felleisen, Daniel
P. Friedmann. Synthesizing Object-Oriented and Functional Design to
Promote Re-Use.
[16-Feb-2005]
(9) Manuel Chakravarty et al. Associated Types with Class.
Review
[25-Feb-2005]
[26-Feb-2005]
Peter J. L. Wallis and Brian A. Wichmann. Requirements Analysis for Ada Compilers.
Link
Got this paper by typing "monolithic compiler" into Google and following the links. States that monolithism should end and be replaced with an architecture in which the compiler is broken up into modules with well-defined interfaces so that various tools can use these modules separately.
It also has an interesting discussion of why language specifications do not serve as a complete specification for compilers. It also clarified in my mind why portability is such a difficult issue: efficiency of hardware.
All language features must be implemented in hardware. Hardware implements very efficiently the core elements of programming languages such as arithmetic, boolean operations, and memory access/management. If a language includes floating point numbers, and most do, then the most efficient thing to do is to use the floating point arithmetic provided by the hardware. But if it differs between hardware platforms this means that identical programs will yield different behaviour on different systems. The alternative is to implement floating point arithmetic in terms of something more standard but this will be hellishly inefficient. Hence portability is compromised.
]]>
"I think my other most valuable contribution has been in teaching, advising, working with students, especially graduate students. I'm very gratified when students writing evaluations say that I'm good at making complicated or difficult things clear, and that I'm simultaneously demanding and supportive. I am at least as proud of the students whose dissertations I have chaired and those I have worked with in other capacities as I am of any of my publications. And I am grateful to them too; they have been as interesting and stimulating and rewarding to work with as anyone could possibly wish for. I think my strengths in teaching and in research are probably related. They say that I’m a good listener and good at suggesting connections to be drawn between one thing and another. I suppose that's at the heart of my teaching and also at the heart of my work. I like looking at things from various points of view, spotting connections, and trying to figure out what different ideas may have in common as well as where the crucial obstacles are to putting them together. For quite a few years I felt a slight inferiority complex because I wasn't gifted at inventing new theories that I could put my own name on, but rather worked at analyzing strengths and weaknesses of various theories, and putting together other people's theories, and solving problems. I contented myself with the idea that if everyone was always coming up with their own theory, it would be hard to make any collective progress. Gradually I learned to value synthesis more and to value my work. I'm grateful to all the teachers and students, friends and colleagues, who have touched my life and my work and helped to make it such an exciting, rewarding and joyful adventure."
Associated Types with Class. Manuel M.T. Chakravarty, Gabriele Keller, Simon Peyton Jones and Simon Marlow. In Proceedings of The 32nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'05), pages 1-13, ACM Press, 2005.
POPL'05.
Synopsis
This paper presents a light-weight extension to Haskell that allows ad hoc overloading of types in much the same way that values can be overloaded in Haskell already. This similarity is highlighted syntactically by extending Haskell's type classes to allow local data type declarations. Here is an example:
class ArrayElem e where
data Array e
index :: Array e -> Int -> e
instance ArrayElem Int where
data Array Int = IntArray UIntArray
index (IntArray ar) i = indexUIntArray ar i
The most interesting thing to me was what sort of applications this idea has.
Much of the paper is then devoted to showing that type checking can be done on the associated types extension. They also show that an evidence translation to System F is possible without extending it.
Difficulties
Verdict
The significance of this paper is its light-weight nature. The problem of type indexed types has been tackled before many times but never with such syntactic elegance nor implementation simplicity.
]]>Can you spot it?
SPECIAL_PACKAGE=YES
ifeq "$(SPECIAL_PACKAGE)" "YES"
... then part ...
else
... else part ...
endif
For some reason the else part was continually invoked. Can you spot the reason? No. Don't even try. You can't spot the reason because spotting involves using your eyes and the thing about whitespace, right, is that you can't see it.
Yup, you guessed it. A trailing whitespace after the YES above caused the problem. Argh!
It reminds me of Holly's1 poor excuse for not avoiding a cluster of black holes.
"Well the thing about black holes, you see, is they're black. And the thing about space, you see, is that it's also black."
[1] The ship's computer from Red Dwarf
]]>The reason for this is that it's hard to work out when exactly a production is going to be reduced1inside the parser. If you keep the last position from the lexer inside the parser state then it may well be at a position beyond the syntacic element that you are trying to glean information for.
e.g.
Say I have a rule in my parser:
PosId : id {% do pos <- getPos
return (%1, pos) }
Unfortunately when this rule is reduced the lexer may already have read a little bit beyond the id above. Hence, it is better for the lexer itself to add position information to the tokens. Then it is easy to read the correct position information. e.g. with a rule like:
Id : id { $1 }
If your token for ids was defined as id { TokenId $$ } and data type Token is defined as:
data Token = TokenId (Name, Position)
| ...
then the rule above will return a name/position pair.
[1] I'm using this term in the sense that it is used when describing the LALR parsing algorithm. i.e. reduce, as in, the reduce from "shift/reduce conflict".
]]>First up I got an email from my mother linking to an ABC story on that obscure activity known as "caving". Caving is the act of exploring the city's urban underground architecture - mainly of storm water drains and sewers. While these are interesting in themselves there are other occasional wonders to be experience. It might be the entrance to the bowels of an underground car park, a cave full of bats, or even an old stone bridge that has been assimilated into the arterial system of storm water drains.
http://www.abc.net.au/built/stories/s1124306.htm
What immediately drew my attention was the stunning photos on the right hand side of the page. Upon closer inspection I realised that I'd been to some of these places before. Yes, that's right, I used to run with the Brisbane Cave Clan. Many of the photos were from Brisbane but a large portion were from other states' capital cities. In one photo neon lights streak down a long brick sewer. I couldn't help but feel a sense of recognition - as far as I know it was us that pioneered this technique of timed exposure in the albeit highly specific setting of underground sewer exploration. But what finally made my eyes widen was reading who the author of the article was - dsankt. Looks like an online handle, and indeed it is, but it's an online handle I'm intimately familiar with. Just as I was getting into caving dsankt was taking over the reigns of the Brisbane Cave Clan as the older members became less interested. His tireless efforts in organising expeditions into the dark underbelly of Brisbane gave our clan a national reputation far in excess of the perceived architectural merit of the subterranean passages we explored.
It was good to see your name again my friend.
Shortly after thanking my parents for bring the article to my attention I checked my news feeds and discovered a link to a post humus defence of what most people consider to be P. G. Wodehouse's greatest blunder. P.G. Wodehouse, most famous for his books concerning the adventures of Bertie Wooster and his butler Jeeves, was unfortunate enough to be captured in France during World War II and placed in a camp. But in 1941, two years into the war, he was approached by some Germans who wanted him to broadcast a short series of light entertainment programs, from Berlin, with the ulterior motive of placating the Americans who had not yet entered the war. Naturally his stalwart fans, and the people of England in general, were not the least bit impressed. His friend from youth, A. A. Milne, author of the Pooh books, was absolutely scathing in his attacks upon him - and at first glance it seems eminently justifiable.
To find out how such actions could be seen the least bit defensible simply follow the link below.
And now for the greatest revelation. On my way back from dropping off the wonderful Philippa Grahame at work I was listening to Radio National1. Sir David Hare was being interviewed about his plays which are strongly political in nature, but on a small scale. To give you a taste, one of his plays is about the privatisation of the public rail system in England. Although I haven't seen any, I'm sure his plays are very interesting. Yet what really intrigued me was the words of praise he had for an American playwright by the name of Wally Shawn. In Hare's opinion Shawn was the only playwright tackling the really big issues. As an example he cited the fact that Wally is intensely concerned with the issue of the world's poor. How is it, really, that the ten percent of people that have all the wealth can be so at ease with the starving, (or at least underprivileged masses) that support our way of life?
This is an issue really close to my heart. We damn the past for colonialism, imperialism, witch-hunting, slavery, genocide, child-stealing and other such atrocities. We are aghast when we hear that such things took place often thinking, "How could people be so unaware of the harm their actions were causing?" But in the same way that we damn the past, the future will damn the present for its wilful ignorance and refusal to solve the tractable problem of world hunger. How is it that in good conscience we can burn mountains of food in France, pay people not to farm pigs and grow certain crops in the U.S. while others starve? It's not that there isn't enough food in the world, it's just a matter of distribution.
My interest in Wally Shawn's plays suitably piqued I decided to look up his name on Amazon. A list of books, including his plays appeared in the top four matches, but the next match, "The Princess Bride" intrigued me. My initial thought was that this was a false match - that it just so happened that there was an actor called Shawn and another calling Wally somewhere in the cast of the movie. But, no, I was wrong.
In that movie, Wally Shawn, is the angry little balding guy with a lisp. In other movies he plays a bubbly little honest-looking gentleman with a lisp. He even did some voice acting in the latest Pixar block-buster "The Incredibles". This little man is the same one tackling the big issues of the world. This completely floored me - I stood up, walked into another room and exclaimed to the open air, "How freakin' cool!" Here was the quintessential example of the type of person your mother has in mind when she says, "Don't judge a book by its cover". All over the internet reviews use superlatives such as genius, and unsung hero to describe his plays.
And here we all are, disarmed by his diminutive size and obvious speech impediment. There is just something about him that screams "minor character" or "comic relief". But he's fully aware of all this and has manipulated this perception of himself to his advantage in his acting career.
I feel it necessary to write an essay about the people in the movies who aren't drop dead gorgeous. You know, the people who play the fat, the idiots, the morons, the ugly ones. They simply have to be aware of the way in which they are intended to be perceived when they land these roles. Why do they do it then? What makes them tick and what it is they think they are accomplishing. Are they just doing it for the money, or is there a deeper goal?
Remember kids, appearances can be deceiving.
[1] I cannot stress enough how cool Radio National is. It's the voice of the intellectual minority in Australia. I'd like to think that its presenters, producers and writers are simply imbued with more common sense than the rest of us, but the reason that the station resonates with me so much probably resides in the fact that, politically, I lean more to the left than the right.
]]>