Archive for the ‘General’ Category

2008-01-24 14:05

Thursday, January 24th, 2008

Got drunk Sunday and Monday, Tuesday I didn’t drink and yesterday I felt sick through half the day. And why in the evening I got drunk with 500ml vodka, I have no idea (and there’s the rumor about one 50ml vodka afterwards).

I most probably need to find a girlfriend, to drink less. But the problems is that most women that I know drink as much as me…
(not that drinking interferes with my work, but I’m getting tired of hangovers)

2008-01-24 14:05

Thursday, January 24th, 2008

Напих се в неделя и в понеделник, вторник не пих и вчера ми се гади половината ден. А защо вечерта се напих като идиот с 5 големи водки, идея си нямам (носи се слух и за още една малка след това).

Най-вероятно трябва да си намеря любовница, че да намаля пиенето. Само дето повечето жени, дето познавам, пият колкото мене…
(А пиенето не ми пречи на работата, само дето взе да ми писва от тоя махмурлук)

2008-01-21 21:57

Monday, January 21st, 2008

I have again forgotten to write in the last 4 days, I’ve become too absent-minded.

I finished the configuration of my home work station, compiz is working like charm (far better than the metacity). I fixed some network stuff also, now phoebe.ludost.net is on the router, not NAT-ed to the inside (some day I’ll even stop using my workstation as a server).

I’m looking for a job for my mother – she got fired at her previous one because she told an use to rtfm.
(how can I not be proud with her)

“Return” will be presented again on 3.02, I need to get a ticket. Is someone passing by there?:)

I’m getting back in shape – last night I drank about half of 750ml bottle of vodka and had no problems in the morning.

I was about to write a rewiew of “Requiem for Homo Sapiens” by David Zindell (4 books – Neverness, The Fallen God (the only one translated in Bulgarian), The Wild and War In Heaven), but I’m too lazy – I’ll just say that the books are wonderful and it’s worthy to dive in them for a while.

There’s an update for wordpress, but no patch, so I had to diff myself 2.3.1 and 2.3.2. I’ll see how exactly will apply it and what will it conflict with…

2008-01-21 21:57

Monday, January 21st, 2008

Пак не съм писал от 4 дни, нещо съвсем се отнасям.

Довърших си настройките на домашната работна станция, compiz-а работи като слънце (доста по-приятно от metacity-то). Оправих си и малко настройките по мрежата, сега phoebe.ludost.net е на router-а, а не се прехвърля навътре (ще взема някой ден така да спра да си ползвам работната станция за сървър).

Търся работа за майка ми – от предната работа я уволниха, понеже казала на един user да rtfm.
(после как да не се гордея с нея)

“Завръщане” има още едно представление на 3.02, трябва да си взема билет. Някой да има път натам ?:)

Влизам във форма – снощи съм изпил около половината от 750мл бутилка водка и нищо ми нямаше сутринта.

Щях да пиша review на “Requiem for Homo Sapiens” на Дейвид Зиндел (4 книги – Neverness, The fallen god (единствената, преведена на български), The wild и War in heaven), само дето ме мързи – само ще кажа, че книгите са страхотни и си струва човек да се потопи за известно време в тях.

Има update за wordpress, само дето няма patch, та трябваше сам да си diff-вам 2.3.1 и 2.3.2. Да видим и как точно ще го apply-на и с какво ще се сбие…

“Return”

Thursday, January 17th, 2008

I went to see “Return” – a really nice play with the right (and beautiful) end, I should definitely find the scenario and read it in the quiet.
(Raizhekov, can you give me the text, I seem to have hard time finding it)

Also I was in “The apartment” for the first time. I should add in my schedule to get drunk there some time, the place is perfect for this.
(they also have wireless, which I couldn’t connect to as it died – I have the feeling that it fought with the thing they used for the video streaming for the play, but can’t be sure)

There was a problem with the video streaming, it went through strange analog devices – Raizhekov, I have 30-40 meters of coaxial cable and I’m giving it as a gift to use instead the antennas, how can I give it to you?

“Завръщане”

Thursday, January 17th, 2008

Ходих на представлението на “Завръщане” – много хубава пиеса с правилен (и много красив) край, определено трябва да си сваля сценария и да го изчета на спокойствие.
(Райжеков, я дай текста насам, нещо не мога да го намеря сам)

Също така бях за пръв път в “Апартамента”. В графика си трябва да планирам да се напия там някой път, мястото е прекрасно за целта.
(имат и wireless, на който не можах да се закача, щото изпадна – имам чуството, че се е намазвал с това, което използваха за видео излъчване за пиесата, но няма как да съм сигурен)

Имаше проблем с видео прожекцията, минаваше през странни аналогови wireless неща – Райжеков, имам 30-40 метра коаксиален кабел и ти го подарявам, да го ползваш вместо антените, как да се разберем?

2008-01-16 14:27

Wednesday, January 16th, 2008

Last night I destroyed a piece of history – I reinstalled my home workstation…

