Log in

No account? Create an account
Like the moment when the brakes lock / And you slide towards the big truck - MrPutter: doing things the hard way, because it is there.
January 27th, 2008
08:30 pm
[User Picture]


Previous Entry Share Next Entry
Like the moment when the brakes lock / And you slide towards the big truck
Some shmuck just ran his car into a lamp post right outside my window. Way to go, shmuck.

Note for all shmucks out there: road + ice + snow "go really fast."

So another academic year is here, and this time, I can has schedule. The schedule says that (a first draft of) the first three chapters of Thesis are to be turned in on February first. Which would be less of a problem than it is had I written more than ½ a chapter by now.

This is also the last semester in which I will be TAing, sigh. My plan had been to do Dr. I's compiler course this semester[1] (417 (Functional Programming) is not offered during the Winter and the instuctor who has taken over 349 (Programming Paradigms) has changed the course[2] to the point where I no longer have any desire to am no longer the best TA for the course). However due to some last-minute shenanigans, I am instead TAing CPSC 513: (Computability).

This should be interesting. It's the first time I've TA'ed a theory course (yes, the Functional Programming one contained a fairly heavy theory component, but this is the first one that has been all theory, and that has no programming at all). It is, however, known as a "theory for non-theoreticians" course. It's just about the only 4th-year course that has no significant prerequisites in its particular specialization. This leads a lot of undergrads to take it who are just looking for "a 4th year course, any 4th year course" that fits in their schedule to meet graduation requirements. Whether this will mean I have a lot of duds in the class, I don't know. So far (after all of one tutorial), it seems fine enough.

However it does mean that so far, I have been doing things like going baby-step-by-baby-step through " what is an inductive proof?" and similar activities. Which is, I suppose, also fine. I won't have to mentally stretch myself much, but, y'know, after last semester's gung-ho 417 students, I can kinda use the break.

Another side-effect is that since grad students are allowed to take 4th year courses, and since breadth requirements compel non-theory grad students to take a theory course, a lot of them end up taking this one, knowing that it's not particularly challenging. So out of the 21 students in my class, I already know/am friends with at least 12. There's more, but since at least one of them is on LJ (not flisted, but whatever) it's probably not appropriate to discuss it here & now.

Every year, I try to add at least one new component to my course websites. This year, it was LJ-style discussion fora. I got the idea last year while I was LJ-ing and F/Book-ing and Tabnet-ing a lot, and replying to various posts, then hit up my course website for something, and got the overwhelming urge to post a reply to one of my pages. (As I recall, I spent a good 30 seconds or so trying to recall where the "reply" button was before coming back to Earth.) So the idea is that every page (for example, assignments, exercises, examples and the like) has a thread attached to the end. If students have any questions or comments to make on the assignment or whatever, they can just use the forum to comment. It also has other abilities, e.g.: students can make anonymous posts, so those who feel nervous about asking what may seem like "stupid" questions can still ask away without feeling overly self-conscious. I don't know how heavily the fora will end up being used, but *shrug*. It's an experiment.

The webspace we are given by the department has PHP capability, but as I've alluded to before, the security measures applied thereto are completely inadequate, and to get any security at all, I have to compile my programs to a binary, for which I can set the execute, but not the read, bits. I considered C for my forum software, but since webfora are basically a whole bunch of text handling, that sounded like too much hassle that I didn't want to go through. So after some humming and hawing, I decided to write it in Haskell.


So to no-one's greater surprise than my own, I have demonstrated that Haskell can actually be used to write useful things!

After finishing the software, I discovered that, of course, MSIE completely mangles the CSS I used to properly disply my threads. So after 2 days of hair-pulling I succeeded in carefully bastardizing the CSS into a form that is adequate (if no better) on all major browsers...

...only to then discover that MSIE refuses to properly render the math symbols that I need (and that are part of the HTML standard!). After a good deal more hair-pulling, I discovered that the only solution requires user intervention, so I just threw my hands up, said "to Hell with it," and told my students to use Firefox.

Fucking MSIE.

(math symbols in MSIE)

(math symbols in Mozilla, Firefox, Opera, Konqueror, Safari and every other browser on the planet)

So yeah. Good times. How much longer can I make this post ramble?

These two are a couple of interesting satellite images that I've now seen a dozen or two times. They are composites of images taken in 1993 and 2003. The red indicates light that was absent in 1993 but present in 2003. The blue is light that was present in 1993, but absent ten years later.

There's a lot that can be said here. Personally I'm content just to look and contemplate.

Edit: here's a legend for the colours.
    New light
    Increase in high-intensity light
    Increase in low-intensity light
    Unchanged high-intensity light
    Unchanged medium-intensity light
    Unchanged low-intensity light
    Decrease in low-intensity light
    Decrease in high-intensity light
    Extinguished light

I think I will call it: MiniMeDubai

Okay, so the above photos are all from Astana, the "new" capital of Kazakhstan (after Almaty was considered to be {too close to China/too remote from Russian-dominated parts of the country/in an Earthquake zone/too hemmed in to accomodate further growth/too disorderly/pick yer poison}). Therefore instead, the Kazakh government is spending large amounts of oil money to build a new capital-city-cum-cultural-center-for-all-of-Central-Asia on the frigid steppe of the country's northernmost province.

