Thursday, December 07, 2017

Why why why is a soft fork so much better than a hard fork?? Jesus, I can't understand these bitcoin core people. Why is it so much better that you prefer to overcomplicate the code to achieve something simple just so it will be technically a soft fork?

It's so lame. You can always write "valid" where the old nodes are looking and implement a completely different logic elsewhere;  and for this you pat yourself on the back and say "we managed to do it with a soft fork!"?

What do you gain? more nodes that say "valid" no matter what?  You could add a million of those whenever you want.

And anyone who wants to split an old node from the network just sends it a transaction that is valid in the old rules but not new.

Monday, January 30, 2017

If you're on ubuntu and ever have wifi connection problems #4 here did the trick for me

Wednesday, August 31, 2016

Some thoughts on blockchain technology

We want things to be incorruptible - an incorruptible government, an incorruptible and unbiased legal system, incorruptible private companies that behave strictly according to the rules they committed to.
But people are naturally corruptible, and naturally tempted to take advantage of a position of power..
and sometimes people are just bad at keeping track of the rules they should be following, not out of bad intentions, but just out of boredom and laziness or busyness.

A natural solution that comes to mind, sounding perhaps a bit like something from a science fiction story, is to have a computer program run a company, a bank, or the world?..or just start small and have a computer program enforce a legal contract between two people so that they would not have to worry about trusting the other.

As a side note, Uber was supposed to start using self-driving cars this week in Pittsburgh, so we are definitely living in the science fiction era.

As any one who has programmed has experienced, once a computer program is executed it will stick to the rules it was given, even when they have absurd consequences.

This was how roughly 150 million dollars were stolen in the DAO smart contract.

DAO stands for Distributed Autonomous Organization and this was the first large scale attempt to have a computer program run a company.

..but wait - you want to have a computer program be in charge to avoid corruption,
but can't the person in control of the computer just change or stop the program?

The solution to this is to use the whole internet as one big computer..
in a way that you can execute the next step of the program only if the majority of the internet, which we assume is not all colluding together in bad intent, agree that - yes, this is indeed the next line of the program.

The bitcoin protocol gave an ingenious way to have a vast number of computer work together without a minority among them being able to mislead the others regarding what the current state of the program is.

Monday, July 11, 2016

Spiritual practice is the practice of boredom.
Liberation is not necessarily the right for free speech, free sexuality,
free internet..but the right to be bored.
Say you saw a man or women running around all day, frantically performing
various tasks and errands that seemed urgent, although it was not always
clear if they were important;
and say every time he or she stopped to rest, for just a moment,
they were almost immediately whipped.
You might call that person a slave.
But, I know at least from my experience, that a moment without stimuli,
sitting with no movement, eyes closed, no smartphone, no food, no laptop,
is enough to get mentally whipped from within.
Are we whipping ourselves, or is it some demon from another world? That's
just semantics maybe..
Usually, we reach so fast for the smartphone or a piece of food,
that we don't even notice or remember it is to avoid the whipping.
But the counter-intuitive fact, that is forgotten again and again,
is that we are strong and our master is weak. When you keep sitting, just
feeling the lashes, resisting the urgent call ``new stimulus now!!', the lashes
grow weaker exponentially fast.
Within a few minutes you feel a bliss that evaded you all day when you
were running around trying to make everything perfect.
Why would there be bliss when doing nothing?
Suppose there was a huge ocean, and in that ocean a bottle.
Very quickly the bottle is filled with water.
And suppose that the water drops that got swept into the bottle started
thinking ``I am bottle''.
``I am a small fragile individual in this huge scary dangerous ocean''.
It would be quite stressed out, and it would even forget the basic reason
why it is stressed out, and blame its discontent on trivial matters
and disputes with other bottles.
But then..say after years of thinking this way,
the water drops had a glimpse of the truth
``Wait a second, we're just water drops that happen to be inside this bottle right now,
and if anything happens to the bottle, we'll just be water drops outside of the bottle..
so what's to be so worried about?''
Imagine, the relief a water drop would feel at such a moment.

