Sunday, September 21, 2014

The present and future of brain-computer interfaces: Avi Goldberg at TED...

Writing music by hearing it in your head.

Communicating by telepathy rather than facebook.

Maybe real sometime soon.

Any tool can and will be used for good and bad.

Because technology advances, but human nature does not.

Mind control will become a bigger concern than rape or murder.

Friday, September 19, 2014

Playing with your phone. In these modern times every moment there's a chance , something will come to take you out of this hard long day. Parents would keep there child alive when he cannot breathe.
I would keep a dead body rotting in my living room and watch it everyday for the once or twice a year some latent nerve reaction makes it move.
This is what we call hope, and we prefer it to the long day in front of us .

Sunday, September 14, 2014

Potential revolution

We are fooled by easy tricks.
Growing up I learned how traditional societies thought of sex as bad\dirty,
and we that are more liberal\enlightened are more open to sex.
It seems sometimes ridiculous that this idea enables you to think of yourself
as liberal\enlightened\intellectual because you are obsessed with perverse sexual ideas.

What would really be revolutionary is perhaps the idea as it is in Buddhism,
that sexuality is actually a source of suffering.
Whether this is right or wrong, if it were true and I would really see this truth,
it is clear that it really would be a revolution.

A freedom, especially for men, from constant stress.

The stress, for most single guys, well at least for me, is unending.

Like in these reality shows like `the voice' , an endless sequence of tests to pass.
After each one a short moment of relief and exhilaration, and then coming back to the same stress.

-Will she be nice to me if I talk to her?
- Will she give me her number?
- Will she answer my message?
- She wants to meet for lunch, I can't make it to lunch. Will she want to meet at 16:30 instead?
Or is it ruined forever cause I can't make it to lunch?
- Will we actually meet at 16:30 or will something get delayed and we'll have to cancel?
Will that meeting I have before get prolonged and then I won't make it and then this chance will be lost forever?


50 tests later if miraculously they all passed.. you are having Sex!

If you knew that the end prize was nothing more than tension in your body,
getting you more and more addicted to this endless chasing, where if you look with a magnifying glass, there is not one actual moment of `making it', not one actual moment of contentment and satisfaction..

Then you would know it is not the end of the world if you meet today or tomorrow,
or in 2 weeks. It is not a matter of life and death If you kiss now, or in a month, or never.
cause in any case `success' is getting more addicted to this sexuality that is just a pair of handcuffs limiting your peace of mind, limiting your ability to enjoy life.

It would even the playing field. You can act around the hottest women like you do around your friend that is nice to get together with, but that you don't care much whether you meet today or next month.

But it seems like the male brain works in a way that you always feel, once I fulfill the sexual fantasy that is in my mind right now I will transition from this state of frustration to real lasting satisfaction.

Monday, September 08, 2014

std::move makes things f**kable

After spending sometime figuring out C++ 11 move semantics,
I wanted to write some semi-formal intuitions about it,
for anyone encountering bugs related to it.

(Google will bring you to more precise, thought-out descriptions than this one for sure)

The most important thing:
std::move(A) does not actually move A! it just tells the compiler - from now on
you can fuck with A.

How does it do this?
It turns A into the most insignificant type of creature in the world of C++.
The type of creature that does not even have a name...
This creature is called - an rvalue. r stands for `right' - not as in correct , but as in the opposite of left.

What are rvalues?
Think of the expression
i = 5;

any programmer is aware that i is something that exists, there  is a place in the memory
that the computer calls i, and that place can store a value.

But what about the 5 on the right hand side?
where was it before it got put into i?
It was in some temporary place in the memory that does not even have a name.
A place that the computer feels free to treat like shit.
Will the 5 still be there after it is put into i?
Nobody gives a fuck.
Nobody's looking out for that place.

This is what it's like being an rvalue.

Sadly, in the world it sometimes pays off to treat people, or variables, like shit.

Suppose you had an expression


The compiler would probably decide this means it has to copy all the data stored in B
and store this copy in A.

Suppose we don't care that much about what will happen to B after running this line.
We can tell the compiler - feel free to ruin B while running this line if it pays off.
e.g. if B contains a pointer to some large object, it would be very efficient
to have A point to the same object, and set B's pointer to null, rather than making
a copy of the large object.

A= std::move(B);
will encourage the compiler  to do this.

How does this actually happen?

I like to think of it like this.
Suppose you have a prison named `operator ='

In this prison the are 3 wards -
One for the rich prisoners where they can be sure nothing bad will happen to them.
One for the regular prisoners where, bad things may happen to them, but no one will intentionally
try to screw them over,
and one for the prisoners someone had it in for, and wanted to make sure they would really get screwed.

The entrances of the wards look in C++, respectively, like this

1.operator=(const object& B)
2.operator=(object& B)
3.operator=(object&& B)

The double && is a way to tell C++ - B is an insignificant little worm! (that is, an rvalue). Feel free to tear him apart while running this operator!

The well-known `const' on the other extreme is a way of saying -
don't you dare touch B!

