Threads are an illusion - asynchronous programming with boost::asio
This talk was recorded during the LWG Meeting in Cologne:
Threads are an illusion - asynchronous programming with boost::asio
by Chris Kohlhoff
September 13-19, Aurora, CO, USA
October 25, Pavia, Italy
November 6-8, Berlin, Germany
November 3-8, Kona, HI, USA
By Meeting C++ | Mar 13, 2015 03:17 AM | Tags: performance intermediate efficiency c++11 boost basics
This talk was recorded during the LWG Meeting in Cologne:
Threads are an illusion - asynchronous programming with boost::asio
by Chris Kohlhoff
By Anastasia Kazakova | Mar 11, 2015 08:00 PM | Tags: None
CLion is a new cross-platform IDE from JetBrains for C and C++ developers. And Biicode is a C/C++ dependency manager. This post is about a very simple and straightforward way to use biicode features together with CLion IDE to benefit from both.
When CLion met biicode
by Anastasia Kazakova
From the article:
CMake layout for the project is generated by biicode commands, after which you can open the project directly in CLion. You can resolve dependencies and install the missing libraries easily by using bii commands from the CLion built-in terminal (Alt+F12).
Take a short overview of the overall process and some available features...
By Mantosh Kumar | Mar 11, 2015 06:33 PM | Tags: None
This article talks about how modern C++ unique_ptr tool can be used to achieve exception safety.
Simplifying code and achieving exception safety using unique_ptr
by Marshall Clow
From the article:
The general pattern for this is:
unique_ptr<T> holder(new T{/* params */}); // set up some stuff that uses holder.get() holder.release();
By Adrien Hamelin | Mar 11, 2015 01:54 PM | Tags: c++11 basics
Quick A: Wrong!
Recently on SO:
Return a local object rvalue reference,right or wrong?
I see once return a local object,the compiler will take the return value optimization.(RVO,NRVO).
The part of the Standard blessing the RVO goes on to say that if the conditions for the RVO are met, but compilers choose not to perform copy elision, the object being returned must be treated as an rvalue.
So we just write code like this:Widget makeWidget() { Widget w; … return w;//never use std::move(w); }I never see somebody write code like this:
Widget&& makeWidget() { Widget w; … return std::move(w); }I know that returns an lvalue reference of local object is always wrong. So, returns an rvalue reference of local object is also wrong?
By Adrien Hamelin | Mar 11, 2015 01:50 PM | Tags: intermediate
Quick A: You need to create a stub.
Recently on SO:
Calling C++ Application Code from C library?
Folks, Assuming I have a c++ application / library running which implements say
/* Alloc API */ void* my_alloc(int size) { return malloc(sizeof(size)); }This is not under "extern c".
I have a C dynamic library from which I need to call my_alloc, can I directly call that API?
Like,
int test_my_alloc (int size) { int *x; x = (int*)my_alloc(size); if (x == NULL) { return 0; } else { return 1; } }
By Adrien Hamelin | Mar 11, 2015 08:00 AM | Tags: intermediate c++11
While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:
Hardening Your Code
by Marshall Clow
Summary of the talk:
Ok, you've written some code, and it seems to work. How can you be sure that it works? It's a busy, complicated, dangerous world out there, and software has to work in lots of different environments.
How can you gain confidence about your code? How can you make your code more reliable?
There are a lot of techniques available to developers today; I'll talk about several of them: Unit tests, static analysis, runtime analysis, fuzzing, decoding compiler warnings and probably others.
By Adrien Hamelin | Mar 9, 2015 10:17 AM | Tags: intermediate c++11
While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:
Creative Coding with C++
by Andrew Bell
Summary of the talk:
Realtime graphics, computer vision, hardware hacking, and audio synthesis are just a few of the crafts that fall under the banner term of "creative coding". In this session we'll talk about some of the creative projects putting C++ in places you might not expect it - everywhere from the Smithsonian's permanent design collection to robotic Coca-Cola dispensers on California beaches. We'll look at a wide spectrum of projects ranging from those of the "maker" community to commercial work from full-time professionals earning their livings in advertising and design agencies. And finally we'll take a look at how you can use the C++ you already know to jumpstart your own creative coding projects using the open source toolkit Cinder.
By Jordi Mon Companys | Mar 9, 2015 01:58 AM | Tags: intermediate
On Thursday the 26th of March at Tuenti's HQs in Madrid, Spain.
Sistemas Distribuidos con ZMQ y Google Protocol Buffers
By Blog Staff | Mar 7, 2015 07:19 PM | Tags: None
From a totally unnecessary blog (we beg to differ):
Stackless coroutines with Visual Studio 2015
by Paolo Severini
From the article:
I had been looking for some time now at the problem of implementing coroutines/resumable functions in order to have even in C++ something similar to what is provided by C#
await
andyield
statements. It turns out that -- unbeknown to me -- this is quite a hot topic in the C++ community...... stackful coroutines have a big disadvantage in the fact that fibers are very expensive... The new proposal (N4286) instead focuses mostly on a stackless implementation, and promises to be scalable to billions of concurrent coroutines...
By Blog Staff | Mar 7, 2015 06:11 PM | Tags: None
Because clear example code is a great motivator:
A quick tour of the Silicon web framework: A simple blog API in 85 C++ lines
by Matthieu Garrigues
From the article:
In late January 2015, I released the first version of the Silicon Web Framework. The documentation covers all the concepts of the library but does not contains a concrete example covering the needs of a real world application. In this blog post, I'll show how to write a such an application with the framework. Like most modern web apps, it relies on a database to store data, and sessions to authenticate its users.
The source code of this article is hosted on the Silicon github repository: https://github.com/matt-42/silicon/blob/master/examples/blog_api.hh ...