The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘C’ Category

Is this the ultimate XKCD “Dependency” derivative?

Posted by jpluimers on 2025/11/29

xkcd modern digital infrastructure torn down by a satisfied looking cat

Besides the August 2025 XKCD infrastructure dependency inspired cartoon on the right, the more recent and great [Wayback/Archive] XCKD: Dependency derivative below is a monumental piece as it combines the recent:

  • fiber outage of the Internet Archive
  • DoS of Cloudflare by itself
  • AWS us-east-1 dependencies outage
  • Crowdstrike DoS of Windows machines
  • framework-du-jour mentality in the JavaScript world
  • many more¹

Image [Wayback/Archive] 36247840bf294a9d.png (1080×1389) from [Wayback/Archive] xyla 🐀🪇: “someone pls alt text this shit…” – buy shitpost cheap:

Read the rest of this entry »

Posted in *nix, Amazon.com/.de/.fr/.uk/..., AWS Amazon Web Services, C, CDN (Content Delivery Network), Cloud, Cloudflare, cURL, Development, Fun, Hardware, Infrastructure, ISP, JavaScript/ECMAScript, Network-and-equipment, Node.js, npm, Power User, Rust, Scripting, Software Development, Web Development | Tagged: , | Leave a Comment »

When compiler optimisations cause memcpy undefined behaviour: Fix a crash trying to save an empty AudioStream by hpvb · Pull Request #100422 · godotengine/godot · GitHub

Posted by jpluimers on 2025/11/25

The libc C standard library memcpy function is very fast, but because of that also very dumb and with a list of circumstances where its behaviour is undefined (a great opportunity to introduce vulnerabilities in your code). The specs of those are in [Wayback/Archive] memcpy, memcpy_s – cppreference.com, including:

The behavior is undefined if either dest or src is an invalid or null pointer.

With C compilers becoming smarter and smarter, their optimisations can hide the fact that you call memcpy with parameters causing undefined behaviour.

This is a nice example of that: [Wayback/Archive] Fix a crash trying to save an empty AudioStream by hpvb · Pull Request #100422 · godotengine/godot · GitHub

The change is relatively simple, but hardly shows why the change is there. Only one line got changed in [Wayback/Archive] Fix a crash trying to save an empty AudioStream by hpvb · Pull Request #100422 · godotengine/godot · GitHub

Read the rest of this entry »

Posted in C, Development, Software Development | Tagged: , , | Leave a Comment »

GitHub – RfidResearchGroup/ChameleonUltra: The new generation chameleon based on NRF52840 makes the performance of card emulation more stable. And gave the chameleon the ability to read, write, and decrypt cards.

Posted by jpluimers on 2025/11/18

[WaybackSave/Archive] GitHub – RfidResearchGroup/ChameleonUltra: The new generation chameleon based on NRF52840 makes the performance of card emulation more stable. And gave the chameleon the ability to read, write, and decrypt cards.

Via: [Wayback/Archive] Angry Nerds 260 – Opladen voor WHY2025 – YouTube

Related: [Wayback/Archive] ChameleonUltra NFC/RFID Reader/Writer/Simulator from Dim6 Tech on Tindie

It is also available from various Asian sites.

Query: [Wayback/Archive] chameleon nfc reader writer at DuckDuckGo

Way more lightweight than Flipper Zero (less chance of getting it confiscated at border controls as well) but also less powerful/flexible.

--jeroen

Posted in C, Development, Hardware Development, Software Development | Leave a Comment »

Rudimentary DaynaPORT packet driver to use WiFi from DOS using BlueSCSI: GitHub – cml37/daynaport-dos-packet-driver

Posted by jpluimers on 2025/10/08

Despite beta or early alpha quality [Wayback/Archive] GitHub – cml37/daynaport-dos-packet-driver by by [Wayback/Archive] RetroTech Chris – YouTube is very cool.

Main source: [Wayback/Archive] daynaport-dos-packet-driver/src/dayna.c at main · cml37/daynaport-dos-packet-driver · GitHub

Related:

Read the rest of this entry »

Posted in C, Development, Hardware Development, Hardware Interfacing, MS-DOS, Network-and-equipment, SCSI, Software Development, TSR Terminate and Stay Resitent, Turbo C | Leave a Comment »

What Every Programmer Should Know about How CPUs Work • Matt Godbolt • GOTO 2024 – YouTube

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 »

