51

Re: Application field With ++

Hello, AlexGin, you wrote: AG> Here examples: AG> Computing, fashionable now the task ( ) applying a C ++ we receive result faster, AG> than it would be applying Java or C#: https://habrahabr.ru/post/183536 Hallo Alex! You that scoff? In this article there is nothing about . Not to mention C# and Java. Only time lost.

52

Re: Application field With ++

Hello, Berserk, you wrote: N>> Upon - it was accelerated. But there simultaneously and in large quantities the interior of many functions has been rewritten on SSE, AVX, NEON. Well that is it was accelerated not at the expense of a rewriting on With ++? No, not for the account. I also did not write, what for the account, you track conversation? I cannot still understand, how it was affected by a C ++? With ++ made possibility sharply to expand library with functions and algorithms, thus its usage became easier. Earlier the main data type was ugly IplImage with as which was to work inconveniently. Now it cv:: Mat (and not only, there a little different Mat). Not not clear  cvSeq, and std:: vector. Etc., etc. Smartpointery, interfaces, templates, an overload of functions. It was necessary to write a heap  the service code earlier, and began to describe probably practically only algorithm. And after passage on With ++ the active growth of library began, it became de facto the standard in the field of computer sight. Also it is an indisputable fact - Khronos in the standards refers to it too. Further interiors of functions actively correspond on SSE, AVX, NEON. The Nvidia by own strength does CUDA-versions of the majority of algorithms, Intel and  by own strength - OpenCL versions. Also the Nvidia does  under Tegru. It is all happened on my eyes, I used OpenCV from versions 0., something , something found and spoke to developers. And so before passage on With ++ the library was  a hand-made article from Intel with memory leaks, and after passage on With ++ became almost the branch standard. And even  IPP it was practically bent on its background and now it is offered free of charge as acceleration of some parts OpenCV. There and then: ccv, written on With, it was bent, though contained very fast implementations of many popular algorithms. The library dlib - this already on With ++, develops, in many areas competes with OpenCV. So in this area From library on all fronts gives way With ++ to libraries. As a whole it seems to me Pzz the rights about that what critical things on runtime it is necessary to write that in procedural style with usage of own data structures specially optimized under the task. In such approach, most likely, many possibilities With ++ will not be used. And I think that is not right. With ++ with its templates gives free abstractions, which frequently also faster. A vivid example - functors instead of pointers on function. Plus is more many enough difficult things, type of stabilizing of video. It something of type  which comprises a call of several algorithms (driving search, driving model, compensating, warp and fuse - I do not know how correctly to translate). And all these families of algorithms have a set of implementations, each of which depends on a dial-up of the parameters. And on With ++ the code using stabilizing, looks compactly enough and beautifully. ON About the same code was before bulky that the eye was simply lost in details, it was very difficult to make out algorithm behind a heap of a tinsel. Here in such places very often also there are errors. Or behind complexity of implementation the algorithm essence is lost. It would be possible on With to write it better? Yes, it is possible. But then it should to do manually all that already is in other language which on all fronts turns out better.

53

Re: Application field With ++

Hello, Berserk, you wrote: I Track, I will remind from what it began: K>> * video Handling in real time. And users want that was fullHD and not . I suppose, on pure Si. Difficult abstractions in such task are not necessary, and only are hindered. On With ++ it is possible to write, not , abstractions are necessary. And are necessary to all: ffmpeg, gstreamer, DirectShow - as without abstractions to build  with filters? It is difficult to me to make comments here on something as with OpenCV no business had. But it all the same looks as an error of designing of initial library. More competent experts then came and made all beautifully, and the C ++ here was already secondary, in my opinion. Here also is not present, development was continued by the same command, as earlier, they left Intel and based Itseez, and in 10 years Intel bought the company together with employees. Only there was rich community from the diversified developers: scientists, engineers, large corporations. Here about "frequently also faster" also it would be desirable to hear more in detail. Than the functor in respect of productivity is better than the pointer on function? That that can . And on With ++ in the same way it is necessary to write the data structures with the manual selection of storage. Standard means of a C ++ do not give sufficient control over that how and when storage is selected and it is very important for productivity. As all implicit calls of designers/destruktorov need to be traced. I will tell so, on With ++ to write a high-efficiency software will write even more difficult, than on Si because it is necessary to understand very well all that latent code which goes as "payment" for convenient usage. Examples in studio! The area of my competence suggests otherwise. Even the multimedia the driver in  were written on With ++.

