sci-tech

Chipmate!

There’s hardly anything sexier than a multicore CPU that I actually know how to program! Better yet, make that a “manycore” CPU.
Dual-core CPUs were cool, and quad-cores even cooler. But they were hardly enough to enable writing real fine-grained parallel programs. Recently Intel released “Core i7″ architecture CPUs, with four cores minimum and they all support HyperThreading, which is at best a hack and not a particularly beautiful one, but it gets the count of available hardware threads to 8, which I’m willing to settle for! (Note that semi-8-core CPUs have been available for some time, but not on desktops, and not in practical price ranges.)
When I think of all the execution units, the 64-bit wide registers, the cache hierarchy… Oooh!

VN:F [1.0.8_357]
Rating: 6.7/10 (3 votes cast)

noteworthy
sci-tech

Comments (1)

Permalink

Better Soshiant Videos

Here are two higher-resolution in-game videos from Soshiant: one (~90MiB) and two (~86MiB).
Here’s another video (~71MiB) showing some characters from concept, through modeling, to animations.

Note that our engine is not even in alpha. There are many bugs present, most of with are level design bugs due to our rush for the exhibition (camera placements and transitions, characters occasionally going through walls, Soshiant’s hand not being aligned with the ledges he is hanging from, etc.) But there are some engine bugs too, like the character’s hair getting stuck in a wall or ground, or the character jumping from one position to another, or the shadows poping here and there. All you see is subject to improvement, change or both.
Also, these videos are compressed with the irreplaceable Xvid codec. The third video, which is the only one with sound, features one of our original sound-tracks, composed and played by our multi-talented concept artist Soheil Danesh.
I would be very happy to hear your feed back on any and every aspect of these videos.

VN:F [1.0.8_357]
Rating: 7.0/10 (3 votes cast)

Soshiant
entertainment
game development
noteworthy
sci-tech

Comments (8)

Permalink

Managing Your Life Online - Part 1

(Should I have titled these series “Managing Your Online Life”? But there’s almost no distinction between my online life and my life, so I don’t feel the need.)

Some general notes first. When it comes to online life (or even life in general,) the most important thing you have is data, period. So you have to think about data accessibility, portability and protection.
Let me give you an example. If you use Yahoo! mail as your primary email, you are not OK. Your email is held hostage on Yahoo! servers. You have no way of reaching it. Even if you pay for premium services, you only get lousy POP3 service and the ability to download all your email as an archive. The keyword here is “all”. You can’t chop it up and the download is not restartable or resumable. Imagine downloading a 3GiB file in those situations! If you forward your email to another account, you won’t get a local copy anymore and you can’t forward the mail already in your inbox. It doesn’t support IMAP so you can’t remotely manage and move your email around in your mailbox. Both the web-based interfaces are so brain-dead that any form of bulk operation is tremendously hard or virtually impossible. So you tell me whether my almost 90000 email messages in my Yahoo! mailbox are accessible or not? Can I get a backup copy of my email so that if someone malevolently accessed my account and deleted all my email, I won’t be left high and dry? Can I be sure that Yahoo! will not start enforcing its own brand of sanctions against Iran and blocking my access to my email from tonight? Can I be sure that my email is not read by Yahoo itself, or not forwarded to Michael Chertoff’s or Jack Valenti’s desks as a result of something similar to the Patriot Act?
So, accessibility, portability and security are important!

Don’t trust anyone! Don’t trust corporations. Don’t trust governments. However, keep in mind that both keeping security and breaking security cost money and time (usually.) Weigh the trade offs and then make decisions. If your data is not worth anything to you, then it may not be cost-effective for you to protect it. If it’s not worth anything to anybody, then it may not be cost-effective for an adversary to try and gain access to you data.

Also remember that I live in Iran. My whole life I’ve been struggling with unreliable and lacking technological infrastructure, services and options. The situation is unlikely to improve in near or even far future. Therefore, I cannot download 3GiB from a webserver in a single connection. My connection will get interrupted. I cannot be sure that I’ll have Internet connectivity in my home for 12 hours straight without disruption because I have no grounds to sue my ISP when I get disconnected for 1 to 5 minutes every 2 to 3 hours (or 5 hours of no connectivity every once in a while.) Actually, I can’t even trust my cellphone, hard-line phone or even electricity to be available all the time (they almost always are, but I can’t expect them to, and no one will be accountable if they are not, and there are few or no alternatives to switch to in that case, and the providers know that.)

