Sunday, October 25, 2020

2020-10-25 Sunday - GNU Compiler Collection (GCC) 10.2


 

For one who seeks to be a master of their craft - you must continually attend to sharpening the saw.

Today: A deep dive back into C++ POSIX threaded programming, using the G++ compiler, available with the GNU Compiler Collection (GCC 10.2) - and exploring the differences in C++17, and the experimental implementation of some C++20 features.

GCC References

Eclipse: C/C++ Development Toolkit (CDT) Resources

Although I usually rely on Microsoft Visual Studio (or Visual Studio Code) as my primary IDEs - I'm forcing myself to use Eclipse ("2020-09" CDT release) - so that I maintain familiarity & proficiency:

  • https://www.eclipse.org/cdt/
    • https://www.eclipse.org/cdt/documentation.php  
      • "The C/C++ Development Toolkit (CDT) is a collection of Eclipse-based features that provides the capability to create, edit, navigate, build, and debug projects that use C and/or C++ as a programming language."
      • "The CDT does not include the necessary compilers and debuggers to convert C/C++ code into executable programs and to debug those programs, but it does provide the frameworks that allow such tools to be integrated in a consistent fashion. This allows you to mix and match such tools depending on your project requirements."
  •  ...which leads to suggesting:

Cygwin

  • https://cygwin.com/
  • Once you have the GCC G++ elements installed, run "g++ -v" at the command line, and you should get something like this:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/10/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0/configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (GCC)

Or, alternatively, you may wish to try LLVM

LLVM & Clang

"The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines. The name "LLVM" itself is not an acronym; it is the full name of the project."

"LLVM began as a research project at the University of Illinois, with the goal of providing a modern, SSA-based compilation strategy capable of supporting both static and dynamic compilation of arbitrary programming languages. Since then, LLVM has grown to be an umbrella project consisting of a number of subprojects, many of which are being used in production by a wide variety of commercial and open source projects as well as being widely used in academic research. Code in the LLVM project is licensed under the "Apache 2.0 License with LLVM exceptions" "

  • "clang fully implements all of standard C++98 except for exported templates (which were removed in C++11), all of standard C++11, C++14, and C++17, and most of C++20."

Suggested Books:


  • "Coverage begins with the basics, then ranges widely through more advanced topics, including many that are new in C++17, such as move semantics, uniform initialization, lambda expressions, improved containers, random numbers, and concurrency. The tour even covers some extensions being made for C++20, such as concepts and modules, and ends with a discussion of the design and evolution of C++."
Some older books, that may also be of interest as background reading:

Useful Tutorials - General C++

Useful Tutorials - POSIX Threads

References

Tuesday, October 20, 2020

2020-10-20 Tuesday - Do One Good Thing - Before The Sun Sets Tomorrow

 

Photo by Diego PH on Unsplash 
 

A meditation for tomorrow:

Do one good thing before the sun sets tomorrow - for someone else - without any expectation of reward.

Plant a seed.
Offer a suggestion.
Make a recommendation.
Send a thank you.
Remind someone of the impact they had on your life, your career.
Reach out to someone and offer your help.
Volunteer.
Speak words of encouragement.
Offer praise for a job that was truly well done.
Pause for a moment and find something in another - for which you are grateful.

Be the thread of inspiration.

Be The Light For Others.

 

Friday, October 16, 2020

2020-10-16 Friday - Today's Meditation: Building Complex Things

 
There are many different schools of thought in the world of IT, software engineering, and architecture today.

The pendulum has swung so far in the direction of "Continuous delivery of throwing spaghetti against the wall - to see what sticks" - that many have lost sight of the need (and value) of doing __any__ deep design work.

That has an often predictable outcome: "Continuous Rework".

Which is neither agile, lean, efficient, or economical.

Consider this feat of engineering:

"This digital model was created for the project of the virtual exhibition 'Prague at the time of Charles IV' and shows how the construction of the Charles Bridge took place in the 14th century"


"construction began at 5:31am on 9 July 1357...[and] was completed 45 years later in 1402" https://en.wikipedia.org/wiki/Charles_Bridge

 

 Analysis. Design. Architecture. Planning. Calculations. Engineering. 

 All went into this effort. 

Much good would accrue - if we make a distinction between what is appropriate for trial-and-error engineering - and what benefits may accrue to valuing some judicious levels of investment in deep design work. 

Flailing may create the appearance of a lot of activity (and perhaps may seem to imply progress) - but, it is not a very efficient operating model.

Saturday, October 10, 2020

2020-10-10 Saturday - Free O'Reilly Book - Chaos Engineering by Casey Rosenthal & Nora Jones

 


Chaos Engineering: System Resiliency in Practice

https://www.verica.io/book/

 

Also see: 

The github repo ("A curated list of Chaos Engineering resources.") maintained by Pavlos Ratis

https://github.com/dastergon/awesome-chaos-engineering  

and:

https://principlesofchaos.org/

https://github.com/chaos-eng/chaos-eng.github.io/

and:

"The Chaos Toolkit aims to be the simplest and easiest way
to explore building your own Chaos Engineering Experiments."

https://chaostoolkit.org/



Copyright

© 2001-2021 International Technology Ventures, Inc., All Rights Reserved.