C++Guns – RoboBlog

30.01.2019

C++ Guns: C++20 Aggregates can no longer declare constructors (schon wieder anders...)

Filed under: Allgemein — Tags: — Thomas @ 21:01

Ab GCC 9. P1008 Prohibit aggregates with user-declared constructors Initialization in modern C++ - Timur Doumler - Meeting C++ 2018 Das Thema ist ziemlich lang und eigentlich total überflüssig. Wenn nicht immer die ganzen Altlasten da wären ... but we have to deal with it. Es gibt genügend Artikel im Internet wie gut oder schlecht […]

27.01.2019

C++ Guns: Stop using std::endl start using acpl::newline and std::clog std::cerr

Filed under: Allgemein — Tags: — Thomas @ 13:01

Schaut euch mal C++ Weekly - Ep7 Stop Using std::endl an. Eigentlich hat er ja recht, std::endl wird nicht gebraucht. Problem damit (wie immer), es macht mehr als man vermutet. Denn "end line" suggeriert nicht, dass nun ein Zeilenumbruch kommt und auch kein flush(). Das ganze hat bestimmt wieder historische Gründe. Jedenfalls gibt es neben […]

26.01.2019

Installation von Devuan

Filed under: Allgemein — Thomas @ 18:01

Wie ich schon im vorherigen Artikel Installation von FreeBSD schrieb, geht mir Linux auf die Nerven, vorallem der systemd Teil. FreeBSD war allerdings nicht so das Wahre für den Desktop. Für einen Router ist es super klasse, ohne Frage. Also ist heute Devuan dran. Das netinstall Image war schon geladen und mit dd auf die […]

24.01.2019

Installing gcc, g++ and gfortran 8 from source

Filed under: Allgemein — Tags: , , , — Thomas @ 22:01

The procedure is quite the same as for gcc 4.8 as you can see in my older post Installing gcc, g++ and gfortran 4.8 from source Read the manual. Download, unpack, switch dir, download, unpack, link. $ wget ftp://ftp.gwdg.de/pub/misc/gcc/snapshots/LATEST-8/gcc-8-20190118.tar.xz $ xz -d gcc-8-20190118.tar.xz $ tar xf gcc-8-20190118.tar $ gcc-8-20190118/ $ wget ftp://ftp.gmplib.org/pub/gmp-6.1.2/gmp-6.1.2.tar.bz2 $ tar xjf […]

23.01.2019

C++ Guns: ACPL: Conway's Game of Life

Filed under: Allgemein — Tags: — Thomas @ 18:01

In den Heise Kommentaren (Ja ich schau da ab und zu rein) gab es letztens ein Vergleich zum Spaß von Conway's Game of Life einmal in C++ und GO. Natürlich war GO furchtbar langsam. Aber der C++ Code sah auch nicht sehr sinnvoll aus. Es ist an der Zeit es mit meinem ACPL Framework und […]

17.01.2019

(QGIS) Debian dummy / fake packet

Filed under: Allgemein — Tags: — Thomas @ 15:01

I want to install QGIS today and run into following issue: qgis : Depends: gdal-abi-2-3-0 but it is not installable It is not installable because it does not exist in buster, only in sid. It is a virtual package for libgdal20. So I installed libgdal20 and crate a fake packed. $ cat gdal_abi.txt Section: misc […]

16.01.2019

C++ Guns: Interval

Filed under: Allgemein — Tags: — Thomas @ 15:01

Es gibt eine Menge Implementationen und Arbeit über Intervall Datentypen in C++, aber nichts, was einfach mal einfach wäre. Riesen Linksammlung http://www.cs.utep.edu/interval-comp/ Doc No: A Proposal to add Interval Arithmetic o the C++ Standard Library (revision 2) von 2008 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2137.pdf BOOST natürlich https://www.boost.org/doc/libs/1_69_0/libs/numeric/interval/doc/interval.htm Und sogar ein Versuch in ganz modernen C++ Moore: Interval Arithmetic in […]

15.01.2019

C++ Guns: How NOW to design FORTRAN -> C++ Interfaces

Filed under: Allgemein — Tags: , — Thomas @ 00:01

This is one wrong way to design a FORTRAN to C++ interface. But let's start at the beginning. From FORTRAN callable C++ function must be declared with extern "C" to disable name mangling. The function funcCPP expect a 2D array. Two items a 3 values. Calculate the sum and return it. Rember: C counts from […]

13.01.2019

C++ Guns: -Wshadow for constructor arguments

Filed under: Allgemein — Tags: — Thomas @ 14:01

-Wshadow is not that bad. We live in a modern world and don't use C if we can use C++ with a better defined scope and namespaces. So we can catch more errors on compile time. First: what kind or errors can be detected with -Werror=shadow Warn whenever a local variable or type declaration shadows […]

C++ Guns: NOT another level of indirection

Filed under: Allgemein — Tags: — Thomas @ 11:01

The following code snips does NOT create a level of indirection. You can see it by introspect the assembler code. So don't worry, start structure your data. See the next post for a practice example. Example 1 Lets begin with a simple struct contains 3 members: double, float, int. Sum them up. And see what […]

Older Posts »

Powered by WordPress