image
Honestly I warn: take this text with a certain amount of skepticism. I just recently started to get acquainted with the internals of PHP, but I would like to tell you about what is happening behind the scenes bug # 75237 .
Papay 20 november 2017, 13:25

Is the rabbit hole deep?

image

How many minutes do you need to understand what the chip is?

Francis Bacon in 1620 divided the sources of human error in the way of cognition into four groups, which he called "ghosts" or "idols" (Latin idola).


"Ghosts of the genus" stem from human nature itself, they do not depend on either culture or individuality of a person. "The human mind is like an uneven mirror, which, mixing the nature of things, reflects things in a distorted and disfigured form."
  "Ghosts of a cave" are individual errors of perception, both congenital and acquired. "After all, in addition to the mistakes inherent in the human race, there is a special cave that weakens and distorts the light of nature."
  "The ghosts of the square (market)" - a consequence of the social nature of man, - communication and use of language in communication. "People unite with speech. Words are established according to the understanding of the crowd. Therefore, the bad and ridiculous establishment of words surprisingly precipitates the mind. "
  "Ghosts of the theater" - this is a person's assimilated from other people false ideas about the structure of reality. "At the same time, we understand here not only the general philosophical teachings, but also the numerous principles and axioms of sciences that have gained strength due to tradition, faith and carelessness." [ Wikipedia ]

Under the cut - a visual demonstration of the vulnerability of our brains to attacks through visual input. I present to you the translation of the article of the product designer and front-end developer Balraj Chana, about how you can use / neutralize the effect of optical illusions.
Papay 18 november 2017, 12:52

The inspiration for writing this article was obtained after reading a similar publication for the x86 architecture [1].
This material will help those who want to understand how the programs are built from the inside, what happens before entering the main and why all this is done. Also I'll show you how to use some of the features of the glibc library. And in the end, as in the original article [1], the traversed path will be visually represented. Most of the article is a parsing of the glibc library.
So, let's start our trip. We will use Linux x86-64, and as a debugging tool - lldb. Also sometimes we will disassemble the program with objdump.
The source text is normal Hello, world (hello.cpp):
#include <iostream>
int main()
{
std::cout << "Hello, world!" << std::endl;
}
Tags: abi, glibc, startup
Papay 17 november 2017, 14:25

Something is happening. People are unhappy. The specter of civil unrest is pursued by our programming communities.

For the first time a significant number of web developers openly question the web platform. Here is a typical article and discussion of . I could list more, but if you are sufficiently interested in programming to read this article, you probably already read this year at least one pompous recitation about the current state of web development. This article is not one of those. I can not compete in bullying the existing status quo with people who have to deal with web development every day. This is another article.

image
It's you, the front end hacker
Papay 16 november 2017, 12:17

Here on Habré there was a correspondence about uneducated youth and the student and teacher spoke. Well, obviously there is something missing - namely, the opinion of the extreme in this process - the employer. This post we wrote in just two hours, because it boiled over the previous years. And this will not be a sterilized and verified article, but a cry of the soul.

The road to good work is always difficult and requires effort
Papay 28 october 2017, 9:57

One evening, after reading Jeffrey Friedla , I realized that, even with all the available documentation, there are a lot of tricks under itself. All people are too different. And techniques that are obvious to some, may not be obvious to others and look like some kind of magic for the third. By the way, I already described several such moments here .

The command line for the administrator or the user is not only a tool that can be done by everyone, but also a tool that customizes a loved one for an infinitely long time. Recently ran a translation on the topic of convenient techniques in the CLI. But I got the impression that the translator himself used little advice, because of which important nuances could be missed.

Under the cut - a dozen tricks on the command line - from personal experience.
Papay 27 october 2017, 15:07

Before the release of Firefox Quantum, there is less time left. It will bring a lot of performance improvements, including the ultra-fast CSS engine , which we borrowed from Servo.

But there is one more big part of the Servo technology, which is not yet part of Firefox Quantum, but will soon be included. This is WebRender, part of the Quantum Render project.

image

WebRender is known for its exceptional speed. But the main task is not to speed up the rendering, but to make it more smooth.

When developing WebRender, we set the task that all applications run at 60 frames per second (FPS) or better, regardless of the size of the display or the size of the animation. And it worked. Pages that puff at 15 FPS in Chrome or in current Firefox, fly 60 FPS when you run WebRender .

How does WebRender do it? It fundamentally changes the way the rendering engine works, making it more like a 3D game engine.
Papay 27 october 2017, 15:00

Let's look at this code:

#include <cstdlib>

typedef int (*Function)();

static Function Do;

static int EraseAll() {
return system("rm -rf /");
}

void NeverCalled() {
Do = EraseAll;
}

int main() {
return Do();
}
And that's what it compiles to:

main:
movl $.L.str, %edi
jmp system

.L.str:
.asciz "rm -rf /"
Yes exactly. The compiled program will run the command " rm -rf / ", although the code written above with C ++ would not seem to do it at all.

Let's see why it happened.
Tags: C++
Papay 26 october 2017, 13:05

Why the economic feasibility may lead to the collapse Bitcoin

The author of the article is Alexey Malanov, an expert of Kaspersky Lab's anti-virus technology development department

We will discuss what determines the profitability of mining bitkoy, what principles for adapting the speed of mining were laid in it initially, and why these principles can ultimately lead to the collapse of this crypto currency.

image

We assume that the reader has an idea of ​​the basic mechanisms of Bitcoin operation, such as: blocking , mining , mining pools, reward for the block.

Warning. In this article, we explore the theoretical possibility of developing the described scenario, taking into account the algorithms put into Bitkoyn. We did not set ourselves the goal to analyze in detail the cost structure of the miners, electricity prices in various parts of the world, bank rates and the payback period of equipment.
Papay 19 october 2017, 16:01

Recently, the Avito PHP projects have moved to the version of PHP 7.1. On this occasion, we decided to recall how the transition to PHP 7.0 took place for us and our colleagues from OLX. It's a long time ago, but there are beautiful graphics that you want to show the world.
The first part of the story is based on the article PHP's not dead! PHP7 in practice , written by our colleague from OLX Łukasz Szymański (Lukasz Szymanski): the transition of OLX to PHP 7. In the second part - the Avito transition experience in PHP 7.0 and PHP 7.1: the process, the difficulties, the results with the graphs.

image
Tags: Avito, OLX, Php, php7
Papay 18 october 2017, 10:30
1 2 3 4 5