Select orthographic mistake with the mouse pointer and press Ctrl+Enter. Let’s make our language cleaner!
Якщо помітите помилку на цій сторінці, будь ласка, виділіть її вказівником миші та натисніть Ctrl+Enter. Зробімо наше мовлення чистішим!

2007-12-26

Unix way

If people knew the grep, sed and vim tools, millions of useful software products would have been never developped.

I’ve just noticed that it’d be good to change the string new test_suite to more stable macros BOOST_TEST_SUITE. A very simple command did everything for me after spending 5 minutes for this:

[sakhnik@incognito ~/work/mps]$ find . -name '*.cc' | \
    xargs sed -i '1,$s/(new test_suite(\([^)]*\)))/ = BOOST_TEST_SUITE(\1)/g'

That’s exciting!

2007-12-07

Колискова

Слухаю — і ніяк не можу наслухатися, просто заворожуючий звук. Може, моя мама мені так само співала? Це те, за що я так люблю цю культуру!

Гойда-гойда-гой, ніченька іде,
Діточок малих спатоньки кладе.
Під вікном тремтить вишенька мала,
В хатку проситься, бо прийшла зима.
Гойда-гойда-гой, очка заплющи,
В сні щасливому зігрієшся ти.
Йди до хлопчика, люба вишенько
В колисочці буде тепленько.
Гойда-гойда-гой ніч прийшла до нас,
Діточкам малим спатоньки вже час.
Рости, хлопчику, з вишенькою враз,
Хай не скупиться доленька для вас

2007-11-30

How to trust them our money?

That’s what I see sometimes:

2007-11-18

Advertisement in the underground

Can it be possible in the epoch of context ads?

Global logic is an outsource software company.

2007-11-17

Shrek’s new line

Do you recognize this brilliant face? It looks like there’s no limit for ukrainian pirates.

2007-11-11

Composed characters

I’ve noticed that there’s a way of depicting stress signs in Cyrillic text, like the following: КМІТЛИ́ВИЙ, ТЯМУ́ЩИЙ, МЕТИКО́ВАНИЙ, МЕТИКУВА́ТИЙ, ПОКМІ́ТЛИВИЙ, ШТУДЕ́РНИЙ. I don’t know how they were typed. But analysis revealed that they refer to so-called composed utf-8 characters. On the way of the investigation it appeared that the XOrg allows to define a custom composition key to type complicated characters easily.

There follow few examples below:

<rctrl>=e ⇒ €
<rctrl>--- ⇒ —
<rctrl>'e ⇒ é
<rctrl>~n ⇒ ñ

Nice! So I know how to type diacrytic characters in any graphical application. Additionally, to the graphical stress sign is one of composed unicode characters, it can be inserted into an XML by its code: &#769;. There’re many other composing characters, which can do interesting things: w̳o̸rld.

2007-11-08

Sorting in the StarDict

Always mixed up accents in foreign words, and it was difficult to find wrong spellings in the StarDict. So I googled the problem.

It appeared that the unix-way is to rely the comparison during sorting on the current locale. Besides the StarDict allows a user to set any language-specific collate function:

I’ve chosen the utf_unicode_ci, and now I’m astonished with the result:

2007-11-07

Core dump

Where’re those known from the university times core dumps on Linux? How can I discover a really rear bug in the server daemon?

Well, it appeared that they’re just turned off for ordinary users in the /etc/profile:

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

Really, why a user should know about such a weird thing? Now I always reset the ulimit before starting an application being debugged.

2007-10-30

Good bye, salsa LA

Finally I’ve given up the LA style. The main reason is that I like much more the casino, which is more authentic. The small one is that I’ve got annoyed by its complexity and pretence. That was a hard step after a year of intensive study.

Wireless networking is easy

I always wandered how difficult would it be to use wireless network on my linux box. But all the complexity reduced to installing proper driver for the on-board

[~]$ /sbin/lspci | grep Wireless
08:04.0 Network controller: Broadcom Corporation BCM4318
[AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)

From the web it appeared to be the native bcmwl5 guided by the ndiswrapper.

