-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasicBiteByByte.html
More file actions
378 lines (365 loc) · 16.3 KB
/
BasicBiteByByte.html
File metadata and controls
378 lines (365 loc) · 16.3 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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<!DOCTYPE html>
<html>
<!--
BasicBiteByByte.html
-->
<head>
<title>Basics Track</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="css/StylesPageFrameDefaults.css" />
<link rel="stylesheet" href="css/StylesPageFrameStructure.css" />
<link rel="stylesheet" href="css/StylesPageFrameMenus.css" />
<link rel="stylesheet" href="css/StylesPageFrameThemeDefault.css" />
<link rel="stylesheet" href="css/StylesWebComponents.css" />
<script src="js/ScriptsWebComponents.js"></script>
<script src="js/ScriptsPageFrameOtherRepos.js"></script>
<script src="js/ScriptsPageFramePagesOtherRepos.js"></script>
<script src="js/ScriptsPageFrameKeyboard.js"></script>
<style>
#github .darkItem {
background-color: var(--dark);
color: var(--light);
}
#github .darkItem a {
color: var(--light);
}
#github summary {
padding: 3px 0px 5px 0px;
}
#github ul.tight > li {
margin-bottom: 2px;
}
#github .undefined {
opacity: 0.4;
}
#github hr {
margin-top: 0.5em;
margin-bottom: 0.25em;
margin-left: -2em;
}
#github div ol > li { /* white-space: nowrap;*/
}
#github menu-item {
display: inline-block;
width: 12em;
font-weight: normal;
}
menu-right {
display: inline-block;
}
</style>
<script>
function loadifbasic() {
var loc = window.location.href;
if (window.self === window.top) {
/*alert('top');*/
window.location.href = 'TOCBasic.html?src=' + loc;
}
else {
/*alert('not top');*/
/*window.top.location.href = loc;*/
window.top.location.href = loc;
}
}
</script>
</head>
<body id="github" onload="initialize()">
<a id="Next" href="DesignBites.html">Next</a>
<a id="Prev" href="CommCompare.html">Prev</a>
<page-frame>
<frame-header>
<nav id="navbar"></nav>
</frame-header>
<main>
<div id="about" onclick="this.style.display = 'none'">about</div>
<div id="modified">2/21/2022</div>
<div id="page">BasicBites Repo</div>
<div id="hlp"></div>
<a id="top"></a>
<content>
<header>
<a class="repoLink" target="_blank" href="https://github.com/JimFawcett/BasicBites">BasicBites Code Repo</a>
<hgroup id="pagetitle" onclick="loadifbasic()" style="cursor:pointer;">
<h1 id="title">BasicBites Repository</h1>
<h3 id="subtitle">Short stories and code about Basics</h3>
</hgroup>
<div class="quickStatusContainer" onmouseleave="closeQuickStatus()" style="padding-right:25px; position:absolute; top:1.9em; right:0.25em;">
<details>
<summary class="darkItem quickStatus" style="border:1px solid var(--light);">Quick Status</summary>
<status-grid class="lightItem border">
<status-itemLeft>
Short bites
</status-itemLeft>
<status-itemRight>
Discuss basic platform operations
</status-itemRight>
<status-itemLeft>
Demonstration code
</status-itemLeft>
<status-itemRight>
Demos in C++, Rust, and C#
</status-itemRight>
<status-itemLeft>
Documentation
</status-itemLeft>
<status-itemRight>
yes
</status-itemRight>
<status-itemLeft>
Test cases
</status-itemLeft>
<status-itemRight>
NA
</status-itemRight>
<status-itemLeft>
Static library
</status-itemLeft>
<status-itemRight>
NA
</status-itemRight>
<status-itemLeft>
Build requires
</status-itemLeft>
<status-itemRight>
Rust, C++, C# installed
</status-itemRight>
<status-itemLeft>
Planned design changes
</status-itemLeft>
<status-itemRight>
Add more bites and demo code
<div style="height:0.5em;"></div>
</status-itemRight>
</status-grid>
</details>
</div>
</header>
<spacer-15></spacer-15>
<div style="display:flex;">
<indent-block style="position:relative; z-index:10; background-color:#fefefa; display:inline; padding:0px 10px; max-width:70%;">
"Try to learn something about everything and everything about something."
<br />
- Thomas Huxley
</indent-block>
</div>
<hr class="spread" />
<div>
<h3 id="cont">Contents:</h3>
<t-b>
<a href="#code">Code List</a>, <a href="#bites">Bite List</a>,
<a href="Resources/BasicBites/BasicBites_Platform.html">First Bite</a>
</t-b>
<indent-blocks>
<t-b>
Software development is a complex process. To be successful one needs to know something about:
<ul class="tight">
<li>
Platforms: how the Windows, Linux, and MacOS platforms support code that runs there.
</li>
<li>
Programs: basics about execution, types, functions, and structure.
</li>
<li>
Object Models: how code uses objects to structure its operations.
</li>
</ul>
</t-b>
<t-b>
This repository links to a "<a target="_blank" href="Resources/BasicBites/BasicBites_Intro.html">Basic story</a>"
composed of pages that address these topics. It also contains
<a target="_blank" href="https://github.com/JimFawcett/BasicBites">sample code</a> used to illustrate topics where
appropriate.
</t-b>
<t-b>
Our purpose is to provide a "background check and tutorial" as an entry into stories about
<a target="_blank" href="CppStory.html">C++</a>, <a target="_blank" href="RustStory.html">Rust</a>, and <a target="_blank" href="SiteMap.html">many other</a>
interesting topics related to software development.
</t-b>
<t-b>
<div style="border:2px solid darkred; padding:0.5rem 1rem; margin:1rem 1rem;">
Each Bite takes an important basic topic, provides a relatively consise overview,
and for some pages provides sample code.
</div>
<s-halfEm></s-halfEm>
</t-b>
<h3 id="bites">Bites:</h3>
<t-b>
Here are the currently planned Bites. I expect missing details will be completed some time in 2022.
The ordering of some of these Bites may change. Ordering so that each Bite depends only on its
predecessors doesn't necessary provide a good logical ordering. I'll be thinking about this
as the list gets completed.
</t-b>
<t-b class="indent">
<ol class="tight">
<li>
<hr />
<menu-item><a target="_blank" href="indexBasic.html">Basics Track Summary</a></menu-item>
<menu-right>Getting started with platform and code development</menu-right>
</li>
<li>
<hr />
<menu-item><a target="_blank" href="Resources/BasicBites/BasicBites_Platform.html">Platforms</a></menu-item>
<menu-right>Models illustrating how common platforms work</menu-right>
</li>
<li>
<hr />
<menu-item><a target="_blank" href="Resources/BasicBites/BasicBites_PlatformMemory.html">Virtual Memory</a></menu-item>
<menu-right>Basic ideas about paged memory</menu-right>
</li>
<li>
<hr />
<menu-item><a target="_blank" href="Resources/BasicBites/BasicBites_PlatformSched.html">Job Scheduling</a></menu-item>
<menu-right>Model for OS scheduler</menu-right>
</li>
<li>
<hr />
<menu-item><a target="_blank" href="Resources/BasicBites/BasicBites_PlatformIO.html">I/O</a></menu-item>
<menu-right>Synchronous and asynchronous I/O operations</menu-right>
</li>
<li>
<hr />
<menu-item><a target="_blank" href="Resources/BasicBites/BasicBites_PlatformSysRescr.html">System Resources</a></menu-item>
<menu-right>How are resources shared among processes</menu-right>
</li>
<li>
<hr />
<menu-item><a target="_blank" href="Resources/BasicBites/BasicBites_Programming.html">Programming</a></menu-item>
<menu-right>Models for execution, types, functions, safety, and program structures</menu-right>
</li>
<li>
<hr />
<menu-item><a target="_blank" href="Resources/BasicBites/BasicBites_ProgExec.html">Execution</a></menu-item>
<menu-right>Models of code execution for native and managed code</menu-right>
</li>
<li>
<hr />
<menu-item><a target="_blank" href="Resources/BasicBites/BasicBites_ProgTypes.html">Types</a></menu-item>
<menu-right>Abstract models for Copy, Move, and Reference types</menu-right>
</li>
<li>
<hr />
<menu-item><a target="_blank" href="Resources/BasicBites/BasicBites_ProgFunctions.html">Functions</a></menu-item>
<menu-right>Functions, methods, and lambdas with parameter passing</menu-right>
</li>
<li>
<hr />
<menu-item class="undefined"><a target="_blank" href="Resources/BasicBites/BasicBites_ProgSafety.html">Safety</a></menu-item>
<menu-right>Functions, methods, and lambdas with parameter passing</menu-right>
</li>
<li>
<hr />
<menu-item class="undefined"><a target="_blank" href="Resources/BasicBites/BasicBites_ProgPlatformAPI.html">Using Platform API</a></menu-item>
<menu-right>Accessing and use of methods exposed by platforms</menu-right>
</li>
<li>
<hr />
<menu-item class="undefined"><a target="_blank" href="Resources/BasicBites/BasicBites_ProgStruct.html">Structure</a></menu-item>
<menu-right>Structuring software with functions, methods, types, libraries, executables</menu-right>
</li>
<li>
<hr />
<menu-item class="undefined"><a target="_blank" href="Resources/BasicBites/BasicBites_ObjModel.html">Object models</a></menu-item>
<menu-right>lifetime, resource management, ownership</menu-right>
</li>
<li>
<hr />
<menu-item class="undefined"><a target="_blank" href="Resources/BasicBites/BasicBites_ObjLifetime.html">Life time</a></menu-item>
<menu-right>Construction to destruction flow</menu-right>
</li>
<li>
<hr />
<menu-item class="undefined"><a target="_blank" href="Resources/BasicBites/BasicBites_ObjResMgmt.html">Resource management</a></menu-item>
<menu-right>Construction to destruction, resource management</menu-right>
</li>
<li>
<hr />
<menu-item class="undefined"><a target="_blank" href="Resources/BasicBites/BasicBites_ObjOwnership.html">Ownership</a></menu-item>
<menu-right>Single vs. Multiple ownership, mutation, sharing</menu-right>
</li>
<li>
<hr />
<menu-item class="undefined"><a target="_blank" href="Resources/BasicBites/BasicBites_SummaryNative.html">Native code models</a></menu-item>
<menu-right>Execution, ownership, lifetime, resource management for native code</menu-right>
</li>
<li>
<hr />
<menu-item class="undefined"><a target="_blank" href="Resources/BasicBites/BasicBites_SummaryManaged.html">Managed code models</a></menu-item>
<menu-right>Execution, ownership, lifetime, resource management for managed code</menu-right>
<hr />
</li>
</ol>
</t-b>
<t-b>
Some of these bites present small simple demonstration codes, and a few that are larger.
All of the code fragments shown in the Bites are included, as complete programs, below.
</t-b>
</indent-blocks>
<h3 id="code">Bite Demonstration Code:</h3>
<div class="indent">
<ol class="tight">
<li>
<a target="_blank" href="https://github.com/JimFawcett/BasicBites">functions, methods, and lambdas</a><br />
<ul class="tight">
<li>
functions<br />
Pass arguments by value and reference, pass and return functions, use static and dynamic dispatch.
</li>
<li>
methods<br />
Demonstrate non-generic and generic methods.
</li>
</ul>
</li>
<li class="undefined">
<a target="_blank" href="https://github.com/JimFawcett/BasicBites">closures</a><br />
Demonstrates closures with copy and with move capture.
</li>
</ol>
</div>
<spacer-15></spacer-15>
<h3>Build:</h3>
<indent-blocks>
Rust code was built with Cargo from Visual Studio Code terminal and tested on Windows 10. C++ and C# code
was built with Visual Studio, 2019, Community Edition.
</indent-blocks>
<h3>Status:</h3>
<t-b>
Just startiing.
</t-b>
</div>
<div style="height:25em;"></div>
<!--<img class="strip-photo" src="Pictures/CampusAtNight.jpg" alt="campus at night" />-->
</content>
<a id="bottom"></a>
<page-TOC id="pages" style="display:none;">
</page-TOC>
<page-sections id="sections" style="display:none;">
<sec-elem style="width:0.0em"> </sec-elem>
<menu-elem class="secElem"><a href="#bottom">bottom</a></menu-elem>
<menu-elem class="secElem"><a href="#code">code</a></menu-elem>
<menu-elem class="secElem"><a href="#bites">bites</a></menu-elem>
<menu-elem class="secElem"><a href="#cont">contents</a></menu-elem>
<menu-elem class="secElem"><a href="#top">top</a></menu-elem>
<div class='darkItem popupHeader' style="padding:0.25em 2.0em;" onclick="this.parentElement.style.display='none'">Sections</div>
</page-sections>
</main>
<frame-footer>
<menu-item style="width:2.0em;"> </menu-item>
<menu-elem id="nextLink2" onclick="bottomMenu.next()">Next</menu-elem>
<menu-elem id="prevLink2" onclick="bottomMenu.prev()">Prev</menu-elem>
<menu-elem id="pgbtn" onclick="bottomMenu.pages()">Pages</menu-elem>
<menu-elem onclick="bottomMenu.sections()">Sections</menu-elem>
<menu-elem onclick="bottomMenu.about()">About</menu-elem>
<menu-elem id="kysbtn" onclick="storyHlpMenu.keys()">Keys</menu-elem>
<menu-elem style="margin-right:1em">
<span id="loc" style="display:inline-block; font-weight:normal"></span>
</menu-elem>
</frame-footer>
</page-frame>
<script>
let loc = document.getElementById("loc");
let fn = window.location.href.split(/\/|\\/).pop();
loc.innerHTML = fn + ":";
</script>
</body>
</html>