54

Re: Application field With ++

Hello, PavelCH, you wrote: K>> * Trejding. Traders very much do not love when they press the button to buy, and  happens at the price which strongly differs from the price which they see on . Is still algorithmic , there all is much more rigid (there than 20 microseconds it already slowly). PCH> it do not agree. If to take  systems, such as amazon, which units in the world there it is possible. And that, With ++ it is too inconvenient in syntax. The logician should write on any  language. If it is a question of remaining systems besides, there is the same 1, Java. I meant not the Internet shop, and exchange trade. In certain cases here it is favourable (favourably) to write and to the logician on With ++. K>> * Toys. Not a tetris on , and present 3D games. Gamers love the beautiful drawing, and do not love when game . PCH> For today toys are favourable for developing with Unity. And there C# or JavaScript. Well, maybe, if it is necessary fast to let out any toy, it is really favourable. But all really abrupt (with an abrupt drawing) games are written mine on pluses.

55

Re: Application field With ++

Hello, Berserk, you wrote: N>>. On With ++ it is possible to write, not , abstractions are necessary. And are necessary to all: ffmpeg, gstreamer, DirectShow - as without abstractions to build  with filters? It is possible to write, but it is necessary to understand language subtleties very well. It nobody denies, language not the idle time. And can and not , and factors on it influencing can be not so trivial, depend on the compiler and so on. https://stackoverflow.com/questions/127 … ot-inlined I in course, therefore and on wrote a word "can". N>> Examples in studio! The area of my competence suggests otherwise. Even the multimedia the driver in  were written on With ++. Well here sketchy search from OpenCV: https://github.com/opencv/opencv/blob/m … p#L2039//! helper fields used in locateROI and adjustROI const uchar* datastart; const uchar* dataend; const uchar* datalimit;//! custom allocator MatAllocator* allocator;//! and the standard allocator static MatAllocator* getStdAllocator (); static MatAllocator* getDefaultAllocator (); static void setDefaultAllocator (MatAllocator* allocator); Is not present std:: vector anything that similar. Manual selection of storage. Once again I will repeat the thesis - it is possible to write and on a C ++, but it is necessary to understand very well cost of various constructions and the nobility when they should be applied and when there is no. And so far as concerns implementation of difficult algorithms such subtleties can hinder only. It also was the initial message of talk. In your code I do not see also a trace With, only With ++. Manual selection of storage through new is With? Ha-ha! Just your example perfectly shows advantages With ++. Examples of usage of Si: https://www.sqlite.org/src/dir?ci=c8186 … p;name=src https://github.com/python/cpython/tree/master/Parser It generally quite another thing, we now about handling of video and images speak.

56

Re: Application field With ++

Hello, Berserk, you wrote: N>> I in course, therefore and on wrote a word "can". It is the key moment. Then I did not understand a message. N>> in your code I do not see also a trace With, only With ++. Manual selection of storage through new is With? Ha-ha! Just your example perfectly shows advantages With ++. Was specific this piece as a matter of fact "Si with classes". Well, no. The class with , a heap of templates, etc. is With with classes only because there there are pointers? No, no, no, here With and close is not present. There is also an image processing: https://www.cairographics.org/manual/Not handling, but it is close. Also started it to write 14 years ago, still templates in With ++ were not. An example not strongly indicative. Is still ImageMagic - too on With, a piece abrupt, but too old cotton wool, years 30 already to library. And mentioned ffmpeg too is. To write on With it is possible, but as practice shows, on With ++ is easier. It seems to me we not absolutely we understand each other. My message what to write difficult algorithms is easier on pure Si. Nontrivial constructions of language here will hinder only to achieve the maximum productivity. We understand. I just also say that difficult algorithms to write on With ++ easier because it gives frequently free abstractions - the same templates. If it is not necessary, nobody forces to produce huge class hierarchies with a heap of the virtual functions which can squander productivity on speed and on storage. It is possible to take only a part of language approaching the task and to write.

57

Re: Application field With ++