Almost there! The GNOME’s NetworkManager applet showed available wired and wireless networks to be chosen.

2007-10-28

Old good flying friends

At last I visited my friends yesterday. It seemed that we never parted.

Here’s Dima taking off:

And this is Tonya:

2007-10-04

Meet the nspluginwrapper

The gnash was a temporary solution, because it produces inaccurate output and doesn’t play some movies. Fortunately, I’ve been advised of an alternative: to use the original Adobe’s flash player plugin by means of the nspluginwrapper.

That’s appeared to be nice!

2007-10-01

Remote administration via GPRS

I’ve given my old laptop to the parents, having told them not to reinstall the system. I wanted they learn working with an open source system (linux). But a problem appeared: how to maintain the system? The only connection to the internet is a dial-up GPRS one.

Well, actually this is no more a problem. Let suppose my father establishes a connection to the internet, then connects to the well-defined server, which we both have SSH access to:

[smm@home ~] ssh -R 1234:localhost:22 koresha@koresha.org

Thus, any connection to the port 1234 will be forwarded to the home:22. So, now it’s my turn:

[koresha@koresha.org ~] ssh -p 1234 root@localhost

And that’s it! I have the desired root console remotely.

2007-09-28

Cell phone and GNOME

I’ve been using the ObexFTP by today. But it appeared that this is much more easier.

There’s a VFS plugin, which enables native browsing and handling experience of data. So I just open the url obex:/// in any of nautilus applications, and vois-là! This is really cool, because I don’t need additional software or sophisticated bools.

2007-09-09

Hello world, YouTube!

Finally, I’ve succeeded installing the gnash to play Adobe flash videos. It took me three times of recompiling it with different options to support ffmpeg. Actually, the out-of-the-box version doesn’t support playing YouTube movies, and the hint was found on pages of the Wikipedia.

Thus, when I’m able to watch videos from YouTube, I’ve tried myself to upload one. Enjoy!

2007-08-16

Robots help us

A year has passed quickly, and I celebrate my first anniversary of salsa LA study.

I’ve understood how not to spend much time updating my software. There’re packet managers, which work in my Fedora 7 just well. So I’ve stopped compiling software from sources.

But they don’t updated the Vim as quickly as I want. So recently I set up the aap build system. And now to update my Vim I just type:

$ aap update; sudo aap install

And that’s it! It’s fascinating, isn’t it?

2007-07-11

Setting up distcc with BBv2

I believe that compilers must do much work for me, that’s why I prefer metaprogramming techniques. Boost::spirit, boost::mpl make my code very resource demanding during the compilation process. But it’s worth indeed.

To make builds faster, I’ve just installed and set up so called distcc — the distributed C/C++ compiler. The result is just exciting!

To use the compiler with the boost build system, I just modified a line in the user-config.jam:

using gcc : : distcc g++ ;

Thats all I’ve done to get ten times faster build!

2007-05-28

Attitude

If you think you’re a looser (an average man, bad student etc), you’re indeed.

From words of Myroslava.

2007-05-13

The same story of music

The same story repeated, I discovered that I can’t just calmly listen to the argentine tango music. But I used to earlier! The same story, like with the salsa music!

When I hear their melody, rhytm or whatever else, warm and exciting emotions come to my head, and fill out all my mind. There’s the only desire after that: to dance one more time again.

Many things happened during the last month. I’ve been quite busy on the job, participated in an international salsa congress “Salsa mayovka”, opened the bike season after the winter break etc.

2007-04-11

Base64 transformations in C++

There appeared a task to encode a binary data to base64 and then decode it back. There’re many solutions, but this one I liked very much.

#include "boost/archive/iterators/base64_from_binary.hpp"
#include "boost/archive/iterators/binary_from_base64.hpp"
#include "boost/archive/iterators/transform_width.hpp"
#include <string>
#include <iostream>

using namespace std;
using namespace boost::archive::iterators;

typedef
    base64_from_binary<
        transform_width<string::const_iterator, 6, 8>
        > base64_t;

