A Few Words About Reversible Computing
Written by Roman V. Dushkin
Today I would like to raise a topic that has recently become all the more relevant and interesting. At least, judging by all the increasing number of publications in this direction, the interest in it is really growing. I am talking about quantum computing, or, to be more accurate, about a model of quantum computations. Without going into details of the model, let’s take a look at one of numerous questions related to it. We are going to review reversible computing . Further discussion will be held with the use of examples written in Haskell. To my mind, functional programming is much closer to the model of quantum computations than any other type. Let me leave out the reasoning of my point of view. But to understand the model of quantum computations, we need a much more severe paradigm shift, than, say, a shift from structured programming to object-orientedIPv6 in Practice
Written by amarao
IPv6 for Cloud Servers Frankly speaking, the Internet lion’s share operates on IPv4. There are some living islands of IPv6 in Asia, plus several big sites, (such as google.com, facebook.com) respond via IPv6. But it’s better to use IPv6. The more websites will be ready to operate using IPv6, the easier and simpler conversion will be. Thus, it’s a relevant investment in the future. What does IPv6 mean for a particular cloud server from a practical point of view? IPv4 users will keep visiting websites that use IPv4 IPv6 users will be able to go to IPv6 server address only if this address is specified in DNS (AAAA record) Outgoing connections from a server to IPv4-only nodes will use IPv4 Outgoing connections from a server to the nodes with IPv6 and IPv4 addresses will use IPv6 addresses There’s an unofficial competition between Cloud server services and the Сloud storageApplication Porno or the Way to Find Secrets in Mobile Applications
Written by Alexey Troshichev
I have recently read an interesting article about a team of researchers that downloaded and parsed the Android Playmarket. Then they analyzed hundreds of thousands of applications regarding the presence of secret tokens and passwords. Since the result of their work concerned the analysis of decompiled code under Android only, I decided to write about a research I did a year ago. I performed it not for Android only, but also for iOS applications. By the way, this research became an online tool, but I’ll tell you about it at the very end, when its meaning becomes obvious. Also, I presented some of the mentioned above things at Zero Nights conference. So, here it goes… Stores are the main Goal There’re a lot of information about the manual analysis of mobile applications. There are also a lot of test methods and check lists. But the bigger part of theseJava 8 vs Scala. The Difference in Approaches and Mutual Innovations
Written by Ruslan Shevchenko
I was really glad to find out that my presentation about Scala and Java 8 was retweeted more than other similar content. That’s why I decided to make some notes and tell you about it. We are going to talk about the difference between Scala and Java and say why each of them is important. There are mutual innovations. Each language has borrowed something from each other. The question is: do you have to learn Scala if there is Java available? Definitely! The more languages you know, the more professional you are. If we ever ask a Scala engineer about the principal differences between Scala and Java, he will not tell you all the nuances of lambda functions and traits. Instead, he will provide the following example: Java public class Person { private String firstName; private String lastName; String getFirstName() { return firstName; } void setFirstName(String firstName) { this.firstNameYAWNDB. Time Series Database Written in Erlang
Written by Pavel Abalihin
I work at Selectel and a lot of our clients, who are leasing dedicated servers, require the information about traffic consumption. Cloud server users need statistics of hardware and network resources use. As for cloud storage users, they need downloads statistics. The simplest way to provide statistic data is plotting. There are plenty of software solutions for analyzing statistic data with further visualization. We have been looking for an appropriate tool with high performance as a basic requirement. But let’s begin with some theoretical information first. Some Theory Each chart of online activities reflects changes of some parameters within defined period of time (a month, a week, a day, etc.). To create a chart we should process some statistic material representing a set of “time-value” pairs in a defined time period. Such material is called time-series. There are quite many software tools for analyzing time series. They have oneA Point Localization in a Polygon
Written by Nikolai Ershov
I have recently come across a post dedicated to solving the task of locating a point in a polygon: there is a polygon (a closed broken line with no self-intersections) and we are to determine, whether the given A point is inside the polygon or not. You may wonder, how such purely mathematic task can be related to the theory of algorithms. But it actually can. Localization is a classic task in computational geometry (do not confuse with computer graphics). To begin with, look at the picture on the right that depicts a polygon of Peano curve type [1]. Try to tell, whether the red point is inside or outside the polygon. We are going to review a simple variation of the given task, when the given polygon is convex. (adsbygoogle = window.adsbygoogle || []).push({}); It is clear that if a polygon is a triangle or a quadrangle, thereBuilding a Minimal Convex Hull
Written by Nikolai Ershov
Since I have recently become interested in convex hulls, I decided to go on telling you about the algorithmic geometry. Today we are going to review the building of the so-called minimal convex hulls . Though the picture on the right provides an exhaustive explanation of what they actually are, you will find more formal definitions and two classical examples below. Minimal Convex Hull Notion Let the plane have a given finite number of A points. The hull of this set is any closed line H with no self-intersections, so that all A points are within this line. If H is convex (for example, any tangent to this line does not intersect it in any point), the corresponding hull is also named convex. Finally, a minimal convex hull is a convex hull of the minimal length (minimal perimeter). I have not checked (I guess it can be proved byErlang for the Little Ones. The Basic Syntax of Functions
Written by Victor Pikaev
Dear %username% , Let’s continue learning Erlang for the little ones. In the previous post we’ve reviewed the way of declaring functions and uniting them into modules. In this post we’ll consider the syntax of functions in details. The source code of all the examples in this post is here . Pattern Matching To begin with, let’s write a function that will greet a user and the welcome text will depend on user's gender. In the form of the pseudo code our function will look like the following: function greet(Gender,Name) if Gender == male then print("Hello, Mr. %s!", Name) else if Gender == female then print("Hello, Mrs. %s!", Name) else print("Hello, %s!", Name) end If we use pattern matching instead of the classic if then else construction, we can save plenty of the template code. That’s how this function will look in Erlang when using pattern matching: greet(male, Name)Randomized Binary Search Trees
Written by Nikolai Ershov
I have always been surprised by the contrast between the grace of the main concept of binary search trees and implementation complexity of balanced Binary Search Trees ( Red-Black Trees , AVL Trees and Treaps). I have recently looked through the “Algorithms” by Robert Sedgewick [1] and found a description of randomized search trees (I’ve also found the original [2]). It is just one third of a page long (nodes insertion, and one more page for deletion). There’s also a nice implementation of the operation on deleting nodes from a search tree. Here we'll talk about randomized search trees, their implementation in C++ and also results of a small author’s research as for these trees balance. Let’s Go Step by Step Since I am going to describe a complete implementation of a tree, we’ll have to start from the very beginning (professionals can skip several paragraphs). Each node ofWhat is grep and How do We Use It?
Written by Simple Admin
When reading some articles about Unix commands, I noticed that the examples provided in them were not practically useful. It turns out that we do not know how to use tools that are actually useful. Before that Three years ago I was asked to hold an interview with applicants for the position of unix system administrator. There were eight applicants, and two of them were top-rated at the freelance marketplace. I never require sysadmins to know configs by heart. I think that we can always become familiar with the necessary software when needed. Of course, if we are ready to read much and want to use system tools properly. Therefore, I asked the applicants to solve the following tasks: create a cron job, that will be executed every even hour and at 3 o’clock; print the processor information from /var/run/dmesg.boot file. To my surprise, none of them coped withKernelCare: Patching the Kernel On-the-Fly
Written by Andrey Yemelianov
As for today, we do not have to turn off and reboot a server with Linux operating system for months. But sooner or later, we’ll have to do it anyway. For example, to install kernel updates. As a rule, this procedure is a real pain for sysadmins. First of all, they have to choose time of the minimal user activity. They should also send out warning emails to all users in advance. Besides, there’s always a risk of an emergency when the server downtime can last for too long. There are also special programming solutions, with the help of which we can install patches and kernel updates without rebooting. As an example, we should name Ksplice – a product by Oracle Company, which is distributed under GPL v.2 license. It supports the following Linux distributives: Oracle, Linux, RHEL, Ubuntu (the desktop versions only) and Fedora. On the whole, KspliceGetting CSS Code in Order: Yandex Experience
Written by Beyond the Clouds
Hey there, I’m currently working at the front-end of a huge project – Yandex search results. As any other web project, we have a huge amount of CSS code and a considerable team interacting with it. When a lot of people write and edit CSS code with the help of various tools, it can become really complex and inconsistent. For instance, someone prefers writing vendor prefixes in one order, the other one prefers writing it in a different way. Some of them will use brackets round url, others won’t. When fixing some bug, someone could write, for example, position: relative at the beginning of the properties block without noticing that there’s already position: absolute somewhere between color and box-shadow . And he will keep wondering, why it’s not working. But despite the fact that we write the code in different ways, there’s a perfect order in our repository: CSSA Cheat Sheet for HTTP Libraries in C++
Written by tangro
Unfortunately, standard C++ library provides no tools for working with HTTP protocol. Therefore, when we want to run some REST service, parse a webpage or write a simple bot or web crawler, we always wonder which library is better and faster in use. Sometimes a project already uses some framework (or even several). But how do we create an HTTP request using available facilities? Not to get confused each time performing such tasks, I decided to make a cheat sheet with examples of HTTP requests in C++ using different libraries. I guess Kukuruku is the best place for keeping such cheat sheets. We’re going to take a look at the following libraries: WinInet WinHttp Casablanca Qt POCO wxWidgets Boost.Asio libcurl neon .NET (С++/CLI) IXMLHTTPRequest HappyHttp cpp-netlib WinInet Website: http://msdn.microsoft.com/en-us/library/windows/desktop/aa385483(v=vs.85).aspx Platform: Windows 95 and later Example #includeSome Useful and Interesting Things for Web Developers
Written by Kukuruku Hub
Dear %username% , I have recently come across several interesting and useful tools/libraries/events I would like to tell you about. DC.js This library allows creating great multi level/scalable cross-platform charts and diagrams providing instant feedback on user's...
What is Rust for?
Written by Dzmitry Malyshau
Rust is a system programming language. It runs blazingly fast, prevents almost all crashes and removes the ambiguities associated with sharing access to data. Mozilla developed it as a tool to create a new generation browser engine – Servo . Similar Facilities The given language definition sounds like a fairy tale, since the henceforth tools have always balanced between speed and reliability. At one point, C++, in which speed and facilities are compensated by constant access errors outside the allocated memory to the reclamated memory. Or the unexpected results of reading data that is being written in-parallel by another thread. On the other hand, there’s Haskell, a “stronghold” language (on the principle “since it compiles, it operates”), which can’t brag about speed, though. Somewhere in-between balance Java, Python, C# and other popular (due to their usability) languages. As for me, Rust is a successful crossing of the best C++Introduction to Elixir
Written by Kukuruku Hub
Who This Article Is For I would say that the article is mainly for people who already have an experience with some other programming languages, but they want to look around. Also, functional programming is a trending thing nowadays. So if you want to see what it actually is, welcome. If you...
Teaching the File System to Read
Written by kmu1990
What I’m Going to Tell You About In the previous article we constructed the environment needed to get familiar with the kernel. Then we took a look at loadable kernel modules and wrote a simple “Hello World!”. Finally, we wrote a simple and useless file system. Now it’s time to go on. The main aim of this article is to teach the file system to read from disk. For now it will read the operating information only (the super block and index nodes). Doesn’t seem like much, eh? The thing is that in this post we’ll have to define the structure of our file system – the way it will be stored on disk. Besides, we’ll also get familiar with SLAB and RCU. All of this will require some explanations – a lot of words and little code. Therefore, the post will be quite long. A Boring Beginning OurMasking a Class in Boost Graph. Part 3: Finding the Path
Written by Vadim Androsov
In the previous articles of the series we’ve reviewed the adaptive process of the square game field for concepts of boost graphs. Now we’ll consider the process of finding the path in the square field. Implementation of boost search allows adapting the algorithm quite accurately. In this article...
Masking a Class in Boost Graph. Part 2: Completing the Implementation of Concept Support
Written by Vadim Androsov
I’ll briefly remind you of the task. There’s a two-dimensional game field consisting of squares. Some of them are vacant and others are occupied. We should find a path through vacant squares from one field position to another one. We implemented the search algorithm in Boost . But it requires...
or