Wednesday, March 4, 2015

Print all the environment in makefile



printenv:

$(foreach V,$(sort $(.VARIABLES)),\
$(if $(filter-out default automatic,\
    $(origin $V)),$(warning $V=$($V) ($(value $V)))))


or - new variables only:

VARS_OLD := $(.VARIABLES)
CUR-DIR := $(shell pwd)
LOG-DIR := $(CUR-DIR)/make-logs
$(foreach v,                                        \
  $(filter-out $(VARS_OLD) VARS_OLD,$(.VARIABLES)), \
  $(info $(v) = $($(v))))

Monday, March 31, 2014

Changing DNS in Ubuntu 12.10 and 12.04

This should be the right way to change the DNS servers without loosing the dnsmaq functionality, making it global for all you connections through dhcp and keeping NetworkManager aware of which DNS servers are you using.

Editing the file

Code:
sudo gedit /etc/dhcp/dhclient.conf
Adding your DNS(s) server(s) here.
Code:
prepend domain-name-servers x.x.x.x, y.y.y.y;
Source:

http://askubuntu.com/questions/13045...ia-resolv-conf

Thursday, March 13, 2014

BASH - remove (or do something) with a list of files (in text file)

Slow: 

while read -r filename; do
  rm "$filename"
done <list.txt


For a few arguments):
 rm -f $(<list.txt)



I think it should work:

xargs -a list.txt -d'\n' rm

Thursday, February 13, 2014

Where does the compiler look for default headers?


`gcc -print-prog-name=cc1plus` -v

This command asks gcc which C++ preprocessor it is using, and then asks that preprocessor where it looks for includes. You will get a reliable answer for your specific setup.

Likewise, for the C preprocessor:

`gcc -print-prog-name=cc1` -v

Monday, October 14, 2013

36 zdań zabijających kreatywność...

1. Tutaj jest inaczej. 2. To już próbowaliśmy. 3. To dużo kosztuje. 4. To nie nasza działka. 5. Oni są zbyt zajęci żeby to zrobić. 6. Nie mamy czasu. 7. Nikt nas nie poprze. 8. To jest zbyt radykalna zmiana. 9. To niezgodne z polityką firmy. 10. Nie mamy takiej władzy. 11. Wróćmy do rzeczywistości. 12. Nie podoba mi się ten pomysł. 13. Nie mówię, że nie masz racji, ale... 14. Znałem osobę, ktora to chciała zrobić i już tu nie pracuje. 15. Zawsze robiliśmy to tak jak teraz. 16. Stracimy tylko pieniądze na to. 17. To jest coś co przecież wymagamy od naszej załogi. 18. Tego nie mamy w budżecie. 19. Nie należy uczyć starego psa nowych sztuczek. 20. Dobry pomysł, ale mało praktyczny. 21. To nie jest dobry moment. 22. Staniemy się pośmiewiskiem w naszej branży. 23. Co? Znowu to? 24. Już to zrobiliśmy działające bez tego. 25. Tego się nigdy nie próbowało. 26. W porzadku. Uformujemy komitet w tej sprawie. 27. To nie zadziałałoby w naszej firmie. 28. To nie przejdzie przez nasz zarząd. 29. Nie widzę żadnego związku. 30. Tego się nie da zrobić. 31. Zmiany niosą zbyt dużo problemów. 32. To niemożliwe. 33. Czy ktoś jeszcze to próbował? 34. Przestań już marzyć. 35. Jeśli funcjonuje nie naprawiaj tego. 36. To będzie dużo pracy.

Thursday, October 3, 2013

Cytaty, quotes,

-¿Cuándo volverá a ser el que era? -Cuando el sol salga por el oeste y se ponga por el este -replicó Mirri Maz Duur-. Cuando los mares se sequen y las montañas se mezan como hojas al viento. Cuando tu vientre vuelva a agitarse y des a luz a un niño vivo. Entonces volverá, no antes.

Thursday, September 26, 2013

REPELENTE CASERO DE MOSQUITOS, HORMIGAS Y PULGAS.

REPELENTE CASERO DE MOSQUITOS, HORMIGAS Y PULGAS. 
(Libre de químicos que intoxican al cuerpo)

Ingredientes:

1/2 litro de alcohol
... 1 paquete de clavos de olor (100 gr)
1 vaso de aceite de bebé o similar (100 ml)

Preparación:
Deja el clavo de olor macerando en el alcohol 4 días, agitando mañana y tarde. A continuación, poner el aceite corporal (puede ser de almendras, manzanilla, hinojo, lavanda vera, aloe, etc.) y ya está pronto para su uso.

Modo de empleo:

Pásese unas gotas en los brazos y piernas y los mosquitos huyen de la habitación.
El clavo espanta las hormigas de la cocina y de los electrodomésticos.
Ahuyenta las pulgas de las mascotas.
El repelente evita que los mosquitos chupen sangre, por lo que se altera la reproducción, disminuyendo su proliferación.

Wednesday, September 11, 2013

GIT: How to see old version of a file...



You can use git show:

$ git show REVISION:path/to/file