typedef
    transform_width<
        binary_from_base64<string::const_iterator>, 8, 6
        > binary_t;

int main()
{
    string str("Hello, world!");
    cout << str << endl;
    string enc(base64_t(str.begin()), base64_t(str.end()));
    cout << enc << endl;
    string dec(binary_t(enc.begin()), binary_t(enc.end()));
    cout << dec << endl;
    return 0;
}

It’s simple enough, isn’t it? But the world is not ideal, and because of a bug decoding doesn’t work, as expected. Fortunately, the bug can be worked around with a little hack.

2007-04-10

Golden gate

The short animation Golden gate came to my mind, when I saw an unsecured door in a supermarket today. Really amazing! How haven’t I noticed it yet?

2007-04-09

First milonga

It happend indeed! The other day I visited the first in my life tango milonga. After three unsuccessful attempts.

Well, I’m astonished, not deeply impressed. But I think I’ll like them in the nearest future. The music of good quality is not loud, one can just seat and have chat with others.

I felt that dancing on milongas would give me a masterfulnes and some certainty that I’m doing well, that my experience is portable indeed. It’s not an assumtion, it’s a fact!

2007-04-02

It happens sometimes...

SELECT
 orig.id, orig.plinkSerial, orig.msgIndex, orig.address, orig.method,
 orig.picPath, orig.eventType, orig.location,
 IF (trans.translation IS NULL, orig.template, trans.translation) as template
FROM
(SELECT
   m.id, m.plinkSerial, m.msgIndex, m.address, m.method, m.picPath,
   e.eventType,
   g1.value as location, g2.value as template
  FROM `eventMessages` as m, `events` as e,
   `global` as g1, `global` as g2
  WHERE m.msgIndex=e.msgIndex
   AND g1.name=e.locationId AND g1.tableId=6
   AND g2.name=e.profileId AND g2.tableId=8
   AND m.status=1) as orig
 LEFT OUTER JOIN
 (SELECT
   v.capStr as translation, w.serial, n.name
  FROM
   `captionVal` as v,
   `captionName` as n,
   `groups` as g,
   `webcoms` as w
  WHERE
   v.capId=n.captionNo AND
   v.languageId=g.lang_id AND
   g.groupId=w.grp) as trans
  ON trans.serial=orig.plinkSerial AND trans.name=orig.template

Two Olyas

Sit down between two Olyas, make a wish, and they will make it real in the evening”.

2007-03-29

New job

I really like my new job! I’m free to choose technologies and tools to use, I can decide what’s right and what’s wrong on my own. It’s really amazing!

Because of my bosses being abroad, no one stays behind my back and watches what I’m doing. Probably they can do this by means of remote desktop, but do they need to?

The only awful thing is inevitable: I want to sleep, just fall down asleep and don’t wake up only until I feel strong and fresh enough again.

2007-03-16

The French

Because of the orthodontic treatment, I can’t pronounce [ts], it sounds very ugly from me. What I’ve just thought of is it’d be very suitable and comfortable for me to speak French, because they don’t use that sound at all.

2007-03-15

New job

New job, new problems, but the world never changes: the existing code is awful, but it works!

2007-03-09

Let’s make the language cleaner!

Only clever head allows itself to carry a modest hair-cut. One should diverge by his intelligence!

I’ve just added ability to send me feedbacks about typos or other orthographical errors. Just select erroneous text with mouse pointer and press Ctrl+Enter. Thank you in advance!

2007-03-03

Using DocBook XML from now

I always disliked HTML because of its oddities. To post previous table I tried three times to mark it up. Then I gave up, and switched to the thing I really know, that’s DocBook XML.

First, the posts have very clean logic structure, there’s no mixture of content and representation.

Second, all sources of my posts can be stored in my repository now. That has promising advantages for the future.

My next goal is to find an offline blogger client, probably a plugin for the vim, so that I could avoid using html forms and automate the process of posting.

Typing text is getting easier

It was always complicated to type some beautiful text characters, for instance quotation marks ‘’ or “”. Actually, I’ve never known how to do it efficiently enough. When I worked under windows, I pressed the alt key then typed four-digit code of the character, and finally released the alt. That was six–seven keys to press!

