header image
Hitchhiker’s Guide to the Galaxy has arrived
October 14th, 2009 under Fun, Gadgtes, Hardware, rvincoletto. [ Comments: 1 ]

The Wikimedia Foundation has just launched the first release of the Hitchhiker’s Guide to the Galaxy. I hope the next version they’ll use sub-etha to update the contents automatically. It could also come with a babel fish or a Federation tricorder…


Online gaming experience
August 15th, 2009 under Fun, Games, InfoSec, Media, Politics, rengolin. [ Comments: none ]

Why is it so hard for the game industry to get the online experience? I understand the media industry being utterly ignorant about how to make sense of the internet, but gaming is about pure fun, isn’t it? The new survey done in UK is more than proof of the obvious fact that people will use all resources of the internet to get what they want, whether it’s illegal or not.

After all, who defines what’s legal and what’s not? The UK government already said that it’s OK to invade one’s privacy for the matter of general security, even when everybody knows that any government has no clue on what’s security and what’s not. Not to mention the Orwellian attitudes of certain US companies seem not to raise any eyebrow from the local government or the general public…

That said, games are a different matter. Offline games still need have some kind of protection, but online games should rely on online commerce, and that can only be complete if the user has a full online experience. So, what do I mean by full online experience?

You don’t always have access to your own computer. Sometimes you have just a remote connection, sometimes only your mobile phone or a web browser. Sometimes you have an old laptop with no decent graphic card and those golden times when you have a brand new game machine with four graphic cards. 10 years ago, mobile phones were not as today, but even though my current mobile has a 3D graphic card in it, it’s closer to the lower end when compared to desktops or even laptops.

So, what’s the catch? Imagine a game that you can play exactly the same game irrespective of where you play it.

There are lots of new online games, so called ORPG (online RPG) or the bigger brothers (MMORPG, massively-multi-player ORPG), but all of them rely on a Windows machine with OpenGL2 and DirectX 10 to play it, even though not half of it really need that kind of realism to be fun.

Moreover, when you’re at the toilet and you want to keep playing your battles, you could easily get your mobile and use a stripped down version with little graphic elements but with the same basic principles. When you’re at your parent’s and the only thing you have is dial-up, you can connect via SSH and play the console version. At least to manage your stuff, talk to your friends or plan future battles.

The hard part in all this, I understand, is to manage different players playing with different levels of graphic detail. Scripts on online games are normally prohibited because it eases too much cheating, and that would be the way of battling via a SSH connection… Players with better graphic cards would have the advantage of seeing more of the battlefield than its friends with a mobile phone, or even using a much better mouse/joystick and a much bigger keyboard (short-cuts are *very* important in online gaming).

With the new mobiles and their motion sensor and GPS interfaces, that wouldn’t be a much bigger difference, as you could wave the mobile to have a quicker glance and even use voice-control for some features that is still lacking support in desktop but it’s surprisingly popular in mobile devices. All in all, having at least three platforms: high-end and low-end graphics plus a mobile version, would be a major breakthrough in online gaming. I just wonder why game makers are not even hinting in that direction…

The console version is pushing a bit, I know, I just love the console… ;)


Opt-out
April 22nd, 2009 under Fun, rengolin, Web. [ Comments: none ]

Apparently, users are so dumb that they don’t even know what opt-out means, so Microsoft just wants to be really sure anyway…

Dear Windows Live User,

We are contacting you regarding your communication preference settings for Windows Live and MSN.

Currently, your settings do not allow Microsoft to send you promotional information or survey invitations about Windows Live and MSN. We would like to communicate important product updates to you, so if you would like to change your settings, please visit your account profile here to change your preferences.

Sincerely,
The Windows Live Team

Note: You can also change your Account settings by going to your browser and typing in: http://account.live.com. After logging-in to your account, look for ‘Additional options’ and click ‘Marketing preferences’. Then uncheck the top preference box and click ‘Save’.

Microsoft respects your privacy. To learn more, please read our online Privacy Statement.

Microsoft Corporation

Thanks for the fun, Rodrigo


Unoptimizable by danger
February 24th, 2009 under Fun, Life, rengolin. [ Comments: 2 ]

We’re always trying to optimize everything. Taking as much dirty dishes to the sink each go, brush our teeth while peeing, studying in the bus to school. But there are some things that are practically unoptimizable.

While some cannot be optimized for obvious reasons, like writing an essay while driving a car, others have more subtle reasons for unoptimization

Take, for instance, the time between you open your zipper and the time you start peeing. I’ve counted about three seconds in average (some people have more, others less). I thought that I could optimize that by allowing my bladder to relax around three seconds before the zipper is open. Then I calculated how many seconds I took to do the whole procedure and was hoping to find a point in time in which I could safely start the procedure in background.

