Efectos Especiales

Ramblings, rants, musings, ideas and observations. Topics include (but are not limited to): programming (especially Python), books, games (especially CCGs and board games), astrology, design, writing, painting, etc.

icon:programming #629 (old comments) Dynamic languages

(via Ted Leung) In his article Dynamic Languages - ready for the next challenges, by design, David Ascher presents three criteria to determine whether a language is dynamic or not:

1. high-level
2. grassroots open source
3. dynamically typed

While I agree with most of the paper, I don't really understand #2. How does being open source make a language (more) dynamic? How does being closed source make it less dynamic, or not at all? I like the concept of open source, use open source software a lot, have a number of OS projects under my belt; I also realize that being open source has been crucial to the success of languages like Python and Perl. But what I don't get is how it makes a language more dynamic.

By this criterion, Lisp wouldn't qualify as a dynamic language (although there are open source implementation, of course), even though it's probably more dynamic than anything else. The same is largely true for Smalltalk. [Ted Leung raises much the same point.]

It's true that all the successful dynamic languages that David mentions are open source. And I can't think of a really successful closed-source dynamic language. [1] However, I think this correlation has not so much to do with the nature of the languages, as with the past and current status quo of the language market. Big language vendors like Microsoft and Sun really cater more to management than to individual developers, and managers traditionally like non-dynamic languages (mostly because that is what they are used to). As such, there was (and still is) a "market" for dynamic languages, left open by those big vendors, which has been happily filled by open source.

I don't think there's a reason why a good, successful dynamic language couldn't be closed source (or why a good, successful static language couldn't be open source, for that matter).

[1] Update: On second thought, this is not true. Commenters pointed out Javascript. And VBScript, but I'm not sure if it's all that dynamic, though.

/* Posted by Hans Nowak at 2004-09-01 17:07 */

icon:programming #628 (old comments) x += x++

(via Joey deVilla) x += x++: A blog post discussing what happens when the statement x += x++ is evaluated in C#. The results may or may not be surprising, depending on what you expect. For x = 3, I would expect it to evaluate to 7, but C# returns 6. In C, it does appear to evaluate to 7:

/* nasty.c */

    int x = 3;
    x += x++;  /* na-yasty! */
    printf("x is %d\n", x);

Well, at least for gcc. Maybe it's undefined in C as well. I think it depends on *when* the postinc happens exactly... in C#, it happens immediately after getting the value of x; in C, it seems to happen after the whole += statement, or maybe the postinc somehow carries over. Where's my copy of K&R...

Fortunately, Python doesn't have a ++ operator... ^_^

/* Posted by Hans "now we know why" Nowak at 2004-09-01 13:04 */

icon:python #627 (old comments) The Joy of Tech

The Daily Python-URL links to this issue of The Joy of Tech. Actually, my own proposal went something like that. Using Python of course. emoticon:smile I'm such a dork.

/* Posted by Hans Nowak at 2004-08-29 14:08 */

icon:python #626 (old comments) ADO programming with Python

Here's a good tutorial about ADO programming with Python. Such documentation is especially useful because COM objects in Python have few introspective features, so you cannot simply do a dir(recordset) to find out which methods an ADODB.RecordSet has, etc. The adoconstants.py module is a lifesaver too.

/* Posted by Hans Nowak at 2004-08-26 17:29 */

icon:astrology #625 (old comments) Doctors might soon ask, "What's your sign?"

Sean McKay pointed me to this interesting article.

"Studies have shown that schizophrenia is more common among those born in late winter or early spring. Multiple sclerosis is associated with births in April, May and June. And epilepsy occurs more frequently in those with birthdays from December to March."

/* Posted by Hans Nowak at 2004-08-24 16:47 */

icon:programming #624 (old comments) Virtual Unknowns

(Via Lambda the Ultimate) Virtual Unknowns. A never-to-be-comprehensive list of non-mainstream, predominantly open-source, programming languages and operating systems. Yay! Hours and hours of orgastic bliss. emoticon:kwijl