Hello, Berserk, you wrote: Power of a C ++ not in the last instance just in standard library. If it is not used, the virtual methods that from With ++ are not used remains very little. Well here also it turns out that frequently suitable part of language is small enough, that is upon Si with classes "is used". That in the project the C subset ++ is used only, the used subset does not cease to be a C ++. In the given occasion so much clarification that allow to leave simply it here already have been given.

58

Re: Application field With ++

Hello, ksandro, you wrote: K> Serious , it would be desirable to hear more torn answer to what favourably to write a software for which response time (latency) and high performance is critical. K> for example: K> * video Handling in real time. And users want that was fullHD and not . K> * Trejding. Traders very much do not love when they press the button to buy, and  happens at the price which strongly differs from the price which they see on . Is still algorithmic , there all is much more rigid (there than 20 microseconds it already slowly). K> * Toys. Not a tetris on , and present 3D games. Gamers love the beautiful drawing, and do not love when game . But the most important market  in germanium is manufacture where in automation of processes latency is critical

59

Re: Application field With ++

Hello, Berserk, you wrote: N>> Well, no. The class with , a heap of templates, etc. is With with classes only because there there are pointers? No, no, no, here With and close is not present. Power of a C ++ not in the last instance just in standard library. If it is not used, the virtual methods that from With ++ are not used remains very little. 1. The standard library there is used everywhere. Any dial-ups of points, descriptors are transferred and turn out as std:: vector. Well and other pieces too are used. 2. The virtual methods? You it are serious? Show me though one virtual method in STL. Well here also it turns out that frequently suitable part of language is small enough, that is upon Si with classes "is used". Templates with an overload of operators certainly look is tempting in respect of implementation of the general algorithms for different data types, but in practice what that difficult types will demand all the same thin sharpening or optimization. Thus it is necessary to know very well With ++, and it often enough is not present in the scientific environment. Anything to itself it is small! All right, discussion to continue there is no sense because at us in a root representation that such With ++ varies. With with classes and the virtual methods are all somewhere till 2003. Further a principal counter there were templates and compile-time abstractions. I consider it as the present sign of presence in the code With ++ (modern With ++). These are powerful and free abstractions which just and allow to write the fast code.

60

Re: Application field With ++

Hello, PavelCH, you wrote: PCH> Good afternoon! PCH> interests where for today in manufacture of a commercial software favourably to apply with ++. If there is a possibility, describe application field and in two-three sentences a project/problem example that it was clear not only to the programmer, but also for example  to the manager. - units where high performance of the code is necessary. For example, very powerful sheaf Python + a C ++. I.e. do services on Python since it is simple, convenient, clear language for writing of such logic. And critical units implement on With ++ to receive productivity. Then these units pull from a python. Besides a profit that these units turn out small. In machine training such sheaf is now very widespread. - the driver. - normal business applications. Now such projects seem to me remains few, many minuses at such approach. So this niche fades. - applications critical on runtime. Databases, for example. If to you not so it is important  some clock periods of the processor, but speed of development and simplicity of attending is much more important further - it makes sense to look at all remaining:.NET, Java, Go, Python and so forth, etc.

61

Re: Application field With ++

Hello, Berserk, you wrote: N>> 2. The virtual methods? You it are serious? Show me though one virtual method in STL. If STL does not use the virtual methods it means that they are not the important tool of a C ++? By your words - yes. I can cite. It is possible and not to continue, if interest is not present. Templates certainly powerful and free, but in many cases it would turn out what to avoid excessive calculations it is necessary to be engaged in different nontrivial things of type expression templates. Whether whether a question in that it is possible to write the fast and effective code on With ++ and in that it is necessary to do it. Whether it is necessary to waste time on a language subtlety only for this purpose what the code was read (and only With ++ programmers) or it is necessary to spend this time for optimization of the algorithm? A question of priorities. Yes, costs. In the same OpenCV which involuntarily became an example of subject library on With ++, too is expression templates for matrixes. I can write readable expression for any mathematician of type: Y = A * X + B. And the right part will be fulfilled by ONE (!!!) specialized function. Here it also is application With ++ which refines understanding of the code, does it easier without damage to speed.

62

Re: Application field With ++

