22. Scratch

Miscellaneous stuff to be ordered and processed later.

22.1. Style Guide

Despite the cpaitalization rules for book titles, e.g. as described in Capitalisation - The University of Nottingham:

Books, films, songs, games etc

Capitalise the first word of the title and all words within the title except articles (a/an/the), prepositions (to/on/for etc) and conjunctions (but/and/or etc).

[…]

Subtitles

Capitalise subtitles only if the original title is printed or displayed that way.

It is simpler to just do away with title capitalization altogether, not just for subtitles.

However, if title capitalizaton is desired but the correct way is uncertain, enter the title all lowercase into the Title Case Converter – A Smart Title Capitalization Tool and select Wikipedia style.

22.2. Emacs

22.2.1. Symbol tags

Delimiter set concept:

[ ANCHOR-RX ] LEFT-DLM SYMBOL-RX RIGHT-DLM [ TRAILER-RX ]

Standard delimiter set:

|: sym :|

Alternate delimiter set:

:: sym ::

Enclose delimiter set:

` sym `

Navigation:

key sequence description
M-left, M-right previous, next tag
M-up, M-down previous, next here tag
M-h go to next here tag. If not found, go to previous here tag
C-u M-<up> define here tag and go to previous here tag
key sequence description
M-o tag occur
M-g tag grep-find
key sequence description
M-i M-x symbol-tag-insert
C-u M-h insert here tag on line of its own
M-e enclose current symbol in enclose delimiters
key sequence description
M-keypad-+ more bars for tag at point
M-keypad-- less bars for tag at point
M-C-+ more bars for future inserted tags
M-C-- less bars for future inserted tags
key sequence description
C-c C-d C-v delimiter stack
f8 delimiter selection menu

22.3. Other Diagrams

22.4. Activity Diagrams

PlantUML has no built-in support for the rake symbol (┌┼┐) which designates call behavior in UML 2.x. _static/call-behavior.puml contains the macros RAKE and CALL, which use UNICODE block characters to provide it.

/' |:here:| '/
   !include settings.puml
   !include call-behavior.puml

   partition "Activities with call behavior" {

     fork
     /' Embedded CALL macro invocation with 1 argument '/
     :argument of
macro invocation
CALL(is the longest line)
followed by
shorter lines;

     /' Alternative CALL macro with 2 arguments '/
     :CALL(Last line of\nfirst argument\nis the longest line, \nfollowed by\nshorter lines);

     fork again
     :Flowchart\nPredefined Process\ncall behavior|

     end fork
   }

' -*- plantuml -*-
' Copyright (C) 2018, Wolfgang Scherer, <Wolfgang.Scherer at gmx.de>
'
' This file is part of Documentation Standard.
'
' This program is free software; you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation; either version 3 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful, but
' WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
' General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.

@startuml
/' |:here:| '/
   !include settings.puml
   !include call-behavior.puml

   partition "Activities with call behavior" {

     fork
     /' Embedded CALL macro invocation with 1 argument '/
     :argument of
macro invocation
CALL(is the longest line)
followed by
shorter lines;

     /' Alternative CALL macro with 2 arguments '/
     :CALL(Last line of\nfirst argument\nis the longest line, \nfollowed by\nshorter lines);

     fork again
     :Flowchart\nPredefined Process\ncall behavior|

     end fork
   }

/' |:here:| '/

' (progn (forward-line 1) (snip-insert-mode "puml.t.ide" t) (insert "\n"))
' :ide-menu: Emacs IDE Menu - Buffer @BUFFER@
' . M-x `eIDE-menu' ()(eIDE-menu "z")

' :ide: OCCUR-OUTLINE: Sections: `||: sec :||'
' . (x-symbol-tag-occur-outline "sec" '("||:" ":||") '("|:" ":|"))

' :ide: MENU-OUTLINE:  Sections `||: sec :||'
' . (x-eIDE-menu-outline "sec" '("||:" ":||") '("|:" ":|"))

' :ide: OCCUR-OUTLINE: Default `|||: sec :|||'
' . (x-symbol-tag-occur-outline)

' :ide: MENU-OUTLINE:  Default `|||: sec :|||'
' . (x-eIDE-menu-outline)

' :ide: +-#+
' . Buffer Outline Sections ()