Luckily I’m not as stupid as I thought (or used to be), so I have done my homework before actually starting the test itself. The average time of preparation is around 3 seconds, good, but the standard deviation is around 1 second down and up to 5 seconds up! Which means that I could wet my pants pretty bad if anything went wrong with the preparation procedures…

The “number 2″ test is more catastrophic but far easier to control if something goes wrong, so I had more progress on that one. But for the sake of all, I’ll leave that as an exercise to the reader.


Happy 1234567890!!
February 14th, 2009 under Fun, rengolin, Unix/Linux. [ Comments: 1 ]

It has just passed the Unix time 1234567890! (or, if you prefer, 0x499602D2, which is not funny at all).

Friday, February 13, 2009 at exactly 23:31:30 (UTC, which I happen to be), is a nice Friday 13th (already spooky).


$ perl -e 'print scalar localtime(1234567890),"\n";'
Fri Feb 13 23:31:30 2009

I suppose you have a Unix at home, of course. Well, you probably do anyway…

Other fancy Unix dates to come:


$ perl -e 'print scalar localtime(2000000000),"\n";'
Wed May 18 04:33:20 2033
Next billionth second…


$ perl -e 'print scalar localtime(0x7FFFFFFF),"\n";'
Tue Jan 19 03:14:07 2038
As far as it can go, with 32bit signed integers…

And some other that passed already:


$ perl -e 'print scalar localtime(1000000000),"\n";'
Sun Sep 9 02:46:40 2001
The first billionth second:

And finally some before the Unix era:


$ perl -e 'print scalar localtime(0xDEADBEEF),"\n";'
Mon Apr 14 15:27:43 1952
Well, 0xD has the sign bit set, doesn’t it? It’s in the past too…


$ perl -e 'print scalar localtime(0x80000000),"\n";'
Fri Dec 13 20:45:52 1901
As far as it can go in the past…

But don’t worry, 64-bit systems can already (and do already) manage times up to 9223372036854775807 seconds back and forth 1st January, 1970. It’s plus and minus 292 million years. It’ll be good to tag even dinosaurs with Unix-time, as well as the Enterprise next-generation.

