Undefined Behavior and Fermat’s Last Theorem
Written by Tyomitch
In accordance with the C and C++ standards, if the program leads to an integer overflow or any other “undefined behavior” (UB), the result of the program performance can be anything: it can post obscenities to Twitter or format your disk… Unfortunately, “Easter eggs” that would make the program...
Multitasking in the Linux Kernel. Workqueues
Written by Vita Loginova
Let’s go on talking about multithreading in the Linux kernel. Last time I told you about interrupts, the ways to process them, and tasklets. Since I’ve wanted it to be one article, I will refer to tasklets in the story about the workqueue, and assume that the reader is already familiar with them. Just like the last time, I will try to make my story as detailed as possible. Articles of the Series: Multitasking in the Linux Kernel Interrupts and Tasklets Multitasking in the Linux kernel. Workqueues Workqueue Workqueues are more complex and heavy entities, than tasklets. I will not even try to describe here all the implementation details, but I hope to review the most important things in some detail. Workqueues, just like tasklets, serve for the deferred processing of interrupts (but we can also use them for other purposes), but, unlike tasklets, they are run in theIntroduction to Machine Learning with Python and Scikit-Learn
Written by Alex Krot
Hello, %username%! My name is Alex. I deal with machine learning and web graphs analysis (mostly in theory). I also work on the development of Big Data products for one of the mobile operators in Russia. It’s the first time I write a post, so please, don’t judge me too harshly. Nowadays, a lot of people want to develop efficient algorithms and take part in machine learning competitions. So they come to me and ask: “Where to start?”. Some time ago, I led the development of Big Data tools for the analysis of media and social networks in one of the institutions of the Government of the Russian Federation. I still have some documentation my team used, and I’d like to share it with you. It is assumed that the reader has a good knowledge of mathematics and machine learning (my team mostly consisted of MIPT (the Moscow InstituteHow to Implement the Deutsch-Jozsa Algorithm in Haskell
Written by Roman V. Dushkin
We have already mentioned this algorithm when solving the simplest tasks in quantum computations . Let’s go on developing the framework and review the initial algorithm enhancement, named the Deutsch-Jozsa algorithm. It is another article in the series about the model of quantum computations. That’s why you’d better read the previous articles, as they will help you to understand all the things here. You should refer to the first three articles: A Few Words About Reversible Computing How to Implement Deutsch’s Algorithm in Haskell Quantum Circuit Design: Methods and Techniques Today you will find out about the way to build an oracle on the basis of the given definition of a binary function. We will build it not manually, like we used to before, but automatically. You will also learn how to understand the function type with the help of the only one oracle call. We will also carryMeteor. How to Build a TODO List
Written by Max Ovcharik
In this tutorial I don’t want to discuss why Meteor is the killer of the web, especially because I don’t think so and even like this framework. That’s why I want to show what to start with when developing applications on it. I’ll tell you about what packages there are and what Meteor is. I don’t have much experience in developing Web applications. I’ve been doing it for two years only, and I got to know Meteor only a few months ago. I should also warn you that the text is quite long, but the code is twice shorter than the text. I just want to share my experience with Meteor not for creating a simple example, but focus your attention on important things. Therefore, we are going to use plenty of external packages that simplify the process of development. And another warning: I used the following techniques forLock-free Data Structures. The Inside. RCU
Written by Max Khiszinsky
Today I will continue to introduce techniques that help to write lock-free containers. At the same time, I will advertise (hopefully not too obtrusive), my libcds library. We will talk about one more technique of safe memory reclamation for lock-free containers – RCU. This technique differs significantly from the previously discussed algorithms , such as Hazard Pointer. Read – Copy Update (RCU) is a synchronization technique designed for «almost read-only», meaning rarely changed, data structures. Typical examples of such structure are map and set , in which the majority of operations are search ones, i.e. reading data. It is believed that more than 90% of operations for a typical map are searches by key. Therefore, it is important that the search operation is the fastest; search synchronization is not really necessary– when there are no writers, readers can work in parallel. RCU provides the lowest overhead exactly for read-operations.Backdoor in a Public RSA Key
Written by Scratch
Hello, %username%! When I saw how it works, say that I was shocked is to say nothing. It's a pretty simple trick, but after reading this article, you will never look at the RSA as before. This is not a way to hijack RSA, but something that will make your paranoia greatly swell. So, imagine that you have access to the generator of an RSA key and you want to give someone the opportunity to get the private key without any factorization and other quantum computers. What we need to do? I'm going to use C#, BouncyCastle and Chaos.NaCl (this library implements Curve25519 ). 1). PRNG We need a PRNG which is initialized with a secret value. I'm going to use AES in CTR mode. using System; using System.ComponentModel; using Org.BouncyCastle.Crypto.Engines; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Crypto.Prng; using Org.BouncyCastle.Security; namespace RsaBackdoor.Backdoor { class SeededGenerator:IRandomGenerator { private readonly AesFastEngine _engine = newQuantum Circuit Design: Methods and Techniques
Written by Roman V. Dushkin
You are most welcome to read another article about quantum computing. Quantum circuit design is the analysis methodology, and a synthesis of quantum circuits that implement some or other algorithms (not only quantum ones). In a generalized sense, any computational process is represented in the form of a three (the input, the process of transformation, the output). Taking into account this consideration, the goals of quantum circuit design are: Forward analysis . Determine the output state, provided that there is an input state and the definition of a computational process. Backward analysis . Determine the input state, provided that there is an output state and the definition of a computational process. Synthesis . Build the definition of a computational process, provided that there are input and output states. Unfortunately, these questions are not really reflected in the literature about quantum computations. But they are extremely important. That's why I amAutomatic Algorithms Optimization via Fast Matrix Exponentiation
Written by Alexander Borzunov
Preface Hi! My name is Alexander Borzunov . This article is the translation of my original publication . Sharing my work with English-speaking community and happy to answer all the questions. Suppose we want to calculate a tenth million Fibonacci number with a program in Python. The function using a trivial algorithm will be calculating it for more than 25 minutes on my PC. But if we apply a special optimizing decorator, the function will give you the answer in just 18 seconds. (85 times faster): The thing is that before the program execution Python interpreter compiles all its parts into a special byte-code. Using the method I came across recently, the decorator analyzes the function byte-code and tries to optimize the algorithm applied there. You will see that this optimization can speed up the program not by a factor of n times, but asymptotically . The bigger theQuantum Dead End
Written by Kukuruku Hub
Several times I was taking part in arguments about the artificial intelligence, I was extremely skeptic. Referring to Heisenberg, I said that the human brain cannot be reproduced, recreated or duplicated. As you might have guessed, the reaction to such statements was always the same: denial. We live in a mechanical world. It happened so that the concept of science and technology as a universal way of solving tasks is one of the key paradigms of the public conscience in the 21st century (at least of the technically educated part of the society). People of mechanical intelligence think that the world is a huge machine/computer/mechanical system, in which any event happens according to some law or algorithm. As a rule, an average techie is far from fundamental science. But we are most likely to think that his mechanical ideas are based on the success of the modern science. InDouble-Typed Relations for Partial Data Representation
Written by Arseniy Zhizhelev
In the previous article about constructing types in Scala we’ve reviewed the idea of constructing types that are similar to classes. This allows to separate stored data from meta-information and emphasize representation of entities properties. But the mentioned approach turns out to be quite...
or