Posts (RSS)
-
Destructors are a terrible place to implement join()
Destructors are required to block the thread. They are not allowed to suspend execution (coroutines). They should not start new tasks without a
join()
to block. Exception unwinders are particularly sensitive to this requirement. -
a promise built on concepts
I have written a promise, a promise/future pair and a packaged_task/future pair on top of the Single concepts!
-
always push async values
The goal is of this post is to agree that; Single,
future.then()
and yes, even callbacks, all push async values from a producer to a consumer. After that, the claim - always push async values - should seem rather humdrum. -
Promise is a concept with many implementations
Perhaps one of the reasons that there are so many
promise
proposals is that each is an implementation of the same Concepts with different tradeoffs. -
C++Now 2017 report
This was my second time at C++Now. I was again amazed by the experience. The schedule allows for deeply technical 90min sessions interleaved with plenty of time for direct interaction with presenters and other attendees.
-
Track word occurrence by sentiment
-
Using an AzureML Webservice to get Sentiment
-
rxcpp observable as a coroutine range
The coroutine proposal is an exciting way to leverage the compiler to rewrite your code into a state machine useful for turning callbacks like
.then()
into sequential code blocks. Not only does it hide future syntax, but it naturally turns async code sequential without blocking a thread like.get()
does. -
Counting tweets
-
Rendering with 'Dear, ImGui'
-
Composing rxcpp and Range-v3
-
Flux Architecture in rxcpp
-
Parsing json documents from a stream
-
Calling the twitter stream API
-
Realtime analysis using the twitter stream API
-
rxcpp - moderncpp events as observables
Kenny Kerr (blog, twitter) has released the excellent moderncpp library. I wanted to apply rxcpp to handle async in moderncpp. rxcpp is cross-platform and can be applied to any UI event model and I hope to build examples for other c++ UI and Networking libraries as well.
-
rxcpp - parsing bytes to lines of text
I answered a question on StackOverflow. The question was for Rx.NET, so that is what I used in the answer. rxcpp has almost every operator that the answer required so I ported the answer to rxcpp and added it as an example.
-
User Defined Literal _idx and operator[] for tuple<>, pair<> and any<>
accessing tuple members
-
await in c++ - a bit on cancelation
When dealing with async, cancelation is essential. Cancelation is also really painful. Adding cancelation to
async_generator<T>
was just as painful as the problem space suggests. At times I have taken a break to addasync_observable<T>
and worked on some rxcpp issues and explored addingasync_generator<T>
support to Kenny Kerr’s excellent moderncpp library for writing modern windows apps in pure c++. -
SeeedStudio Grove unit mount
A couple of years ago I took a class on Rhino3D that included one print on a MakerBot. In the class I built an enclosure for a Cobra Sumo chassis (fingertechrobotics) and calculated the cost to build more parts at that maker house. The cost to print was so prohibitive that I never made another print there.
-
await in c++ - await, then yield, the next
async_generator<T>
implements a new AsyncRange Concept.begin()
and++iterator
return an awaitable type that produces an iterator later, whileend()
returns aniterator
immediately. A new set of algorithms is needed and a newasync-range-for
has been added that insertsawait
intoi = await begin()
andawait ++i
. A function that returnsasync_generator<T>
is allowed to useawait
andyield_value
. -
await in c++ - yield the next
The fibonacci example from Gor’s presentation (PDF, YouTube) is the subject of this post.
generator<T>
implements the Range Concept so it works with existing algorithms from STL and Rangev3 and therange-for
feature. It can be found in the headerexperimental/generator
. A function that returnsgenerator<T>
is allowed to use theyield_value
keyword (which evaluates toawait generator<T>::promise_type::yield_value(T)
). -
await in c++ - await the future
I will start with the sleep_for example from Gor’s presentation (PDF, YouTube). The schedule function is a small extension that adds a lambda that can return a value once the time arrives. The schedule function implements the Awaitable Concept on its return type
awaiter
via theawait_ready
,await_suspend
andawait_resume
functions. -
await in c++ - a series
I have seen a few articles that introduce the await proposal as implemented in Visual Studio 2015 Preview. In this series I will share my exploration of the await feature by showing how I built
async_generator<T>
and some algorithms and adaptors I built to use it. To skip the exposition, go straight to the code on github. -
RxC++ ReactiveCommand
-
DeferOperation
-
Reactive Extensions for C++
-
ZeroMQ and C++ without exceptions
-
console app that monitors smart cards
-
smartcard_certificates implementation
-
smartcard_name_and_provider implementation
-
monitor_smartcard_readers implementation
-
monitor_smartcard_readers usage
-
WINDOW_MESSAGE_DEFINITION
-
window message dispatch generator
-
window message dispatcher
-
WindowCallback
-
window_class::Register
-
win32 window_class
-
walk-through of RootWindow from scratch program
-
a scratch program
-
more on optional traits via ADL
-
Synology
-
FAIL_FAST
-
range copy
-
range size_cast
-
make_range_raw
-
catch(…) is harmful and should be avoided
-
error contract functions
-
C++ exception implementation on Windows
-
all smart ptr's should have a replace method
-
template policies via ADL
-
unique_error
-
an unwinder should be in the standard library
-
I loathe bool function parameters
-
NTSTATUS
-
HRESULT
-
WINERROR
-
error codes in Windows
-
hello
subscribe via RSS