La Reine des Amazelles

🐲

Après quelques discussion sur un forum dédié à Rêve de Dragon, j’ai décidé de renommer les elfes du scénario La reine des elfes, et d’utiliser le terme Amazelle gracieusement suggéré par Vermer. J’ai aussi intégré les commentaires d’Alias et ajouté une introduction qui explique le pourquoi du scénario, en gros le contenu de l’entrée de blog où j’ai présenté le scénario.
La nouvelle version est disponible au format PDF.

flattr this!

Meanwhile on planet Sony

Playstation Logo

So there was another update to the Playstation 3 firmware. This was kind of expected as Sony is preparing the launch of another version of the PS3, slimmer than the slim model I have.
In the world of technology, hardware tends to evolve fast, and buying, six years later, the same hardware is generally impossible, yet this is what Sony is about to sell: a device with mostly the same technical specifications as the original Playstation 3; there are basically two differences besides the size between the model that will launch and the one from six years ago: the size of hard-drive and the lack of the emotion engine, which offered Playstation 2 compatibility in the. That compatibility system disappeared with the slim model.

This is all fine, while the PS3 is certainly not a speed demon by today’s standards, it still has usable hardware, basically similar horsepower to a newer iPhone, so it should be capable of doing the same class of stuff as an iPhone or a tablet: games – of course – but also light web-browsing, e-mail reading. For this one simply needs a web browser (a local e-mail client would be nice, but let us not push it). This spring Sony did something surprisingly reasonable, it replaced the integrated web-browser with a webkit one, sufficiently advanced to pass the Acid3 test, and even some HTML5 features like the canvas tag.

This was update 4.11, the update for October was 4.30, and guess what it improved? The trophy UI is now compatible with the Playstation Vita. I have a computer which Sony thinks is still good enough to sell, is powerful enough to compute protein folding, Sony removes the protein folding client and improves the trophy showcase. Besides this, nothing was improved or even fixed, Facebook photos are still broken in the gallery, there was not the slightest improvement to the web browser, no new utility program, nothing, nada, just trinket compatibility with a gaming console nobody is buying.

To put things into perspective, Sony sold 2.2 millions Playstation Vita between its launch in december 2011 and end of June 2012. Apple sold more than twice this number of iPhone 5 units in a week-end. In fact if you look at the technical specs, the devices are really close (I have added the new Nexus 4 for comparison).

iPhone 5 Playstation Vita Nexus 4
CPU 2 × custom ARM7 (A6)
1.3 Ghz
4 × ARM7 (Cortex-A9)
0.8 – 2 Ghz
4 × ARM7 (Snapdragon)
1.5  Ghz
GPU 3 × PowerVR 325MHz 4 × PowerVR 200MHz Adreno 320
Screen 1136 × 640 960 × 544 1280 × 768
Memory 1 GB 512 MB + 128 MB (VRAM) 2 GB

The iPhone is much more expensive, and has no gaming buttons, on the other hand, it is much smaller and can do useful stuff: make phone calls for starters, web-browsing, light e-mail reading, plus it has a lot of apps – iOS also has much larger user-base: there are around 250 millions iOS5 devices. This in turn is dwarfed by huge volume of android devices: 400 millions.

Two single purpose devices built by Sony – portable gaming consoles and point and shoot cameras – are being replaced by phones that are more versatile, and it takes no genius to realise that single purpose devices in the living room are bound to have the same fate, yet Sony’s strategy seems to be doing nothing…

flattr this!

De la Vélocité des Processeurs

📏

Si le commun des mortels est habitué à mesurer les choses avec des unités, la plupart évitent les conversions qui impliquent la maléfique règle de trois dans le meilleur des cas, et des choses proprement diaboliques comme l’annulation d’unités, où l’on peut découvrir que la consommation d’essence des voitures est une unité de surface.

La performance d’un processeur est généralement exprimée en Mégahertz, ce système a ses désavantages, parmi lesquels le fait que personne ne sait à quoi ressemble un Mégahertz. On pourrait tout aussi bien utiliser une unité que les gens peuvent comprendre et qui a fait ses preuves : la .

Certains lecteurs se souviennent peut-être d’une époque où la fréquence des radios n’était pas exprimée en Hertz, mais en longueur d’onde, ainsi les stations en onde courte étaient aux alentours de 200 mètres. Le processeur de mon ordinateur portable tourne à 2.3 Gigahertz, ce qui équivaut à environ 13 centimètres, soit ⅓ de coudée, ou ⅔ d’empan (à une vache près, hein, c’est pas une science exacte), ce qui est quand même plus parlant…

flattr this!

Of greedy algorithms

🐜

One of the main things you learn in theoretical computer science, is that some problems are hard: it is impossible to find the best solution for them in a reasonable time using the types of computers we currently have access to, and reasonable time means something shorter than the age of the universe.

One example of such a problem is the traveling salesman: finding the shortest path that visits all cities of a country, say France. France has 440 cities (places with more than 20’000 people), this approximates to 5.63 × 10973 possible itineraries, the generally admitted age of the universe is 4.3 × 1017 seconds. So even if we had a trillion processors 1012 , capable each of evaluating a trillion itineraries per seconds (say running at a terahertz frequency), running since the beginning of the universe, we would only have computed around 4.3 × 1041 itineraries, a tiny fraction of total set (less than 1 / 10900). So this can really not be solved in a reasonable time.

While it is very hard to find the best solution, life goes on with acceptable solutions: it is possible to visit all cities of France, just not in the perfect sequence. One approach to solve the problems in practice are called greedy algorithms, they are called like this because they typically solve the problem one step at the time, consuming always the easiest available next step. For instance for the traveling salesman problem, that would be, after visiting each city, look for the closest unvisited city and go there.

Such an approach is not optimal and can be trapped by its own greed: the traveler might end up drifting to one corner of France only to realise that the next un-visited city is on the other side of the country, that he needs to traverse a large territory of visited cities to find his next step. This is called a local minima, getting trapped there is bad and a greedy algorithm might get stuck there, unable to pay the price to get out. On the other hand, greedy algorithm tolerate the chaos of reality pretty well, the roads between cities change length all the time, it might be impossible to visit some because of some event (be it a strike or a festival), and while you are touring the country, one place might get the new inhabitant that makes it a city. A greedy algorithm adapts instantly, because it has no real strategy.

Often, the best one can do is couple greed and smarts, that is among the cheapest options, not choose the one cheapest, but one cheap one that is compatible with a long term strategy. If the strategy fails, greed is always here as a backup-plan. This will never find the optimal solution, but the art is to get as close as possible to it while adapting to the changes and randomness of reality.

Unsurprisingly, the way nature works seem to follow a similar strategy: greed, with a lot of smarts bolted on top of it, evolve and adapt, but keep around enough variation and richness to avoid being trapped in some corner of the evolutionary landscape. That does not mean that there are no local minima, are a typical example.

Politics, at the core is just about solving a problem: what rules to set up, how to distribute resources to make people thrive and be happy. The underlying problem is much more complex than just travelling around the country, probably in the same ballpark that evolution and life in general. Yet, I think the same considerations apply: finding the optimal solution is not reasonable, because of the complexity of the model and the chaos of reality, but unfettered greed means the system is quickly stuck in a local minima, like for instance high-frequency trading.

The political system seems dominated by people whose projected ideology is either to suggest theoretical solutions that cannot work in practice, or proponent of unsupervised greed, yet at the same time, the way they act on the problem is either by always optimising the next vote, the next political item (greedy approach) or they want a complete revolution of everything (theoretical model), they are particularly consistent between their ideology and behaviour.

flattr this!

Dungeon Keeper

Mac OS X Window showing the dungeon heart of Dungeon Keeper

While they cannot compete with the graphical quality of today’s games, I still have fond memories of games of the past. While I played most on my C64, ports of games of these days do not feel very stratifying. My two favourite games in those days, and have been re-written as and , I find neither fun to play nowadays.

is a DOS game from , I never played it, but I loved the sequel, which game out two years later and was a Windows game, so when released Dungeon Keeper for Mac OS X at 5.99$, I just bought it.

In Dungeon Keeper, you control the heart of a dungeon, building up the rooms of the dungeon, hosting, feeding and training you minions to defeat either the human adventurers that visit your dungeon or competing dungeon keepers. The game takes ideas from real-strategy games, with a good sense of humor: your units fight among themselves, have different personalities and require some management.

The game appears as a simple Mac OS X application, hidden in the bundle, there is an instance of DosBox that basically runs the original game. The game is fun to play, as the graphics are quite blocky (S-VGA graphics, remember), I prefer playing in in windowed mode. The game playing flawlessly for me, and is quite fluid – which you would expect running a game designed at a time when 100Mhz was the best you could get, running on a 2.4Ghz machine.

While certainly not as engaging as the sequel, Dungeon Keeper is a fun game, which ads a twist to the classical fantasy setting and the general roleplaying game with dungeons trope. I would certainly recommend this game to anybody who designs dungeons, while laughing with an evil laugh. Despite the low resolution, the graphics are pretty nice, with many nice touches, like the wall decorations

I really like the idea of refurbishing old games for a moderate price: 6$ is certainly worth the hassle of not hacking around with emulators, and such games have a much clearer legal standing as abandon-ware. My only wish would be that Good Old Games releases Dungeon Keeper in the same format, as Dungeon Keeper II is a window game, this might be a bit more complicated.

While this might not be considered a real game by today’s standards, the price is anyway that of an phone app, so there is no big risk in buying it.

flattr this!

Grammar for computer geeks

Grammar is one of those things you discover when learning a second language, even though you were using it with you first. Like many abstract way of thinking about stuff, you can live without, but it makes discussing stuff much easier. Instead of explaining those concepts using words, I’m going to explain them using C function pointers.

Transitive Verbs

They are functions that take two parameters, a subject and an object, like for instance the verb to beat. The first defines who does the action, the second defines what the action affects.

typedef void (*transitive_verb)(Object*, Object*);

Intransitive verbs

They are functions that take only one parameter, a subject, like for instance the verb to die.

typedef void (*intransitive_verb)(Object*);

Ambitransitive verbs

They are functions that can have both a transitive and an intransitive form, like for instance the verb to eat.

flattr this!

Unlocking PDF files

🔓

People writing RPG scenarios seem to have two bad habits: using weird fonts, and distributing their texts in password protected PDF files. Very often, the weird font is either not included in the PDF, or so corrupt that any modern operating system will flat out refuse to load it; when the document is displayed, poor Helvetica is forced into strange bounding boxes, and the result is basically unreadable. Because the document is copy-protected, one cannot simply copy-paste the text into a text editor to simply read it.

Thankfully, it is possible to get to the text by making a round-trip using ghostscript. Please only use this to read documents, and not to copy them or do anything nefarious. On Mac OS X the sequence is the following (assuming you have MacPorts installed).

sudo port install gs
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf

Where encrypted.pdf is your encrypted pdf file. On exit, unencrypted.pdf will contain the unencrypted text, the layout will still be broken (although often makes things less evil in the process), but you will be able to copy-paste the text. Beware that depending on the tool that produced the PDF file, there might be weird spaces all over the text, and bits of text will be moved into random places…

flattr this!

Le goût de Tōkyō

Un gratte ciel de Tōkyō

J’aime bien les anthologies de nouvelles, cela permet de découvrir de nouveaux auteurs, des idées, et le format ce prête bien à une lecture souvent interrompue. Durant mon récent voyage à Dublin, j’ai lu Le goût de Tokyo, un petit livre de 117 pages qui exactement le bon format pour se coincer de manière ennuyante dans le casier où l’on range les instructions de sécurité de l’avion. Ce n’est de loin pas un livre unique, il y a toute une série de livres intitulés le goût de… suivi du nom d’une ville. La sélection de texte apparaît assez diverse, auteurs, mais aussi architectes, sociologues, japonais, écrivains francophones mais aussi anglophones, bref, une grande variété.

Le goût de Tokyo
Rédacteur : Michaël Ferrier
Le petit mercure
ISBN : 978-2-7152-2811-5

Je ne fais probablement pas partie du public cible, vu que j’ai déjà visité plusieurs fois la capitale de l’est, quoi qu’il en soit le livre m’a laissé perplexe. Il ne s’agit pas, comme dans une antologie, d’une collection de nouvelles ayant leur propre structure, un début, une fin. Ici on a affaire à de courts extraits de 2-3 pages, auquel on a accolé une introduction et une sorte de synthèse. Vu le commentaire en page 6, la longueur des extraits pourrait être justifiée par des considérations non littéraires.

Nous avons tenté de joindre tous les auteurs ou leurs ayants droit. Pour certains d’entre eux, malgré nos efforts, nos recherches de coordonnées n’ont donné aucun résultat. Leurs droits leur sont naturellement réservés.

J’ai trouvé le résultat assez médiocre ; la qualité des textes est très variable, certains textes sont le fruits d’auteurs qui connaissent le japon et savent écrire (Nicolas Bouvier), d’autres d’auteurs japonais, mais le reste relève assez vite du fatras : écrivains célèbres ayant passés quelques jours sur l’archipel, analyses sociologiques à six sous, théories architecturales bouffies de mots vides et compliqués.

L’introduction et la synthèse de chaque texte par Michaël Ferrier ne parviennent pas réellement à donner une impression d’ensemble, à vouloir tout redire avec un style sans intérêt, il m’a fait penser à un mauvais présentateur TV. Je suppose que cette qualité de texte suffirait pour un magazine, avec de très jolies photographie sur papier glacé pour donner un peu plus de substance. La mise en page du livre m’a d’ailleurs fait penser à celle des magazines, avec trois format de texte différents pour chaque texte : fonte à empattements en italique pour l’introduction, fonte à empattement droite pour le texte principal, fonte grotesque droite pour la synthèse, avec en prime un trait dans la marge à gauche.

Bref, le goût de Tokyo est à mon avis un livre avec un intérêt assez limité, le seul point positif, c’est que l’extrait du Secret de Tanizaki Jun’ichirō m’a donné envie de lire ce livre. Pour le reste, c’est plus un article de magazine imprimé sous forme de livre qu’autre chose, et qui ne donne, à mon avis, qu’un goût très superficiel de Tōkyō.

flattr this!

Halabaille la titanesque

Halabaille n’est pas une ville à proprement parler, mais plutôt un affleurement géologique habité. Par une bizarrerie géologique, des strates urbaines ensevelies à la fin du second âge y sont poussées vers la surface, pour être promptement démantelées par les tempêtes maritimes et les habitants qui vendent aux cités voisines bloc de pierre, colonnes et tuiles. La première richesse de la cité, est sa substance même.

flattr this!

C++ level

I realised something amusing about the C++ language. When I ask to people around me to estimate their level in C++ language, on a 1-10 scale, people who know how to code in this language will usually give themselves a 7. The thing is, I don’t think their level is the same, put their mindset regarding the language is the same: they can use it to code, but there is still a lot of stuff that they don’t fully understand.

I think this is a very good mindset, because it is one that acknowledges complexity, and the fact that one always learns. A path where there are few self claimed gods and the journey is more important than the goal.

flattr this!