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 ‘.NET’ Category

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.”

Read the rest of this entry »

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):

Read the rest of this entry »

Posted in .NET, Conference Topics, Conferences, Delphi, Development, Event, Software Development, Windows Development | Tagged: | 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

Read the rest of this entry »

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

Read the rest of this entry »

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:

Read the rest of this entry »

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″

Read the rest of this entry »

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

Read the rest of this entry »

Posted in .NET, C#, C# 10, C# 11, Development, Software Development | Leave a Comment »

Duotrigordle – find 32 simultaneous Wordle solutions in 37 steps

Posted by jpluimers on 2024/04/09

I wish my language skills were better: [Wayback/Archive] Duotrigordle

Guess all 32 Duotrigordle words in 37 tries!


Based on

Source on GitHub: [Wayback/Archive] thesilican/duotrigordle: Play 32 wordles simultaneously (source in TypeScript and CSS)

–jeroen

Posted in .NET CF, Development, JavaScript/ECMAScript, Scripting, TypeScript, Web Development | Leave a Comment »

When Microsoft download URLs time out: check if it other IP addresses for the same host do work fine (it might be a regional Microsoft CDN issue)

Posted by jpluimers on 2024/03/28

A while back, early in the Wednesday morning after Patch Tuesday I performed regular updates of all the systems noticing some updates failed because timeouts on the Microsoft download servers.

Note I perform the manual steps on Wednesday as Patch Tuesday as it starts at 10:00 AM PST which is in the evening in Amsterdam. The automated steps are automated and kick in when Microsoft tells the Windows machines to update themselves.

See [Wayback/Archive] Security Update Guide FAQs

Microsoft schedules the release of security updates on “Patch Tuesday,” the second Tuesday of each month at 10:00 AM PST.

Depending on time zone(s) in which the organization operates, IT pros should plan their deployment schedules accordingly. Please note that there are some products that do not follow the Patch Tuesday schedule.

I posted a gist and a Tweet, but didn’t immediately thought of a good resolution so I postponed that until Thursday and found it:

Read the rest of this entry »

Posted in C, C++, Development, Power User, Software Development, Visual Studio and tools, Visual Studio C++, vscode Visual Studio Code, Windows, Windows Development | Leave a Comment »

For vscode: git-rename – Visual Studio Marketplace

Posted by jpluimers on 2024/03/26

In vscode, I have installed [Wayback/Archive] git-rename – Visual Studio Marketplace (with source code at [Wayback/Archive] adam8810/vscode-git-rename: Move or rename a file, a directory, or a symlink using git-mv).

Many people assume that git does recognise rename (or mv) operations by itself. Often it does, but it fails, and when it fails it usually is in a complex situation where it is easy to overlook it did not recognise the rename.

Failing complex situations I have encountered in the past (combined they get worse):

  • rename across several directories
  • first edit, then rename
  • first rename, then edit

So it is better to proactively perform an IDE-assisted git mv operation that informs git of the rename.

Many IDE environments support a built-in rename that keeps git mv in the loop, but Visual Studio Code does not, hence the need for this extension.

It means I agree with the question, disagree with the answer, and agree with the comment in [Wayback/Archive] VS Code ‘git mv’ to preserve file history? – Stack Overflow:

Read the rest of this entry »

Posted in .NET, Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, vscode Visual Studio Code | Leave a Comment »