Hello, Nuzhny, you wrote: N> Hello, Berserk, you wrote: N>>> Well, no. The class with , a heap of templates, etc. is With with classes only because there there are pointers? No, no, no, here With and close is not present.> Power of a C ++ not in the last instance just in standard library. If it is not used, the virtual methods that from With ++ are not used remains very little.... N> 2. The virtual methods? You it are serious? Show me though one virtual method in STL. As a matter of fact it agree, but in standard library the virtual methods are, and in STL are not present.

63

Re: Application field With ++

Hello, PavelCH, you wrote:... That it was clear not only to the programmer, but also for example  to the manager. It  an impossible additional condition...

64

Re: Application field With ++

Hello, PavelCH, you wrote: pik>> I will add: practically everywhere in  R&D PCH> Research and Development - it is not absolutely clear why here apply With ++. Why not languages more  level? Generally with ++ - language of as much as possible high level for languages of general purpose (general-purpose), above only specialized languages for programming of special narrow tasks of type PowerBuilder, Oracle PL/SQL, etc. P.S. I spoke, the task will be almost impracticable.

65

Re: Application field With ++

Hello, Berserk, you wrote: it seems To me we not absolutely we understand each other. My message what to write difficult algorithms is easier on pure Si. And these algorithms will work only with void* without any check at a compilation and optimization stage. Nontrivial constructions of language here will hinder only to achieve the maximum productivity. No, With ++ gives the chance to transfer much more the information to the compiler for checks and optimization. For the sake of one RAII it is necessary to use With ++, instead of With.

66

Re: Application field With ++

Hello, Nuzhny, you wrote: N> With with classes and the virtual methods are all somewhere till 2003. Further a principal counter there were templates and compile-time abstractions. I consider it as the present sign of presence in the code With ++ (modern With ++). These are powerful and free abstractions which just and allow to write the fast code. It is possible to write the program with simple and expanded architecture on "a C with classes", and it is possible to pile templates and r-value reference which the author through a floor of year does not understand, without receiving any scoring. The first variant will be better.

67

Re: Application field With ++

Hello, Berserk, you wrote: Hello, Skorodum, you wrote: S>> And these algorithms will work only with void* without any check at a compilation and optimization stage. From what suddenly? How for With to write algorithm which supports the user data type? Can authors qsort in  libraries something do not know? S>> is not present, With ++ gives the chance to transfer much more the information to the compiler for checks and optimization. What it is is specific? Check of types, is more chance of embedding and other than optimization. Here a comparing example qsort and std:: sort. You can try itself. S>> for the sake of one RAII it is necessary to use With ++, instead of S.Napomnju a talk subject not that is better than a C or a C ++ and whether it is necessary to write difficult calculations (such as video decoding) on a C ++ and if yes, it gives what advantages. At least the code is more beautiful,  and is more indicative. Probability of errors because of static typification and the same RAII it is strong less. Possibilities for optimization - above.

68

Re: Application field With ++

Hello, Berserk, you wrote: I Will remind a talk subject not that better a C or a C ++ and whether it is necessary to write difficult calculations (such as video decoding) on a C ++ and if yes, it gives what advantages. Such subject implicitly assumes that usage of a C for difficult calculations is practice is direct  . Meanwhile this thesis at all is not obvious and not demanding proofs. Therefore it would be interesting to listen to arguments for why it is necessary to write difficult calculations on a C and what advantages it gives. Except for an argument "With ++ ".

69

Re: Application field With ++

Hello, Berserk, you wrote: - Si function to optimize looking in the assembler at what code generates the compiler easier - to profile easier, there are no implicit functions and the generated names - the code is more clear, there is no overload of operators - to profile usage of storage Except for, perhaps, overload of the operators easier, all list causes bewilderment. With ++ allows to write the same as and on a C, only thus provides big . Accordingly, if the code with usage of templates, exceptions and STL causes complexities in debugging, profiling and optimization it is possible to be restricted to absolutely scanty subset of a C ++. Losing, thus, it is very strong in speed of development. But benefiting in . S>> Except for an argument "With ++ ". And in vain, it is very important factor. In the scientific environment people waste better time on learning of new algorithm or on article writing, than learning of new difficult language which except quality of the code does not bring any special advantages. I.e. the C in which  a foot as easy as shelling pears also needs to strike permanently with low-level details, for people from a science is better, than Fortran or Pascal? Well OK if all indeed in such conditions, of course, there is no sense to waste time on C learning ++ and obtaining of buns from its usage. Possibly, to people from a science to write matrix_mul_store (c, a, b) instead of c=a*b, more customary easier.