For example, to show the 4th last commit of the file src/main.c, use:

$ git show HEAD~4:src/main.c


Note that the path must start from the root of the repository. For more information, check out the man page for git-show.

Thursday, September 5, 2013

volatile: The Multithreaded Programmer's Best Friend

volatile: The Multithreaded Programmer's Best Friend

I don't want to spoil your mood, but this column addresses the dreaded topic of multithreaded programming. If — as the previous installment of Generic says — exception-safe programming is hard, it's child's play compared to multithreaded programming.
Programs using multiple threads are notoriously hard to write, prove correct, debug, maintain, and tame in general. Incorrect multithreaded programs might run for years without a glitch, only to unexpectedly run amok because some critical timing condition has been met.
Needless to say, a programmer writing multithreaded code needs all the help she can get. This column focuses on race conditions — a common source of trouble in multithreaded programs — and provides you with insights and tools on how to avoid them and, amazingly enough, have the compiler work hard at helping you with that.

Just a Little Keyword

Although both C and C++ Standards are conspicuously silent when it comes to threads, they do make a little concession to multithreading, in the form of the volatile keyword.


Just like its better-known counterpart const, volatile is a type modifier. It's intended to be used in conjunction with variables that are accessed and modified in different threads. Basically, without volatile, either writing multithreaded programs becomes impossible, or the compiler wastes vast optimization opportunities. An explanation is in order.


Consider the following code:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Gadget
{
public:
    void Wait()
    {
        while (!flag_)
        {
            Sleep(1000); // sleeps for 1000 milliseconds
        }
    }
    void Wakeup()
    {
        flag_ = true;
    }
    ...
private:
    bool flag_;
};

The purpose of Gadget::Wait above is to check the flag_ member variable every second and return when that variable has been set to true by another thread. At least that's what its programmer intended, but, alas, Wait is incorrect.


Suppose the compiler figures out that Sleep(1000) is a call into an external library that cannot possibly modify the member variable flag_. Then the compiler concludes that it can cache flag_ in a register and use that register instead of accessing the slower on-board memory. This is an excellent optimization for single-threaded code, but in this case, it harms correctness: after you call Wait for some Gadget object, although another thread calls Wakeup, Wait will loop forever. This is because the change of flag_ will not be reflected in the register that caches flag_. The optimization is too ... optimistic.


Caching variables in registers is a very valuable optimization that applies most of the time, so it would be a pity to waste it. C and C++ give you the chance to explicitly disable such caching. If you use the volatile modifier on a variable, the compiler won't cache that variable in registers — each access will hit the actual memory location of that variable. So all you have to do to make Gadget's Wait/Wakeup combo work is to qualify flag_ appropriately:

?
1
2
3
4
5
6
7
class Gadget
{
public:
    ... as above ...
private:
    volatile bool flag_;
};

Most explanations of the rationale and usage of volatile stop here and advise you to volatile-qualify the primitive types that you use in multiple threads. However, there is much more you can do with volatile, because it is part of C++'s wonderful type system.

Using volatile with User-Defined Types


You can volatile-qualify not only primitive types, but also user-defined types. In that case, volatile modifies the type in a way similar to const. (You can also apply const and volatile to the same type simultaneously.)


Unlike const, volatile discriminates between primitive types and user-defined types. Namely, unlike classes, primitive types still support all of their operations (addition, multiplication, assignment, etc.) when volatile-qualified. For example, you can assign a non-volatile int to a volatile int, but you cannot assign a non-volatile object to a volatile object.


Let's illustrate how volatile works on user-defined types on an example.

?
1
2
3
4
5
6
7
8
9
10
11
12
13
class Gadget
{
public:
    void Foo() volatile;
    void Bar();
    ...
private:
    String name_;
    int state_;
};
...
Gadget regularGadget;
volatile Gadget volatileGadget;

If you think volatile is not that useful with objects, prepare for some surprise.

?
1
2
3
4
5
6
7
8
volatileGadget.Foo(); // ok, volatile fun called for
                      // volatile object
regularGadget.Foo();  // ok, volatile fun called for
                      // non-volatile object
volatileGadget.Bar(); // error! Non-volatile function called for
                      // volatile object!

The conversion from a non-qualified type to its volatile counterpart is trivial. However, just as with const, you cannot make the trip back from volatile to non-qualified. You must use a cast:

?
1
2
Gadget& ref = const_cast(volatileGadget);
ref.Bar(); // ok

A volatile-qualified class gives access only to a subset of its interface, a subset that is under the control of the class implementer. Users can gain full access to that type's interface only by using a const_cast. In addition, just like constness, volatileness propagates from the class to its members (for example, volatileGadget.name_ and volatileGadget.state_ are volatile variables).

volatile, Critical Sections, and Race Conditions


The simplest and the most often-used synchronization device in multithreaded programs is the mutex. A mutex exposes the Acquire and Release primitives. Once you call Acquire in some thread, any other thread calling Acquire will block. Later, when that thread calls Release, precisely one thread blocked in an Acquire call will be released. In other words, for a given mutex, only one thread can get processor time in between a call to Acquire and a call to Release. The executing code between a call to Acquire and a call to Release is called a critical section. (Windows terminology is a bit confusing because it calls the mutex itself a critical section, while "mutex" is actually an inter-process mutex. It would have been nice if they were called thread mutex and process mutex.)