/* Posted by Hans Nowak at 2004-08-23 19:17 */

icon:rant #623 (old comments) Crap

Maybe I'm getting old, but some aspects of today's music are just beyond me. For example, how can people listen to this crap?

I don't care that it's about sex. I don't care about the drug and alcohol references. If you like to indulge in casual sex or substance abuse, go for it. Freedom of speech even guarantees your right to put it on record. And if you have more to say than just that, I might even listen to it. But I do have a problem with the fact that it's derogatory to women. It's about treating women like sex objects and nothing more.

Now, this is not a new issue in hip-hop music, and it's often the cause of misunderstandings. There are several possible explanations why this song is like it is:

1. It's theatre. Maybe these rappers are really nice guys in real life, and wouldn't think of treating women this way. Of course, that raises the question why their song is like this. Also, this theme shows up a little too often in (certain kinds of) hip-hop to be just theatre. There are hundreds of songs like this. Also, while kids are perfectly capable of figuring out whether something is fake or real, it's also true that when you hear something often enough, it becomes normal and acceptable.

2. It's not targeted at all women, just specific ones. Back in 1992, Ice-T/Body Count had this song called "Cop Killer". It caused a lot of outrage, because it talked about shooting cops. Based on this information alone, it was easy to think this was an evil song, created by an evil mind. But the whole story was, that the song wasn't targeted at all cops... just racist ones. It wasn't so difficult to find out, there's a skit on the album, directly before Cop Killer, that explains this. People who condemned the song usually didn't know the whole story.
So maybe it's the same situation here, and they're talking about a specific woman, who apparently doesn't deserve much respect. If that is the case, maybe they should just leave this person the hell alone, rather than putting her down in a song and creating the impression that they think women are just pieces of ass.

3. It's ironic. Maybe, but the less intelligent rappers usually don't use irony and sarcasm to spice up their rhymes. In this case, I can't find a trace of irony in the lyrics. It just seems to be standard pimpin' daddy fare.

4. They're actually complimenting the woman they're talking about. Uh, yeah. I can't speak for women, but somehow I strongly doubt that they would take it as a compliment to be treated like a sex toy and thrown away afterwards.

5. I'm not part of the target audience. The target audience is probably teens who are and/or like thugs, so maybe "I just don't understand", having reached the ripe old age of 31.

So this is what we call hip-hop these days. It's sad. Poppy beats, offensive topics and lyrics that would make Vanilla Ice puke. But like I said, maybe I'm just getting old.

Fortunately, some people still make intelligent hip-hop.

/* Posted by Hans Nowak at 2004-08-23 13:45 */

icon:default #622 (old comments) Cell phones

This guy says he will never get a cell phone, and questions their usefulness. Not everybody agrees.

