I want to be able to do this, but sadly I never will…
Bob Ross on twitch
The Hidden Secrets Inside Internet The Deep Web – Documentary 2015
Ezt találtam ma. Ajánlom mindenkinek aki nem akarja a homokba dugni a fejét…
(Csak másfél óra ebből a film)
Ahogyan röviden össze tudnám foglalni:
A story about Silk Road, cryptography and drugs…
and also another story about the death of privacy, government overreach, corporate interest, game of law and death of justice. 🙁
És hogy hogy mennyire rossz úton járnak a war on drugs hadjáraton, vagy hogy az mennyire nem az állampolgárok megóvását és a közbiztonságot szolgálja.
https://youtu.be/gOHb5Jua-mE?t=1h5m9s
Samsung Galaxy keyboard Input language slide selection not working
This is the second time I run into this:
Switching input language by taping (and holding down) the the space bar and sliding it left/right does not work on Samsung Galaxy Note 2.
So I decided to write a “Note to self” post, because fixing it is not at all intuitive.
Everything in the keyboard settings is set right, the problem is not there.
The problem is with some weird interaction with accessibility services.
The sliding language selector does not work if any accessibility service is turned on.
After switching it/them off it works like a charm. Switching any of them on breaks the keyboard…
There’s definitely some bugs here, cause when a service is turned on and the Accessibility panel shows it as on, after I tap it and the service page is showed the on/off slider is in off stage. I have to turn it on and then off to actually be able to turn it off.
It sure would be great if someone fixed that.
Vertical Video Syndrome
Vertical Video Syndrome – A PSA
Jon Stewart on institutional failure of journalism
Why Pascal is better than C
Or to be more specific, why is C bad.
I learnt Pascal before C, and Delphi before C++. So this might be just that. Meaning that my brain is damaged by Pascal 🙂
I’m also Hungarian and the sentence and phrase construction order is different than in English. And because you express your thoughts in language, it pretty much means that we learn to think in different order than humanoids brought up learning English. The order in Hungarian is from big to small. In addresses (country, city, street, number), time (year, month, day, hour, minute, seconds…), names (family name, given name), even in articles (what we want to discuss, and then the details), someone’s stuff rather then stuff of someone.
So this might also contribute to my insanity. What seems to me logical order, might be different for others.
So, Why is C driving me crazy?
There is a lot of reason for it, but for now just look at a simple example.
Lets move some memory around.
When I thing about moving, I think of “Let’s move this to somewhere”. (this, to)
And I would think when a messenger gets a delivery task to carry something, form somewhere, to somewhere that would be the order (form , to).
If I know “where from” then I can already start going that way to pick it up. That is how taxis work, they first only know where to pick up someone. That is also how the IP header is structured (Source IP Address, Destination IP Address).
It feels natural: from somewhere, to somewhere.
So when I want to move some bytes in the memory I would specify from where, to where, and how much.
And that is how Move in Pascal does it:
procedure Move ( const SourcePointer; var DestinationPointer; CopyCount : Integer ) ;
On the other hand memmove in C uses the opposite order.
void * memmove ( void * destination, const void * source, size_t num );
This just doesn’t feel right.
(Both can handle overlapping source, destination buffers, that’s why they are move and not copy.)
When you write in command line you also use source destination order (copy, cp, move, mv) [1]
PHP uses from, to order too. [2]
C#, .NET also uses source, destination order. [3]
You can find the same reversal in source and destination operand ordering in AT&T and Intel assembly formats.
Intel has dest = source order, while AT&T the opposite.
(It’s strange, I’m compelled to end my lines with a semicolon;)
Example: [4]
Intex Syntax | AT&T Syntax |
---|---|
mov eax,[ebx] mov eax,[ebx+3] add eax, 4 |
movl (%ebx),%eax movl 3(%ebx),%eax addl $4, %eax |
I like Intel’s syntax more. Because it resembles the assignment operator order:
eax = *ebx;
eax = *(ebx+3);
eax += 4;
And I know that it is the opposite order (dest, source) of Move, but I’m crazy like that…
But mov actually means: make this equal to that, (there is no actual moving from).
I think the order should always be this, that and here, there.
So if I call a function Move, than it should move from here to there.
But if I call a function MoveTo, then it might move to here from there.
(We could clarify by naming it MoveFrom or MoveFromTo (which sound awful), but the from, to order just seems natural to me.)
Next time I might write something about constructors. Till then you can also read my rant about arrays, and why are they suck in C, and rock in Pascal… 😉
Investigative journalism
I miss the Newsroom.
Investigating investigative journalism
But I’m glad John Oliver doing real reporting on the Last Week Tonight with John Oliver [Youtube]
Better voting system for elections
Single Transferable Vote