Mutexes are used to protect data against race conditions. By definition, a race condition occurs when the effect of more threads on data depends on how threads are scheduled. Race conditions appear when two or more threads compete for using the same data. Because threads can interrupt each other at arbitrary moments in time, data can be corrupted or misinterpreted. Consequently, changes and sometimes accesses to data must be carefully protected with critical sections. In object-oriented programming, this usually means that you store a mutex in a class as a member variable and use it whenever you access that class' state.


Experienced multithreaded programmers might have yawned reading the two paragraphs above, but their purpose is to provide an intellectual workout, because now we will link with the volatile connection. We do this by drawing a parallel between the C++ types' world and the threading semantics world.

  • Outside a critical section, any thread might interrupt any other at any time; there is no control, so consequently variables accessible from multiple threads are volatile. This is in keeping with the original intent of volatile — that of preventing the compiler from unwittingly caching values used by multiple threads at once.
  • Inside a critical section defined by a mutex, only one thread has access. Consequently, inside a critical section, the executing code has single-threaded semantics. The controlled variable is not volatile anymore — you can remove the volatile qualifier.

In short, data shared between threads is conceptually volatile outside a critical section, and non-volatile inside a critical section.


You enter a critical section by locking a mutex. You remove the volatile qualifier from a type by applying a const_cast. If we manage to put these two operations together, we create a connection between C++'s type system and an application's threading semantics. We can make the compiler check race conditions for us.

LockingPtr


We need a tool that collects a mutex acquisition and a const_cast. Let's develop a LockingPtr class template that you initialize with a volatile object obj and a mutex mtx. During its lifetime, a LockingPtr keeps mtx acquired. Also, LockingPtr offers access to the volatile-stripped obj. The access is offered in a smart pointer fashion, through operator-> and operator*. The const_cast is performed inside LockingPtr. The cast is semantically valid because LockingPtr keeps the mutex acquired for its lifetime.


First, let's define the skeleton of a class Mutex with which LockingPtr will work:

?
1
2
3
4
5
6
7
class Mutex
{
public:
    void Acquire();
    void Release();
    ...   
};

To use LockingPtr, you implement Mutex using your operating system's native data structures and primitive functions.


LockingPtr is templated with the type of the controlled variable. For example, if you want to control a Widget, you use a LockingPtr that you initialize with a variable of type volatile Widget.


LockingPtr's definition is very simple. LockingPtr implements an unsophisticated smart pointer. It focuses solely on collecting a const_cast and a critical section.

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
template <typename T>
class LockingPtr {
public:
   // Constructors/destructors
   LockingPtr(volatile T& obj, Mutex& mtx)
       : pObj_(const_cast(&obj)),
        pMtx_(&mtx)
   {    mtx.Lock();    }
   ~LockingPtr()
   {    pMtx_->Unlock();    }
   // Pointer behavior
   T& operator*()
   {    return *pObj_;    }
   T* operator->()
   {   return pObj_;   }
private:
   T* pObj_;
   Mutex* pMtx_;
   LockingPtr(const LockingPtr&);
   LockingPtr& operator=(const LockingPtr&);
};

In spite of its simplicity, LockingPtr is a very useful aid in writing correct multithreaded code. You should define objects that are shared between threads as volatile and never use const_cast with them — always use LockingPtr automatic objects. Let's illustrate this with an example.


Say you have two threads that share a vector object:

?
1
2
3
4
5
6
7
8
9
class SyncBuf {
public:
    void Thread1();
    void Thread2();
private:
    typedef vector<char> BufT;
    volatile BufT buffer_;
    Mutex mtx_; // controls access to buffer_
};

Inside a thread function, you simply use a LockingPtr to get controlled access to the buffer_ member variable:

?
1
2
3
4
5
6
7
void SyncBuf::Thread1() {
    LockingPtr lpBuf(buffer_, mtx_);
    BufT::iterator i = lpBuf->begin();
    for (; i != lpBuf->end(); ++i) {
        ... use *i ...
    }
}

The code is very easy to write and understand — whenever you need to use buffer_, you must create a LockingPtr pointing to it. Once you do that, you have access to vector's entire interface.


The nice part is that if you make a mistake, the compiler will point it out:

?
1
2
3
4
5
6
7
8
void SyncBuf::Thread2() {
    // Error! Cannot access 'begin' for a volatile object
    BufT::iterator i = buffer_.begin();
    // Error! Cannot access 'end' for a volatile object
    for (; i != lpBuf->end(); ++i) {
        ... use *i ...
    }
}

You cannot access any function of buffer_ until you either apply a const_cast or use LockingPtr. The difference is that LockingPtr offers an ordered way of applying const_cast to volatile variables.


LockingPtr is remarkably expressive. If you only need to call one function, you can create an unnamed temporary LockingPtr object and use it directly:

