Developers Club geek daily blog

Framework for procedural macroes in Rust

1 year, 9 months ago

From the translator


Procedural macroes — one of the most expected Rust features. At the moment it is possible to write procedural macroes only under the unstable version of the compiler though there are several containers, like syntex, allowing to do a limited kodogeneration within the stable compiler. However it especially does not facilitate a situation as the interface to AST remains unstable, and though authors of syntex try to go in step with night assemblies, sometimes there are feyla because of changes in structure of AST.
In it the blog a post one of participants of core team — Nick Cameron — shared the vision of the future of procedural macroes. Though the post is complete of technical details on compiler interiors, it seemed to me that to a habrasoobshchestvo can be interesting to glance a little behind the scenes of development of Rust.

Framework for procedural macroes


In this post I will tell how, in my opinion, procedural macroes have to look. I already told about syntax in other post and when we publish API for procedural macroes, I will write a post and about it. I already described a number of changes in system of macroes so here I in something will repeat (partly contradicting last post), but I will disclose more details.

Read more »


Kaggle and Titanic — one more solution of a task by means of Python

1 year, 9 months ago
I want to share experience with a problem of the known tender of machine learning from Kaggle. This tender is positioned as tender for beginners, and I just had no practical experience in this area. I knew the theory a little, but almost did not deal with real data and densely did not work with a python. As a result, having spent couple of New Year's Eve evenings, gathered 0.80383 (the first quarter of a rating).



Generally this article for still beginners from already begun.

Read more »


Development environment: Redmine + Git + ownCloud

1 year, 9 months ago
This article appeared with the purpose to generalize quite long attempts to collect a convenient environment for work on projects. Undoubtedly, there is a set of services ready to provide similar functionality, but their use is not always convenient also for the different reasons, can be unacceptable. If there was such situation, hope, the configuration presented in article will be useful.



The scenario of use of this sheaf, it is possible to describe briefly as follows:

  • Files of the project are stored in Git repositories;
  • The repository contains settings, source codes and other files of the project which existence is convenient and admissible in a collective repository;
  • In a root cloud directory excluded in .gitignore in which through WebDAV ownCloud the folder, for other files is mounted is located;
  • Contents of Git of a repository are traced in Redmine project management system.


The plan of system deployment includes setup of the following services:

  1. OpenLDAP — the uniform account for all services;
  2. Redmine — start in Docker the container, creation and a binding of Git of a repository, LDAP authentication;
  3. NGINX — access to Git to a repository through HTTPS and LDAP authentication;
  4. ownCloud — LDAP authentication and assembling of the folder through davfs2.

Read more »


OpenOCD, GDB and (strongly) remote debugging

1 year, 9 months ago
It is given: there is a device, with ARM926E-JS (Cypress FX3) onboard. The device is on other continent. The device is connected (JTAG+USB+COM) to Linux to a computer. On a computer there is SSH access (more than nothing, only SSH port).

Problem: The device needs to be debugged and written under it a code. And to do it, it is desirable, conveniently.

Solution with use of OpenOCD, GDB and Qt Creator, and also the description of a way to it, under a cat.

Read more »


Creation of the type of an asset in Unreal Engine 4 and customization of a property bar

1 year, 9 months ago


My name is Dmitry. I am engaged in creation of computer games on Unreal Engine as a hobby. Today I would like to tell as in Unreal Engine to create the type of an asset and how to add an additional element on a property bar of an asset. So we will begin.

Read more »


Simple algebraic data types

1 year, 9 months ago
It is the sixth article from the cycle "The Category Theory for Programmers". The previous articles were already published on Habré:
0. The category theory for programmers: preface
1. Category: composition essence
2. Types and functions
3. Categories, big and small
4. Kleysli's categories
5. Works and koproizvedeniye

