Developers Club geek daily blog

Digit-by-digit sorting with a human face

2 years, 2 months ago
Despite popularity of algorithm of digit-by-digit sorting, it is difficult to find its decent implementation in the Internet in language C ++ (frankly speaking, I think, as in other languages too). Almost everything that is searchers, is terrible either in respect of a code, or in respect of efficiency. And both that, and another is most often bad.

The main error is that authors try to screw universality where it is not necessary, and do not provide universality where it is really necessary. As a result something that works slowly and what cannot use turns out.

It is possible for this reason many people still consider a porazryadka as the algorithm which is of exclusively academic interest and hardly applicable in reality. However, this delusion.

Read more »


Management of Tektronix oscillographs from the Visual Studio

2 years, 2 months ago
You face similar tasks seldom, however if it occurs, it is very pleasant to read exhaustive article which will help to begin quickly productive work, but not to puzzle whole put the questions "What to Download?", "Where to Find?", "How It in General Works?". At me the similar task arose within development of the automated stand for testing of payments. In the course of its solution there was a number of problems, and information on the Internet about it has not enough in view of narrowness of a problem. This article most in detail and capaciously describes highlights for quick start of work with Tektronix oscillographs from the Visual Studio.

Read more »


Atomic processing of data units without blocking

2 years, 2 months ago
Use of algorithms without blocking always was something frightening for the developer. It is very difficult to imagine data access arrangement without blocking so that two or more flows could not process the same data unit at the same time. Most of developers use standard containers like stacks or chained lists without blocking, but no more than that. In the same article I would like to tell how to organize data access in the multithreaded environment without blocking.

The main idea of such method is that each flow uses the separate buffer in which it copies data from the main buffer, processes them and then interchanges the position of the pointer on the buffer with the pointer on the main buffer.

Read more »


Declarative programming on C ++

2 years, 2 months ago
On Friday free evening was issued, such when there are no urgent affairs, and not urgent to do laziness and there is a wish for something as a hobby. As a hobby I decided to look at some report of CppCon 2015 which passed slightly more than a month ago. As a rule reports alive at me never time is enough for video, but here everything so developed — there passed month, C ++-17 already on a nose and conference had to be interesting, but nobody wrote anything about it yet, and here also evening free. Generally I fast stuck with a mouse into the first heading which drew attention: Andrei Alexandrescu "Declarative Control Flow" also pleasantly spent evening. And then decided to share free retelling with a habrasoobshchestvo.

Read more »


The protected TLS connection with use of Boost.Asio and OpenSSL under Windows

2 years, 2 months ago

Introduction


Once I needed to create a secure channel of communication between the server and the application. I remembered that to Boost Asio was mentioned in documentation that it can work with the protected connections, using OpenSSL. I began to look for information on this subject, but, alas, little found, especially under Windows. So now, having dealt with this question, I decided to write this instruction that it was simpler to other people to understand.

Read more »


Small OS from scratch on C ++ and the assembler

2 years, 2 months ago
At once I speak, do not close article with thoughts "Pancake, one more Popov". It has only a pinched Ubuntu, and I have all from scratch, including a kernel and applications. So, continuation under a cat.

Read more »


Design and evolution of language C ++: excerpts

2 years, 2 months ago
In comments to transfer "30 years With ++" were noticeable that not all stages of evolution of language are equally well-known, sometimes at all there is no idea of an origin and development of this or that element of syntax or the corresponding semantics. Perhaps, this note will possible to interest readers will address for a long time not the new book of the author of language for the purpose of forming of broader picture about C ++. The book tells as there was its development that exerted impact on this process and why the preference was given to one approaches instead of others.

Read more »


Sublime Text as IDE for ARM on the example of STM32

2 years, 2 months ago
image

In this article the instruction for creation of assembly of Sublime Text with additional programs which can be used as a development environment for microcontrollers, in particular STM32F10x will be stated. So, we are faced by a task to make by means of Sublime Text — IDE which includes: static analysis and autocompletion of a code at the time of its writing, system of creation of the project with the help of makefile, the compiler, a linkovshchik, a firmware of the microcontroller and debugging. Besides assembly will work without installation.

Read more »


The empire strikes back

2 years, 2 months ago
Дарт Вейдер - Единорог
Recently there was article "Hackathon 2: Time lapse analysis of Unreal Engine 4" in which it is told how having taken the Klocwork tool can find a set of errors in the Unreal Engine 4 project. I cannot pass by this article. The matter is that in due time we corrected all errors which were found in this project by the PVS-Studio analyzer. It is clear, that all errors but only found by the analyzer were corrected not in general. However article makes impression that the PVS-Studio analyzer passed too much. Well, now my course. I too again rechecked Unreal Engine 4 and found the mass of errors. Thus I can declare that PVS-Studio can find in Unreal Engine 4 new errors now too. Draw.

Read more »


Static analysis of printf-like of functions in Xi by means of libclang

2 years, 2 months ago
In comparison with many modern languages the Xi language often seems extremely primitive and unsafe. And one of frequent claims to language is the impossibility of access from a code to its internal representation. In other languages it is traditionally performed by mechanisms, like reflections, and it is quite convenient in application.

Nevertheless, with the advent of libclang, it is possible to write own analyzers and generators of a code directly to compile time, fixing rather big set of problems at early stages of work. The combination of instruments of static analysis of a vista shot (coverity, clang-scan), analysis tools for the specific project, and also discipline of writing of a code allows to improve much more quality and code safety, written on Xi. Of course, it will not give guarantees what haskell or even rust gives, but allows to optimize significantly development process, especially in a case when to rewrite the huge project in other language is an unreal task.

I would like to share experience of creation of a plug-in of static analysis of format argument for the functions similar to printf in this article. During writing of a plug-in, I had to rummage much in source codes and doxygen of documentation libclang therefore I considered useful to make some overview for those who want to step into this thorny road, but for the present it is not confident in expediency of a waste of time on collection of information. In article there will be no pictures, and even pictures of the vomiting unicorns, forgive.

Read more »