Unfortunately, I have to use Windows for all my current work and therefor I use it most of the time (who am I kidding? I use Windows almost exclusively.) But I hate Windows. Although I have to admit it was getting better and better with Windows XP and Windows 2000. It sucked a lot less than it used to. But then Microsoft went and just did it; yo and behold a beast straight from the Dungeon Dimensions: (Do I really have to name it? I’m afraid that there might be a “Taboo” on it so they can track me if I use the name!) It starts with a ‘V’ and ends with an ‘ista’! I’m not hopeless though. It’s not the OS you use, it’s how you use it and what you use it for! I count myself a proponent of free software and opensource software, and crossplatformity is a real concern for me.

One more piece of advice. Sam (no last name) never walks into a place he doesn’t know how to walk out of. You should never ever put your data somewhere you don’t know how to take it out of. This point is more important that anything else to remember and utilize. Avoid vendor lock-ins like the black plague and tomato juice mixed together! If your email or hosting provider can’t secure your data, or your day-to-day access is hard, but you can export your data in a usable manner, then you have no problems. You can pack up and move anytime you want. So, always devise an escape route before you put your data in. (Hey, that’s good “Hitman” and “Commandos” advice too!)

The above factors affect the choices I make and opinions I have.

*Expect the next parts at a time indeterminately far away.*

VN:F [1.0.8_357]
Rating: 5.5/10 (2 votes cast)

life
rants
sci-tech

Comments (0)

Permalink

Mass Produced Input Device That Uses Brain Activity

OMG!
OMFG!
(Note the plural!)
Read this news article on Slashdot. Wow! I don’t care if it works, or is it even practical. The idea of having an input device such as this is sooo appealing to me…
A while back I read about an Australian who had put an RFID tag into his arm, and it acted as his identity for everything in his home, where he obviously had rigged everything to be controlled via software. I wish I was tech savvy enough to do such a thing. But over here, it’s all just Make-It-Yourself, not Connect-It-Yourself.

I wish I could put an 802.11 interface in my brain.

VN:F [1.0.8_357]
Rating: 5.5/10 (2 votes cast)

noteworthy
sci-tech

Comments (0)

Permalink

Sun Microsystems Bought MySQL AB!

I just saw it on slashdot! here’s the announcement. That’s the biggest acquisition news since AMD bought ATI!
Man, what is the world coming to? At least Sun is tolerable. What if Oracle had bought them out?! What would have happened to my favorite DBMS?

VN:F [1.0.8_357]
Rating: 1.0/10 (1 vote cast)

noteworthy
sci-tech

Comments (3)

Permalink

The Good, the OOXML and the OOXML!

I hate Microsoft. No, let me rephrase that. I hate everything that insults my intelligence, and Microsoft is very high on the list of them. Another thing that I hate is a bad standard. Put these two together, like the case of Microsoft pushing for ISO standardization of OOXML, and I’ll be entering a “Two Minute Hate” period!
I could bore you with all the reasons that I think OOXML is bad, but you can find all those and a few more over here. Specially interesting and possibly beneficial is a petition they’re seeking to prevent the standardization of OOXML.

You can also get these cool banners there!



(Sorry for the GIF. Still waiting for MNG adoption!)
VN:F [1.0.8_357]
Rating: 1.0/10 (1 vote cast)

noteworthy
sci-tech

Comments (3)

Permalink

OpenID, a Neat Idea

If you’re anything like me (wait, that’s not an insult!) you live a busy life online. You have a multitude of registrations and user IDs and passwords for many sites on the net. There are many ways to manage this inherent mess with different trade offs between convenience and security.
One methods that I came across recently is using an Open ID (here’s the Wikipedia page.) I first saw this when leaving a comment on a Blogger weblog. I noticed that one of the authentication methods it supported was a single URL, and the caption read “Open ID”.
Well, suffice it to say that after a couple of hours I had my own personal Open ID provider up and running, using phpMyID. Even if you don’t have an Internet-reachable box at your disposal, you can use one of the free ID providers (listed on the above pages.)
I’m yet to investigate the security of the whole system in depth, but it seems well enough. In the least, it let’s me be in charge of my own security instead of some random web site.
But such a scheme does not work if it’s not adopted, not by users, but mainly by software developers. As a developer, I’m going to consider giving the users of my next web-based application (if I ever develop such an application again) the option of logging in using their Open ID. I hope others do so as well.

VN:F [1.0.8_357]
Rating: 1.0/10 (1 vote cast)

noteworthy
programming
sci-tech

Comments (0)

Permalink

Simplest Turing Machine

One of the cellular automata that were made famous by Stephen Wolfram in his fascinating book “A New Kind of Science” (or NKS for its worshipers) has proven to be a universal Turing machine. It’s the 2,3 machine (named 2,3 because it has 2 states and 3 colors for each state.)
Apparently, it had been proven before that no universal Turing machines with 2 states and 2 colors or less existed (it should not be difficult, because the number of all such machines is really limited.) Now, after a $25′000 prize was announced a few months back, an undergraduate student has proven that the said automaton is indeed universal and can perform any computation that the original Turing machine was capable of.

Two notes: First, I’m not a fan of NKS and Wolfram. He really over-estimates himself and his book. On the other hand, he is a genius and NKS is interesting and a mind-opener. Besides, people wanted to burn Galileo at stake in his own time! Who am I to decide who is right and who is wrong?!
Second, whenever I hear/read/write “Wolfram”, I can’t not think of “Wolfram & Hart” (in Angel TV series) and therefore Buffyverse! Joss Whedon rulz!

UPDATE 2007-10-30: It seems that I was in too much hurry in announcing this. The proof has come under scrutiny and now it seems that it has flaws. Read more on Slashdot.

VN:F [1.0.8_357]
Rating: 1.0/10 (1 vote cast)

noteworthy
sci-tech

Comments (0)

Permalink

How Do You Setup Windows?

A friend sent me this link into the blog of the creator of VirtualDub (a very impressive piece of code.) In it, he describes how he installs Windows XP and how he configures his installation. The thing is that his procedure was freakishly similar to mine! Except that I don’t use Perforce!
By the way, I have been thinking about writing a guide on how to rip DVDs into high-quality, compressed MPEG4 formats. Is there any interest in such a thing?

VN:F [1.0.8_357]
Rating: 1.0/10 (1 vote cast)

noteworthy
sci-tech

Comments (2)

Permalink

Playful Pluto

As you probably know, a 10th planet (called UB313, or Xena) was discovered (not too) recently in our very own Solar System, but beyond Pluto. The reason that it has evaded our eyes till now is that its orbit forms quite an angle with the rest of the planets (with the first 8 at least, since Pluto’s orbit is not aligned with us either.)
Actually lots of stuff are discovered beyond Pluto everyday, but the important thing about UB313 is that it’s slightly larger than Pluto!
The discussion whether Pluto itself should be considered a planet has been going on for some time now. There are many things wrong with Pluto (or at least irregular) :
First, it has a very large (relatively) satellite, named Charon (pronounced kay-ron) with a diameter more than half of the diameter of Pluto, and a mass about 1/9 of that of Pluto. This ratio of mass causes the center of rotation of the Pluto-Charon system to be somewhere outside of both of them. Therefore, neither of them revolves around the other.
As a comparison, the mass of Earth’s Moon is 1/80th of the mass of the Earth. This means that the center of rotation of the Earth-Moon system is 1/80th of the way along the line that connects their centers. Since this distance is ~400′000km, and Earth is the bigger object here, this point would be at about 400′000/80 (or 5000) km from the center of the earth. Again, as you all know Earth’s radius is ~6300km, so the center of the Earth-Moon system is well inside the Earth, and Moon undoubtedly revolves around us. Also, have in mind that Moon is really big relative to Earth compared to other planet’s satellites.
Let’s go back to Pluto now. The second thing about Pluto is it’s orbit. Not only it forms an angle with the plain that all other planets’ orbits more or less lie on, it’s a longer ellipse than typical for other planets. The orbit is so far from a circle that during a portion of its year, Pluto actually gets nearer to Sun than Neptune!
The third issue with Pluto is its size. Pluto is the smallest of all the 9 planets. It’s diameter (2300km) is far smaller than Mercury’s (4900km,) the second small planet in the Solar System. What’s more annoying is that Pluto is actually smaller than Triton (Neptune’s moon,) Titan (Saturn’s,) Callisto, Europa, Ganymede and Io (all Jupiter’s) and even our very own Moon! (It might be interesting to know that Ganymede and Titan are even larger than Mercury, but who dares touch Mercury?)
And now this UB313 business. That’s why last month (August 2006) the International Astronomical Union changed the definition of “planet” so that it no longer included Pluto or UB313. They are called “dwarf planets” now and I think Ceres (a 1000-km asteroid!) and Charon are included in the definition. Of course, this redefinition, like any other radical change, is the subject of heavy controversy.
In any case, for now, the Solar System has 8 planets!