In the previous article basic operations over types were considered: work and koproizvedeniye. Now we will show that the combination of these mechanisms allows to construct many of daily data structures. Such creation has essential applied relevance. For example, if we are able to check base data types for equality, and also we know how to reduce equality of work and a koproizvedeniye to equality a component, then operators of equality for composite types it is possible to display automatically. In Haskell for an extensive subset of composite types operators of equality and comparison, converting at line and back and many other operations are automatically brought.

Let's consider in more detail the place of work and a koproizvedeniye of types in programming.

Work of types


Canonical implementation of work of types in programming languages is a couple. In Haskell of steam is a primitive designer of types, and in C ++ it is rather difficult template from standard library.
Pair
Strictly speaking, work of types is not commutative: it is impossible to substitute couple of type (Int, Bool) instead of (Bool, Int), though they also contain the same data. However work is commutative to within the isomorphism set by function swap, which back to:
swap :: (a, b) -> (b, a)
swap (x, y) = (y, x)

It is possible to consider such couples as different formats of storage of the same information as big endian and little endian.

Read more »


Erlang for web development (2)-> a DB and warm;

1 year, 9 months ago

In the first article we got acquainted with the Erlang and a framework of n2o. In this part we will continue to do our blog:
  • let's add authorization through Facebook, we will cause from the client for this purpose functions on the server;
  • let's save comments and posts in NoSQL to base;
  • let's unroll our blog on DigitalOcean and we will measure performance (a spoiler — 1300 requests per second).


At code from the articles https://github.com/denys-potapov/n2o-blog-example, the ready project it is possible to look to the address http://46.101.118.21:8001/.

Read more »


Perl 6 developers: language is ready to use

1 year, 9 months ago
image

On December 24 in the official blog devoted to news of development of Perl 6 congratulatory record appeared. Developers congratulated all on the coming Catholic Christmas, and on the fact that so long expected language growing, at last, took place. Actually, language is ready to use in detail designs, and developers promise more anything essentially not to change.

From the moment of an output of the first Perl version there passed 28 years, from the moment of an output of the Perl 5 version most popular at present – more than 20 years. As Larry Wal, the creator of language and the leader of its development jokes, the 6th version, perhaps, sometime and will replace the 5th – approximately in about 40 years.

The Perl 6 version was announced more than 10 years ago – on Amazon still it is possible to purchase the book about this "soon the language leaving", published in 2004. Duration of development can be explained with the fact that Perl 6 – actually the modern language written based on the 5th version. And though some claim what 6 differs from a 5-ka no more, than C ++ from C, after all the ideology in Perl 6 evolved rather strongly to call it more modern language.

Read more »


As the JavaScript market in 2016 will look actually

1 year, 9 months ago
image


Today on the website Mashable the curious article "To Become the Guru of Programming in 2016, It Is Enough to Master Javascript and to Move to Utah" about labor market of software developers appeared. This material creates very perverse picture of reality, and therefore let's understand together.

Short background. I am software developer and on an extent of several last years I happened to conduct repeatedly interviews with persons interested to join ranks of my colleagues. Besides, I trained the JavaScript developers in skills thanks to which they got a smart job. I have a decent experience in the field of creation and consultation of promising design teams of various startups and 500 successful companies.

I also often cooperate with recruitment agencies thanks to what I know firsthand that is wanted by the most hi-tech companies in the world. Being guided by own experience and what is told by my students, I can declare with confidence that I perfectly understand structure of labor market of JavaScript both outside, and from within.

Read more »


As we made Rich Text Editor with support of joint editing under Android

1 year, 9 months ago
рисунок
"Mobilization" of worker processes in the companies means that more and more functions for collaboration are transferred to phone or the tablet. For Wrike as cross-platform service of project management, it is important that the functionality of mobile application was absolutely full, convenient and did not limit users in work. And when there was a task to create Rich Text Editor with support of joint editing the description of tasks, we, having evaluated possibilities of the existing WebView of components, decided to go in the way and implemented own native tool.

Read more »