-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
258 lines (255 loc) · 15.9 KB
/
index.html
File metadata and controls
258 lines (255 loc) · 15.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<!DOCTYPE html>
<html lang="en-us">
<head>
<style>
li { font-size: 1em; text-align: justify; width: 55em; }
p.abstract { font-size: 0.9em; width: 90%; }
li.in-progress > a { text-decoration: none; color: initial; }
</style>
<meta charset="UTF-8">
<title>insooth.github.io</title>
</head>
<body>
<h1>insooth.github.io – computer science only</h1>
<p>
Articles on software design and programming, C++ and language independent ideas.
<ul>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/making-hybrid-systems.md" title="Making hybrid systems">Making hybrid systems</a>
<p class="abstract">
In every well-managed software project sooner or later we face cross-system boundaries testing needs,
where we basically observe how our software cooperates with the other actors. Those actors include
users as well as the other software products. Following article presents an idea of a hybrid system
of asynchronous actors running in a heterogeneous environment.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/heterogeneous-swap.md" title="Heterogeneous swap">Heterogeneous swap</a>
<p class="abstract">
A research on possiblity of re-interpretation of a memory allocated
by a container by means of another container. The following approaches
were considered: structural equivalence, concepts, stateful allocators,
and non-owning view types.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/log-decoration.md" title="Decorating with a side effect">Decorating with a side effect</a>
<p class="abstract">
A technique that is used to extract side effects brought by logging,
and then compose with them back in a well defined manner. Functional stack of effects.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/tagged-lambda-injection.md" title="Phantom lambda type, partially applied class template, and deduction guides to support dependency injection">Phantom lambda type, partially applied class template, and deduction guides to support dependency injection</a>
<p class="abstract">
Hi-perf dependency injection with construction of an injected type out of user-defined lambda expressions.
Minimal overhead, great benefits.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/tuple-find.md" title="Access tuple-like container by type to return an index">Access tuple-like container by type to return an index</a>
<p class="abstract">
How would you look for an item in a tuple by the item's type, and return the item's index within that tuple?
This article presents the answer to that question which is composed of an application of lazy fold expression,
and an idea of type embellishment that lets us introduce an implicit context in which the current element is embedded.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/template-instance-deconstruction.md" title="How to deconstruct a template instance">How to deconstruct a template instance</a>
<p class="abstract">
I was asked recently a question about the template instance's parameters inspection
possibilities in order to be able to stringify the types and integral constants used
to create that instance. Namely, having a template with N parameters, and an instance
(an object or just a type) of that template we would like to print the text representation
of the parameters with which that instance was created. This article presents an example
solution to that problem.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/global-state-design.md" title="Design with a global state">Design with a global state</a>
<p class="abstract">
State is inevitable. Essential in practice, a side-effect, is a change applied to a shared global state.
With the state up front, we make it easily trackable and visible in the data-flow diagrams.
No more bad surprises after refactoring, at least in theory.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/log-less-log-once.md" title="Log less, log once">Log less, log once</a>
<p class="abstract">
It is almost unbelievable how it is easy to commit a sin against simplicity.
Consider a funcionality that converts some data type into an another one data type.
All the information required to do a conversion is included in the original data type.
How would you report errors if optional-way were banned?
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/customisation-points-support-interfaces.md" title="Customisation points to support interfaces">Customisation points to support interfaces</a>
<p class="abstract">
Definition of actions is not a trivial task. The resulting abstraction that embeds
the defined actions does not have to be a set of virtual member functions wrapped
into a class from which implementations exposed to the user derive. General guideline
promoted in this article is to expose non-virtual interfaces to the user while providing
a customisation point in the form of a minimal set of actions that can be combined
with each other.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/data-type-converters.md" title="Writing data type converters">Writing data type converters</a>
<p class="abstract">
Presentation of a generic approach to accessing and transforming nested data types using Profunctor Optics in C++17.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/templated-generic-lambdas.md" title="Emulating templated generic lambda expressions">Emulating templated generic lambda expressions</a>
<p class="abstract">
Embedding and recovering the type information by means of a value passed into a generic lambda expression.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/composition-function-objects.md" title="Composition of function objects">Composition of function objects</a>
<p class="abstract">
<i>(or Exercise in Monads)</i>
Building and executing a generic chain of functions that are <i>not</i> composable
directly with the help of <tt>FunctionObject</tt> concept, C++17 abstractions,
and functional programming idioms.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/selective-argument-application.md" title="Selective argument application">Selective argument application</a>
<p class="abstract">
Presentation of a technique that enables transparent interception of the selected arguments
passed to any function by means of a user-provided predicate metafunction. A proposal
of an extension to C++17 <tt>std::invoke</tt> STL helper function — <tt>apply_if</tt>.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/lock-less-swapped-buffers.md" title="Lock less with swapped buffers">Lock less with swapped buffers</a>
<p class="abstract">
Synchronisation cost minimisation technique explained based on the classic producer-consumer problem.
Keep the shared resource synchronised, but unblock the producer execution for the time of the buffer
items' consumption to achieve significant gain in overall performance of the solution and its reliability.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/accessing-private-members.md" title="Accessing inaccessible object members">Accessing inaccessible object members</a> (released as a library: <a href="https://github.com/hliberacki/cpp-member-accessor" title="hliberacki/cpp-member-accessor">cpp-member-accessor</a>)
<p class="abstract">
Exploring execution of algorithms during explicit template instantiation. Example includes
code that generates accessors that are able to mutate <i>private</i> members and call
<i>private</i> member functions.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/deferred-initialisation.md" title="Deferred initialisation for classes that inherit constructors">Deferred initialisation for classes that inherit constructors</a>
<p class="abstract">
<i>(or Automatic two-phase init)</i>
This article presents a solution that enables injection of a custom code to
be executed once all the non-static members are initialised. Presented technique
is particulary useful in case of constructor inheritance and use of "member initializer" feature.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/visitor-pattern.md" title="The role of the visitor pattern">The role of the visitor pattern</a>
<p class="abstract">
Among all the various design patterns widely used by the C++ language community,
probably only the visitor pattern takes advantage of the language type system
in such a sophisticated way. Visitor pattern provides a solution to a recurring
problem found in object-oriented designs (and in any other that use runtime-supported
subtype polymorphism), namely the determination of the actual type of the object
referenced by some interface type. This article will revisit the core idea behind
that design pattern, mention couple of existing implementations, and describe
a C++14 implementation of the visitor that aims to be flexible and type-safe
as much as the template-based solution is, but remains in the domain of fixed
(non-template) types favoured by the classic interfaces based on the virtual
member functions.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/binary-search-for-intervals.md" title="Tweaking std::binary_search for intervals">Tweaking <tt>std::binary_search</tt> for intervals</a>
<p class="abstract">
Tweaking <tt>std::binary_search</tt> to return found item
using custom comparator and ordering of intervals and points.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/alternative-to-select-many-bitmask.md" title="Alternative to select-many bitmask">Alternative to select-many bitmask</a>
<p class="abstract">
Enforcing stronger typing with couple of alternatives to bitmasks
typically used by interfaces to select many properties at once.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/wrap-members-of-reference-type.md" title="Wrap members of reference type for great good">Wrap members of reference type for great good</a>
<p class="abstract">
Understanding concept requirements put on types by <tt>std::swap</tt>
and taking benefit from <tt>std::refrence_wrapper</tt> class members.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/basic-dependent-typing.md" title="Basic dependent typing">Basic dependent typing</a>
<p class="abstract">
How to encode assumptions into types and check them during compile time
with no use of <tt>static_assert</tt>.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/cpp-type-inference.md" title="When type inference fails">When type inference fails</a>
<p class="abstract">
There examples of C++14 type inference failures and solutions to them.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/type-level-modelling-example.md" title="Type-level modelling example">Type-level modelling example</a>
<p class="abstract">
Let's define an interface by using types and composition, where misuse is
signalled by a compilation error.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/simple-laziness-cpp.md" title="Take benefit from simple laziness">Take benefit from simple laziness</a>
<p class="abstract">
A note on improving performance through wise usage of short circuiting, simple
pattern matching engine with boolean operators and ternary operators.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/enabling-forward-traversal.md" title="Enabling forward traversal">Enabling forward traversal</a>
<p class="abstract">
Enabling iteration over a sequence of objects of given type without changing the type name itself.
Plus, how to guarantee never-singular iterators and never-empty collections.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/blessed-split.md" title="The Blessed Split in software design">The Blessed Split in software design</a>
<p class="abstract">
Well designed system is built up from multiple layers, where each layer may be complex piece of software.
We will look into a single layer of the system to find out how to make it safe without sacrificing its performance.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/partial-functions-magic-values.md" title="Partial function and magic values in codomain">Partial function and magic values in codomain</a>
<p class="abstract">
Functions defines <i>domain</i> as a set of possible input values and <i>co-domain</i> as a set of possible output values.
Let's find a way to assure we receive and reply with meaningful values. An example from production code.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/testable-design.md" title="Start with testable design right now">Start with testable design right now</a>
<p class="abstract">
Thoughts on designing software that is easy to test and benefits from dependency injection.
</p>
</li>
<li>
<a href="https://github.com/insooth/insooth.github.io/blob/master/cpp-source-generation.md" title="Better way to generate C++ source code">Better way to generate C++ source code</a>
<p class="abstract">
Plenty of software projects use source code generation to automate numerous tedious tasks.
Let's have a look how to resolve code generation task in much cleaner way compared to what
we find usually and make its results maintainable.
</p>
</li>
<li class="in-progress"><a href="#" title="Hiding sensitive information with GCC and CMake">Hiding sensitive information with GCC and CMake</a></li>
<li class="in-progress"><a href="#" title="Designing intrusive data structure in C">Designing intrusive data structure in C</a></li>
</ul>
<hr>
© 2016–2020 Krzysztof Ostrowski — <a href="https://github.com/insooth/insooth.github.io/blob/master/LICENSE" title="CC-BY-4.0">LICENSE</a> — http://lnkd.in/x8twDX
</body>
</html>