I have already mentioned some problems with the null pointer but my recent discovery knocked my socks off.
By now, it should come with no surprise to anyone that 0 in pointer context acts as a null pointer (no matter of its actual representation). Moreover, it takes only a tiny bit of experimenting to figure out that expressions like (int)0 do as well. The latter is in itself a bit of a pita but it is conforming to the C++ standard which says:
So I've just finished Braid. Not a very impressive achievement, I admit, but just as I finished the last world (or should I say the first) I immediatelly felt the need to spread the word about this wonderful game. (I do need to apologise at this point for yet another non-technical entry on my blog.)
I probably wouldn't got myself to writing anything about the game if I hadn't seen Video Games are Art talk by Kellee Santiego of That Game Company, who, as it turns out, mentions Braid. (Not that I consider the speech to be particularly interesting or well presented – on the contrary, in my opinion it is unstructured with rather poor arguments, I don't care what some film critic says, and besides “art” is just a buzzword anyway – but it somehow stuck in my memory.)
It has been pointed out to me that my website does not open on some web browsers due to XML error. This undesired state was caused by the entity that XML does not define by itself. I have noticed this some time ago and thus switched to numeric notation ( ) but the named entity still prevailed in a few places.
Interestingly, I was unable to reproduce the error myself but nonetheless I have seen it happen on my friend's computer so this was a real issue.
I'm writing “was” because I got rid of all occurrences of the entity so this problem should not affect anyone anymore. Had you been affected by this problem, consider revisiting. :)
I'm also extremely grateful for reporting any problems either via email (mina86 at mina86.com), jabber (mina86 at jabber.org) or on IRC (mina86 on FreeNode network).
Anyone working in a big corporation must have been hit by some “funny” mail from a coworker that helps everyone gets through the day. No different at my office – at one point all engineers have been challenged to write the shortest code in C that prints all prime numbers (and only prime numbers) less than a hundred each on separate line.
This is an interesting brain-teaser so posting it here so others may choose to think about it while their code's compiling.
Of course, a “C program” needs not to be taken too seriously – depending on not too far fetched undefined behaviours of given implementation is all right (but please do not use system() or exec() family of calls ;) ).
It has been a long time since my last entry. In fact, it was so long, that this condition has already been pointed out pushing me into finally writing something. Inspired by Adriaan de Groot's entry, I decided to write something about 0, NULL and upcoming nullptr.
I will try to be informative and explain what the whole buzz is about and then give my opinion about nullptr. Let us first inspect how a null pointer can be donated in C and C++.
There has been a discussion about extensions for Opera recently which made me realise something about Free Software. I may have been aware of it subconsciously but now I can name it:
In the long run, Free Software will win because of the long tail.
W kategoriach:
Słowa kluczowe:
I usually do not deal with politics, philosophy or what not in this blog as I try to keep it purely technical even thoug I have some strong opinions regarding various topics. Nevertheless, when Steve Jobs tries to redefine our dictionaries in something that looks like Orwellian attempt to control our minds I feel obliged to defy.
A few days ago, Ryan Tate “picked a fight” with Apple's CEO. I don't want to judge the whole “discussion” they had nor say who was right. I only want to refer to Job's single statement:
Yep, freedom from programs that steal your private data. Freedom from programs that trash your battery. Freedom from porn. Yep, freedom.
Does it occur only to me that freedom is to or of never from? There's freedom of speech. One has freedom to go naked in his or her house. But there's no such thing as freedom from.
Or wait… Maybe I'm in fact mistaken and people in China have freedom from uncensored Internet?
It's so ironic… Apple has finally turned into the Big Brother it was fighting back in 1984. An so it's only natural for this company and Jobs to use techniques described in the book:
The purpose of Newspeak was not only to provide a medium of expression for the world-view and mental habits proper to the devotees of Ingsoc, but to make all other modes of thought impossible.
So no, Mister Jobs, I refuse to participate in your propaganda. I will use words in the way they were intended so that I can be hungry or cold but at the same time be free to say two plus two make four and then all else will follow…
As the committee gathered to discuss how the new C standard will look like I did some thinking of my own. I thought about features that I would love to see in C. I even collected thoughts of my twisted mind and condensed them into a text file.
What is outrageous is that since I believe information and ideas want to be free and shared I have decided to post my concepts on the net instead of imprisoning them in my wicked brain.
Maybe someone will find it useful somehow. Maybe even some committee member will read those and bring them out on the next meeting.
Sitting in a dark office, after swearing for hours at ATI video cards I noticed time on my PC was incorrect. “No problem” I thought as I started typing ntpdate but before finishing I realised that our beloved IT department had blocked most of the Internet. Checking the time on a watch or a mobile phone was not an option – I have neither – nor was looking at GKrellM on another PC – that's just lame.
“I wish there was a NTP-over-HTTP protocol” I dreamed sighting. And then, a few curses on the IT department later, I came up with an idea…
W kategoriach:
Słowa kluczowe:
Have you ever wondered why Caps Lock, a key you press twice a decade (once to turn it on and then to turn it off), is in such a lucrative position on the keyboard? And how about Ctrl? Compared to Caps Lock it seems like miles away. If you think about it old unix keyboards with those keys swapped seem to got it right.
I've gone one step further and recommend turning Caps Lock into Ctrl key altogether. In this article I will describe how to do that in various systems and platforms. But lets start with some propaganda.