There was no such possibility under Linux at all. So I tried to use the OpenOffice.org writer first. After years of software development I decided that there’s no better editor than the Vim. So I started using it everywhere. To edit a text in a web input field, I use the ViewSourceWith add-on for Mozilla. To type an exotic sign, I pressed <c-v>u2019. That was another seven keys.

And finally I discovered so called digraphs. This beast can help to type almost any character by pressing only four keys. For example, the same apostroph can be typed as <c-k>'9. Moreover, two-character abbreviation of a sign is very easy to remember:

'6, '9‘, ’Digits 6 and 9 are very like the sign itself.
"6, "9“, ”wThe same story as above.
-N, -M–, —En and em dashes respectively.
N0Numero, number.

I haven’t found the ellipsis , so I had to define it manually in my .vimrc: :digraph 3_ 8230.

2007-03-01

Guests

We often say that an uninvited guest is worse than a tatar. But my yesterday’s occasion was just opposite. They had had come and fallen asleep by the time I returned home in the evening, and they had had disappeared by the time I woke up in the next morning. May it have just seemed to me?

2007-02-24

Laziness can save us!

The ATI has just released new version of their video drivers, so I pretended to install them. But then I newly discovered that the driver isn’t installed under linux-2.6.20. The problem was much more severe this time, so I just refused to dig down any more. I downgraded the kernel to the previous version, and everything went just smoothly. How much time would I save if I did this when I was installing the previous version of drivers?..

2007-02-23

How I applied for information

Yes, it’s very easy, every kyiv man knows it’s nesessary to call 09 and to ask a phone girl. So did I when I took on the bus:

—Would you please tell me where is a military store?
—Which street is it situated on?
—I’d like you to tell me that.
—Sorry, I can’t help you...

But because I was speaking loudly enough, two passengers turned to me and prompted politely exactly what I wanted. Next time I shan't call the 09 at all, I’d rather just ask people around me.

2007-02-20

Think global

Hi there! Recently I've been looking for the suitable way to connect to the internet. Actually, I've been already using gprs connection for two months, but the way I did it was very awful. First, I logged in as a root than in console I typed wvdial umc. And finally, when the connection was established i copied /etc/ppp/resolv.conf to /etc/resolv.conf to use just received DNS nameservers' addresses. But this approach completely contradicts to my developer's nature: I'm lazy (in a good sense of the word), that is my credo is "It's better to spend an hour and reach in five minutes". So when I digged deeply into system configuration, I discovered that there were a simple way just from the beginning. I just had to use the system network configuration utility (it's called system-config-network), add new ppp connection, configure dialling parameters and that's it! Now to connect to the internet, I just launch another system utility that's called Network Device Control, choose desired connection (ppp0) and click on the Activate button. All this operations are performed from within my usual user account. And what is the most important, the DNS resolver gets configured automatically, I don't need to do any dangerous manipulations on the system manually. The conclusion from the story was for me to think sometimes as usual user, to think global and to regard the system as the whole ignoring its parts.

2007-02-19

Dancing with teachers

I really like dancing with teachers! They treat me very carefully, just like my mother does. The fear of failure goes away when I'm dancing with a teacher, so the dance become much more clear and fluent. Tonight I liked dancing with Anya (the teacher of NY) very much, just can't recover my sense!

Dancing with tambourine