' :ide: PLANTUML: HELP
' . (let ((args (concat (file-name-sans-extension (buffer-file-name)) ""))) (compile (concat "plantuml -h ")))

' :ide: PLANTUML: this file's EPS
' . (let ((args (concat (file-name-sans-extension (buffer-file-name)) ".eps"))) (compile (concat "plantuml -teps " (buffer-file-name))))

' :ide: PLANTUML: this file's PDF
' . (let ((args (concat (file-name-sans-extension (buffer-file-name)) ".pdf"))) (compile (concat "plantuml -tpdf " (buffer-file-name))))

' :ide: PLANTUML: this file's PNG
' . (let ((args (concat (file-name-sans-extension (buffer-file-name)) ".png"))) (compile (concat "plantuml -tpng " (buffer-file-name))))

' :ide: PLANTUML: this file's SVG
' . (let ((args (concat (file-name-sans-extension (buffer-file-name)) ".svg"))) (compile (concat "plantuml -tsvg " (buffer-file-name))))

' :ide: PLANTUML: this file's PNG + display
' . (let ((args (concat (file-name-sans-extension (buffer-file-name)) ".png"))) (compile (concat "plantuml -tpng " (buffer-file-name) " && display " args)))

' :ide: PLANTUML: this file's PNG + VIEW
' . (let ((args (concat (file-name-sans-extension (buffer-file-name)) ".png"))) (shell-command (concat "plantuml -tpng " (buffer-file-name) " ")) (view-file-other-window args))

' :ide: PLANTUML: this file's SVG + VIEW
' . (let ((args (concat (file-name-sans-extension (buffer-file-name)) ".svg"))) (shell-command (concat "plantuml -tsvg " (buffer-file-name) " ")) (view-file-other-window args))

' Local Variables:
' mode: plantuml
' mode: snip-minor
' snip-show-inactive: t
' snip-mode: plantuml
' truncate-lines: t
' comment-start: "'"
' comment-end: ""
' End:
@enduml

22.5. Emacs Buffers with Highlighting

The command M-x htmlify-buffer generates HTML source from the current emacs buffer.

The program webvector converts HTML to SVG as vector graphics (not bitmap images). convert(1) is used to convert SVG to PDF.

Here is an example of the OCCUR-OUTLINE for a python buffer:

_images/emacs-buffer-html-svg.svg

22.6. Tastatur- und Spracheinstellung

Eventuell nach dem Start, Tastaturbelegung einstellen.

Ohne Einstellung der Tastaturbelegung befinden sich folgende Tasten an anderer Stelle:

Beschriftung Zeichen
z y
y z
ß -
- /

22.7. Build statistics

Add new statistic data to doc/_static/build-stats.csv:

( cd "${HOME}"/project/documentation/bin && ./build-stats-for-hosts.sh --no-header >> ../doc/_static/build-stats.csv ws@sheckley )
host processors bogomips memory real user sys load1 load5 load15
luna.wiedenmann.intern 1 7182.70 10G 13m33.565s 6m55.069s 0m25.234s      
luna.wiedenmann.intern 4 7182.70 9G 4m12.369s 7m8.329s 0m40.473s 2.00 1.45 0.69
sheckley.simul.de 8 6983.85 62G 5m1.218s 7m26.416s 0m29.068s 3.24 2.77 1.91
goch.wiedenmann.intern 4 6624.16 31G 4m19.433s 7m40.044s 0m23.544s 2.01 1.31 0.74
scherer.wiedenmann.intern 4 6000.00 31G 3m26.640s 8m19.654s 0m28.548s 3.11 1.60 0.76
tilman-Vostro-5568 4 5424.00 7G 4m47.822s 13m4.366s 0m32.663s 2.60 1.86 1.09
spectre.simul.de 8 3984.00 15G 4m11.647s 13m59.743s 0m38.552s 2.62 1.90 1.02
                   
                   

Note

real < user => process uses multiple CPU’s
real > user => process loses time for I/O or virtualization

Theoretically luna (Virtualbox VM) with a single processor loses a lot of time (real == 13m33, user == 6m55) to virtualization.

Since the build process obviously uses more than 1 CPU for building diagrams, increasing the CPUs to 4 results in a substantial gain for a full build. However, an incremental build without diagrams is not faster with 4 CPUs compared to a single CPU.

A further speed-up, but probably marginal, can be expected if Linux is running on the bare metal and windows is running in the virtual machine.