News for hackers. Stuff that matters.
Re:Writing high-performance servers in modern C++ by SeanDav on Sunday January 10, 2016 @11:34AM (#10875864)
I don't understand the point of saying something like:

> "I show how to build a modern C++ high-performance, asynchronous echo server that can be written with just 48 lines of code."

The fact that it is 48 lines of code is almost meaningless. If the framework was a different design it could be done in 1 line of C++ code or 1 line of COBOL. Given the right library/framework, any application can be done with 1 line of code (taking a bit of poetic licence here, but hopefully you see my point).

As a discussion about using Wangle in C++, the article has far more merit.

Perhaps I am just being overly pedantic.

Re:Writing high-performance servers in modern C++ by BinaryIdiot on Sunday January 10, 2016 @12:05PM (#10876004)
> The fact that it is 48 lines of code is almost meaningless. If the framework was a different design it could be done in 1 line of C++ code or 1 line of COBOL. Given the right library/framework, any application can be done with 1 line of code (taking a bit of poetic licence here, but hopefully you see my point).

I think it's fine to state that; are you ever going to write C++ code with zero included libraries? Probably not. If you write some string manipulation code and you boast that you did it in 10 lines are you going to count it against them that they included std::string?

I think saying how many lines of code it took, using the Wrangle framework, shows that it can be powerful and easy to use versus many of the libraries you end up seeing in C++.

Re:Writing high-performance servers in modern C++ by such_a_casual on Sunday January 10, 2016 @01:35PM (#10876460)
I agree that a more fitting line would have been, "I show how to build a modern C++ high-performance, asynchronous echo server using Facebook's Wangle (which comes out to be only 48 lines of code).

However the TITLE OF THE ARTICLE is "Writing modern C++ servers using Wangle." Furthermore, the author states that he's using that framework almost immediately after the statement you quoted, so I really see nothing to complain about. It would be more of an issue if the author led with a huge introductory paragraph or click-baity title that failed to mention the library she or he is using.

Knowing how many lines it took for the author to implement the server in the Wangle framework is very relevant to the reader.

Re:Writing high-performance servers in modern C++ by mentos on Sunday January 10, 2016 @12:05PM (#10876005)
If those frameworks/libraries are battle tested and not one off solutions for the project then I do think it has merit.

Imagine building an overpass out of 3 prefabricated concrete pieces; two columns that serve as the base pedestals and 1 beam that spans them. The 48 lines of glue code to me are the nuts and bolts used to tie the pieces together. If the nuts and bolts are structurally sound then I would say our overpass has merit..?

Re:Writing high-performance servers in modern C++ by ape4 on Sunday January 10, 2016 @12:02PM (#10875993)
I agree. Especially because this sort of code seems to be the whole purpose of this framework. I would expect it to take fewer LOC.
Re:Writing high-performance servers in modern C++ by ofrobots on Sunday January 10, 2016 @02:13PM (#10876659)
> 1 line of COBOL

Offtopic, but this would be quite a challenge.

Re:Writing high-performance servers in modern C++ by userbinator on Sunday January 10, 2016 @12:07PM (#10876012)
I'm far more interested in what those 48 lines of source actually compiles to, or how much framework code is involved. I've found that the more of the latter there is, the more difficult debugging tends to be.
Re:Writing high-performance servers in modern C++ by cbsmith on Monday January 11, 2016 @02:33AM (#10879386)
> The fact that it is 48 lines of code is almost meaningless. If the framework was a different design it could be done in 1 line of C++ code or 1 line of COBOL.

Yes, you can optimize it to whatever, but the point of mentioning that it is only a small number lines, it informs the reader they aren't going to get lost in a tone of code.

Re:Writing high-performance servers in modern C++ by imh on Sunday January 10, 2016 @05:35PM (#10877555)
48 lines is totally relevant. If I'm coming into the article and thinking, "Oh god, C++? This is going to be a mess," then seeing that it's only 48 lines is a great hook.
Re:Writing high-performance servers in modern C++ by hnbro on Sunday January 10, 2016 @05:13PM (#10877474)
it may not be an information-dense sentence, but it is merely a single sentence. one which you've isolated from it's context.
Re:Writing high-performance servers in modern C++ by SeanDav on Sunday January 10, 2016 @05:37PM (#10877563)
It is the direct TL;DR quote from the Author himself, given prominence with blank line separators, italics, bold prefix and located near the very start of the article, so hardly out of context.