• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisioncd7112c807c2ca461b2d635353aea1bec8ab9c7a (tree)
Time2023-03-25 07:06:39
AuthorAlbert Mietus < albert AT mietus DOT nl >
CommiterAlbert Mietus < albert AT mietus DOT nl >

Log Message

asis

Change Summary

Incremental Difference

diff -r 80fc934ac658 -r cd7112c807c2 CCastle/3.Design/B.Workshop/CC2Cpy/Components_and_Friends.rst
--- a/CCastle/3.Design/B.Workshop/CC2Cpy/Components_and_Friends.rst Fri Mar 24 17:10:04 2023 +0100
+++ b/CCastle/3.Design/B.Workshop/CC2Cpy/Components_and_Friends.rst Fri Mar 24 23:06:39 2023 +0100
@@ -3,7 +3,7 @@
33 =========================================
44
55 .. post::
6- :category: Castle, DesignStudy
6+ :category: Castle, DesignStudy, CC2Cpy
77 :tags: DRAFT
88
99 Any compiler will read & parse the source, convert it into an abstract natation (like the AST) and write the result
@@ -23,9 +23,8 @@
2323
2424 .. todo::
2525
26- * Spilt the Modeling & Rendering parts; by using delegating to a ${Any}Rendering subclasses of ${Any}
2726 * Add (pseudo) namespaces-support, global/extern/static keyword and such (during generation)
28-
27+ * Better design & describe the Pre/In/PostFixes (see XXXX)
2928
3029 Overview
3130 =========
diff -r 80fc934ac658 -r cd7112c807c2 CCastle/3.Design/zz.todo.rst
--- a/CCastle/3.Design/zz.todo.rst Fri Mar 24 17:10:04 2023 +0100
+++ b/CCastle/3.Design/zz.todo.rst Fri Mar 24 23:06:39 2023 +0100
@@ -34,8 +34,8 @@
3434
3535 .. _TheMachinery:
3636
37-The Machinery
38-=============
37+The Machinery (ToDo)
38+====================
3939
4040 The CC-concept has abstracted the communication between components, by using ports, connections, and protocols. A
4141 protocol is a “horizontal” interface: two port can be connected when they share the same protocol.
@@ -57,7 +57,7 @@
5757 Some example machineries
5858 ------------------------
5959
60-.. Machinery-DirectCall:
60+.. _Machinery-DirectCall:
6161
6262 DirectCall
6363 ~~~~~~~~~~
@@ -68,6 +68,7 @@
6868
6969 It works great for simple single-threaded (small) applications
7070
71+.. _Machinery-LibDispatch:
7172
7273 LibDispatch
7374 ~~~~~~~~~~~
diff -r 80fc934ac658 -r cd7112c807c2 CCastle/4.Blog/Heisenbug-sidebar-Sequence.irst
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CCastle/4.Blog/Heisenbug-sidebar-Sequence.irst Fri Mar 24 23:06:39 2023 +0100
@@ -0,0 +1,28 @@
1+.. -*- rst -*-
2+ included in `a.Heisenbug.rst`
3+
4+.. sidebar::
5+
6+ .. tabs::
7+
8+ .. tab:: Conceptual
9+
10+ In this diagram, the order of the message in shown in a logical order. As we only show the integers that are
11+ tested for (relative) prime, it looks simple and error-free.
12+
13+ .. uml:: ./sieve-Sequence-concept.puml
14+
15+ .. tab:: Out of order
16+
17+ But there is no garantie that the simple, conceptual order is used. By example, the Generator can be *“fast”*,
18+ and produce the to-be-sieved integers faster than the Sieves handle them.
19+
20+ .. uml:: ./sieve-Sequence-OOO.puml
21+
22+ .. tab:: With details
23+
24+ Adding components-creation details (as well as reconnecting) shows a
25+ lot more details. Here we added the
26+ event/port-names. When studying carefully, we can already see there might be a problem when the order changes ...
27+
28+ .. uml:: ./sieve-Sequence-details.puml
diff -r 80fc934ac658 -r cd7112c807c2 CCastle/4.Blog/a.Heisenbug.rst
--- a/CCastle/4.Blog/a.Heisenbug.rst Fri Mar 24 17:10:04 2023 +0100
+++ b/CCastle/4.Blog/a.Heisenbug.rst Fri Mar 24 23:06:39 2023 +0100
@@ -18,7 +18,7 @@
1818
1919
2020 What is a Heisenbug?
21-********************
21+====================
2222
2323 The heisenbug is named to Werner Heisenberg, who described the “observer effect”: when you look closely, the behavior
2424 changes. The same can happen to software (bugs). The behavior apparently changes when you study -or slightly adjust-
@@ -26,15 +26,21 @@
2626 sequential code on slow CPU’s is less likely to have heisenbugs then concurrent code on fast multi-core systems. It’s
2727 also common in threaded programs.
2828
29+.. include:: ./Heisenbug-sidebar-Sequence.irst
30+
2931 The sieve goes wrong
3032 ====================
3133
32-Also my standard Caste demo ‘Sieve of Eratosthenes’ can suffer from this issue. The initial version did work for years,
33-and failed horrible when another “machinery” was used.
34+Also my standard example ‘:ref:`Castle-TheSieve`’ can suffer from this issue. The initial version did work for years,
35+but failed horrible when another “machinery” was used. After studying this, the bug is simple, and easy to fix.
3436
3537
3638
3739
38- https://en.wikipedia.org/wiki/Heisenbug
40+
41+
42+========================
43+
44+https://en.wikipedia.org/wiki/Heisenbug
3945
4046 .. LocalWords: heisenbugs, heisenbug
diff -r 80fc934ac658 -r cd7112c807c2 CCastle/4.Blog/sieve-Sequence-OOO.puml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CCastle/4.Blog/sieve-Sequence-OOO.puml Fri Mar 24 23:06:39 2023 +0100
@@ -0,0 +1,45 @@
1+@startuml
2+hide footbox
3+title OutOfOrder (Fast generator)
4+
5+participant "Generator" as G
6+participant "Sieve(2)" as S2
7+participant "Sieve(3)" as S3
8+participant "Sieve(5)" as S5
9+participant "Sieve(7)" as S7
10+participant "Sieve(11)" as S11
11+
12+G -[#green]> S2: 2
13+G -[#blue]> S2: 3
14+G -[#red]> S2: 4
15+G -[#blue]> S2: 5
16+G -[#red]> S2: 6
17+G -[#blue]> S2: 7
18+G -[#red]> S2: 8
19+G -[#blue]> S2: 9
20+G -[#red]> S2: 10
21+G -[#blue]> S2: 11
22+
23+activate S2
24+S2 -[#green]> S3: 3
25+S2 -[#blue]> S3: 5
26+S2 -[#blue]> S3: 7
27+S2 -[#red]> S3: 9
28+S2 -[#blue]> S3: 11
29+
30+activate S3
31+S3 -[#green]> S5: 5
32+S3 -[#blue]> S5: 7
33+S3 -[#blue]> S5: 11
34+
35+activate S5
36+S5 -[#green]> S7: 7
37+S5 -[#blue]> S7: 11
38+
39+activate S7
40+S7 -[#green]>S11: 11
41+
42+activate S11
43+
44+== etc ==
45+@enduml
diff -r 80fc934ac658 -r cd7112c807c2 CCastle/4.Blog/sieve-Sequence-concept.puml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CCastle/4.Blog/sieve-Sequence-concept.puml Fri Mar 24 23:06:39 2023 +0100
@@ -0,0 +1,50 @@
1+@startuml
2+hide footbox
3+title Concept (sequential order)
4+
5+participant "Generator" as G
6+participant "Sieve(2)" as S2
7+participant "Sieve(3)" as S3
8+participant "Sieve(5)" as S5
9+participant "Sieve(7)" as S7
10+participant "Sieve(11)" as S11
11+
12+G -[#green]> S2: 2
13+activate S2
14+
15+G -[#blue]> S2: 3
16+S2 -[#green]> S3: 3
17+activate S3
18+
19+G -[#red]> S2: 4
20+
21+G -[#blue]> S2: 5
22+S2 -[#blue]> S3: 5
23+S3 -[#green]> S5: 5
24+activate S5
25+
26+G -[#red]> S2: 6
27+
28+G -[#blue]> S2: 7
29+S2 -[#blue]> S3: 7
30+S3 -[#blue]> S5: 7
31+S5 -[#green]> S7: 7
32+activate S7
33+
34+G -[#red]> S2: 8
35+
36+G -[#blue]> S2: 9
37+S2 -[#red]> S3: 9
38+
39+G -[#red]> S2: 10
40+
41+
42+G -[#blue]> S2: 11
43+S2 -[#blue]> S3: 11
44+S3 -[#blue]> S5: 11
45+S5 -[#blue]> S7: 11
46+S7 -[#green]>S11: 11
47+activate S11
48+
49+== etc ==
50+@enduml
diff -r 80fc934ac658 -r cd7112c807c2 CCastle/4.Blog/sieve-Sequence-details.puml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CCastle/4.Blog/sieve-Sequence-details.puml Fri Mar 24 23:06:39 2023 +0100
@@ -0,0 +1,62 @@
1+@startuml
2+hide footbox
3+title Sieve creation details (sequantial order)
4+
5+participant Main as M
6+participant Finder as F
7+participant "Generator" as G
8+
9+participant "Sieve(2)" as S2
10+participant "Sieve(3)" as S3
11+participant "Sieve(5)" as S5
12+participant "Sieve(7)" as S7
13+
14+
15+
16+G -[#purple]\\ F: try(2)
17+F -\ M: found(2)
18+M -\ S2: new
19+activate S2
20+G \\--o M: "reconneced to Sieve(2)"
21+
22+
23+G -[#blue]> S2: try(3)
24+S2 -\\ F: try(3)
25+F -\ M: found(3)
26+M -\ S3: new
27+activate S3
28+S2 \\--o M: "reconneced to Sieve(3)"
29+
30+
31+G -[#red]> S2: try(4)
32+
33+G -[#blue]> S2: try(5)
34+S2 -[#blue]> S3: try(5)
35+S3 -\\ F: found(5)
36+F -\ M: found(5)
37+M -\ S5: new
38+activate S5
39+S3 \\--o M: "reconneced to Sieve(5)"
40+
41+
42+G -[#red]> S2: try(6)
43+
44+G -[#blue]> S2: try(7)
45+S2 -[#blue]> S3: try(7)
46+S3 -[#blue]> S5: try(7)
47+S5 -\ G: try(7)
48+F -\ M: found(7)
49+M -\ S7: new
50+activate S7
51+S5 \\--o M: "reconneced to Sieve(7)"
52+
53+G -[#red]> S2: try(8)
54+
55+G -[#blue]> S2: try(9)
56+S2 -[#red]> S3: try(9)
57+
58+G -[#red]> S2: try(10)
59+
60+
61+== etc ==
62+@enduml