VN:F [1.0.8_357]
Rating: 1.0/10 (1 vote cast)

sci-tech

Comments (0)

Permalink

IEEE 754

That’s the floating point number format standard. What do you know about how floating point numbers are stored? (We are not talking about arithmetic.)
My experience with programmers is that many of them don’t know anything about these formats. Sure, they know that the real numbers are stored as sign, fraction and exponent triplets, but nothing more. After all, who needs to know how computers actually work these days, right?

Well, if you think like that, I’m sorry for you. These line of thought may be practical (I hate that fact,) but it’s not at all part of the hacker/geek spirit. Here’s a brief description about how floating point numbers are stored, according to IEEE-754.

I thought there were 3 formats for floats, but as it turns out, there’s four. They are 32, 43, 64 and 80 bits (who’ve ever heard of a 43-bit float? Honestly?) The most widely used form is the 64-bit, or “double precision” one.
This format (and all others) have a single sign bit (the MSB), with “0″ for positive and “1″ for negative numbers. Then comes an 11-bit exponent field. And after that, a 52-bit fraction part, for a total of 64 bits (it’s 8 and 23 bits for the 32-bit single precision format.)
As you know, floating point numbers are stored as some for of scientific notation, with base 2. Basically, that means that the value is the result of the multiplication of a M by two to the power of E.

But that’s not the whole story. First of all, you have to realize that every number you write in binary, has a ‘1′ as it’s leftmost bit. Think about it! Without zero-padding on the left, every number must have a non-zero digit at its left, and in radix-2, that means a 1. So we omit that 1 and save one bit. In our scientific notation, the M must be normalized to be greater or equal to 1, and less than 2.
Second of all, the E is not the exponent, but the exponent minus 1023. That is, if you want 2 as E, you have to set the exponent to be 1025. This way, you can accommodate negative values as well. You might wonder why the common two’s-complement method why not used. Well, I don’t know all the reasons, but one of them probably has been the side effect that using this method, and the field layout being what it is (first exponent, then fraction) you can compare normalized floating point values just as integers, using the bit pattern! (not considering the sign bit, of course.)

More precisely, the final number is calculated like this:

value = -1sign bit * 2exponent - 1023 * (1 + fraction / 252)

The above is used when 0 < exponent < style="font-style: italic;">normal number. There are also a few special case values that you need to know about as well:

  • If exponent is 0 and fraction is 0, the value is ±0.0;
  • If exponent is 0 but fraction is nonzero, the value is denormal and equal to ±F/21022+52;
  • If exponent is 2047 and fraction is 0, the value is ±∞;
  • If exponent is 2047 and fraction is nonzero, the value is ±NaN (Not a Number. There are 252-1 of these!)

Single-precision format is similar to the above, except that -127 is added to the exponent, and other changes to accommodate the smaller size.

VN:F [1.0.8_357]
Rating: 1.0/10 (1 vote cast)

programming
sci-tech

Comments (0)

Permalink

Wall-socket PC

A very cool thing I saw on Slashdot. It’s a thin client PC, with the size of a hand. Just look at the picture. I think all the ports and connectors take more room than the chips!

VN:F [1.0.8_357]
Rating: 1.0/10 (1 vote cast)

noteworthy
sci-tech

Comments (0)

Permalink