The machine was a Debian install from about 1998 (can’t remember if it was either Hamm or Slink), which from then on until now was only upgraded (I think that after woody I went directly to unstable). While backing some stuff up I saw what was currently installed and let’s say that it was pretty obvious that I had used it for all kinds of experiments…
(It went through three motherboards and probably 5-6 hard drives)

Reinstalling it with ubuntu had its small problems, because 1) the network card didn’t have a boot ROM and had to take one from another machine, 2) when I had changed the router I went from dhcpd2 to dhcpd3, in which the next-server option is not on by default and had to add it and 3) the root partition was only 1GB, which is not enough for the full desktop installation, so I had to do a base install and then apt-get install ubuntu-desktop (after I activated the LVM).
(and this whole thing I did because I decided to put the NVidia I bought a few months ago, then decided to install compiz and xgl and found that the later was not available in Debian).

And because I seem to have missed mentioning it – my router at home is a new small box that I bought, the alpha got retired. Let’s see when I’ll start playing with OpenVMS…

2008-01-16 14:27

Wednesday, January 16th, 2008

Снощи унищожих парче история – преинсталирах си работната станция вкъщи…

Машината беше с Debian инсталиран около 1998 (не мога да си спомня Hamm или Slink беше), който от тогава до днес беше само upgrade-ван (мисля, че след woody минах направо на unstable). Докато backup-вах разни неща, гледах какво толкова има в момента на машината, и да го кажа така – определено и личеше, че съм я ползвал за всичките си възможни експерименти …
(а е минала през три различни дъна и 5-6 харддиска…)

Преинсталирането с ubuntu беше свързано с малко приключения, понеже 1) мрежовата ми карта нямаше boot ROM и се наложи да измъкна една от съседна машина, 2) около смяната на router-а съм минал от dhcpd2 към dhcpd3, в което next-server опцията я няма по подразбиране, та трябваше да си я добавя и 3) root partition-а ми беше само 1GB, което малко не стига за инсталация на цялата работна среда, та трябваше да правя инсталация само на базова система и после apt-get install ubuntu-desktop (след като си активирах LVM нещата).
(а цялото желание за преинсталиране ми дойде като реших да си сложа NVidia-та, дето си бях купил преди няколко месеца, реших да си сложа compiz и xgl и открих как последното в Debian го няма)

Май и съм пропуснал да спомена – вече не ми е router alpha-та, взех си едно дребничко PC да върши тая работа. Да видим кога ще си играя с OpenVMS-а…

C – continuation

Tuesday, January 15th, 2008

As a continuation of the previous posting, one explanation, as looks like it’s needed :)

So, again the three fragments:

Fragment 1:

char *pesho="pesho";

Fragment 2:

char *pesho=(char *) malloc (6);
strcpy(pesho,"pesho");

Fragment 3:

char pesho[6]="pesho";

The first fragment writes the string in the .rodata section (before the executable code) and makes the pointer to point there. You can’t write there (except if you’re running DOS or something else with no memory protection), but can be passed around as a pointer.

The second fragment allocates memory in the heap and writes the string there. The pointer can be passed around, the space written to, etc..

The third fragment has two sub-cases: if pesho is a global or a local variable. In the first case the memory is allocated in the .globl section where the global variables are written with their names, so the dynamic linker can decide which is where – this one can be passed around, to be written to, etc.. The second one it’s local to the function, it’s allocated in the stack and the pointer can be passed to functions that are called by this one, but not returned by it (because when you leave the function the memory gets deallocated).

If you want to see for yourself what happens, write those in a program and compile it to assembly code with

gcc -Wall -o pesho.s -S pesho.c

and look at pesho.s, it’s pretty much obvious.

This was also tested on a few unixes (32 and 64bit) and 32bit Visual C++.

C – продължение

Tuesday, January 15th, 2008

Като продължение на предишния постинг, едно обяснение на цялата ситуация, понеже изглежда има нужда :)

Та, пак трите фрагмента:

Фрагмент 1:

char *pesho="pesho";

Фрагмент 2:

char *pesho=(char *) malloc (6);
strcpy(pesho,"pesho");

Фрагмент 3:

char pesho[6]="pesho";

Първият фрагмент записва низа в секцията .rodata (преди изпълнимия код на програмата) и насочва указателя натам. По принцип там не може да се пише (освен ако не работите под DOS или нещо подобно, което няма защита на паметта), но може да се предава напред-назад като указател.

Вторият фрагмент заделя памет в heap-а и записва в нея string-а. Указателя може да се предава навсякъде, там може да се пише и т.н..

Третия фрагмент е има два под-случая: ако pesho е глобална или локална променлива. В първия случай паметта се заделя в .globl секцията, където се пишат глобалните символи с имената им, за да може динамичния linker да се ориентира кое къде е – този може да се предава навсякъде като аргумент на функция, може да се пише отгоре му и т.н.. Втория случай е локален за функцията, заделя памет в stack-а и записва в него стойността. Указател към това може да се предава към функциите, които текущата вика, но не и на функцията, която е извикала настоящата (понеже при излизането от функцията тая памет вече се de-alloc-ва).

Който иска да види как точно стават нещата, може да си напише нещата в една програмка и да я компилира до асемблер с

gcc -Wall -o pesho.s -S pesho.c

