Downloading binary Homebrew bottles without installing Homebrew can be useful to check the location of the bottle contents.
This is useful when developing Meson native-files or CMake Find*.cmake modules.
Since 2015, Homebrew distributes bottles from Bintray.
For example, HDF5 bottle may be inspected by:
tar --list -f hdf5-1.10.5_1.catalina.bottle.tar.gz
No Homebrew install is necessary for inspection, but actually using the libraries and binaries is of course best done by
Usually it’s desired to check Python type annotations for an entire project.
However, when introducing type checking to a large Python project, it can be beneficial to introduce type checking gradually, to avoid massive refactoring all at once.
You will almost certainly find old code bugs due to type checking that will require refactoring, which introduces risk.
Mitigate this risk by introducing type checking gradually.
MyPy single file options
MyPy is a strongly recommended type checker, though others exist.
We typically use a per-project mypy.ini to make appropriate MyPy default behavior.
To tell MyPy to only check certain files, use the MyPy
deprecated PGI debugger
– it will be removed after 2019.
PGI Java-based pgdbg graphical debugger was for Fortran, C and C++, including the no-cost Community Edition.
The program to be debugged needs compile options -g -O0 to provide debugging information.
Example with hello.f90:
pgfortran -g hello.f90
pgdbg a.out opened the graphical Fortran debugger.
If you don’t see code in the upper left of the graphical PGI debugger for your program, be sure you compiled the executable with -g -O0 options.
Like most other programs, 32-bit Python can be run on 64-bit OS.
When needing to precisely detect if the operating system is 64-bit or 32-bit in a cross-platform way,
one needs to check if Python itself is 32-bit to avoid falsely detecting that the operating system is 32 bit when the OS is actually 64 bit.
Note: This check is just for the Python interpreter.
If you’re working on detecting the operating system parameters in a cross-platform-robust way, several further checks are necessary in general.
Dozens of “free” compilers exist for C, C++ and Fortran.
However, only five compiler families available at no charge support the modern features of these popular compiled languages.
GCC has broad support of modern standards on a very wide range of computing platforms.
GCC’s downside in some cases can be slower runtime performance than compilers having less broad language and platform support.
IBM XL compilers are currently for POWER CPUs only e.g. ppc64le.
IBM XL compilers do not work with a typical x86-based computer.
If you have a $3000 Raptor IBM POWER9 desktop, then IBM XL may be for you.
The IBM XL compilers are high-performance compilers that have a free community edition.
IBM XL Fortran has wide support for Fortran 2008.
Many IDEs create per-project cache directories with metadata relevant to the IDE configuration for that project.
Instead of editing the .gitignore file for each repository,
ignore directories in Git system-wide for all repos as follows, for any operating system.
To avoid connection failures requiring reboot of a Windows 10 PC upon resuming from sleep/standby,
consider disabling Windows network (WiFi) connectivity during sleep.
Only certain PCs are capable of having network connectivity during sleep.
The option to disable WiFi during sleep is only present if the laptop supports it.
Windows Wifi power setting is under the Control Panel → System → Power & Sleep.
If present, uncheck under “Wi-Fi” the “stay connected…sleep” options.
Check if laptop supports Connected Standby
From Command Prompt, type:
if the response includes
Standby (S0 Low Power Idle) Network Disconnected
then the PC is set to disconnect from WiFi on sleep.
Advantages of disabling Windows Connected Standby:
save battery by not having your computer connected to Wifi while sleeping.
not connecting to possibly rogue AP as you travel about, or being subject to tracking.
some hardware (e.g. Microsoft Surface Pro) often fails to connect to Wifi on wakeup until manually going to Device Manager and disable/enable cycling the Wifi adapter.
We usually avoid the WSL default of putting the full Windows PATH into WSL.
Particularly when using a build system like CMake, there will be Windows libraries that WSL-based CMake thinks it can use that it actually can’t.
There are a lot of StackExchange questions on this topic as well.
There is a trivially-simple fix to this problem. Simple be sure that /etc/wsl.conf includes: