Eye of The Beholder

Long live RSS!

Товарищи, дамы и господа! Чувихи и перцы! Гвиротай ве-работай и прочие мина-сан!

Тут требуется некоторое пояснение. Я — ayao, комментирую от этого имени, но в этом ЖЖ я ничего НЕ пишу. Можете меня зафрендить, если вы хотите, чтобы я мог, например, читать ваши подзамочные записи. Если же хотите меня читать, то это не поможет.

Мой основной блог находится здесь:

www.brededor.info

Это, конечно, не ЖЖ, поэтому читать его не всем удобно. Поэтому записи оттуда транслируются в ЖЖ в специальный RSS-аккаунт, который находится тут:

http://brededor.livejournal.com/

Именно этот аккаунт надо френдить, если хотите меня за каким-то Хреном читать.

Однако, RSS-аккаунты весьма эфемерны. Записи там живут недолго (как раз чтобы вы успели прочитать их у себя в ленте), комментарии тоже (и я даже не знаю, дойдут ли они до меня). Поэтому если уж захотелось прокомментировать, не поленитесь зарегистрироваться на brededor.info и комментировать там. В каждой транслированной записи в ЖЖ есть ссылка на исходный пост, если что.
Eye of The Beholder

Переезд

В силу некоторых психологических причин, не выдержал и снова обратился к блогу. Но переехал на собственный домен, поскольку оный давно уже валялся без дела. Теперь мой блог помрет вместе со мной, ну туда ему и дорога. Новый адрес:

http://www.brededor.info/
Eye of The Beholder

Генератор светских бесед

Классная штука. Может выдать, например, такое (немного подредактировано):

Жопу можно забыть, но она никогда не забудет о нас. Один водитель купил почти новый Мерседес, у которого на капоте гвоздиком было нацарапано: «Жопа». И хозяин ему сказал: «Что хочешь с машиной делай, но Жопу не убирай». А водитель взял и убрал. И у него начались проблемы с тем самым, про что было слово. Он взял и нацарапал «Жопа» снова. И всё стало хорошо. Жопа сидит в своей нише,
кому-то же надо там сидеть. Жопа. Где достать сие произведение? Уверен, что все окружающие оценят. Жопа как сильный наркотик – один раз получив от нее удовольствие, начинаешь употреблять ее все чаще и чаще, и в итоге, не в состоянии себя контролировать, ты становишься невыносимым как для окружающих, так и для себя. Жопа – только не надо путать подлинный продукт с тем, что продается в магазинах. Так это же мое ИМХО! Точно ИМХО. Госпожа М. ничего не может понять: «Как только я увидела на своей домашней странице надпись «Жопа», у меня сердце ушло в пятки». Наша собеседница – редактор крупного форума, посвященного игровым приставкам. В тот день ее сайт практически перестал существовать. Пользователи, заходившие на форум, видели лишь огромную надпись «Жопа». Реальность намного больше, чем Жопа. И не такая добрая. А вот «Апож» – это Жопа наоборот.
Eye of The Beholder

How to write a web book in XXI century

It all started because I wasn't feeling well and had to stay at home for a few days. But since it can be pretty boring, I decided to sort out my limited knowledge of Hebrew by putting it into a kind of a web book or something like that. Maybe, just maybe, if I really learn Hebrew someday, it will turn into a nice language course for nerds like me. And if I just get bored of it before I actually finish, then I'll at least waste enough time doing it so I won't be bored for a while. It's a win-win idea.

One would think that writing a web book is something that is easily done in XXI century, provided, of course, that you know what to actually write there. I mean, there is Unicode, there is appropriate markup for bi-directional text in HTML, and it seems to be well supported by the mainstream browsers. Just pick up the right tools and write! Or so I thought.

The first issue is to find the right format. Writing directly in HTML isn't the best idea (although it can be done too) because HTML lacks internal structure. You'll have to struggle with chapter numbering, table of contents and splitting the thing into the right number of HTML pages. HTML is the best output format for web publishing, but it's not quite right to actually write in it.

The first format I thought of was Lyx, as its WYSIWYM (what you see is what you mean) idiom gives the most content with the least effort required to format everything. I already used it for my "Endgame: Singularity" Impossible Guide and found it quite nice, especially when there is math involved. I knew there were some problems with Unicode support in TeX/LaTeX, but I thought that such a nice piece of mature software should have all those solved already... Boy, was I wrong!

There is a whole bunch of UTF-8 encodings, using XeTeX or whatever-TeX, but none of them seemed to actually work. After struggling with it for a while, I realized that using TeX in any way cripples the very idea of using Unicode to get rid of all multi-language troubles even before they appear.

OK, so I thought I needed some decent format with native support of Unicode. Something like XML. Of course, raw XML is kind of useless unless I wanted to write my own XSLT sheet, which I didn't. So what I needed was an XML-based format that is designed for writing structured documents... Looks like Docbook is the way to go! It is designed for technical documentation primarily, but nothing stops from using it for anything else, as long as nothing special is required of it, and my requirements were quite simple indeed.

Now the only thing that I needed was a sort of WYSIWYG/WYSIWYM XML editor with Docbook support because I didn't want to write raw XML with Vim or something like that. Given Docbook's popularity, there must be plenty of them, right?
Collapse )
To sum it up, here what one needs to do in order to comfortably write a book to publish in the web: download an editor, customize XSLT stylesheet by writing a couple of new files and re-writing some templates, download spell checker dictionaries and the program to combine them into a single one, fix the dictionaries by replacing the wrong characters with the right ones, then disassemble and fix the editor so it accepts your new dictionary. Oh, and I almost forgot: write some AutoHotkey scripts to be able to actually type the right characters. Isn't that easy?
Eye of The Beholder

Don't set clock to match local time zone!

There are rumors that Russian time zones are going to change yet again. Hopefully we'll get rid of daylight time once and for all. This made me think of people who set their clocks to match new time zone each time they discover that their clock on a PC or a phone shows wrong time. Well, don't do it!

Setting a clock to match the new time zone works fine for mechanical clocks and primitive electronic clocks. So why is it so wrong to do the same thing with a computer or a phone? Because almost any such device runs its clock in UTC. That is, Greenwich time with no daylight corrections whatsoever.

Hey, but I don't see Greenwich time on my clock! I see the right time for my area!

That's right, if you live, say, in Houston, your clock will show (at summer) 8 AM when it's 1 PM UTC in the internal clock of your OS. Why? The answer is time zones.

Before displaying the time, your computer converts it to the local time zone. That's why you have to choose it when you set up your OS. So at any given time your OS knows two things: what's UTC time right now and how it differs from the local time. This makes all internal time processing incredibly simple: the OS doesn't have to take time zones into account. If it has two times, it always knows which one is later, and what's the exact difference is - it just has to subtract one time from another.

Now suppose your local authorities decide to change time zones in your area, like they wont to do it in Russia lately. Say, Texas decides that it no longer needs daylight time, so 8 AM becomes 7 AM now. But your clock still shows 8 AM, so you just go and set it to 7 AM. You now see the "correct" time, but then all kinds of strange things begin to happen. Mail shows wrong time, internet forums show wrong time, files on USB sticks have incorrect time stamps, and sometimes antivirus gives you vague alerts which not only you don't understand, but you get the feeling that the antivirus itself doesn't quite figure out what it doesn't like.

So what's wrong with just setting the clock to match the new time?

The reason all this crazy stuff is happening is because you didn't actually change 8 AM to 7 AM. While you might think you did something like this:

8 AM => 7 AM,

you actually did it like this:

8 AM CDT => 7 AM CDT = 6 AM CST

or, actually,

1 PM UTC => 12 PM UTC,

which is the same thing. Now when a mail arrives, your OS knows its time and its timezone, converts it to UTC, and then to your local time zone. Say, I wrote an e-mail to a guy in Texas. I am not too far away from Moscow, so my time is 5 PM MSK which is 1 PM UTC, which is 8 AM CDT or 7 AM CST. Now that guy has the time set to 6 AM CST, so here's what his OS thinks: "OK, so there's this mail that was written at 17:00 UTC+4, which is not a very convenient way to write it, so it would be much better for me to represent it as 13:00 UTC, but then again, while it's perfect for me, it's not the best way for my user, so I better convert it to the local time zone, which would be, well, let me think... 08:00 CDT (UTC-5). But wait! What's that? That's one hour into the future! Oh, that must be a junk mail or some sort of virus! I better warn my user!"

OK, what is the right way to do it then?

What you really need to do is not to fix the time, but to fix the time zone. Unfortunately, this is made incredibly hard for some reason. You can't just say, well, let's just set the time zone to UTC+4 and change it to UTC+3 at 03:00 AM on the last October Sunday. At best, you can just change it to UTC+4 or UTC+3, but then you have to adjust it manually unless your local authorities abolish daylight adjustments altogether. But even this strategy only works on some phones, and doesn't work in Windows 7, for example. It just lets you choose from a huge list with various places.

So what can be done if the OS on my PC or in my phone doesn't let me to set the right zone?

There are three ways.

The first way is to update the OS, hoping that developers already incorporated the new time zone rules. This has a nice effect of OS always showing the correct time, even for dates far in the past, because it actually remembers what all those rules were like long ago. This is actually the best way, and it can be as simple as just running Windows Update, or as hard as having to upload new firmware into your phone. In the worst case, you could be using an OS that is so outdated that no updates are available.

Here comes the second way. A geeky way. If there are no updates, you can make it yourself. It can involve registry edits or some really bizarre tricks like hex editing your phone's firmware. Someone could have done it for you already, so you may want to look for a ready recipe in the Internet. But there's an even easier way.

The third way is to just find a timezone identical to what you need. You need to switch to UTC+4, but your old OS doesn't know that Moscow is there already? Just choose Yerevan or whatever! Just don't forget to turn off daylight savings or you'll be in for a huge surprise - Yerevan's rules for daylight adjustments might not be exactly what you need. This has a disadvantage is that times in the past will probably be wrong because you now applied the whole history of that foreign place to your system's time zone rules. But at least the present will be present.
Eye of The Beholder

Хлопок одной ладони

"Однaжды зa Антигоной увязывaется кaкой-то юный болвaн, и онa, отчaявшись отделaться от непрошенного ухaжерa, отвешивaет ему звонкую пощечину. Встрепенувшись, Эдип зaинтересовaнно спрaшивaет: "Что это было?"

"Пощечинa, пaпa. Просто пощечинa", - потупившись отвечaет Антигонa. Ей стыдно зa собственную горячность, но Эдип восторженно восклицaет: "Молодец, дочкa!" - и принимaется хохотaть.

"Что ж, - отсмеявшись, говорит он, - вот он знaчит кaкой, хлопок одной лaдонью!"

Впрочем, просветления он тaк и не получил."

- кажись, Макс Фрай.

Я же сегодня понял, как услышать хлопок одной ладони несколько по-другому. Оказывается, очень просто. Берёте обе ладони и хлопаете. Но ведь это будет обычный хлопок двумя ладонями, скажете вы? Верно. А кто вам сказал, что хлопок двух ладоней не может быть хлопком одной ладони? Ещё как может! Собственно, это и есть хлопок одной ладони о другую. Вот так-то.

Eye of The Beholder

Creation and meaning

A very common question: how was this world created? The most common answers, excluding the obvious "I don't know", are these:

The "scientific" answer: Something blew up and turned into the world. Nobody knows where did that something get from. Then life appeared by pure chance, and instead of dying right away, evolved into something really complicated and incomprehensible for some reason.

The "religious" answer: God created all of this. Nobody knows why or what for. Nobody knows who or what god is. That's just about it.

Is it just me or is something so terribly wrong with both of these, that it would be very likely that the truth lies not somewhere in between, but rather somewhere far, far away from these two?

It's unlikely that anything plausible could be deduced with our current knowledge, but if anything, I'd say that it's probably that evolution of some sort actually took place, but it was driven by some forces that are completely outside of our knowledge now, and perhaps these very forces are referred to as "god" by religious people. It is very hard to imagine that all of this just created itself by accident, so it's probable that it actually has some meaning. It is also pretty obvious that something is terribly "wrong" with this world, in particular that it contains a lot of contradictions which mess up reasoning. For example, good and evil are so mixed up that it's pretty much impossible to remove all evil without removing all good as well. Sort of yin-yang applied in practice. It's even impossible to clearly define both good and evil, although it's also obvious that both exist.

To understand the world would mean understand ourselves, as we're a part of the world. To understand ourselves, we need to resolve all of that contradictions so our reasoning becomes consistent. While we have contradicting concepts interchange each other (like good and evil), we are dealing with contradictory system where everything could be proven from the same premise.

And it doesn't look like we got any closer to that during past few thousand years. Not a good sign at all. But then again, a thousand years is but a moment for the universe. Right now, I can only hope it happens someday. Or else it would be much better if this world never existed in the first place.
Eye of The Beholder

Deus Ex 3: Human Revolution

A long time ago, in a galaxy far, far away, Deus Ex was definitely one of my favorite games. And it still is. I always loved those first-person action with RPG elements. Great weapons, great maps, character development and extensive dialogs made it rather awesome example of that rare genre.

