Reminder to check out this [Wayback/Archive] David Fowler on Twitter: “Playing around with using static interface methods and the new IParsable to make generic callsites for HTTP APIs. Before .NET 7 there was no way to write generic code that did {Type}.TryParse/{Type}.Parse. The type system didn’t have a way to describe these contracts. #dotnet” (and OCR the images):
Archive for the ‘.NET’ Category
David Fowler on Twitter: “Playing around with using static interface methods and the new IParsable to make generic callsites for HTTP APIs. Before .NET 7 there was no way to write generic code that did {Type}.TryParse/{Type}.Parse. The type system didn’t have a way to describe these contracts. #dotnet”
Posted by jpluimers on 2024/07/25
Posted in .NET, .NET Core, C#, C# 11, Development, Software Development | Leave a Comment »
Interesting thread on the usefulness of running a syslog server and being able to write to it
Posted by jpluimers on 2024/07/04
For my link archive:
- [Wayback/Archive] jilles.com ๐ MCH2022 ๐ณ๏ธโ๐ on Twitter: “My Ubiquity setup stopped working (again). This happens way to often in my opinion. I have setup a monitoring environment to debug the issues and consider it not reliable enough for the amount of money I spend on it.”

- [Wayback/Archive] Rick on Twitter: “@jilles_com Waar heb je problemen mee? En ik tijdelijk een syslog server draaien. Dan je kun je gemakkelijker de logs doorspitten (kiwi heeft een simpele gratis versie)”
- [Wayback/Archive] jilles.com on Twitter: “@RickvanSoest Ik draai een grafana setup met syslog, snmp ingest en een losse traceroute om uit te sluiten of het aan de provider of de hardware ligt.”
- [Wayback/Archive] jilles.com on Twitter: “@RickvanSoest Software upgrades die falen. In dit geval een PoE switch die op zโn gat lag. In dit geval iets dat met een reboot gefixt is. Maar in geval van de upgrade was het een compleet nieuwe configuratie.”
In todays cross-platform world, it pays if your tooling can send logging to syslog.
Though originating from the CP/M and SunOS background, I have done most of my professional development work in Windows back-ends and front-ends, so here are some links relevant to that:
- Via [Wayback/Archive] .net – how to write to kiwi syslog server log c# – Stack Overflow:
- [Wayback/Archive] Janik Vonrotz – Forward Windows event log entries to syslog server
- Via [Wayback/Archive] features [Ararat Synapse]:
- Edit 20240811: new location of this unit, Thanks [Wayback/Archive] Steven Kamradt!
[Wayback/Archive] delphi-synapse/slogsend.pas at master ยท dimmaq/delphi-synapse (note this is from an old fork , I have to dig for a more recent synapse git repository as their main repository is SVN based [Wayback/Archive] Ararat Synapse download | SourceForge.net)
[Wayback/Archive] synapse/slogsend.pas at master ยท geby/synapse ยท GitHub - [Wayback/Archive] slogsend
BSD SYSLOG protocol
Used RFC: RFC-3164
- Edit 20240811: new location of this unit, Thanks [Wayback/Archive] Steven Kamradt!
- Via [Wayback/Archive] Syslog & Windows Event Log Utilities – I made this – Delphi-PRAXiS [en]:
--jeroen
Posted in .NET, C#, Delphi, Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, Subversion/SVN | 2 Comments »
In potentially multi-threaded .NET Console applications, ensure `Console.EnsureInitialized` gets called for at least output, and potentially for input
Posted by jpluimers on 2024/07/02
An interesting issue at [Wayback/Archive] Khalid โก๏ธ: “I just used #JetBrainsRider to find a deadlock scenario in #dotnet that I would not have guessed would deadlock. The Console needs to be initialized since the initialization uses a lock the first time. Using it in parallel tasks causes deadlocks. #dotnet This is excellent tooling!โฆ” – Mastodon.
It boils down to a non-public Console.EnsureInitialized method being called from multiple threads causes deadlocks. So far, it looks it can only be called as part of referring to Console.In or Console.Out.
I could only find one potentially related bug, which is [Wayback/Archive] NativeRuntimeEventSource behaving poorly in conjunction with other providers ยท Issue #88011 ยท dotnet/runtime ยท GitHub and being worked on, for .NET 9 or later:
Posted in .NET, Development, Multi-Threading / Concurrency, Software Development | Leave a Comment »
GitHub – KirillOsenkov/LargeAddressAware: A build tools package that adds support for making 32-bit exes LARGEADDRESSAWARE (and some words on a 64-bit Delphi product)
Posted by jpluimers on 2024/06/26
[Wayback/Archive] GitHub – KirillOsenkov/LargeAddressAware: A build tools package that adds support for making 32-bit exes LARGEADDRESSAWARE
Hopefully this can be applied to Delphi projects as well. If not then in Delphi you can manually call this in an post-build task.
Addition late 20240626
[Wayback/Archive] Kirill Osenkov: “@wiert I also found that you canโฆ” – Mastodon
@wiert I also found that you can target AnyCPU 32-bit preferred and it will give you the same address space. So that tool is only for x86.
Via [Wayback/Archive] Meik Tranel on X: “Please for the love of all that is holy. Do not build #dotnet tools to serve a non interactive task that is supposed to be run during a build – use an #MSBuild task package. Also #JS/#NPM devs should not be allowed to write tooling. Thanks for coming to my ted talk…”.
The Delphi bit inspired a few months ago by: [Wayback/Archive] Andreas on X: “Will there ever be a 64bit Delphi IDE or at least a LargeAddressAware version. Our Projekt crashes the IDE between 14-18 compilations because it runs out of memory. Maybe I have to patch the IDE myself by moving all .NET and Compiler memory allocations above the 2 GB address.”
Posted in .NET, Conference Topics, Conferences, Continuous Integration, Delphi, Development, Event, msbuild, Software Development | Leave a Comment »
delphi – What is the meaning of the bScan parameter value 0x45 in keybd_event? – Stack Overflow
Posted by jpluimers on 2024/06/06
From a long time go and a project that got cancelled, but maybe in the future I will need a similar thing again: back in the days not all raw key codes were readily documented or converted correctly from winuser.h to other environments (0x45 is the keyboard raw scan code value for VK_NUMLOCK of the Num Lock key).
[Wayback/Archive] delphi – What is the meaning of the bScan parameter value 0x45 in keybd_event? – Stack Overflow (thanksย [Wayback/Archive] David Heffernan andย [Wayback/Archive] kludg):
Posted in .NET, Conference Topics, Conferences, Delphi, Development, Event, Software Development, Windows Development | Tagged: include | Leave a Comment »
Script alternatives to the Windows-L keyboard shortcut (SwitchUser / LockWorkstation)
Posted by jpluimers on 2024/05/23
More than a decade ago I wrote about Programmatic alternatives to Windows-L keyboard shortcut (SwitchUser / LockWorkstation).
Still, I see many scripts invoke rundll32.exe orย to call theย [Wayback/Archive] LockWorkStation function (winuser.h)ย inside user32.dll. Don’t!
The BOOL LockWorkStation()function has a calling convention that is incompatible with rundll32.exe () which will corrupt the call stack likely will lead to random problems as after two decades, this post from Raymond Chen still holds:ย [Wayback/Archive] What can go wrong when you mismatch the calling convention? – The Old New Thing
Posted in .NET, Batch-Files, C#, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Security, Software Development, Windows, Windows 10, Windows 11, Windows 7, Windows 8, Windows 8.1, Windows Server 2016 | Leave a Comment »
How NOT to Measure Latency
Posted by jpluimers on 2024/05/15
According to @isotopp (Kristian Kรถhntopp ), this is one of the most important talks to watch regarding performance issues: [Wayback/Archive.is] How NOT to Measure Latency
Gil Tene provides an in-depth overview of Latency and Response Time Characterization, including proven methodologies for measuring, reporting, and investigating latencies, and overview of some common pitfalls encountered (far too often) in the field. Tene also covers specific considerations in garbage collected environments (such as Java).
It is on YouTube (embedded below the signature) as well, but the above link as synchronised slides plus video.
More places where you can get it:
Viaย [Archive.is] Kristian Kรถhntopp on Twitter: “… Dieser Talk ist einer der wichtigsten Talks รผberhaupt, wenn es um das debuggen von “Performance Problemen” oder SLOs geht.”
–jeroen
Posted in .NET, Database Development, Development, Java, Java Platform, Profiling-Performance-Measurement, Software Development | Leave a Comment »
sharplab.io – ashmind/SharpLab: .NET language playground
Posted by jpluimers on 2024/05/08
[Wayback/Archive] ashmind/SharpLab: .NET language playground is hosted onย [Wayback/Archive] SharpLab.ioย ย and has this README:
Posted in .NET, C#, C# 10, C# 11, Development, F#, Software Development, VB.NET | Leave a Comment »
Not sure I like this without tail recursion
Posted by jpluimers on 2024/05/07
A while ago Andy Gocke posted this bit of C# 11 code:
[Wayback/Archive] Andy Gocke on Twitter: “Can’t believe none of that “C# is turning into F#” people have noted that this is legal code in C# 11″
Posted in .NET, C#, C# 10, C# 11, Development, F#, Software Development | Leave a Comment »
Please do not make your C# code an obfuscation contest
Posted by jpluimers on 2024/04/23
You. This is valid C# code. Guess what it does [Wayback/Archive]:
for ( var (f,l) = (1, 10); f <= 10; Console.WriteLine($"{f} + {l} = {f + l}"), f++, l-- );
Via [Wayback/Archive] Khalid ๐โ๐ฆบ๐๐ฉ on Twitter: “Iโm trying some programming in #csharp today. Am I doing this right? #dotnet”
–jeroen
Posted in .NET, C#, C# 10, C# 11, Development, Software Development | Leave a Comment »