Likewise, a few consciousness particles, in a sea of consciousness
particles, floated inside a temporary container,
and started thinking, I am this container.
But a few minutes with no stimulus are sometimes enough to feel -
nothing here but consciousness particles floating around.

Friday, March 04, 2016

Something I find very exciting. Much more than these silly gravitational waves (only physicists can spend a billion dollars to generate spikes on a graph ;) ).
The first Zero-Knowledge Contingent Payment was successfully carried out on bitcoin. Suppose I have some valuable information I want to sell you.
So we have a chicken and egg problem - I can either send the information first, and then you might not pay; or you might send the payment first and I will not send the information (I may be lying about having it in the first place)
Greg Maxwell, one of the main developers of bitcoin, described a clever method where either both things happen at once, or don't happen at all.That is, either both money and information changed hands, or neither.
You can think of the method roughly like this. The seller generates a digital key.
At first this key is useless. But then through a process involving the bitcoin network, and something called zero-knowledge proofs, this key is given the power to unlock doors to two rooms - one containing money that the buyer stored for the seller, and another containing the valuable information the buyer wants. Well, by this description you could think, the seller can now only unlock the door containing the money. But the way this is implemented, unlocking that door corresponds to publishing the key on the bitcoin network, after which the buyer can use the key to unlock the second door and get what he paid for.
In a recent conference, a contingent payment was used for the first time to buy a solution to a sudoku puzzle for 0.1 bitcoin - about 40 dollars :)

Tuesday, March 01, 2016

Raise the Bar

You can't improve what you don't measure, I heard once.
Many times in life there is a conflict between what's good in the short term,
and the long term, or even just slightly longer term.

Supposedly, some people are better than others at thinking about the long term.
But I think of it differently (intentionally oversimplifying): All humans are equally incapable of being motivated by anything except what feels good now;
but humans vary significantly on their ability to generate short term emotional rewards,
for performing a ``not fun'' activity that is good for the long term.

