-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
164 lines (139 loc) · 6.61 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Ghyslain Leclerc">
<meta name="description" content="Personnal notes on code">
<link rel="alternate" type="application/atom+xml" title="RSS" href="https://ghlecl.github.io/atom.xml">
<link rel="stylesheet" href="https://ghlecl.github.io/css/weblog.css" media="screen" charset="utf-8" />
<title> Code Attempts · ghlecl's code attempts</title>
</head>
<body class="site">
<header>
<nav>
<h1><a href="/">@ghlecl</a>'s Code Attempts.</h1>
<div class="menu">
<ul>
<li>
<a href="https://ghlecl.github.io/posts/">Posts<img src="/img/atom.svg" class="rss-icon" /></a>
</li>
<li><a href="https://ghlecl.github.io/about/">About</a></li>
</ul>
</div>
</nav>
</header>
<main class="content list">
<article class="post">
<h2>
<a rel="full-article" href="https://ghlecl.github.io/posts/conveting_to_zola/">Converting to Zola</a>
</h2>
<div class="postmeta">
Posted on <time datetime="2022-04-22 22:30" pubdate="">April 22, 2022</time>
</div>
<p>
Zola
I haven't had (or taken really) the time to write anything technical in the last few years.
The pandemic definitely did have an impact on me, but also work.
I was not in a frame of mind to program at home, much less write about it.
But lately, I've felt better and I am getting back into that hobby of mine.
In the interim, the static site generator that I was using (Hugo) upgraded quite a few
</p>
<a class="continue" rel="full-article" href="https://ghlecl.github.io/posts/conveting_to_zola/">Continue Reading »</a>
</article>
<article class="post">
<h2>
<a rel="full-article" href="https://ghlecl.github.io/posts/string_ctor/">One of std::string ctor</a>
</h2>
<div class="postmeta">
Posted on <time datetime="2018-09-18 21:45" pubdate="">September 18, 2018</time>
</div>
<p>
std::string from C style string ctor
In writing a function template having to create a std::string from a char[], I have had to use the following constructor of std::string:
basic_string( CharT const* s, size_type count, Allocator const& alloc = Allocator() );
which you can find documentation for in the standard or on cppreference.com.
In using this constructor, I have had a "off by one" problem with the count parameter.
The function template I originally wrote used the constructor
</p>
<a class="continue" rel="full-article" href="https://ghlecl.github.io/posts/string_ctor/">Continue Reading »</a>
</article>
<article class="post">
<h2>
<a rel="full-article" href="https://ghlecl.github.io/posts/cpp_invoke/">Invoking a callable in C++</a>
</h2>
<div class="postmeta">
Posted on <time datetime="2018-09-13 19:15" pubdate="">September 13, 2018</time>
</div>
<p>
Invoking a callable in C++
This is my exploration of the std::invoke utility of C++17.
I started with something vaguely related (which I am discussing here) and ended up reading the standard library implementation of std::invoke (and that of Google's Abseil library).
The funny thing is that in the end, I decided I did not really need any of it for my original motivation, but I did gain some knowledge along the way, so worth the
</p>
<a class="continue" rel="full-article" href="https://ghlecl.github.io/posts/cpp_invoke/">Continue Reading »</a>
</article>
<article class="post">
<h2>
<a rel="full-article" href="https://ghlecl.github.io/posts/range_function/">Python's range in C++</a>
</h2>
<div class="postmeta">
Posted on <time datetime="2018-08-05 00:00" pubdate="">August 05, 2018</time>
</div>
<p>
Exploring loops: Python's range in C++
In spite of what Sean Parent would like (i.e. no raw loops ;-) ), loops are a common control flow in programming.
So common that most languages have more than one loop syntax:
for loop,
while loop,
do while loop...
Given their prevalence, loops might seem uninteresting, but when I decided to look into
creating a range function1 for C++ which would behave like Python's
range object, I learned a thing or two and decided
</p>
<a class="continue" rel="full-article" href="https://ghlecl.github.io/posts/range_function/">Continue Reading »</a>
</article>
<article class="post">
<h2>
<a rel="full-article" href="https://ghlecl.github.io/posts/usual_conversions/">Mixed types arithmetic in C++</a>
</h2>
<div class="postmeta">
Posted on <time datetime="2018-05-19 00:00" pubdate="">May 19, 2018</time>
</div>
<p>
Arithmetic on mixed fundamental types in C++
For a weekend project of mine, I have had to think about mixed type arithmetic on fundamental types in C++.
In the process, I made sense of a few fundamental things (no pun intended ;-) ) and I have decided to write them down.
Hopefully, writing about it will allow me to both clarify my thoughts and remember the information!
Arithmetic conversions
Applying binary operators to different types might seem trivial in
</p>
<a class="continue" rel="full-article" href="https://ghlecl.github.io/posts/usual_conversions/">Continue Reading »</a>
</article>
<div class="pagination">
<a href="https://ghlecl.github.io/posts/2/">Older »</a>
</div>
</main>
<footer>
<div class="footer_text">
<div>
<h3>Hi, <a href="https://ghlecl.github.io/about/">I'm Ghyslain</a></h3>
<p>
I am a medical physicist by day and a hobby programmer by night.
You can follow me on <a href="http://twitter.com/ghlecl" target="_blank">Twitter</a>
and on <a href="http://github.com/ghlecl" target="_blank">GitHub</a>.
You can reach me via codeattempts [at] gmail [dot] com.
</p>
</div>
</div>
<div class="footer_copyright">
© 2022 <a href="https://ghlecl.github.io/about/">Ghyslain Leclerc</a>
— Made in Québec, Canada
— Generated using <a href="https://www.getzola.org/" target="_blank">Zola</a>
— Style ported from <a href="https://jnjosh.com/about/" target="_blank">Josh Johnson's</a>
Hugo Theme (<a href="https://github.com/jnjosh/internet-weblog"target="_blank">internet-weblog</a>)
</div>
</footer>
</body>
</html>