C++Guns – RoboBlog

12.09.2014

Python Naming Conventions

Filed under: Allgemein — Thomas @ 09:09

The naming conventions of Python's library are a bit of a mess, so we'll never get this completely consistent http://legacy.python.org/dev/peps/pep-0008/ Python ist SCHROTT ;)

I can feel segfaults

Filed under: Allgemein — Tags: — Thomas @ 09:09

int main() { const char *a = "I can feel segfaults"; printf("%c\n", (char*) * (char*) * (a+strlen(a))); return 0; }

04.09.2014

virtual inheritance and sizeof()

Filed under: Allgemein — Tags: , — Thomas @ 10:09

Folgender Code: #include < iostream > #include < stdint.h > using namespace std; class Base { public: int32_t a; }; class Derived : public Base { public: int32_t b; }; class VirtualDerived : virtual public Base { public: int32_t c; }; int main() { cout

03.09.2014

Fortran is DEAD!!

Filed under: Allgemein — Tags: , , — Thomas @ 19:09

Leute, ist sag es schon die ganze Zeit: Fortran ist eine tote Sprache. Und damit meine ich nicht nur diese verbuggten Compiler. Oder dass es ewig braucht bis man ein neues Feature vom Compiler unterstützt wird. Im Fortran 2003 Standard sind zwar schön viele OO Ansatze festgelegt, aber ich kenne kein Compiler der den Standard […]

01.09.2014

Fortran progressmeter nice code

Filed under: Allgemein — Tags: — Thomas @ 22:09

! use modulo to determine when to print progress ! not independet of called algorithm speed ! possible output: ! 0.0 % done ! 0.01 % done ! 0,02 % done ! 0,03 % done ! or only one output ! 80.0 % done ! We can do better! subroutine variant1(n) implicit none integer, intent(in) […]

Powered by WordPress