Jeroen Wiert Pluimers @wiert@mastodon.social on X: “@_ObomheseR Since JavaScript is in the group of curly based programming languages influenced by the B programming language, integer constants starting with zero are tried first in octal base. 017 octal is 15 decimal 018 octal is not possible, so becomes 18.”

Posted by jpluimers on 2025/08/20

With the constant influx of JavaScript programmers, it keeps worth repeating that you should always run JavaScript in strict mode via "use strict"; (like in the past Visual Basic 6 developers should use option strict and option explicit) to forget risky JavaScript syntax like implicit ocal constants (which were removed from the documentation in the 2009 ECMAScript 5 specification for JavaScript), and every codeline should have a test code covering it, especially for comparisons involving non-strict behaviour like the use of leading zeros.

As of the succeeding 2015 standard (ECMAScript 6), octal numbers in JavaScript start with 0o or 0O followed by a series of octal digits.

Oh, and the history of octal in computing of course has to do with 6-bit systems and also lead to 6-six bit character codes including BCD character encoding..

My tweet back earlier this year: [WaybackSave/Archive] Jeroen Wiert Pluimers @wiert@mastodon.social on X: “@_ObomheseR Since JavaScript is in the group of curly based programming languages influenced by the B programming language, integer constants starting with zero are tried first in octal base. 017 octal is 15 decimal 018 octal is not possible, so becomes 18.”

Inhteritence:

Read the rest of this entry »

Posted in B, BASIC, C, Development, JavaScript/ECMAScript, MarkDown, Retrocomputing, Scripting, Software Development, VB6, Visual BASIC | Leave a Comment »

Alan Turing Wrote Object-Oriented Code In C And Ran It On BEAM – De Programmatica Ipsum

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:

These days, we are using the offsprings of multiple programming paradigms having unprotected sex with one another in a thoughtful orgy. PHP, C#, Perl, C++ and even Visual Basic have all closures, lambdas or anonymous functions now. F# and Scala can instantiate any class included in their corresponding vendor-provided frameworks. JavaScript implements functions as objects with a single method .call(). Haskell comonads are actually objects. Swift 1.0 implemented instance methods as curried functions.
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 »

GitHub: finding the oldest commit on large repositories

Posted by jpluimers on 2025/06/25

The manual process of getting back to the earliest commit of a GitHub repository is easy for small repositories, but for a large one it is very tedious.

TL;DR: there are various ways, but the easiest was the INIT Bookmarklet below.

Note: 2 weeks before the scheduled post made it to the front of the queue, I got a report¹ that it started to fail. Here it still works.

It’s hard to debug because of the functional programming approach taken.

Read the rest of this entry »

Posted in Bookmarklet, C, Conference Topics, Conferences, Development, DVCS - Distributed Version Control, Event, git, GitHub, Go (golang), JavaScript/ECMAScript, Power User, Scripting, Software Development, Source Code Management, Web Browsers | Tagged: , , | Leave a Comment »

Bypassing ACLs with SeRestore privilege. And very simple User to LocalSystem elevation. – YouTube

Posted by jpluimers on 2025/05/28

This is cool and scary at the same time, especially since I knew about other privileges (SeDebugPrivilege comes to mind).

Granted you need to be local administrator for this, but still: for some tasks you do not need to elevate in the traditional way, but just give your current token more privileges.

[Wayback/Archive] Bypassing ACLs with SeRestore privilege. And very simple User to LocalSystem elevation. – YouTube

Via [WaybackSave/Archive] Grzegorz Tworek on X: “Friendly Reminder: If you have admin privileges but lack the necessary file permissions, you can leverage the SeBackup/SeRestore privileges directly from cmd.exe! There’s no need to elevate to LocalSystem, duplicate TrustedInstaller, or use similar methods. Simply enable the …”

Read the rest of this entry »

Posted in C, Development, Power User, Software Development, Windows, Windows Development | Leave a Comment »

Delphi “array of const” to “varargs” – Stack Overflow

Posted by jpluimers on 2025/04/16

Just in case I ever think “oh, I might try want to go the Variadic function arguments way in Delphi” again, I must remember “maybe not a good idea” and re-read these posts:

Note that this example, despite the description indicates it is, it is actually not varargs by array of const (which requires using TVarRec as under the hood it is an open array of TVarRec): [Wayback/Archive] How to create functions that can accept variable number of parameters such as Format().

Then some Free Pascal links, which is different from, but also similar to Delphi:

Queries:

--jeroen

Posted in .NET, C, C#, Delphi, Development, FreePascal, Pascal, Software Development | Leave a Comment »