?
1
2
3
unsigned int SyncBuf::Size() {
    return LockingPtr(buffer_, mtx_)->size();
}

Back to Primitive Types


We saw how nicely volatile protects objects against uncontrolled access and how LockingPtr provides a simple and effective way of writing thread-safe code. Let's now return to primitive types, which are treated differently by volatile.
Let's consider an example where multiple threads share a variable of type int.

?
1
2
3
4
5
6
7
8
9
class Counter
{
public:
    ...
    void Increment() { ++ctr_; }
    void Decrement() { —ctr_; }
private:
    int ctr_;
};

If Increment and Decrement are to be called from different threads, the fragment above is buggy. First, ctr_ must be volatile. Second, even a seemingly atomic operation such as ++ctr_ is actually a three-stage operation. Memory itself has no arithmetic capabilities. When incrementing a variable, the processor:

  • Reads that variable in a register
  • Increments the value in the register
  • Writes the result back to memory

This three-step operation is called RMW (Read-Modify-Write). During the Modify part of an RMW operation, most processors free the memory bus in order to give other processors access to the memory.


If at that time another processor performs a RMW operation on the same variable, we have a race condition: the second write overwrites the effect of the first.


To avoid that, you can rely, again, on LockingPtr:

?
1
2
3
4
5
6
7
8
9
10
class Counter
{
public:
    ...
    void Increment() { ++*LockingPtr<int>(ctr_, mtx_); }
    void Decrement() { —*LockingPtr<int>(ctr_, mtx_); }
private:
    volatile int ctr_;
    Mutex mtx_;
};

Now the code is correct, but its quality is inferior when compared to SyncBuf's code. Why? Because with Counter, the compiler will not warn you if you mistakenly access ctr_ directly (without locking it). The compiler compiles ++ctr_ if ctr_ is volatile, although the generated code is simply incorrect. The compiler is not your ally anymore, and only your attention can help you avoid race conditions.


What should you do then? Simply encapsulate the primitive data that you use in higher-level structures and use volatile with those structures. Paradoxically, it's worse to use volatile directly with built-ins, in spite of the fact that initially this was the usage intent of volatile!

volatile Member Functions


So far, we've had classes that aggregate volatile data members; now let's think of designing classes that in turn will be part of larger objects and shared between threads. Here is where volatile member functions can be of great help.


When designing your class, you volatile-qualify only those member functions that are thread safe. You must assume that code from the outside will call the volatile functions from any code at any time. Don't forget: volatile equals free multithreaded code and no critical section; non-volatile equals single-threaded scenario or inside a critical section.


For example, you define a class Widget that implements an operation in two variants — a thread-safe one and a fast, unprotected one.

?
1
2
3
4
5
6
7
8
9
class Widget
{
public:
    void Operation() volatile;
    void Operation();
    ...
private:
    Mutex mtx_;
};

Notice the use of overloading. Now Widget's user can invoke Operation using a uniform syntax either for volatile objects and get thread safety, or for regular objects and get speed. The user must be careful about defining the shared Widget objects as volatile.


When implementing a volatile member function, the first operation is usually to lock this with a LockingPtr. Then the work is done by using the non- volatile sibling:

?
1
2
3
4
5
void Widget::Operation() volatile
{
    LockingPtr lpThis(*this, mtx_);
    lpThis->Operation(); // invokes the non-volatile function
}

Summary


When writing multithreaded programs, you can use volatile to your advantage. You must stick to the following rules:
  • Define all shared objects as volatile.
  • Don't use volatile directly with primitive types.
  • When defining shared classes, use volatile member functions to express thread safety.
If you do this, and if you use the simple generic component LockingPtr, you can write thread-safe code and worry much less about race conditions, because the compiler will worry for you and will diligently point out the spots where you are wrong.
A couple of projects I've been involved with use volatile and LockingPtr to great effect. The code is clean and understandable. I recall a couple of deadlocks, but I prefer deadlocks to race conditions because they are so much easier to debug. There were virtually no problems related to race conditions. But then you never know.

Acknowledgements


Many thanks to James Kanze and Sorin Jianu who helped with insightful ideas.

LINUX: Going to the specific line in the huge text file....



You can use sed for this:

sed -n '320123'p filename

This will print line number 320123.


If you want a range then you can do:

sed -n '320123,320150'p filename


If you want from a particular line to the very end then:

sed -n '320123,$'p filename

Tuesday, April 17, 2012

How to cut first n fields in the text file using awk

To cut first 4 columns of the text file just use:

  awk '{print substr($0, index($0,$4))}'

Thursday, February 23, 2012

birthday wishes

If you look for a nice set of bithday wishes in English or Spanish - here are some useful links http://www.imag-e-nation.com/happy_birthday_verses_poems_quotes.htm
spanish:
http://www.cabinas.net/mensajes_de_texto/mensajes_de_cumplea%C3%B1os.asp

merge w svn

Just to remember - quite a nice instruction how not to overwrite someones work during SVN branch merge. instruction:

http://www.sepcot.com/blog/2007/04/SVN-Merge-Branch-Trunk

Monday, February 20, 2012