70

Re: Application field With ++

Hello, Berserk, you wrote: It is all clearly, the majority of compilers now behind what exception that of rare platforms, compile as Si and With ++ the code so in it is not present a difference of basic. Here speech went about possibilities With ++ and how much they are necessary in this narrow area more likely. Once again: implicitly it is meant that here the C ++ is not necessary also to you it would be desirable proofs that the C ++  is necessary and useful. However, allow to ask a counter question: what for here it is necessary to a C in which there are no links, there are no name spaces, castes from void* to any other pointer type is fulfilled automatically, are not present enum class and enum easy mix up with int, a unique method to declare a kompajl-time a constant is to use #define, is similar and about a kompajl-time expressions (any constexpr functions)? I.e. the C ++ gives the chance to write at the same level, as a C, even without classes and templates, but thus to receive more buns and the big safety. And thus someone else asks, what advantages are at a C ++? Work to show that advantages are at a C, please.

71

Re: Application field With ++

Hello, Berserk, you wrote: Types and algorithms different happen. No means always it turns out to make algorithm which will accept the user types. Well here in it also there is a force of "correct" With ++: it superimposes minimum restrictions on user data, allows to change algorithms and data types independently from each other. That in a context of "difficult calculations" more than it is useful. I know that faster, std:: sort it is a favourite example of adherents of templates. Sorting is too primitive example. So on other examples all will be even worse for S.Mozhesh to take any algorithm from boost.graph to compare it to the implementation on With with support of the arbitrary data structures. If to aim it is possible to write  what sorting that of difficult type which will be much faster std:: sort Try Put not in complexity of type, and in possibility comparison operator embedding. In With ++ this possibility is better. The Probability of errors can and less but probability to write not the optimum code above. It is possible to substantiate this courageous statement with something or it is necessary to take simply a word?

72

Re: Application field With ++

Hello, Skorodum, you wrote: S> At least the code is more beautiful,  and is more indicative. Probability of errors because of static typification and the same RAII it is strong less. Possibilities for optimization - above. Matter is not in RAII and an overload of operators, and that mathematical algorithms badly lay down on an object model, in difference from models of typical data domains. Including in the real codec of video compression to the data of one objects all time access and change from others will be necessary, and it breaks all OOPs.

73

Re: Application field With ++

Hello, lpd, you wrote: lpd> Matter is not in RAII and an overload of operators, and that mathematical algorithms badly lay down on an object model, in difference from models of typical data domains. Including in the real codec of video compression to the data of one objects all time access and change from others will be necessary, and it breaks all OOPs. You to see want to retract the doctrine of Gradi Bucha there where it is not necessary. In With ++ there is that does writing of mathematical algorithms much easier, more pleasantly, and sometimes and more effectively, than on With, including RAII and an overload of operators. Classes here only auxiliary means, instead of end in itself.

74

Re: Application field With ++

Hello, Skorodum, you wrote: S> Hello, lpd, you wrote: S> you to see want to retract the doctrine of Gradi Bucha there where it is not necessary. S> In With ++ there is that does writing of mathematical algorithms much easier, more pleasantly, and sometimes and more effectively, than on With, including RAII and an overload of operators. Classes here only auxiliary means, instead of end in itself. The best expression of architecture by means of classes was the main difference of a C ++ from a C. And favor of matrix multiplication record  C=A*B only the esthetic. Considering that except matrix multiplication other matrix operations are actively used many, and multiplication can be fulfilled by different methods, mathematicians will not be  storage of syntax of an overload of operators.

75

Re: Application field With ++

Hello, lpd, you wrote: lpd> the best expression of architecture by means of classes was the Main difference of a C ++ from a C. To year in 1981 it is possible, but we that now in 2017. lpd> And favor of matrix multiplication record  C=A*B only the esthetic. Not only, here examples were already resulted where possibilities With ++ allow to do and the code faster and more safely. And even for the sake of this  favor it is necessary to use With ++ since the short and expressiveness reduce probability of errors. lpd> considering that except matrix multiplication other matrix operations are actively used many, and multiplication can be fulfilled by different methods, mathematicians will not be  storage of syntax of an overload of operators. Presence With ++ libraries for operation with matrixes refutes your words