The only problem is that the two final catastrophes we can’t get rid of: sun becoming a red giant (thus engulfing all planets, or the Milky Way colliding with Andromeda, will happen in no less than 5 billion years from now, which means that we’ll need to change to 128-bit time-stamp eventually.

Happy unix-time 1234567890!!


Scientific explanation about the Force
November 17th, 2008 under Fun, rengolin, Science. [ Comments: 2 ]

Before the second trilogy (actually the first three films) came, the force was something spiritual that some people had more than others. As Obi-wan described: “an energy field created by all living things, that surrounds and penetrates living beings and binds the galaxy together”, the force was magical and intended to be interpreted as some form of God’s will.

Then the first film came with the midi-chlorians non-sense, trying to please religious as well as sceptical people, but failed to explain why midi-chlorians would please the gods more than normal cells would. After all, aren’t we all “sons of God”? Apparently, only the midi-chlorians were…

Anyway, getting rid of all that God stuff, I came up to a perfectly rational explanation of how the midi-chlorians work (not that I like them more than the energy field).

It’s actually quite simple. As Qui-Gon Jinn explains to Anakin when he was just a boy (before the pod race), the force helps you predict when things are going to happen, so you can avoid them before they actually happen.

Throughout the film, Jedi are always happily (and effortlessly) avoiding all moving boulders, laser shots, attacks from behind, and things like that. They can easily avoid danger but rarely love. Anakin couldn’t avoid fallnig in love with Padmé, not even the force, for he was the chosen one, could help him with that matter.

So, as it’s shown over and over on all six films, the force helps you avoid bad things, not good things. This brings me back to the famous axiom that we all know to be true, but was beautifully postulated by Douglas Adams:

Axiom #1: “Nothing travels faster than light, with the possible exception of bad news, which follows its own rules”.

Now, if you’re following my thinking you’ve guessed already. Midi-chlorians are nothing more than “bad news detectors“. If you haven’t been in sync with recent physics you might be puzzled, but the fact is that faster-than-light travel actually goes back in time!

Now, if midi-chlorians are bad news detectors, it’s perfectly clear that they will detect them in the past! So, you (in the past) will detect (bad) things that are about to happen, like: “Your head was just smashed by that boulder” or “Darth Vader has just cut your head off with his light sabre.”

Being trained in the Jedi art is to be able to understand this information faster than they do actually happen, otherwise you’re a dead Jedi.

Disturbances in the force

Now, you can often see Jedi masters saying “I sense a disturbing in the force” when some serious shit happened elsewhere in the galaxy but not a single master (not even Yoda) sensed that Obi-wan was in danger when he went after Jango Fett. He had to send a crappy message through Anakin to the high council in Coruscan to be heard.

This reinforces the idea that the midi-chlorians are detectors, and that the detection quality (or precision) depends on the distance of the event and the strength of the original signal.

What about the rest?

It still doesn’t explain how a Jedi can move boulders in the first place. Nor how can the light in the light sabre be confined to a limited range and interact with light from other sources.

Indeed, it’s all connected. We cannot throw away a very good theory like that just because it doesn’t address all the points of reality. Therefore, we force reality to fit our model, as usual.

So, the light sabre is not made of light, but some condensed bad news, confined by a midi-chlorian rich crystal. As we all know, bad news comes in bunch. A bunch of bad news is worse than just bad news, so when two sabres hit each other, sparks comes out of them.

Also, some bad news won’t cope with other bad news. Like, bad news for a Jedi is a Jedi dead, which in turn, is a good news for a Sith. So, when the sabre of a Jedi clash with the sabre of a Sith, the universe conspire to not allow them to co-exist in the same space, otherwise the whole universe will cease to exist in a picosecond. Pretty much the same way the black holes protect our universe from singularities.

In a similar way, Jedi (and Sith) can lift thing just by thinking of doing some really bad things to the universe just above the boulder. That thinking will make the universe emit help signals to every Jedi or Sith around. Emissions must carry energy, otherwise they wouldn’t be detected by anyone. Loosing energy makes the space around the boulder have a negative pressure (of energy or mass) and therefore move the object towards it.

Because bad news travel in the past, you don’t have to actually do anything to the universe at all, as thinking to do something in the future will act in the past (your present) and lift the boulder right now. If you keep doing that in straight lines you can actually make it move in any direction you want.

As confirmation of this statement, watch the films again and see the faces of Jedi masters moving boulders (except for Darth Vader, of course, we can’t see his face). Yoda lifting Luke’s ship or protecting Obi-wan and Anakin from the pole Count Dooku threw at them cowardly to escape in his cool ship.

They all do pretty bad faces. They’re obviously thinking some serious shit on the universe around things. I can almost hear Yoda thinking about the air above Luke’s ship: “I’m going to transform all your atoms into plasma soup and rip your space-time continuum and mix it with a Tom Jones’ album”. That would freak me out for sure!


Silly game of the week: Grep Pipes
August 31st, 2008 under Devel, Fun, rengolin. [ Comments: 1 ]

After writing my last post I couldn’t stop thinking about pipes and remembered a nice game called Pipe Dream (aka Pipe Mania) and than it came to me the geeky version of this game:

You have a starting point (some lines of text) and some ending points (stripped versions of the original text) and a few grep blocks with regular expressions. The objective is to place the grep blocks from start to finish before the data floods out.

grep pipes

After a few minutes with OODraw and Gimp I could come to this (horrible and ill drawn) interface for the game. Nothing really exciting, just to give you an idea on what should happen… ;)

I’ve also did a sample code on what the underlying library should look like available here.

The idea is to have more commands, such as awk, sed and perl to make it harder (because each one has its own regular expression syntax). A tee should also be required to split paths and other programs such as cat, diff and comm re-unite them.

Harder levels of the game should have bigger boards, tricky regular expressions and even more than one board with netcat or ssh bridges to send data across the network. Also, to increase the level of reality, some programs such as cat and grep should let the data flow faster than others like perl.

Another option is to let the user define the regular expression by hand or number of lines to crop. This would be like having some of the blocks as wild cards, in case there isn’t any suitable block available.

Anyway, the options are endless and I’m sure there will be lots of people that would love it (me included) but I’m a complete failure to design user interfaces. So this is an open invitation, if you’d like to see this game out and could give me a hand with the interface, just let me know… ;)

Just bear in mind the following fundamental pre-condition: the game must allow (better still, encourage) keyboard-only playing, even if high-end OpenGL graphics interface is used.


Serial thinking
March 11th, 2008 under Algorithms, Computers, Devel, Fun, Physics, rengolin. [ Comments: 2 ]

I wonder why the human race is so tied up with serial thinking… We are so limited that even when we think in parallel, each parallel line is serial!

What?

Take the universe. Every single particle in the universe know all the rules (not many) that they need to follow. On themselves, the rules are dumb: you have weight, charge and can move freely round the empty space. But join several particles together and they form a complex atom with much more rules (combined from the first ones) that, if combined again form molecules that form macro-molecules that form cells that form organs that form organisms that form societies etc. Each level makes an exponential leap on the number of rules from the previous one.

