City of Heros

May 19th, 2004

The lack of entries around here lately has been mostly due to my discovery of City of Heros. Great game - very addictive. Anyway, but get back to it - I’m hoping to reach level 12 tonight….

Computer Problems

May 12th, 2004

I really hate computer hardware. My PC started to randomly freeze every so often a month of two ago. It’s been totally out of action for a few weeks now and I’ve finally gotten around to trying to get it up and running again. After replacing the motherboard, RAM and CPU I can boot linux again and it seems stable if lacking a lot of features. It doesn’t seem to have support the ethernet card, sound card and has some issues with the hard drive controller.

Windows on the other hand blue screens on startup - even in safe mode.

I’m now trying to backup all the document from the windows hard drive to the linux hard drive and there’s this awful clicking noise. Somehow I think I’ll be replacing the hard drive too. Sigh.

Functional Languages

May 9th, 2004

I got involved in a long argument last night centering around different language paradigms and how the perl language fits into them. My “worth adversary” argued that perl could be considered a functional language at least in some ways because it supported function language constructs. In particular the example was given:

map { freq $_ }
    @list

The particular point being made here was that perl supported passing code into functions as parameters and that was a principle construct of functional languages. In Java you’d need to use an object to pass the function in as data thus it’s object-oriented and not functional. Now that I’m home and have access to my text books, I can safely put this argument to rest too. From Programming Language Essentials by Henri E. Bal and Dick Grune and published by Addison-Wesley:

A functional (or applicative) language is based on the evaluation of expressions built out of function calls (applications). A function … computes a certain value, based on its input parameters (also called arguments) and nothing else.

The key issue here is that functions cannot have side-effects on the state of the program, unless this state is carried around in the arguments of the functions. This lack of side-effects results in a property called referential-transparency, which is the most important term in functional programming. It means the result of a function application does not depend on when the function is called but only on how it is called (with which arguments).

So the most important tenant of a functional language is the fact that functions can’t have side effects - not that they don’t, they can’t.

Later it goes on to talk about higher-order functions (functions which take other functions as arguments) and says:

Functional languages usually treat functions as first-class objects, which can be passed as arguments, returned as function results, and stored in data structures

Note two key terms here: usually and first-class objects. Usually - because it implies that this is not an essential feature of functional languages, though it is a useful one. First-class objects - because, while they don’t really mean objects in the object oriented sense, they do mean that the function is an entity in itself and that representing it as an actual object isn’t such a big leap, nor is representing it as a function pointer in a language like C. It’s also worth pointing out that these functions can not only be passed in, but also returned, stored in data structures and “curried” or partially parametized.

Anyway, what this really shows is that keeping your old text books around can occasionally be useful…

Word Of The Day

May 7th, 2004

The word of the day (and it’s a cool word so probably the word of tomorrow as well) is:

gynotikolobomassophilia

The love of biting a female’s earlobes. It’s just wrong when the definition of a word is about the same length of the word itself…. Still, cool word.

White America Policy?

May 6th, 2004

Just browsing stuff and came across a list of requirements to become a US Citizen. One of them is:

you must demonstrate an elementary level of English (reading, writing, understanding);

Is this right? I always tend to question legal advice from random websites, and this one seems to have the entire purpose of getting you to find a lawyer using their site…

If this is right, how is this different from the extremely controversial, and now removed, White Australia Policy? Finally, is it really the case that every American immigrant speaks english? That would suggest to me that there’d be effectively noone in the US that didn’t speak English as I’d imagine someone born in the US would pick up enough over their lifetime to speak at least “elementary english”. There’s still a few exceptions - people born in the US and moved overseas at an early age etc - but that would be an extremely small percentage of the population I’d imagine.

Any Americans want to shed some light on this?