This little story tells, how I installed driver for ATI Radeon Xpress 1100 under Fedora Core 6. Well, everything worked just fine primarily with the generic open source driver called radeon. The universal linux test for OpenGL glxgears showed that my new laptop processes near 450 fps, that's to say there was no hardware acceleration at all. Offensively. So I went to the ati.com, downloaded their native driver. It doesn't matter that the 'radeon xpress 1100' doesn't even appear in the list of supported hardware, the driver is as generic that it can work with many others. It turned out also that there were the only driver suite for any configuration, and I had to download near 60 MB. So I became a happy owner of a copy of new ATI hardware driver with version number 8.33.6. Very well, we begin shortly. First I have to confess that I've just customized my linux kernel and installed the newest version available at that time, that was 2.6.20. Actually, this let me have spent MUCH MORE time getting the driver to work. 1) Launch $ ati-driver-installer-8.33.6-x86.x86_64.run --listpkg showed that my system distribution should be well supported. 2) But when I tried to build RPM packages, I got first surprise: ati-driver-installer-8.33.6-x86.x86_64.run --buildpkg Fedora/FC6 .... (lots of compilation errors go here) The short look at the messages revealed that the version 2.6.20 of the linux kernel isn't supported by the driver. Actually, there were no macros _syscallX() anywhere. But deep investigation in the web found out that that problem can easily be solved by defining missing macros either in the source file where they're used or in the kernel source. In my case the latter was more suitable. 3) I tried to build desired RPM packages again. The second problem prevented me from success, it appeared that my system lacks the fireglcontrolpanel application. The web helped me again: the source of the program can be extracted from the driver package and compiled manually. It appeared that to do so, one must solve some easy programming puzzles ;-) 4) At last, I succeeded building RPMs for my system: $ ls *.rpm ATI-fglrx-8.33.6-1.fc6.i386.rpm ATI-fglrx-control-panel-8.33.6-1.fc6.i386.rpm ATI-fglrx-devel-8.33.6-1.fc6.i386.rpm kernel-module-ATI-fglrx-2.6.20-19.02.2007-8.33.6-1.fc6.i386.rpm $ su # rpm -ivh *.rpm 5) At this point everything seemed to be ready to restart X Window system, so I pressed ctrl + shift + backspace. The X server started, but nothing interesting happened. The glxgears showed the same 450 fps, fgl_glxgears refused to start. That was the best time to look at /var/log/Xorg.0.log. There were errors! So I disabled the option AIGLX in the section "ServerLayout" of /etc/X11/xorg.conf. 6) And that was the turning point! The glxgears printed out that my system was able to produce 2000 fps, almost four time increase! Enough about computers. I spent for that process near 24 hours, two times I decided to give it all up. But every time I came back and tried again. This insistency made my success, so I can safely say: "Never give up!"

2007-02-02

Dangerous thoughts

Be careful with your even non-dangerous thoughts, aspecially when you're going to share them. I've posted a notice about women cloths on a web forum. I just supposed those cloths were reused from another performance... I didn't even had time to turn around, as I was plied with stones. It doesn't matter that I appreciate "reusing" in life very much... So I had to beg pardon.

2007-01-30

Ski season 2007 opening

The winter has come to us at last. So I prepared my nordic ski, and just tried out the snow coat. After long summer season, I've lost knack, and it took me near an hour to wash out the previous season klister (it'd be much more better if I did this in the previous year!), and to apply new ski wax. But I was endowed for my effort with very smooth skiing experience. A small distance (but enough for the first time) showed out that my skiing skills and power remain on the good level, so I'm going to more interesting hillycountry tomorrow.

2007-01-28

Welcome back to Ukraine!

The last five days in Hungary passed very quickly, because it was very interesting. The days was spent for excursions, nights for dancing and getting home. I slept only few hours every night, but nevertheless I felt very fresh. I used the Hungarian for communications if I know how to express myself, the English was used otherwise. It appeared that Hungarians are very friendly people, they speak very good English, German, sometimes Russian. I've found a female friend, we danced together. I've taughted her to dance the Los Angeles style of salsa, she showed me the night city, presented young wine of her own production. I adore her!

2007-01-23

It happend indeed!

I danced salsa with Tanya Yur'yeva today. As long as she is my teacher, the fact itself is something like a ceremony of initiation for me. Actually, I've been trying to catch her for two last months, but she was too busy to visit salsa parties. "The ambition of an idiot" became true ;-)

2007-01-21

Magyarországra megyek!

Hi there! "Who can do something does it, but who can't teaches",-- I heard today. It appears that my next dream is becoming a reality, yes, the day after tomorrow I'm going to Hungary. Hurray!

Архів блогу