Posted by jpluimers on 2025/09/10
[Wayback/Archive] What Every Programmer Should Know about How CPUs Work • Matt Godbolt • GOTO 2024 – YouTube
Main takeaways for me:
- CPU pipelines have grown a lot longer than I was aware off
- there are many more internal registers than I was anticipating
- clever ways to convert if statements to non-jumps
--jeroen
Posted in .NET, Assembly Language, C, C#, C++, Delphi, Development, Python, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2025/07/22
A while ago, I had to figure out the field sizes for some Windows API functions. In the distance past, the base data types used to be defined in windows.h, but over the decades that file has been split into various other files as there are far more than just the BOOL, int, UINT, DWORD, HWND, LPARAM and WPARAM data types. Currently the data types are defined in [Wayback/Wayback] Windows Data Types (BaseTsd.h) – Win32 apps | Microsoft Learn.
Note that C++ allows to specify bit field sizes for fields in struct composite data types, so under some circumstances, fields my have a different number of bits than you might expect from their data type.
Via [Wayback/Archive] c++ dword uint size – Google Search.
–jeroen
Posted in C++, Development, Software Development, Visual Studio C++, Windows Development | Leave a Comment »
Posted by jpluimers on 2025/07/16
I originally missed this as back then I was in the midst of managing trouble in my parental family, unaware I was already having rectum cancer. Then things went fast, not even including the Covid-19 years, so I was glad last year I got reminded of this mid-2019 article:
[Wayback/Archive] Alan Turing Wrote Object-Oriented Code In C And Ran It On BEAM – De Programmatica Ipsum writes a lot of interesting things on programming paradigms, starting with
In his rare 1994 book “Object-Oriented Programming In C” Axel Tobias Schreiner explains how to do inheritance, class methods, class hierarchies, and even how to raise exceptions using nothing else than pure, simple, pointer arithmetic-filled, ANSI C.
then arguing basically most of not all modern languages share the majority of programming paradigms and all these paradigms are repeats of the past:
But none of this is new. Smalltalk, arguably the precursor of object orientation, had collect and select methods which were the grandparents of our more common map and filter functional friends.
What sets modern languages apart is that they the majority covers all the paradigms you might need, just differing in how well they support the paradigm-du-jour.
It means programming language wars should have been a thing of the past for about two decades now.
Please let that sink in.
Oh: if you look for that ANSI C book, here it is: [Wayback/Archive] https://www.cs.rit.edu/~ats/books/ooc.pdf [Wayback PDF View/PDF View]
Via: [Wayback/Archive] De Programmatica Ipsum: “”In his rare 1994 book “Object…” – mas.to
--jeroen
Posted in .NET, C, C#, C++, Cloud, COBOL, Containers, Design Patterns, Development, Docker, Erlang, F#, Go (golang), Haskell, Infrastructure, Java, Java Platform, Kotlin, Kubernetes (k8n), ObjectiveC, OOP (Object Oriented Programming), Perl, Scala, Scripting, Software Development, Swift, VB.NET | Leave a Comment »
Posted by jpluimers on 2025/07/10
Below is a really cool tool-set for Visual Studio Code of which its development started when I was recovering from life-saving bowel-surgery during the series of procedures to get rid of my metastasised rectum cancer.
It supports decompilation of various languages (.NET C# and F#, GO, Rust and clang) into either x86 assembler or IR (Intermediate Representation, on the .NET side often also called IL for Intermediate Language) to research how well a compiler stack behaves.
[Wayback/Archive] badamczewski/PowerUp: ⚡ Decompilation Tools and High Productivity Utilities ⚡:
Read the rest of this entry »
Posted in .NET, C#, C++, Development, F#, Go (golang), Rust, Software Development | Leave a Comment »
Posted by jpluimers on 2025/06/12
I wrote about Sequoiaview in depth in SequoiaView Homepage, made some research notes in “cushion treemap” delphi – Google Search and touched it slightly in A choco install list.
I never heard back from my request for Sequoiaview source code, and given ever increasing local storage media sizes, the speed of it now has become an issue, so I started looking to see if more alternatives have appeared and what sets them apart.
TL;DR
- There is the open source WinDirStat that runs as non-admin and is about as slow as Sequoiaview
- There is the closed source but free for personal use WizTree that requires admin elevation and is much faster than Sequoiaview and WinDirStat
Neither of them allow for a view that is cushion treemap only.
The reason that WizTree is fast is that it directly uses the NTFS MFT (Master File Table) to read the information from. This requires elevated permissions.
This is the same mechanism used by the Everything search tool, but unlike Everything, WizTree:
Read the rest of this entry »
Posted in C++, Development, Encoding, Mojibake, Software Development, UTF-8, Windows Development | Tagged: include | Leave a Comment »
Posted by jpluimers on 2025/04/30
With the huge dependency of Delphi on the LLVM project – basically none of their cross-platform support falls apart without LLVL – I wonder how much Embarcadero and their. mother company Idera contributed back to the LLVM project (which isn’t hard, see [Wayback/Archive] Contributing to LLVM — LLVM 20.0.0git documentation).
I tried these queries with remarkably few results:
The ones found were contributed by [Wayback/Archive] jwiegley (John Wiegley) · GitHub and [Wayback/Archive] atoker · GitHub. I could not find back who atoker is, but John Wiegley was part of the C++ Builder 1 team [Wayback/Archive] The C++Builder 25th Anniversary: Visual Development, the Power of the C++ Language and 2.5 decades of Continuing Excellence but made the patches while working for Boostpro, for instance [Wayback/Archive] [cfe-commits] PATCH [1/2]: Implementation of Embarcadero expression traits.
Hoping the above queries are not good enough: anyone having a more complete idea of the Embarcadero/Idera contributions to the LLVM project?
Especially in the light of this bsky post a while ago:
Read the rest of this entry »
Posted in C++, C++ Builder, Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2025/04/10
Over the last years a few C:\Windows.msi vulnerabilities have been discovered (and fixed), of which some are linked below.
The core is that the Windows Installer tries to be transactional, and NTFS is, but the combination with installer processes isn’t.
That leads into vulnerabilities where you can insert malicious Roll Back Scripts (.rbs files) and Roll Back Files (.rbf files), and I wonder if by now more have been discovered.
So this post is a kind of reminder to myself (:
Oh, and I learned much more about whoami on Windows, as there whoami /groups shows very detailed SID information. From that, I learned more on the internals of SIDs too!
Read the rest of this entry »
Posted in Blue team, C++, Development, Power User, Red team, Security, Software Development, Visual Studio C++, Windows, Windows Development | Tagged: 1, else, endif, if | Leave a Comment »
Posted by jpluimers on 2025/03/13
From a while back, but still interesting:
- [Wayback/Archive] Counting the leading zeroes in a binary number with C#
- [Wayback/Archive] c# – Getting the number of leading 1 bits – Stack Overflow (thanks [Wayback/Archive] Barry Kelly and [Wayback/Archive] SoapBox)
Especially the first link explains the algorithm very well and is similar to links referred to from the Stack Overflow question as it is based on counting ones (and leading ones are basically leading zeros but bit-inverted).
It also explains a cool thing for leading zeros: modern CPU have instructions which .NET Core.
Read the rest of this entry »
Posted in .NET, AArch64/arm64, Algorithms, ARM, Assembly Language, C, C#, C++, Delphi, Development, Software Development, x64, x86 | Tagged: csharp, dotnet, dotnetcore | Leave a Comment »