-- Leo's gemini proxy

-- Connecting to gemini.tuxmachines.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

Tux Machines


Programming Leftovers


Posted by Roy Schestowitz on Dec 13, 2022


Open Hardware/Modding: Raspberry Pi, ESP32, and More

Security Leftovers



Add moc includes to speed up Qt compilation


↺ Add moc includes to speed up Qt compilation


> The Meta-Object Compiler, moc, handles Qt's C++ extensions and it is required for signals and slots and properties in Qt. moc reads C++ header files and if the Q_OBJECT macro is used, it generates an extra .cpp file named moc_filename.cpp containing extra (meta-object) code. This post has a bit of background information and a shell script to automatically include moc_*.cpp files in your code whenever Q_OBJECT is used. If you use qmake, this will probably speed up your build and if you use cmake, this will probably speed up incremental builds (when CMAKE_AUTOMOC is on).



An Ideal CI/CD System


↺ An Ideal CI/CD System


> A good CI/CD system means developer productivity. What an ideal CI/CD system looks like today.



Switching to Go – First Impressions


↺ Switching to Go – First Impressions


> A few months ago I switched to working in Go. Before that, my main language was Python for many years. The change to Go has been very smooth, without any major surprises or stumbling blocks. This may partly be because in the past I have also worked in both C++ and Java. Even so, Go (the parts I have used so far) is quite straightforward.


> Before I started in my new role, I read through The Go Programming Language, which is quite good. Otherwise I have mostly used online resources when I have needed to learn how something works. Both A Tour of Go and Go by Example are good.



Optimizing compilers reload vector constants needlessly


↺ Optimizing compilers reload vector constants needlessly


> Modern processors have powerful vector instructions which allow you to load several values at once, and operate (in one instruction) on all these values. Similarly, they allow you to have vector constants. Thus if you wanted to add some integer (say 10001) to all integers in a large array, you might first load a constant with 8 times the value 10001, then you would load elements from your array, 8 elements by 8 elements, add the vector constant (thus do 8 additions at once), and then store the result. Everything else being equal, this might be 8 times faster.



A Neat XOR Trick


↺ A Neat XOR Trick


> There's a neat trick to solve Advent of Code, day 6 in a single pass.


> Looking over the solutions mega-thread, it seems like not many people discovered this trick; when I posted about it, people found it to be noteworthy.



Logical beats sequential


↺ Logical beats sequential


> This matter of logical versus sequential constraints is at the heart of the distinction between scenario-based techniques — use cases, user stories… — and object-oriented requirements. This article analyzes the distinction. It is largely extracted from my recent textbook, the Handbook of Requirements and Business Analysis [1], which contains a more extensive discussion.



Use Django to send emails with SMTP


↺ Use Django to send emails with SMTP


> Numerous professions utilize simple mail transfer protocol (SMTP) to deliver emails to their end users. SMTP also retrieves messages, though that has not been its primary use case. Open source frameworks like Django, a Python-based web framework, allows more control for sending emails using functions and expressions.


> This article shows how to configure an SMTP server and send emails in Django using SMTP.



Perl Advent Calendar 2022


↺ Perl Advent Calendar 2022


> 2022 twenty four merry days of Perl




gemini.tuxmachines.org

-- Response ended

-- Page fetched on Sat Jun 1 09:23:14 2024