Monthly Archives: November 2009

Philosophizing about Programming; or "Why I'm learning to love functional programming"

Way back, about three years ago, I started writing a Haskell tutorial as a series of posts on this blog. After getting to monads, I moved on to other things. But based on some recent philosophizing, I think I’m going to come back to it. I’ll start by explaining why, and then over the next few days, I’ll re-run revised versions of old tutorial posts, and then start new material dealing with the more advanced topics that I didn’t get to before.

To start with, why am I coming back to Haskell? What changed since the last time I wrote about it?

Continue reading

Berlinski – still pompous, still wrong.

An anonymous tipster sent me a note to let me know that on one of the Disco
Institute’s sites, my old pal David Berlinski has been arguing that all sorts of
famous mathematicians were really anti-evolution.

I’ve written
about Berlinski before.
In my opinion, he’s one of the most pointlessly
arrogant pompous jackasses I’ve ever been unfortunate enough to deal with. He
practically redefines the phrase “full of himself”.

This latest spewing of him is quite typical. It is mostly content free –
it consists of a whole lot of name-dropping, giving Berlinski a chance to talk
about all of the wonderfully brilliant people he’s close personal
friends
with. And, quite naturally, his close personal friends have told
him all sorts of things about what other famous mathematicians
really thought about evolution.

Continue reading

Friday Random Ten, 11/06

  1. Porcupine Tree, “Kneel and Disconnect”: New Porcupine Tree! It’s
    always great to get new stuff from these guys. It’s good, but it’s not
    up to the quality of their last two albums. (But given that their last two
    were utterly amazing, that’s not much of a criticism.)
  2. Mind Games, “Royalty in Jeopardy”: Some prog that I recently found
    via eMusic. They’ve got a sound that I describe as being sort of like a
    mix between Yes and Marillion. They’re very good – I wouldn’t put them
    in the top ranks of neo-prog, but they’re not at the bottom either.

  3. Riverside, “Cybernetic Pillow”: Now, these guys, I would
    definitely put in the top ranks of neo-prog. Riverside is a
    Polish prog-rock band, formed by members of a couple of other
    heavy metal bands. They’re absolutely brilliant. This track
    is off their album “Rapid Eye Movement”, which I’d recommend as a first
    Riverside album.
  4. Marillion, “Hard as Love (acoustic)”: This is the version of “Hard as
    Love”” from their recent acoustic album. HaL was one of their louder,
    poppier, catchier tunes – a Marillion rocker. To call this just an acoustic
    mix doesn’t do it justice. They took the basic bones of the song,
    and completely rebuilt it. It’s an amazing change. The acoustic
    version swaps the bridge and the chorus, completely changing the fell
    of the structure, and turning it into something that’s almost a ballad.
    Amazing, and much better than the original version of the song.
  5. Thinking Plague, “This Weird Wind”: Thinking Plague is a group
    that I have a hard time describing. To me, they sound like a very out-there
    post-rock group with classical influences, but I’ve been told that
    they call themselves a “Rock in Opposition” band. What they are is
    a distinctly peculiar ensemble. They’ve got vocals, but they use
    the singers voice like it’s just another instrument in the mix – it’s
    not leading the song in any way, it’s just part of the music. The music
    itself is frequently atonal, with a very peculiar sound. The guitarist
    sounds very much like one of Robert Fripp’s GuitarCraft students – but
    when I mentioned that in the past, he showed up in the comments saying
    “Who’s Robert Fripp?” I love Thinking Plague, but I have a hard time
    recommending them – they’re so strange that most people won’t like
    them. If you’re a big fan of both neo-progressive rock and 20th
    century classical, then definitely give them a listen.
  6. EQ, “Closer”: IQ is back! IQ is a progressive band that
    got started around the same time as Marillion. Also like Marillion, they
    started off sounding like a Peter Gabriel-era Genesis rip-off, but
    they’ve evolved their own very distinct sound over the years. They’re
    absolutely fantastic – I’d put them up in the top of neo-progressive
    bands with Marillion and the Flower Kings. And they just released a new
    album, which is absolutely fantastic.
  7. Sonic Youth, “Rain King (live)”: Very typical Sonic Youth – strange
    tonality. Loud. Tons of hidden complexity. Brilliant. And performed
    live! No studio tricks here.
  8. Kayo Dot, “The Useless Ladder”: Another very hard-to-describe
    band. Roughly, they’re what you get when a progressive metal band
    decides to start writing 21st century classical chamber music. Very,
    very highly recommended.
  9. Red Sparrowes, “And By Our Own Hand Did Every Last Bird Lie Silent In
    Their Puddles, The Air Barren Of Songs As The Clouds Drifted Away. For Killing
    Their Greatest Enemy, The Locusts Noisily Thanked Us And Turned Their Jaws
    Toward Our Crops, Swallowing Our Greed Whole”
    : It took me longer to type
    the title of that than it did to listen to it. Red Sparrowes is a really
    excellent post-rock band. But frankly, this track just annoys be because
    of the damn title.
  10. Rachel’s, “A French Gallease”: A beautiful track by my favorite
    of the classically-leaning post-rock ensembles.