using move can become crucial when dealing with the specie in C++ 11 that's on top of the food chain - the guy nobody can touch.. the Unique Pointer.

A unique pointer in a way, is even tougher than the untouchable const object.
As the name suggests, you cannot even make a copy of a unique pointer.
(This turns out to be extremely useful for preventing memory leaks)

The big mess is that, not only the unique pointer itself, but consequently any thing
containing a unique pointer cannot be messed with. For example, a vector of unique pointers
to String.

For unique pointers, std::move is a way for the gang leader (i.e. the programmer)
to tell the gang's representative in the prison (i.e. the compiler)
`This guy no longer has my protection, you can make him your bitch'

The thing is, the gang representative will hesitate about messing with the unique pointer
if he is not constantly reassured by the gang leader that the u.p really does not have his protection any more.
This hesitation will cause compiling errors.

For example,
Suppose you have a method containing a line
where B is a u.p the method got as a parameter.
You may think if I call the method with std::move(B) everything will be fine.
(cause a u.p cannot be copied, but it can be moved)
but that is not enough!Cause by the time you get into the method the compiler will hesitate
whether he can really mess with B,
and you will have to reassure him by writing again

This is worst when calling constructors, where for reasons I do not fully understnad
you need to use std::move(B) in the initializer list - by the time you reach the
start of the method it's too late to mess with B. (well this last part is not completely correct,
but I'm tired and it's late)

Tuesday, September 02, 2014


The weird list of 4 things that throughout years has consistently shown to have
a boost on my mood if I do them daily

-Avoid video - TV, youtube, ect.
-Avoid Masturbation.
-Hit on beautiful girls (oddly, this in itself has a more positive effect on my mood,
than having sex with them (in the rare occasions it ends up that way))
-Meditating 2 hours a day

I've been confused by this list.. cause there seems to be some kind of a contradiction between 3 and 4.
Cause it's kind of like taking one step in the direction of eliminating desire,
and one step in the direction of igniting desire.

Related to that , an analogy I had on tantra:
Think of 2 scenarios
1. You go into mcdonalds sweating in the middle of the day in shorts and a t-shirt
and get a Big-Mac

2. You go to a fancy restaurant, dressed perfectly, for a candlelight dinner, with
a wonderful woman who is also dressed amazingly. There is classical music in the background
and you have a wonderful view of the city from a window.
You are enjoying a tender steak of very high quality cooked by a gourmet chef.

You could say the second experience is more `spiritual' than the first,
but both experiences have at their core something that is non-spiritual  - eating meat.

Similarly, Tantric breathing exercises, postures, ect. can enhance the sexual experience,
and  given that you are going to have sex, why not indeed make it a special experience and a bonding experience with your partner;
but to say it is a spiritual practice when at it's core it's based on sexual desire -  the precise thing that spiritual practice is supposed to gradually dissolve, is misleading in my opinion.

btw If I had choose to #5 on this list it would probably be physical exercise , something I am only doing once a week lately, specifically Pilates in the last few weeks.

Anyway I digressed.
As for #2 on the list, for a long time I could keep it under control using a combination of meditation,
and this website
where you can define goals and even put money on the line.
But at a certain point I began to not take what I wrote on the site too seriously
(the credit card # I gave them also expired by the time I stopped meeting the goal, so didn't lose money)
But recently, Tim Ferriss created a community of guys trying to meet the no M goal -
actually he defined it as NOBNOM - no booze no masturbation, but I haven't been into alcohol for many years anyway -
turns out a lot of guys find this having tremendous positive effect.
This community of guys holding each other accountable has helped finally get back on the wagon
in the M category.
I recommend looking at the lift site.
This concept of choosing a few things that have positive effect,
and seeing the accumulative effect of doing the consistently (even ,say 85% consistently)
for months or years is simple and poweful..
and so different from the one I feel I was raised on by the media..
where most of the time it doesn't matter what you do,
but there are just a few critical moments, e.g., in Back to the Future where Marty's dad punches Biff
that determine everything.

Subconciously, this encourages us to spend most of our time doing nothing cause we think
all there is to do is watch TV and wait for that fateful moment when we open a car door and a guy is getting rough with the girl of our dreams, and we have to save our energy for that one punch we'll have to deliver.

I really like the phrase `Luck is when preparation meets opportunity'

Monday, September 01, 2014

I try to build a whole world from a few words you've given me.
 I'm hanging on a distant echo trying to hear what seemed so pure and right.
 And no matter how much time passes, when I start to listen a huge wave comes towards me. One particle containing the whole universe.
Poking at it, thinking it is small and weak now, it answers back, almost screaming:
You cannot deny this bond!!
It's power hasn't gone anywhere, just because you tried to forget it.

Blog Archive

About Me

My photo

Hi! I am a computer science postdoc. For some reason google is not finding my new homepage so I added a link from this profile