For example, while small kids rarely enjoy brushing their teeth,
by adulthood we can enjoy the physical sensation of cleanliness during and after the brushing.
Once we learn to enjoy it, the brushing does not really require `sacrificing the short term for the long term'.

I've been working with an app called Raise The Bar that helps me give myself immediate emotional rewards for positive long term behaviors.

Basically, each time you do the positive behavior, e.g., a push-up,
you get to press the up-arrow of the push-up bar on your app

You can define a daily goal you want to get to - like 35 push ups, or 2 hours meditation in my case.
Or you can just use a progress bar, that measures, say, from now onwards, how many pullups have you done in your life.
When you choose to use this progress bar, you can progress up levels, where each time you need to do more repetitions to get to the next level.
For example, 5 pull-ups suffice to go from level 1 to 2, but to get from 2 to 3 you'll need 10.

You can also use timers.
For example, I make a goal of spending a total of 1 hour cleaning the house each week.
Each time, I do a one minute mini-clean - taking out the trash, or picking something from the floor,
I activate the timer, and see my percentage go up a bit more towards the goal

You can track goals of avoiding certain things as follows:
You can track  ``days without activity X'', where I take X for example to be more than 60 minutes of non-work related internet, and for each day you managed to maintain that you raise the bar by one.
Then you can set a goal of, say, having at least 25 such days till the end of the month.

Yesterday, I went to the beach near my house,
got a (soy-milk) cappuccino,
went to the exercise area;
and did reps of 5 pull-ups, 10 push-ups, and 3-5 meditation

Having the constant feedback of pressing the up-button on the app, and seeing your stats go up makes it more fun.

Friday, February 19, 2016

Off topic, but my favorite GIT tips

You're not a real programmer until you've had a nervous breakdown by accidentally erasing your files with git,
or at least had a nervous breakdown from some other git-related reason.
But perhaps there is no point in 5 or more git-triggered nervous breakdowns.
My favorite tips, so I won't forget:

add all and commit in same line:
git commit -am "bla"

Note: Something I've understood while writing this. What is the "all" in "add all"?
All files in the directory? No! It's all files that are currently *tracked*.
As I understand, this means files you have added manually, i.e. used
git add filename
at some point in the past.
You can stop a file from being tracked by
git rm --cached filename
(If you don't use --cached file will actually be erased!)

change a commit name after you've called it ``fuck git'':

git commit --ammend -m "hug git"

Save before pulling! Otherwise this could happen:
You pull, before you've saved a file.
When you go back to the editor it asks
you ``The file has changed, do you want to save this one?"
Instinctively, you say yes..
Now git thinks your old file, contains newer updates than
what you've just pulled!
If you retry to merge, it will just give you your old file, cause it think it's newer..
actually wonder if someone had solution for this?

You've done a lot of nonsense, and just want to go back to state at last commit without saving anything:

git reset --hard.

You've done a lot of nonsense, commited it. You want to go back to the state you were in 2 commits ago, but want to save what you have cause some of this nonsense might be useful someday:

git branch wip
git reset --hard HEAD~2

To prove the point of this post - I did accidentally erase some work while trying the above lines:
After I created the branch wip, I assumed it had all my latest work. - but I did not *commit* before running the first line. So branch wip had my latest *comitted* work.
And when I ran the second line, my newest changes after my latest commit where erased for good as far as I know. arghhh    gotta be careful with that --hard flag
In this context
Save before any git operation!! or weird shit will happen!

You want to see what's different now compared to j commits ago (This *includes changes you've made you haven't committed to)

git diff HEAD~j

You want to see what's different in the latest commit, compared to 4 commits ago:

git diff HEAD HEAD~4

You just want to see  what's changes since you've last commited

git diff

You want to temporarily go back to the situation you were in 3 commits ago, without actually changing anything about the branches

git checkout HEAD~3

Stuff I've just learned: You want to go back to a commit, but without deleting the history, rather by adding a new event in the history that you have gone back:

Say you had commits titled

You've come to the conclusion you prefer to fuck git, but don't want to erase the memory of a nicer time. So you use revert as follows:

Now you feel like you just want to erase all the emotions you went through,
and leave only that first moment, so you use reset as follows

Warning: If you try to use git revert on complex projects. where there have been merges, weird shit happens that I am working on understanding

Tuesday, November 17, 2015

Too easy

Why do people like to be extremists? Maybe part of it is just laziness. If there is only pure good and pure evil, there is no need of mental effort to do good; no point in putting effort to try to avoid evil.

Thursday, October 29, 2015

Karma tales

I can't believe he's not calling me, and I'm sitting in this boring office,
and I've got nothing to do tonight but..
wait a second.. what's this?
What?? We're already recording?!
Yes. We're recording your average happiness level.
When you're done with this life, we'll send you to the next one according to your score.
What? When did you start?
Ohh.. the day you were born.
What?? So everything so far counts?
Didn't we agree you would only start recording when everything worked out for me?
Ahh.. not really.. though a lot of people assume that for some reason.
But it's totally not fair. How I am supposed to be happy before I get a relationship
with that guy I've been thinking about?
Well if I put a gun to your head and said do something that will make you happy now,
what would you do? Would you say `Ohh just kill me there's no way I can be happy now
without him'
No, I'd meditate, or work on one of my music projects, or math projects,
or call a friend, or give someone on the street a complement,
or volunteer at the meditation center, or write something creative,
or go dancing, or just smile at someone, or just take a deep breath and tell myself I'm awesome, or..
Well, then I'd highly recommend you start doing more of that stuff even without a gun to your head.. cause your numbers are not that great so far..
we're thinking of making you an elevator constantly playing `marry that girl' next time..
Ohh no that song has such shitty lyrics
..well being a higher power.. can you at least tell me when he'll call?
ohh sure.. it'll be next.. ohh sorry you're out of higher-power query karma..
what?? this sucks..