Everything about this place echoes Dubai (albeit maybe 15 years ago), from the amount of money being spent, to the population growth projections, to the scope of the ambitions, to the scale of the construction (in which everything is being built all at once: see Google Earth for a better idea). Crazy. Especially so for one of the more-or-less-impoverished former Soviet republics (we note how Kazakhstan is a large swath of blue and black in the above satellite image). I'd been largely unaware of what was going on here until stumbling across it on Google Earth the other day.

One more image from Kazakhstan before we go. Needless to say, this is not Astana:

A new C-Train station opened up in Calgary way back on December 17, and I still have yet to go check it out. This worries me.

I'm not so sure I understand what everyone sees in this 'Hallowe'en' thing...
"I'm not so sure I understand what everyone sees in this "Hallowe'en" thing..."

[1] Unlike most others, I pretty much get my pick of which course to TA, since I am generally happy to TA courses that no-one else wants to touch with a 10m electric cattle prod. So I just say that I want to TA course XXX and it's mine.

[2] Since when the fuck does "Programming Paradigms" imply "studying the internals of the Java interpreter??"

Current Location: T2L 2C7
Current Mood: tiredtired
Current Music: Pink Floyd -- Two Suns in the Sunset
Tags: , , , , , , , ,

(5 comments , Leave a comment)

[User Picture]
Date:January 28th, 2008 02:28 pm (UTC)
So that's what the Haskell nickname was all about.

It never occurred to me that the cranes at Baikonur could look so different from the gantry at Cape Canaveral.

I'm puzzled by all the red lights over Java. It would already have been very densely populated by 1993. Also, for some reason London, Paris, Tokyo, and Osaka seem to be whitish, whereas most other cities are yellow. The sheer size of the Moscow conurbation is breathtaking. Tokyo as well (especially given the scale difference on the maps), but that's a much more heavily populated megalopolis, as is Hong Kong/Shenzhen/Guangzhou. Surprisingly few red dots over the rest of China though, I'd have expected massive growth in the south.

Hyperlinked footnotes are great, but they are even better when there is a link at the end to the point from which you jumped.
[User Picture]
Date:January 28th, 2008 08:21 pm (UTC)
> a link at the end to the point

Back button on yer browser? Well, I'll keep it in mind, anyway.
[User Picture]
Date:January 29th, 2008 12:01 am (UTC)
> so different from the gantry

My feelings too, which is one of the reasons I included the image. That, plus it looks eerily similar to a giant iron venus flytrap.

(actually, my main point was to illustrate how with all the attention being focused on Astana, the rest of the country's infrastructure was just being left to rust)

> seem to be whitish, whereas

Yeah, I'm not sure what to make of that. Someone was hypothesizing that the white light was "less intense" than yellow or somesuch, but that doesn't make sense when I look at the pictures.

> what the Haskell nickname


The nickname to which you refer came when I was attempting to modify the contents of a file. My first attempt was pretty quick-and-dirty, and consisted of: (1) Open file for reading, Read, Close; (2) Mangle information; (3) Open file for writing, Write, Close.

Which didn't work. At all. After some investigation, I discovered that in step (1), once I closed the file handle, all the information I had read from it "disappeared" and was no longer available to my program for steps (2) or (3).

I know and understand Haskell pretty well, so a few seconds' thought quickly revealed to me why this was the case (beyond the scope of this discussion, but despite appearances, the reason is not quite so, uh, unreasonable as would be in other languages).

So the revised algorithm became: (1) Open file for reading+writing, Read; (2) Mangle information; (3) Rewind file pointer to the beginning; Write; Close.

I didn't mind this so much, as it is a vastly more thread-safe algorithm than was the first (important when writing discussion fora) and I would have probably eventually had to settle on something similar anyway.

Except that it still didn't work.

This because Haskell doesn't reset the file size at all when opening for read/write (fair enough, being consistent with other languages), but furthermore has no way of explicitly inserting an EOF marker into the stream (which is to say, it has no analogue to C's ftruncate()). So if, for example, my original file's contents were "abcdef<EOF>", and I collapse the "bcd" to just "b", then my resulting file ends up being: "abefef<EOF>". Which is totally not what I want. My workaround ended up being to devise my own special 'EOF' character that I can insert into the stream, and for which I had to write code to explicitly check every time I opened the file anywhere.

Which seems to me entirely retarded, and something that the Operating System should do for you... that's why we have EOF to begin with!

Anyway, grumble. I managed to work around every issue, so the language isn't completely hopeless. But it ended up being a damn sight more hassle than I had expected.
Date:August 21st, 2008 08:47 am (UTC)


I'm new here, just wanted to say hello and introduce myself.
[User Picture]
Date:August 22nd, 2008 12:20 am (UTC)

Re: Hello

Okay, um. Hello!

Beware of Road Surprises Powered by LiveJournal.com