Orbits, Periodic Orbits, and Dense Orbits – Oh My!

Another one of the fundamental properties of a chaotic system is dense periodic orbits. It’s a bit of an odd one: a chaotic system doesn’t have to have periodic orbits at all. But if it does, then they have to be dense.

The dense periodic orbit rule is, in many ways, very similar to the sensitivity to initial conditions. But personally, I find it rather more interesting a way of describing key concept. The idea is, when you’ve got a dense periodic orbit, it’s an odd thing. It’s a repeating system, which will cycle through the same behavior, over and over again. But when you look at a state of the system, you can’t tell which fixed path it’s on. In fact, minuscule differences in the position, differences so small that you can’t measure them, can put you onto dramatically different paths. There’s the similarity with the initial conditions rule: you’ve got the same basic idea of tiny changes producing dramatic results.

In order to understand this, we need to step back, and look at the some basics: what’s an orbit? What’s a periodic orbit? And what are dense orbits?

To begin with, what’s an orbit?

If you’ve got a dynamical system, you can usually identify certain patterns in it. In fact, you can (at least in theory) take its phase space and partition it into a collection of sub-spaces which have the property that if at any point in time, the system is in a state in one partition, it will never enter a state in any other partition. Those partitions are called orbits.

Looking at that naively, with the background that most of us have associated with the word “orbit”, you’re probably thinking of orbits as being something very much like planetary orbits. And that’s not entirely a bad connection to make: planetary orbits are orbits in the dynamical system sense. But an orbit in a dynamical system is more like the real orbits that the planets follow than like the idealized ellipses that we usually think of. Planets don’t really travel around the sun in smooth elliptical paths – they wobble. They’re pulled a little bit this way, a little bit that way by their own moons, and by other bodies also orbiting the sun. In a complex gravitational system like the solar system, the orbits are complex paths. They might never repeat – but they’re still orbits: a state where where Jupiter was orbiting 25% closer to the sun that it is now would never be on an orbital path that intersects with the current state of the solar system. he intuitive notion of “orbit” is closer to what dynamical systems call a periodic orbit: that is, an orbit that repeats its path.

A periodic orbit is an orbit that repeats over time. That is, if the system is described as a function f(t), then a periodic orbit is a set of points Q where ∃Δt : ∀q∈Q: if f(t)=q, then f(t+Δt)=q.

pendulum.tiff

Lots of non-chaotic things have periodic orbits. A really simple dynamical system with a periodic orbit is a pendulum. It’s got a period, and it loops round and round through a fixed cycle of states from its phase space. You can see it as something very much like a planetary orbit, as shown in the figure to the right.

On the other hand, in general, the real orbits of the planets in the solar system are not periodic. The solar system never passes through exactly the same state twice. There’s no point in time at which everything will be exactly the same.

But the solar system (and, I think, most chaotic systems) are, if not periodic, then nearly periodic. The exact same state will never occur twice – but it will come arbitrarily close. You have a system of orbits that look almost periodic.

But then you get to the density issues. A dynamical system with dense orbits is one where you have lots of different orbits which are all closely tangled up. Making even the tiniest change in the state of the system will shift the system into an entirely different orbit, one which may be dramatically different.

Again, think of a pendulum. In a typical pendulum, if you give the pendulum a little nudge, you’ve changed its swing: you either increased or decreased the amplitude of its swing. If it were an ideal pendulum, your tiny nudge will permanently change the orbit. Even the tiniest perturbation of it will create a permanently change. But it’s not a particularly dramatic change.

On the other hand, think of a system of planetary orbits. Give one of the planets a nudge. It might do almost nothing. Or it might result in a total breakdown of the stability of the system. There’s a very small difference between a path where a satellite is captured into gravitational orbit around a large body, and a path where the satellite is ejected in a slingshot.

Or for another example, think of a damped driven pendulum. That’s one of the classic examples of a chaotic system. It’s a pendulum that has some force that acts to reduce the swing when it gets too high; and it’s got another force that ensures that it keeps swinging. Under the right conditions, you can get very unpredictable behavior. The damped driven pendulum produces a set of orbits that really demonstrate this, as shown to the right. Tiny changes in the state of the pendulum put you in different parts of the phase space very quickly.

Damped driven chaotic pendulum - double period behavior.png

In terms of Chaos, you can think of the orbits in terms of an attractor. Remember, an attractor is a black hole in the phase space of a system, which is surrounded by a basin. Within the basin, you’re basically trapped in a system of periodic orbits. You’ll circle around the attractor forever, unable to escape, inevitably trapped in a system of periodic or nearly orbits. But even the tiniest change can push you into an entirely different orbit, because the orbits are densely tangled up around the attractor.

Free Energy From Air? Sorry, no.

After the
fiasco
that was my flame against the downwind faster than the wind
vehicle, you might think that I’d be afraid of touching on more air-powered
perpetual motion. You’d be wrong :-). I’m not afraid to make a fool of myself
if I stand a chance of learning something in the process – and in this case,
it’s so obviously bogus that even if I was afraid, the sheer stupidity here
would be more than enough to paper over my anxieties. Take a look at this –
the good part comes towards the end.

Continue reading