I personally hate cell phones with a passion. Needless to say, I don't have one, and previous employers realized that it was probably not a good idea to force me to have one. I obviously don't hate new technology (or I wouldn't be sitting here at a PC, in a room with PS2, sampling keyboard, digital camera and other stuff). I don't have a problem with ATM cards, laptops or digital cameras. I just hate phones. I absolutely hate to make phone calls, something I unfortunately haven't been able to avoid at previous jobs, aside... So it only makes sense that I hate cell phones too.

It's kind of funny, and at the same time scary, how fast public opinion has changed. In 1996, mobile phones were almost exclusively for snobs, or for the few people who really really needed them. They were mainly used by attention seekers, hoping to get called while standing in line in the store, trying to show off how important they are. But only a few years later, most of my coworkers had one, either for work or for personal use, so they could be reached anywhere. These days, it appears that almost everybody has one.

As said, I really don't see the need for it... I don't like talking on the phone, so it's bad enough that we have a real phone <0.3 wink>, I'm not going to spend money on another. Also, since I work from home, I'm not often on the road... and if I am, I sure as hell don't want to be bothered. I consider it an invasion of the little privacy we have these days... where not so long ago people could only pester reach you at the office, now they can do so no matter where you (or they) are. Hooray for progress. emoticon:wink2

And let's face it, cell phones *are* a nuisance. Or rather, they can be in the hands of people who don't care (and there are quite a few of those). emoticon:smile People on the phone while driving, in restaurants, in stores, in movie theaters. People interrupting conversations with you because their cell phone goes off.
Sure, they can get you out of precarious situations, sometimes even save lives, but most of the time they're just annoying.

To sum it up, I don't deny the usefulness of cell phones, but it will be a cold day in Florida before I get one.

/* Posted by Hans Nowak at 2004-08-21 20:10 */

icon:nl3 #621 (old comments) Dunglish

"Dunglish" is a kind of crossover between Dutch and English. English expressions directly translated to Dutch, or vice versa; or mixing Dutch and English words. Never correct, often confusing and funny. Sometimes used by the Dutch rap group Def Real [1], they say things like "What is on the hand?" and "take an appleflap". (Which probably only makes sense if you know Dutch. emoticon:smile)

So what does Dunglish look like? Here's an example. Here's more. And more. And a post in Language Log.

Dutch people tend to be very confident of their English, but often produce "Dunglishisms". I am no exception, even after a few years of living in the US. In addition to that, I probably also learned a number of Florida-isms. ^_^

(Regarding that last post in Language Log: "alle hands aan dek" is mentioned as a Dunglish example. The Dutch expression is "alle hens aan dek", but I wonder if that comes from English "all hands on deck"? "Hens" isn't really a Dutch word, at least not in this context.)

[1] URL: http://www.defreal.com/ Note: resizes browser window.

/* Posted by Hans Nowak at 2004-08-20 18:26 */

icon:nl3 #620 (old comments) English and Dutch

I've also had the joy of experiencing the attempts of Americans to speak Dutch. emoticon:devilish Like English has sounds that Dutch doesn't have, the reverse is true as well.

The Dutch g is a good place to start. If you're from the north/west of the Netherlands, then it's pronounced the same as ch (a "hard g"), not unlike /ch/ in Scottish loch. If you're from the south, especially Limburg (which is *not* the home of the notorious Limburger cheese, aside), then they are pronounced differently. It's hard to describe what it sounds like... the same will be true for most of the other "typical Dutch" sounds. Either way, it causes all kinds of problems for English speakers. :-)

Dutch g is usually not pronounced like the English one, unless in foreign words. But even then, it depends. Some people pronounce spaghetti with an "English" g, some don't.

Dutch j is pronounced like English y. So, "Jessica" is pronounced /yessica/. In some cases, the j comes from an English word or name, in which case it might or might not be pronounced like in the original language. "John" is often pronounced /zhon/, with a j like in French jaune. English chips may be pronounced /ships/, etc.

A sound that is surprisingly hard for English speakers is the schwa at the end of a word. They have no problem pronouncing it in the, but Dutch de seems to be hard for some reason. It's not pronounced /dee/. This sound occurs a lot in Dutch, especially with diminutives. English speakers tend to pronounce it as /ee/, or, when pointed out their mistake, overcompensate with an 'uhh' sound. "Dotje" is not pronounced "doe-chee", nor is it "doh-chuhh".

Dutch also has a number of diphthongs that are foreign to English (and probably many other languages). ui and eu are often incorrectly pronounced as /oo/. They're hard to describe, especially ui, but Dutch eu is not unlike the French one. Then there are ei and ij. They are pronounced the same, but aren't interchangeable in spelling, so they are responsible for all kinds of fun in spelling contests (leiden, to lead, vs lijden, to suffer, etc). American English doesn't really have this sound; in British English, the /ay/ in stay may be close.

More about the Dutch language here.

/* Posted by Hans Nowak at 2004-08-20 18:20 */