People say that is love what makes the world go around, and they are not too far from the truth. Because instead of time there is only love since we record each moment of lucidity with our minds, and think about things as we cling to them, in a level of love. To think about something to acknowledge its existence it’s a form of love to a certain degree. Time is an illusion where we constantly try to give numbers and order to everything around us, including the order of events. Time has even become even more artificial as we assign a certain amount of what we think are evenly spaced events called seconds in order to quantify the time, and we love this notion greatly as most of us use it without fail every day. But what is an event? An event is a moment of lucidity in wish we take the chance to acknowledge the existence of several things that we believe are happening together in unison. The reason we do this is no other than love, because we want to know, we desire to understand and to record this fleeting moment of lucidness as our own. Anytime we could just stop thinking, and not care about the entire world, maybe our body will then start giving signals as it needs something, but we really need to love our bodies in order to react to those signals, otherwise they would be nonexistent to us. So we have to desire the world in order to see it, we deep inside love what is around us, since it keeps us from the void of madness. And this is why every event is nothing else that love toward the things we believe are around together in an abstract concept we call time. But how can we love the horrible things that happened around us? Why don’t we ignore them? Well as we see them happened to others and to us, we do love them, yet we attach other feelings to those events to cloud what they really are, just moments of loving lucidity for us to explore and perhaps learn to love more, to exist more. If we didn’t acknowledged the existence of the world, the world would cease to exist for us, but because we love the world, it exists.
Love does make the world go round, without it there is only void.
Tuesday, September 15, 2009
About time and love.
Tuesday, September 8, 2009
Fatality of time.
Fatality of time... we live we suffer we give so much importance to our lives, and a few moments later, we have new worries, and the old ones are just memories, memories that slowly dissipate, as meaningful and meaningless as dreams, was it real? All I know is that I might have learned something, something I might forget or perhaps remember one of these days when I fall on the sweet embrace of nostalgia.
Sunday, August 23, 2009
A memory, a realization and a law
A memory, a realization and a law is all I carry in my brown leather bag. Two are blue and one is chrome to reflect the world it has become. One is a memory of a distant past, to teach me well, to teach me again, that happiness exist if hope is never lost. Another is a realization, a gift once forgotten, a sphere once lost, it’s the reminder that I can. And then comes the law, sharp and reflective to link the mundane with the divine, sharp and reflective a building block for the future. One is a shape of free forms, the kind to playfully lie in a person’s neck, lost in a distant sandy shore. Another is a marble, a piece of some mind, one that was lost in a rocky shore. Another is a cube of hard reflective stone, a link to nature’s solid grounds, hidden in an exchange of distant memories. A memory, a realization and a law is all I carry for now. But today is yet to end, and more lessons are to learn, to fill my brown leather bag.
Saturday, August 8, 2009
Firefox Bookmarks yayness
Ah a brand new morning for going around doing the same over and over again… well did you know that you could open multiple tabs in Firefox? It’s easy! All you have to do is go to your bookmark right click them and add select to open all in tabs, you can bookmark all your daily “to do”-s in a big folder and just open them all in a tabs so you can just go one by one doing what you need to do. Its better than searching for each of them links separately. So yay.
Wednesday, April 9, 2008
Make your code Smaller with Function Pointers and Templates
While programing we find ourselves with things we would need to write over and over again. Even tho copy paste is very friendly to use, it tends to make the code larger, and since we are bound to make bugs every now and then. Its not easy fixing hundreds of times in the same error, so most of us use functions. Functions are an essential part of programing when it comes to extremely complex algorithms, but sometimes functions aren't enough and we still end up writing the same processes over and over again. For example we might have a common process, lets say we have a simple loop (of course a simple loop is simple but for the sake of explaining lets use a loop) so lets say we have something like this
void primary_process(int beginning, int times)
{
int x;
for (x=0;x<times;x++)
cout << beginning + x << " ";
}
yet as we keep on programing we notice that we use that loop a lot of times, the only thing that changes is the formula that we use on the number. So we could write yet another function with the same loop.
void primary_process_multiply(int beginning, int times)
{
int x;
for (x=0;x<times;x++)
cout << beginning * x << " ";
}
But that would be writing the same loop function once again. What we can do is use a function
int sum(int a, int b)
{
return a+b;
}
int multiply(int a, int b)
{
return a*b;
}
once again this functions are extremely simple but in a real programing environment functions could take hundreds of lines. Now that we have this two functions lets use function pointers.
a function pointer can be declared like this
class (*function_name)(classes)
so if we whant to rewrite our loop function but using a function pointer we do this
void primary_process(int beginning, int times,int (*function)(int,int))
{
int x;
for (x=0;x<times;x++)
cout << function(beginning,x) << " ";
}
Now you must notice how I added a function pointer in the parameters the function will take, and then I used the function pointer like if it were a normal function. How we use this?
well here is an example
primary_process(1,15,sum);
cout << endl;
primary_process(3,14,multiply);
by writing the name of the function in the third parameter, I pass the function I want to use to the primary_process function
now its important to note that the function pointer must contain the same amount of parameters as the function it will point at otherwise it will fail to work.
Now we have made our code smaller and without duplicates. But what if another problem arises. Lets say we want to play those same processes but to other types, in our example we want to use characters too and also output characters. Well we could copy all 3 functions and make functions that get characters in them OR. Use templates.
look at this code.
template <class T>
T sum(T a, T b)
{
return a+b;
}
template <class T>
T multiply(T a, T b)
{
return a*b;
}
template <class T>
void primary_process(T beginning, int times, T (*process)(T,T))
{
int x;
for (x=0;x<times;x++)
cout << process(begining,(T)x) << " ";
}
by using templates in functions we allow it to take any type of class, it could be an integer, a character, even a custom class. of course there could be exceptions but I won't discuss them today. Yet this way allows us to use different types in similar processes now for using this functions I ran this example code.
primary_process('a',5,sum);
cout << endl;
primary_process('b',10,multiply);
cout << endl;
primary_process(1,15,sum);
cout << endl;
primary_process(3,14,multiply);
this returned.
a b c d e
b ─ & ê Ω L « ► r
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 3 6 9 12 15 18 21 24 27 30 33 36 39
In a larger programing environment we might use classes that need to go trough the same processes, and this processes might take hundreds even thousands of lines, and sometimes having duplicates of those processes will cause enormous headaches when debugging.
By using this methods we can have cleaner codes, and be able to change them fast in the future instead of going trough a all the copies of itself.
back to the code.
A step further in encryption
In an early post, Simple Encryption Methods, I mentioned 4 kinds of bitwise level operations that could be used to encrypt data. Between them was, mask, inverse, reverse and rotate. If you want speed its good to remember that the more complex the more processing time it has to be done yet it normally also means that it is more secure. Mixing several kinds of operations can be a good idea. if only you know the order it would be like the formula itself is a giant password. But also, if you want security its a good thing not to use the same process with each word, that would just generate an alternate alphabet that can be easily decrypted by using word associations. So you need to vary your methods in a way a pattern its difficult to recognize. So we start by mixing the methods. We need a formula that tells what methods to use, so the lowest form would be, if the method will be used or not used. Also we can alter the order of the methods this can create a large amount of possibilities. But first we have to know, that when using this 4 kinds of methods the inverse one can be anywhere. And therefore should be used once.
Its easy to identify why rotate and reverse don't matter when you did the inverse (if before or after.
1100 rotated once 1001 and then inversed 0110
1100 inversed 0011 rotated once 0110
1100 reversed 0011 inversed 1100
1100 inversed 0011 reversed 1100
note that in combinations inverse and reverse will return the same, but this is not true for all values.
mask also have this property lets see at a simple test
1100 masked with 1010 is 0110 inversed is 1001
1100 inversed is 0011 masked with 1010 is 1001
this has been tested with all possible combinations and is true for all.
therefore we don't need to care about the position of the inverse only if it exist or not
inverse rotate reverse masked is the same as rotate inverse reverse masked and therefore is the same as rotate reverse inverse masked and therefore is the same as rotate reverse masked inverse.
Yet on further testing the position between rotate reverse and masked, does matter, So its a good thing to play with their order when building an encryption method. Also since the position of inverse doesn't mater don't go around making more than one inverse because two inverse is the same as no inverse.
Remember you can get creative with the formula of encryption a nice idea is to force an order of encryption, by using a formula that generates values for each letter that affect the way they are encrypted and by using the letter before as a value to alter the encryption. This way ensures that not only you need to know the method and the formula, but you need to encrypt in an order, and the encryption depends on the message itself making it hard to identify a pattern between two messages.
Tuesday, April 8, 2008
Lunatic Night Walk. The sea of darkness
So two weeks or so have passed since my last long walk, to keep my sanity I decided to take this next trip, this time, I knew where I was going. To my surprise things might be a bit misleading in the night, specially when you can't hear your destination or see it in the night. Once again I was talking in the cellphone with my good friend Gerson, who once again asked me to please don't go walking in the night. But since I don't want to reach the old age I didn't listen and went out of my house at 12:00 am
To my happiness the bar "El Colegial" was open at that hour so I used the only two dollars and 25 cents I had in my pocket to buy myself a nice Smirnof Green apple, before the long journey I was about to go. Not knowing how lost I was gonna get.
Because I am shush a good person and like to keep my island clean I decided to turn back and walk around the houses for a while so once I finished the drink I had a trashcan nearby to dispose it.
That done I decided to go out of the known area and take the unknown path. Near the end was when I began getting confused, what in Google map appeared as a street was actually a large metal bridge for people only. The metal planks made loud noises and bent down as I walked in them. But the river under it looked nice and calm. After that I made my first mistake, I tough I had to keep walking forward but I saw a guy standing in the middle of the empty street so I took a turn. In the way near the funerary I saw a strange light orb come out and hover into some bushes. Also found another strange guy standing in the middle of a street who I think asked me for money but I had none.
I found myself in the viaduct what just told me, I have made a huge mistake and I was walking away from my destination. So I took a turn and went into the next street. As I walked I notice a place full of people so I took a turn to a more solitary street were I saw a rather peculiar building that had the name Stealth in it and the drawing of a black angel in one side. finally I found a dead end and no sign of the sea. Even tho in the map it looks like I was so close to the sea I took a turn passed behind the bat and kept on walking some rather unused streets that belonged to some factories. later I found a bridge that was only for cars so I decided to walk back away from what I tougth was the good way. ending up in a rather strange neighborhood with old houses.
Creepy enough I got in the heart of those old and small looking houses where I saw a guy entering a house with a bicycle and his face was masked. Y took a turn away from him and ended up in a dead end, so I walked back and took another dead end so I just traced my steps back and went walking in front of another bar. back to were I came from but trough another street.
and when I finished walking I found myself in the street were I saw the first guy standing. So I began rethinking where I was and decided to take a turn toward the correct path. I ended up in a large bridge and I tough I was in the bridge I wanted to take in the first place so I walked back and ended back in the street with the black angel so trying to walk other streets just in case someone saw me didn't noticed I was lost I took a few unnecessary turns back to the bridge. The buildings there looked extremely old and the gates looked almost castle like. but I kept on walking.
Then I started looking in the direction the river went and I noticed that all that was over there was some rather heavy dark looking wilderness and the most nearer streets that went in the direction I tough was the sea was in another side of a highway, and there was no sidewalk there. But considering it was already 1 am in the morning in a rather solitary place I ran in the middle of the highway and not even one car passed. I was getting scared, I was passing near construction sights and no sign of the sea. No sound no wind just the distant bark of dogs. I was about to call Gerson who I told I was gonna call him so he could hear the sea, and tell him I had failed miserably and was now lost. But then I heard it, the sound of the sea, the beautiful sound of crashing of waves. I followed the street and saw some dogs barking at me, yet no sign of path to go there, I was thinking again to turn back. but then I notice an open green area that wasn't full of tall grass, and immediately called my friend. Happy with joy I finally saw the waves, the almost infinite plain of darkness, I was so overjoyed.
Under a nice tree I found a fallen tree that served perfectly as a seat and there I sat, for about an hour. Looking at the sea and meditating. While in there I saw some nocturnal birds running in the shoreline. Probably eating. Until I decided to leave.
I took the same path back, now looking at the map I notice I took a rather long path when I could have took a short cut, but the reason of this walks is not to get to places fast, is just to enjoy the beauty of the night. To go to places at hours no one goes, and experience the world without the pain of the sun. In the way I saw this guy coming from the University, for a reason I found him familiar, he looked almost like my friend, so after we passed each other I decided to look back, just to find out he was also looking back. But I kept on walking.
Passed in front of "El Colegial" wish was already closed, only the bartender was cleaning around.
and I got back home with a smile in my face and a large feeling of accomplishment, the waves still fresh in my mind, the beautiful sight of the moonless night, the blurry of the horizon like a lived dream.
4 sleeping pills
2 pain relievers
no casualties.

