Than, the stupid humanoid looks at reality and says: “That’s too complex, I’ll do one thing at a time”. That’s complete rubbish! His zillions of cells are doing zillions of different things each, his brain is interconnecting everything at the same time and that’s the only reason he can breathe wee and whistle at the same time.

Now take machines. The industrialization revolutionized the world by putting one thing after the other, Alan Turing revolutionized the world again by putting one cell after the other in the Turing tape. Today’s processors can only think of one thing after the other because of that.

Today you have multi-core processors doing different things but still each one is doing things in serial (Intel’s HyperThreading is inefficiently working in serial). Vector processors like graphic cards and big machines like the old Crays were doing exactly the same thing over a list of different values and Quantum computers will do the same operation over an entangled bunch of qbits (which is quite impressive) but still, all of it is serial thinking!

Optimization of code is to reduce the number of serial steps, parallelization of code is to put smaller sets of serial instructions to work at the same time, even message passing is serial on each node, the same with functional programming, asynchronous communications, everything is serial at some point.

Trying to map today’s programming languages or machines to work at the holographic level (such as the universe) is not only difficult, it’s impossible. The Turing machine is serial by concept, so everything built on top of it will be serial at one point. There must be a new concept of holographic (or fractal) machine, where each part knows all rules but only with volume you can create meaningful results, where code is not done by organizing the high-level rules but by creating a dynamic for the simple rules that will lead to the expected result.

How then?

Such holographic machine would have a few very simple “machine instruction” like “weight of photon is 0×000″ or “charge of electron is 1.60217646 × 10^-19″ and time will define the dynamics. Functions would be a pre-defined arrangement of basic rules that must be stable, otherwise it’d blow up (like too many protons in the nucleus), but it wouldn’t blow up the universe (as in throw exceptions), it would blow up the group itself and it would become lots of smaller groups, up to the indivisible particle.

The operating system of such machine should take care of the smaller groups and try to keep the groups as big as possible by rearranging them in a stable manner, pretty much as a God would do to its universe when it goes crazy. Programs running on this operating system would be able to use God’s power (GodOS libraries) to manipulate the groups at their own discretion, creating higher beings, able to interact, think and create new things… maybe another machine… maybe another machine able to answer the ultimate question of Life, the Universe and Everything.

I know letting the machine live would be the proper way of doing it but that could take a few billion years or I’ll be quite tired of engineering the machine and it’s OS and I’ll just want to the the job done quickly after that…

Why?

There is a big fuzz about Non-Polynomial time problems (NP-complete), those that can’t be solved in a reasonable (polynomial) time. The classic example is the travelling salesman problem where a salesman has to go to each one of a number of cities. Which is the best path to follow to visit all of them in the smallest distance possible? With 3 or 4 it’s quite simple but when you have lots like 300 it becomes impossible for normal (serial) computers to solve.

Another problem quite fancy is the Steiner tree problem, where you have some points and you want to connect them using the least amount of strings. This is as complex as the problem above, can take forever (longer than the age of the universe) for relatively small sets of points, but if you use water and soap the problem is solved almost instantly.

Of course, soap films cannot calculate the last digit of PI but because every part of it know a small list of basic rules (surface tension increased by the soap molecules derived from opposite charges between atoms) every particle of the machine works together at the same time and the result is only achieved because the dynamic of the system has it’s least energy (least amount of strings) in that state.

It’s true that today’s computers are very efficient on working on a wide range of problems (thanks to Turing proving the classes of problems his tape could solve) but there are some that it can’t, given that we only have a few billion years yet of universe to spare. Such problems could be solved if there was a holographic machine.

UPDATE:

More or less what I said was practically applied here. Thanks André for the link, this video is great!


True wisdom from randomness
February 2nd, 2008 under Algorithms, Fun, rengolin. [ Comments: none ]

You can live a whole life and remain stupid but a stupid program using a pseudo-random number generator and a clever algorithm (Markov’s chain) can excel us quite easily:

  • Input: The GNU GPL license
  • Output:
    “GNU General Public License along with you add to sue for details.”

  • Input: man perl
  • Output:
    “PERL (higher numbers usually being affected by wraparound).”

  • Input: My own wiki
  • Output:
    “Bioinformatics is a physicist (definitions of enforcing standards but it puts wrong things can build complex information systems and nothing is totally unacceptable for every new piece of giving generic answers.”


Free beer as in free speech
December 13th, 2007 under Fun, OSS, rengolin. [ Comments: 1 ]

Some Brazilian guys are doing FREE BEER in the true sense: using open source recipes licensed by creative commons.

Every batch is tagged with a version, 1.0, 2.0 etc. They’re currently on version 3.4! But you can still get the last 1.0 at ebay.


« Previous entries Next entries »