и да разгледа pesho.s, там си личи най-добре.

Нещата са тествани на няколко unix-а (32 и 64битови) и на 32битово Visual C++.

C

Tuesday, January 15th, 2008

I started wondering some days ago, can most programmers tell what’s the difference between these three fragments and what can/can’t be done in each case? I can’t remember being taught this:

Fragment 1:

char *pesho=”PESHO”;

Fragment 2:

char *pesho=(char *) malloc (6);
strcpy(pesho,”PESHO”);

Fragment 3:

char pesho[6]=”PESHO”;

(for example, how in one of these cases we must not write in the string, how the other one can’t be returned as a function result, etc.).

C

Tuesday, January 15th, 2008

Тия дни ми стана интересно, дали програмистите могат да кажат каква е разликата между следните 3 фрагмента и кое в кой случай може/не може да с ползва? Най-малкото не си спомням някога да са ми го преподавали:

Фрагмент 1:

char *pesho=”PESHO”;

Фрагмент 2:

char *pesho=(char *) malloc (6);
strcpy(pesho,”PESHO”);

Фрагмент 3:

char pesho[6]=”PESHO”;

(например как в единия от случаите не трябва да се опитваме да пишем в string-а, как другия не можем да го връщаме като резултат и т.н.)

2008-01-14 00:17

Monday, January 14th, 2008

I have no idea why people get upset when they aren’t listened to. It saves me. Seems like nobody can think of something worse than the truth :)

2008-01-14 00:17

Monday, January 14th, 2008

Не знам защо хората не им харесва, че не ги изслушват. Мен ме спасява. Никой май не може да си помисли нещо по-лошо от истината:)

textbook on thinking

Thursday, January 10th, 2008

Since last year I’ve been thinking about something and I’m going to ask here, because nobody that I’ve asked has any idea…

The question is – is there a course or something similar on the topic how to solve problems? Where you can find an explanation of the things like the basic methodology (understanding the problem, reproducing, splitting it, verifying the solution, etc.), of the principles like it’s good to think from time to time about something else, what to do when you paint yourself in a corner, etc., etc…

Turns out that a lot of people have no idea how to solve some a bit more complex problems and just stop, being unable to do anything – which is pretty bad when the person is a programmer on whom something depends… Delian has a good example for this – a lot of people can solve the problem of a way in a two-dimensional labyrinth, but when it gets to 3 or more dimensions most people are unable to think it (and it’s as simple as how to find the adjoining cells and one depth- or breadth-first search).

The people whom I’ve asked and can do this have all taught themselves, with a lot of head-bashing and hard labour. I, being the lazy type am thinking that there should be an easier way to do this, like someone to have written a book on it by now… The closest we got to this was a textbook on logic like for first-course CS students (I should check what happened with that).

So, does someone know where can I find a textbook on thinking ?:)

учебник по мислене?

Thursday, January 10th, 2008

От миналата година се чудя върху едно нещо и най-накрая ще взема да го питам и тука, понеже май никой от хората, които съм питал няма идея…

Става въпрос за следното – има ли някъде курс, книга или нещо такова на темата как се решават проблеми? Някъде да се обясняват основни неща от типа на основна методология (изясняване на проблема, репродуциране, разделяне на части, проверка на решение и т.н.), на принципи от типа, че е добре от време на време да си почиваш и да мислиш за нещо друго, какво да правиш, като решиш, че си в задънена улица, и т.н., и т.н…

Оказва се, че твърде много хора нямат идея как да решават някакви по-сложни проблеми и просто спират, без да могат да направят нищо – което е бая неприятно, когато тези хора са програмисти, от които зависи нещо… Делян беше дал добър пример – много хора може и да решат задачата за път в лабиринт за двуизмерен такъв, но като се опре до 3 и повече измерения изведнъж нищо не могат да измислят (а тя задачата в общи линии се свежда до намиране на съседни клетки в N-измерен масив и едно обхождане в ширина или дълбочина).

Хората, които го могат това и които питах, все са се учили сами, с много блъскане на главата. Аз като един мързел обаче си мисля, че трябва да има по-лесен начин от това, някой например да е написал книга най-накрая… Най-близкото, до което стигнахме беше учебник по логика като за първокурсници информатици (който трябва да видя какво стана с него).

Та така, някой да знае къде се продава учебник по мислене ?:)

nonSense

Thursday, January 10th, 2008

Включих се към nonSense.

2008-01-09 17:51

Wednesday, January 9th, 2008

A portrait of the office alcoholic.

2008-01-09 17:51

Wednesday, January 9th, 2008

Портрет на офисния алкохолик.

2008-01-04 23:35

Friday, January 4th, 2008

Friday… I haven’t drank for two days.

I spent the day without reading mail or whatever – I brought the laptop to repairs for the display (who stopped working at christmas). In the end it’s not known what it is, something on the motherboard (it works on the external display), so I’ve ordered a new one…

While it was getting opened and debugged, I went to get some books, to get a haircut (just the ends :) ). I also decided to order a new machine for a router, when I set it up, I might run OpenVMS on the alpha (although I’m too lazy for this).