Then Deus Ex 2: Invisible Bore War came out. Man, it sucked. All of the weapons were using the same ammo (which means you can't switch to another weapon if you're out of ammo), the maps were somewhat half-lifeish, although not that bad. And those stupid quests were all along the lines of "we give this important task to you, and if you betray us and do our worst enemy a favor, then we'll be all pissed off at you, but still give you the next quest nevertheless". OK, it preserved some of the original atmosphere and setting, but it still sucked.

Well then, when I heard Deus Ex 3: Human Revolution is out, I was terribly afraid. The only example I can remember when the 3rd game in a series was good is Thief 3: Deadly Shadows. But then, Thief 2: the Metal Age was good too. And history knows too many examples where the 3rd game was absolutely awful, Doom and Fallout just to name a few. So I went on to read some reviews before actually buying the damn thing. The reviews unsurprisingly good, but also surprisingly praising the game for the very features I liked in the original Deus Ex, such as great freedom of choice.

So I gave it a try. To make a long story short, it was an awesome game. It is true Deus Ex. There's even more freedom than in the first one, where you could have troubles relying on stealth and non-lethal weaponry. Here is absolutely possible to complete the game without killing anyone with a few exceptions, and not feeling awkward about it. It is also possible to complete the game without even being seen by anyone, well, again maybe with a few exceptions. And if you want, you can always shoot you way through and still feel good about it.
Collapse )
It took me about 10 days to finish the game. And what's especially good is that it was better and better towards the end. At first, I felt a little awkward about enemies killing me in a few shots, there was a shortage of Praxis Points, and that linear mission really annoyed me a little bit. But then, after the first city, I felt like real badass, and the plot involving large corporations and various conspiracies impressed me more and more.
Eye of The Beholder

Велосипед тоже запретили

Не устаю делать глупости и удивляться последствиям.

В прошлом году в хорошую погоду я ездил на работу на велосипеде. Это как минимум быстрее и комфортнее, чем на машине, поскольку дорога пролегает почти целиком через лес.

В этом году я наивно решил, что можно снова начать ездить. То есть я конечно же знал, что нельзя, но почему-то об этом не думал.

Неприятности начались, как только я попытался достать велосипед из гаража. Конечно же, как только я это сделал, тут же на меня напал какой-то мужик. Ну это обычное дело, я к этому был готов, и тут же начал спасаться бегством. Но тут произошло совсем уж неожиданное - мужик меня догнал и снова на меня напал. Обычно эти неосознанно нападающие так не делают, поскольку уверены, что ни на кого не нападают. А тут ему удалось случайно переместиться туда, куда я убежал, причём (опять же случайно) в самый неприятный момент: я как раз накачивал колёса у велосипеда.

В общем, намёк я понял. Пришлось убрать велосипед обратно, уже навсегда. Если уж достать его так сложно, то как я на нём буду ездить? В прошлом году как-то, правда, обходилось, но я забыл, что всё не только должно быть обязательно плохо, всё должно и обязательно ухудшаться!

Всё-таки странно. Сколько я ни пытался вбить себе в голову мысль, что жить запрещено, если ты не палач и убийца, никак она туда не лезет. Что это, откуда такой странный закон? Почему даже мысль о том, чтобы никого не убивать и никому не причинять страданий, так наказуема?

Вообще этот закон всеобщего ухудшения работает как-то странно. С одной стороны налицо его последствия. Много людей даже зарплату получают за различные ухудшения. Сидит человек, думает, как бы сделать похуже, как бы людям страданий побольше причинить - а ему за это деньги платят. Вот, например, у нас снесли единственную автомобильную мойку в городе. Теперь там строят какой-то сраный куриный ресторан, который, конечно же, очень нужен на заправке в полной жопе рядом с крупнейшим гипермаркетом города (где и так полно чего пожрать, так что люди не попрутся специально для этого через дорогу). Ну а на тех недомойках, что остались в городе, теперь снова вырастут очереди на несколько часов.

Но с другой стороны, если сравнить жизнь в средние века, скажем, и жизнь сейчас, то как-то не получается представить, чтобы сейчас было хуже. Возможно, надо сравнивать не абсолютный уровень, а относительный - по сравнению с максимально возможным при данном уровне развития. Вряд ли, например, в средние века производитель каких-нибудь повозок стремился так усложнить жизнь пассажиров, как стремятся это сделать современные автопроизводители. То есть получается, с одной стороны растут возможности жизнь улучшить, а с другой - усилия по её ухудшению. И первые растут сильнее, что ли? Странно это всё как-то. Понять бы, как оно работает, может тогда удастся хоть как-то пожить. У меня же запросы и так минимальные, уж по сравнению со всеми этими врагами и уродами-то!