Polish language on windows 7

Jak zmienić język w Windows 7. Sprawdzone - działa :)

How to switch language in Windows 7.  I think it is:

Run CMD as administrator and type:
DISM /Online /Add-Package /PackagePath: (example: c:\langpack\sv-se) This can take quite a while

Then type

bcdedit /set {current} locale sv-se (or whatever language)

then

bcdboot %WinDir% /l sv-se

Then in regedit
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlMUIUILanguages
delete en-us

Restart and we have win 7 pro rtm in swedish (in this example)

Useful links:

http://answers.yahoo.com/question/index?qid=20110322135351AAaaCyj

http://www.windows7.pl/forum/index.php/topic,1407.0.html#post_pl2


I jeszcze porada (na ten sam temat po polsku):


Witam
Mam Windows 7 Home Premium 64 bitowy SP1 kupionego w Danii no i borykałem się ze zmianą języka duńskiego na polski. Po przeczytaniu wielu artykułów zgłupiałem i dałem sobie spokój. Na drugi dzień coś mnie olśniło i połączyłem kilka opcji, a przy okazji znalazłem caba do SP1. A zrobiłem to tak:

- ściągnąłem Vistalizator ze strony (http://www.froggie.sk/download.html, następnie wszedłem we właściwości i zmieniłem zgodność na win7, i w tedy się uruchomił, inaczej się nie uruchamiał, bynajmniej u mnie, od razu po uruchomieniu pokazał jakie języki mam na kompie.

- następnie ściągnąłem plik exe z językiem polskim pod SP1 ze strony (www.be-mine.info/software/windows-7-sp1-mui-language-packs-direct-download/) no i problem, plik cab znika, więc zrobiłem tak, kliknąłem na plik exe, po pojawieniu się pliku cab wszedłem w jego właściwości i zmieniłem, otwieraj za pomocą internet explorer. Następnie znowu kliknąłem na plik exe i po pojawieniu się pliku cab kliknąłem na niego prawym i dałem uruchom w eksplorator Windows, otworzyło się nowe okno w którym była zawartość pliku cab, no i nie znikało.

- następnie zainstalowałem te spolszczenie z instrukcji jak wyżej, ale tylko sama instalacja, czyli (DISM /Online /Add-Package /PackagePath:(tu podajemy dokładną ścieżkę do pliku lp.cab)), resztę zrobiłem programem Vistalizatorem, po restarcie ukazał się język polski.

a to moja paczka z Vistalizatorem i polskim plikiem .cab który nie znika link do RapidShare ((https://rapidshare.com/files/4050527944/PL_64x_Vistalizator.zip))

Może się komuś przyda.

GCC - coverage and gprof

A friendly reminder - how to generate a good looking code coverage graph. 1. Coverage
-lgcov to linker, --coverage to compiler

part of makefile:
RM=@rm -fr
CP=@cp
MV=@mv
FIND=find
GCOV=gcov
LCOV=lcov
GENHTML=genhtml

gcov:
$(FIND) . -name "*.c" -print -exec $(GCOV) -o$(OBJ_DIR) {} \;
$(MV) -f ./*.gcov ./tests/coverage

lcov:
$(MV) $(OBJ_DIR)/*.gc* .
$(LCOV) --directory . --capture --output-file ./tests/coverage/vp.info
$(MV) ./*.gc* $(OBJ_DIR)

html: lcov
$(GENHTML) -o ./tests/coverage/html ./tests/coverage/vp.info
${RM} .#include#*



2. Great graphical tool for gcc profiler:

http://code.google.com/p/jrfonseca/wiki/Gprof2Dot

How to shrink PNG picture

Since PNG is loosless format it must be greater than good quality jpeg
- anyway I've found a library which may help reduce png size of about 30% http://pmt.sourceforge.net/pngcrush/ ... just a thing good to know ;)

Thursday, September 10, 2009

Piosenka hiszpanska - Shakira - Tortura

Alejandro Sanz:
Ay payita mía /Moja pioseneczko/
Guárdate la poesía /Zachowaj poezję
Guárdate la alegría pa'ti /Zachowaj radość dla siebie/

Dame,dame,damelo,oh /daj mi, daj mi, daj mi to, oo/

Shakira:
No pido que todos los días sean de sol /Nie proszę by każdy dzień był pełen słońca/
No pido que todos los viernes sean de fiesta /Nie proszę o bale w każdy weekend/
Tampoco te pido que vuelvas rogando perdón /Nie chcę też byś wrócił błagając o wybaczenie/
Si lloras con los ojos secos /Jeśli płaczesz krokodylimi łzami/
Y hablando de ella. /I mówiąc ciągle o niej/

Ay amor me duele tanto /Ech, mój drogi, to tak bardzo boli/
(Alejandro Sanz)Me duele tanto /To tak bardzo boli/
(Shakira)Que te fueras sin decir a donde /Że odszedłeś nie mówiąc dokąd/
Ay amor, fue una tortura perderte.. /Aj kochany, to była dla mnie tortura, że cię straciłam/

Alejandro Sanz:
Yo se que no he sido un santo /Wiem, że nie byłem święty/
Pero lo puedo arreglar amor /Ale mogę to wszystko naprawić/

Shakira:
No solo de pan vive el hombre /Nie samym chlebem żyje człowiek/
Y no de excusas vivo yo. /A ja nie chce ciągle słyszeć tylko tłumaczeń/

Alejandro Sanz:
Solo de errores se aprende /Człowiek uczy się na błędach/
Y hoy se que es tuyo mi corazón /I dziś wiem, me serce należy do ciebie/

Shakira:
Mejor te guardas todo eso /Lepiej zachowaj Te słowa/
A otro perro con ese hueso /"Dla innej naiwnej" (trzymaj te kosc dla innego psa)/
Y nos decimos adiós / I powiedzmy sobie do widzenia/

Alejandro Sanz:Esto es otra vez esto es otraves no../ale to innym razem...../

Shakira:
No puedo pedir que el invierno perdone a un rosal /Nie mogę żądać by zima przebaczyła kwiatom róży/
No puedo pedir a los olmos que entreguen peras /Nie mogę żądać by na wierzbie rosły gruszki/
No puedo pedirle lo eterno a un simple mortal /Nie mogę żądać wieczności od zwykłego śmiertelnika/
Y andar arrojando a los cerdos miles de perlas /I rzucać perły miedzy wieprze/

Alejandro Sanz:
Ay amor me duele tanto /Ech, moja droga, to tak bardzo boli/
Me duele tanto /To tak bardzo boli/
Que no creas más en mis promesas /Że już nie wierzysz moim obietnicom/
Ay amor (Shakira) /Ech moj kochany/
es una tortura (Alejandro Sanz) /To tortura/
perderte (Shakira) /Że cię tracę/

Alejandro Sanz:
Yo se que no he sido un santo /Wiem, że nie byłem święty/
Pero lo puedo arreglar amor /Ale mogę to wszystko naprawić/

Shakira:
No solo de pan vive el hombre /Nie samym chlebem żyje człowiek/
Y no de excusas vivo yo. /A ja nie chce ciągle słyszeć tylko tłumaczeń/

Alejandro Sanz:
Solo de errores se aprende /Człowiek uczy się na błędach/
Y hoy se que es tuyo mi corazón /i dzis wiem ze do Ciebie nalezy me serce/

Shakira:
Mejor te guardas todo eso /Lepiej zachowaj Te słowa, dla innej naiwnej/
A otro perro con ese hueso
Y nos decimos adiós /i powiedzmy sobie 'do widzenia'/

Alejandro Sanz:
No te bajes, no te rajes /Nie zostawiaj mnie, nie wylamuj sie,/
Oye negrita mira, no te rajes /Słuchaj moja słodka, nie wycofuj się/
De lunes a viernes tienes mi amor /Od poniedziałku do piątku jestem twój/
Déjame el sábado a mi que es mejor /Zostaw mi sobotę, tak będzie najlepiej/
Oye mi negra no me castigues más /Przestań już mnie karać moja czarnulko/
Porque allá afuera sin ti no tengo paz /Bo tam na zewnątrz bez ciebie nie mogę już żyć/
Yo solo soy un hombre arrepentido /Teraz jestem skruszony/
Soy como el ave que vuelve a su nido /I jak ptak wracam do gniazda/

Yo se que no he sido un santo /Wiem, że nie byłem święty /
y es que no estoy hecho de cartón (I że nie jestem ze skały)/

Shakira:
No solo de pan vive el hombre
Y no de excusas vivo yo.

Alejandro Sanz:
Solo de errores se aprende
Y hoy se que es tuyo mi corazón

Shakira:
Ay ay ay ay yai yai /aj aj.../
Ay, todo lo que he hecho por ti /Wszystko co zrobiłam dla ciebie/
Fue una tortura perderte /To była tortura stracić cię/
Y me duele tanto que sea asi /Bardzo mnie boli, że tak się stało/
Sigue llorando perdón /Przepraszaj mnie nadal płacząc/
Yo... yo no voy /Ja nie będę za tobą płakać/
A llorar por ti ...

Tuesday, September 1, 2009

Piosenka hiszpańska - Chambao - Ahi estas tu.

Teledysk

Dejate llevar, por las sensaciones /Zagub sie zupełnie z powodu uczuć/
Que no ocupen en tu via (1), malas pasiones /Niech złe boleści nie zajmują Twojego życia/

Esa pregunta que te haces sin responder /To pytanie ktore sobie zadajesz bez odpowiadania/
Dentro de ti está la respuesta para saber /Odpowiedz jest wewnatrz ciebie (zeby wiedziec) /
Tu eres el que decide el camino a escoger /Ty jestes tym, ktory decyduje jaka droge wybrac/
Hay muchas cosas buenas y malas, elige bien /Jest duzo rzeczy dobrych jak i złych, wybierz dobrze/
Que tu futuro se forma a base de decisiones /Twoja przyszlosc ksztaltuje sie na tych decyzjach/
Y queremos alegrarte con estas canciones /I chcemy Cie uszczesliwic tymi piosenkami/

Y ahí estás tú, tú... /A ty jestes tam/

Y es que yo canto porque a mi me gusta cantar /I chodzi o to ze spiewam, bo lubie spiewac/
También tú bailas porque a ti te gusta bailar, tú... /A ty tez tanczysz, bo lubisz tanczyc (ty)/
Y es que yo canto porque a ti te gusta escuchar /I chodzi o to ze spiewam, bo lubisz sluchac/
lo que yo canto porque así se puede bailar, tú... /to co spiewam, bo w ten sposob jest mozliwe tanczenie... ty (twoje)/

Estribillo /Refren/
Y ahí estás tú /A ty jestes tam/
Y a mi me gusta como bailas, tú.../I lubie sposob w jaki tanczysz/
Tú a bailar, tú a bailar /A ty do tanca, do tanca/

Y ahí estás tú, tú... /A ty jestes tam, ty/
Y a mi me gusta como te mueves, tú... /I lubie sposob w jaki sie poruszasz/
Tú a bailar, tú a bailar /A ty do tanca, do tanca/

Canto por el día, y en mañanas de alegría /Spiewam za dnia i radosnymi porankami
Canta tú conmigo si quieres conmigo canta /Spiewaj ze mną ,jesli chcesz ze mna spiewaj/
Canto por las noches, cuando el lorenzo (2) se esconde /Spiewam nocami kiedy "El Lorenzo" sie ukrywa (słonce)/
Canta tú conmigo si quieres conmigo canta /Spiewaj ze mną ,jesli chcesz ze mna spiewaj/
Canto pa' los pobres que temprano se levantan /Spiewam dla biednych, ktorzy wstaja wczesnie rano/
Canta tú conmigo si quieres conmigo canta /Spiewaj ze mną ,jesli chcesz ze mna spiewaj/


Estribillo

(1) powinno byc vida = życie (Andaluzyjczycy łykają przedostatnie d - i nie tylko to)
(2) Lorenzo (Wawrzyniec) to imie dane słońcu. Prawdopodobnie pochodzi to z dzieciecej piosenki: El sol se llama Lorenzo, la luna Catalina....
(Słońce ma na imie Lorenzo, ksiezyc - Catalina...). TO BYLO NAJTRUDNIEJSZE CHYBA !!!

Monday, August 31, 2009

Piosenka hiszpanska - Conchita - Nada que perder.

Nagranie unplugged z radia

"Nada que perder" /nic do stracenia/

Nunca se me dio demasiado bien /nigdy nie udawalo mi sie zbyt dobrze /
poner las cartas sobre la mesa /wykladac karty na stół (walic prosto z mostu)/
Nunca se me dio demasiado bien… /nigdy nie udawalo mi sie zbyt dobrze.... /
Y ahora nos volvemos a encontrar / i teraz znowu sie spotykamy /
y me preguntas, que tal me va /i mnie pytasz jak mi sie wiedzie.../

Quisiera ser capaz, decirte la verdad /chcialabym byc zdolna powiedziec ci prawdę/
Decirte que me va realmente mal, /powiedziec ze wiedzie mi sie naprawde źle /
no te logré olvidar, ni lo intenté quizás /nie zdolalam cie zapomniec, a moze nie chcialam tego/
Quisiera ser capaz, mirarte y no temblar /chcialabym byc zdolna patrzec na ciebie i nie trząść sie/
Decirte que nadie me volvió a besar /powiedziec ci ze nikt mnie pozniej juz nie calowal/ No te logré olvidar, ni lo intente quizás /nie zdolalam cie zapomniec, a moze nie chcialam tego/

En lugar de eso sonrío y tiemblo /a zamiast tego usmiecham sie i dygocę/
Y te cuento que ya acabé la facultad /opowiadam ci ze skonczylam fakultet :) /
Me puse a trabajar y me volví a enamorar… /zabralam sie za prace i znowu zakochalam/
En lugar de eso sonrío y pienso /zamiast tego usmiecham sie i mysle/
Por que no seré capaz de decir la verdad /dlaczegoz to nie bede zdolna mowic prawde/
te pierdo una vez más /trace cie kolejny raz/

Quisiera ser capaz, decirte la verdad /chcialabym byc zdolna powiedziec ci prawdę/
Decirte que me va realmente mal /powiedziec ze wiedzie mi sie naprawde źle /
no te logre olvidar, ni lo intente quizás…/nie zdolalam cie zapomniec, a moze nie chcialam tego/
Quisiera ser capaz, mirarte y no temblar, /chcialabym byc zdolna patrzec na ciebie i nie trząść sie/
Decirte que nadie me volvió a besar /powiedziec ci ze nikt mnie pozniej juz nie calowal/ No te logré olvidar, ni lo intente quizás…/nie zdolalam cie zapomniec, a moze nie chcialam tego/

Y ahora me quedan dos opciones /i teraz pozostaja mi dwie mozliwosci/
Quedarme quieta o echar a correr… /pozostac spokojnie albo rzucic sie do biegu/
Y me pongo a correr…ya que puedo perder /i rzucam sie w bieg, poniewaz moge stracic/
Verás es que no me va demasiado bien /zobaczysz, ze nie wiedzie mi sie zbyt dobrze/
No te logré olvidar, ni lo intente quizás /nie zdolalam cie zapomniec, a moze nie chcialam tego/
Y me pongo a correr… ya que puedo perder /i rzucam sie w bieg, poniewaz moge stracic/
Verás es que ya nadie me volvió a besar /zobaczysz, ze nikt mnie nie calowal/
No te logré olvidar ni lo intente quizás…/nie zdolalam cie zapomniec, a moze nie chcialam tego/

Y ahora ya te toca a ti acabar con esta historia /a teraz twoja kolej zakonczyc tę historie/
ahora ya te toca a ti decir las cosas con un punto y final /teraz twoja kolej powiedziec o sprawach i postawic kropke/
O bésame sin más…. /pocaluj mnie (tak bez zastanowienia!) /
Y ahora ya te toca a ti, ya no vale callar /a teraz twoja kolej juz nie warto milczec/
Esta vez no volveré a perderte una vez más /tym razem juz cie nie strace kolejny raz/
No me voy a marchar sin saber el final /nie bede podążać nie znajac co jest na koncu/

Nunca se me dio demasiado bien /nigdy nie udawalo sie zbyt dobrze/
poner las cartas sobre la mesa /wykladac karty na stół/
Nunca se me dio, no demasiado bien…/nigdy nie udawalo mi sie zbyt dobrze, o nie... /
Y ahora nos volvemos a encontrar y me preguntas que…/ i teraz znowu sie spotykamy i mnie pytasz/
Que qué tal me va…/Jak, jak mi sie wiedzie.../
Y yo ya no se, ya no se ni que… contestar /a ja juz nie wiem, juz nie wiem zupelnie co.. odpowiedziec /

Sunday, August 16, 2009

Piosenka hiszpanska - Amaral: "Marta, Sebas, Guille y los demás"

Wersja unplugged

Amaral
"Marta, Sebas, Guille y los demás"


Marta me llamó a las seis hora española. /Marta do mnie zadzwonila o 6 rano (czasu hiszpanskiego)/
Sólo para hablar, solo se sentía sola /Tylko zeby pogadać. tylko czuła się samotnie/
porque Sebas se marchó de vuelta a Buenos Aires. /Ponieważ Sebas pojechał z powrotem do Buenos Aires/
El dinero se acabó, ya no hay sitio para nadie. /Pieniadze sie skonczyly, juz nie ma miejsca dla nikogo (przy Marcie?)/
Dónde empieza y donde acabará /Gdzie sie zaczyna i gdzie sie skończy /
el destino que nos une y que nos separará. / przeznaczenie ktora nas jednoczy i nas rozdzieli /

Yo estoy sola en el hotel, estoy viendo amanecer. /Ja jestem sama w hotelu, patrze na świt/
Santiago de chile se despierta entre montañas. /Santiago de Chile budzi sie pośród gór/
Aguirre toca la guitarra en la 304. /Aguirre gra na gitarze w pokoju 304/
Un gato rebelde que anda medio enamorao /Krnąbrny kociak, łazi na wpół zakochany (konia z rzedem kto wie o co tu chodzi)/
de la señorita rokanroll, aunque no lo ha confesado, /w panience rock'nrollowej, chociaz tego nie wyznał/
eso lo se yo. /ja to wiem!/

Son mis amigos, en la calle pasábamos las horas. /To moi przyjaciele, na ulicy spędzaliśmy długie godziny/
Son mis amigos, por encima de todas las cosas. /To moi przyjaciele, tak na przekór wszystkiemu /

Carlos me contó que a su hermana Isabel /Carlos opowiedział mi, że jego siostrę, Isabel/
la echaron del trabajo sin saber porqué. /wyrzucono z pracy nie wiadomo dlaczego/
No le dieron ni las gracias porque estaba sin contrato, /ani jej tego nie wynagrodzono bo pracowała na czarno/
aquella misma tarde fuimos a celebrarlo. /i tego samego wieczoru poszlismy to opić/
Ya no tendrás que soportar al imbécil de tu jefe ni un minuto más. /Już nie będziesz musiała znosić swojego szefa-idioty ani minuty dłużej/

Son mis amigos, en la calle pasábamos las horas. /To moi przyjaciele, na ulicy spędzaliśmy długie godziny/
Son mis amigos por encima de todas las cosas. /To moi przyjaciele, tak na przekór wszystkiemu /
Son mis amigos. /To moi przyjaciele/

Alicia fue a vivir a Barcelona y hoy ha venido a mi memoria. Alicia wyjechała zamieszkać do Barcelony i dziś mi się przypomniała/
Claudia tuvo un hijo y de Guille y los demás no se nada. /Claudia ma syna, a o Guille i pozostałych nic nie wiem/

Son mis amigos, en la calle pasábamos las horas. /To moi przyjaciele, na ulicy spędzaliśmy długie godziny/
Son mis amigos, por encima de todas las cosas./To moi przyjaciele, tak na przekór wszystkiemu /