Tuesday, September 08, 2015

I'm watching the great move `inside job', about the US financial crisis.
Well by 50th minute it's a bit repetitive so not sure about the great part.
So many Jewish names in the movie. Is it anti-semitic? Or is this just what you get by an unbiased sample of leading figures in the financial industry?

There's an interesting analogy between finance and mathematics about
the value of abstraction.

We know that money is an abstract thing, that is made
very real by the collective human mind.
But it turns out the rapid growth of financial industries,
is by making even more abstract things real.

For example - derivatives.

Rather than the value of a currency\company -
the change over time of a currency\company.

This becomes a real thing you can buy on the stock market.

Maybe the more abstract a thing you can make the general public think
of as a real, tangible thing - the more you can leverage and control.
Because there's a bigger gap between what people perceive as how the thing
is and works, to what it actually is.
This gap, already exists when thinking of a bunch of atoms, as cells,
and than of a bunch of cells as a human.

But how much larger is this gap when looking at something like a financial derivative.

`They found - the part of the brain stimulated when these men make money,
is the same part that Cocaine stimulates'

The investment companies would, at the same time,
sell their clients mortgage packages, buy `insurance' derivatives that would go up if these packages
lost their value, and buy insurance in case the company selling the insurance derivatives - AIG - would go bankrupt

It seems everything is part of the system - you see a congress board questioning the bankers,
accusing them on TV `You knew you were selling your clients crap!' , and you see the CEO of a big company like Goldman Sachs mumbling an answer like an embarrassed child being scolded - and that makes you feel `OK, it is being taken care of. The power is indeed with the people' so I can continue just living my life and not worry about it.

They say people's interests as they grow from infants to teenagers to adults to being old
are peeing-> food -> sex -> money -> peeing.

Thursday, September 03, 2015

Scott Adams Connect2014 Keynote

Just bought Scott Adams' book: How to fail at almost everything and still win big.

He talks a lot about systems vs goals.

He defines a system to be something you do regularly that increases your odds of success.

He says focus on doing things that no matter what the short-term outcome of a specific action -

Did I get the job? Did I get the date? Did I prove the Theorem?

Put you in a situation where you have better odds of success in the future -

though you may not be able to predict where this success will ultimately manifest,

especially in today's increasingly complex, and getting more complicated at an increasing rate, world.

One nice example he gives: A friend who would go to interviews for jobs he didn't want just
to get better at selling himself. At the end of one of these interviews the interviewer said `well you're totally overqualified for this job; but the department manager just left and you'd be perfect for that job.'

A psychological positive side-effect of being system vs. goal oriented,
is that each time you follow the system - by going to the gym, going to the job interview,
you feel good: `I'm doing something right now that's making a long run positive impact on my life'
Whereas, with the specific goal in mind, you are almost constantly in `pre-success failure' -
as except for that small interval of time where, in the best-case scenario, you've achieved your goal
and are still enjoying the glow of victory before moving on to the next goal, you're feeling like you are lacking something.

This reminds me indirectly of how in Buddhism they talk about `The Dhamma that is good in the beginning, good in the middle and good in the end'.
That is, the true spiritual path should give fruit every step of the way, it should not be total misery
except when reaching Nirvana.

Sunday, July 19, 2015

Being a scientist of life,
rather than being dogmatic,
you see an experiment that goes against your intuition,
again and again.

Whenever you think of a time you got what you desired,
all you feel is a sense of lack of not having it now.

Even more than this, whenever you are in a situation
where your desire is fulfilled, the main thing you feel is stress.

But when you think of an act of generosity or kindness you did,
the good feeling is there forever.

And whenever you simply contact the present,
by being aware of your posture,
or being aware of a feeling on the body,
or being aware of a thought in the mind,
or being aware of your breathing,
or being aware of what you are hearing or seeing  at this moment,
rather than being immersed in your thought process,
you feel a stable, though not exciting, joy,
even though life is not how you dreamed it would be.

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