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,835 other subscribers

Finally learned about the usage of the German word “halt”

Posted by jpluimers on 2021/12/17

German’s use the word “halt” very often, but I never fully understood when and why.

I had a kind of feeling (that’s how I learned speaking German as a kid anyway: we stayed in Germany often, they did not speak Dutch, so it was about the only way to start communicating).

So last year, I asked one of my friends Kristian Köhntopp, see the Tweets further below.

In summary, “halt” is a modal particle, so not like Kristian suggested an interjection (German: interjektion).

This also explains why I had trouble understanding them, as modal particles are only used in a limited number of languages (not English), indicate either a mode or filler, and ofen “the translation is often not straightforward and depends on the context”.

Fillers are used in more languages than modal particles; English contains many (like uh, you know, right, actually) and easier to get right than non-filler modal particles.

Related links for futher reading:

–jeroen

Read the rest of this entry »

Posted in Learning/Teaching, LifeHacker, Power User | Leave a Comment »

Kirsten Verdel on Twitter: “LET OP: de GGD is bezig om het telefoonnummer voor boosterafspraken zoveel mogelijk van internet te verwijderen. Meerdere mensen is zelfs gevraagd hoe ze aan het nummer kwamen (staat in de brief…..). Afijn: het is dus nog steeds 0800-7070.” / Twitter

Posted by jpluimers on 2021/12/17

[Archive] Kirsten Verdel on Twitter: “LET OP: de GGD is bezig om het telefoonnummer voor boosterafspraken zoveel mogelijk van internet te verwijderen. Meerdere mensen is zelfs gevraagd hoe ze aan het nummer kwamen (staat in de brief…..). Afijn: het is dus nog steeds 0800-7070.” / Twitter

Dat is nog niet gelukt op onderstaande pagina’s. Dus onthou: als je een normale of boostervaccinatie wilt, dan kan dat door te bellen naar 0800-7070.

  • [Wayback/Archive] GGD GHOR Nederland ondervindt ernstige hinder door DDoS-aanvallen – GGD GHOR Nederland

    Wanneer het online niet lukt om afspraken te maken ​kunnen mensen telefonisch contact opnemen.

    Als alternatief voor testafspraken kan men bellen met het landelijk nummer 0800-1202.

    Voor vaccinatieafspraken is het telefoonnummer 0800-7070 beschikbaar.

    Beide nummers zijn zeven dagen per week bereikbaar van 08.00 ​uur ‘s ochtends tot 20.00 uur ‘s avonds. Let op: burgers kunnen niet zelf bellen voor hun coronatestuitslag.

  • [Wayback/Archive] Veelgestelde vragen boostervaccinatie – GGD GHOR Nederland

    Hoe maak ik een afspraak bij één van de GGD’en?
    Zodra u uw uitnodiging heeft ontvangen, kunt u de Landelijke Vaccinatie Afsprakenlijn bellen via 0800-7070. Dit nummer is dagelijks bereikbaar tussen 08.00 en 20.00 uur. Samen met een medewerker kunt u een locatie, datum en een tijdstip kiezen.

  • [Wayback/Archive] Contact & Pers – GGD GHOR Nederland
    Uw vraag gaat over: Hier vindt u informatie:
    Coronatest of coronavaccinatie – afspraak maken of verzetten Bel 0800-1202 voor een testafspraak

    Bel 0800-7070 voor een vaccinatieafspraak
    Of ga naar www.coronatest.nl
    Coronatest of coronavaccinatie – algemene vragen Ga naar vragen.coronatest.nl

    U vindt hier ook een contactformulier
    CoronaCheck-app / QR-code – vragen over storingen Ga naar status.coronacheck.nl
    CoronaCheck-app / QR-code – vragen over testbewijs, vaccinatiebewijs, testbewijs voor reizen, Testen-voor-Toegang Ga naar rijksoverheid.nl voor alle
    vragen en antwoorden over uw coronabewijs
    Vaccinatiegegevens: als uw gegevens niet kloppen of u kunt uw gegevens niet ophalen Bent u gevaccineerd door de GGD bel dan 0800-5090 . Bent u gevaccineerd door het ziekenhuis, huisarts of een andere zorginstelling, neem dan contact op met die zorginstelling
    Algemene vragen over het coronavirus en beleid Ga naar rijksoverheid.nl of bel 0800-1351
    Vragen over reisbewijzen Ga naar nederlandwereldwijd.nl

    Of bel het Ministerie van Buitenlandse zaken 024-7247247
    Gratis coronatest voor reizigers Ga naar  testenvoorjereis.nl
    Buitenlandse vaccinaties/registraties Ga naar rivm.nl/vaccinatie2
    Vaccinatieafspraak voor personen zonder BSN/ DigiD Bel 0800-7070
    Verwijderen of anonimiseren persoonsgegevens Neem contact op met de GGD in uw regio (te vinden via ggd.nl). U kunt ook mailen naar gegevensverwerking@ggdghor.nl.

–jeroen

Read the rest of this entry »

Posted in Covid-19 / Coronavirus, LifeHacker, Power User | Leave a Comment »

Language oddities: siblings (English) and Geschwister (German) have no Dutch equivalent word

Posted by jpluimers on 2021/12/17

A while ago I learned that the English word siblings translates into the German word Geschiwster.

Before that, I thought Geschwister was synonym to Schwester; long story at [Archive.is] Jeroen Pluimers on Twitter: “Dat lukt heel behoorlijk. Over Duits: heeft dar een woord voor ‘sibblings’? In het Nederlands kom je dan af en toe “brussen” tegen. Hoe zit dat in het Duits?… “.

There is Dutch word that comes close “brussen” which:

  • has no wide spread use,
  • does mean brothers and sisters (broers en zussen),
  • but in the context of one or more sibblings that have one sibbling with special needs.

In a time where gender has become less important, privacy more important, I think it is time to put more emphasis on the neutral use of “brussen”.

Links

–jeroen

Read the rest of this entry »

Posted in About, Learning/Teaching, LifeHacker, Personal, Power User | Leave a Comment »

Delphi MVVM links

Posted by jpluimers on 2021/12/16

After I did conference presentations and wrote a magazine article and in 2013 about Delphi MVVM using DSharp, I saw a 3 articles in 2018, then I went through a big rollercoaster involving rectum cancer treatment.

After recovering, I found that there is one commercially project working on an MVVM framework implementation.

So here are some links on MVVM from new to old:

In my experience experimenting with MVVM and other three- and four-letter frameworks, I found a recurring concept is “convention over configuration”. This relies heavily on having matching names in the various layers.

There you see a big drawback in the Delphi compiler: it lacks a NameOf expression, which means a lot of literal strings ending in your code. Few of the MVVM frameworks have good logging explaining when literals mismatch.

The C# compiler also took a while (until C# version 6 in 2015) to get one, but now supports the [Wayback] nameof expression – C# reference | Microsoft Docs. Some more documentation about this:

Furthermore, the Delphi compiler lacks helpers on interfaces and helpers for generics (heck, I would actually want full extension methods) and generic parameters for methods on interfaces (which is different from the generic parameters on the interface declaration itself). This lack of these features often cause for convoluted syntax to workaround this. Stefan explains the first lacks more clearly in [Wayback] Delphi sorcery: Why no extension methods in Delphi?.

Requests for the nameof expression and interface helpers have been there since at least 2015:

–jeroen

Posted in Delphi, Development, Software Development, Spring4D | Leave a Comment »

BHACP021 Chime Pro (2nd Generation) Teardown Internal Photos EMC TEST REPORT Ring

Posted by jpluimers on 2021/12/16

So you do not have to do a tear-down yourself: [Wayback] BHACP021 Chime Pro (2nd Generation) Teardown Internal Photos EMC TEST REPORT Ring

Chime Pro (2nd Generation) Internal Photos details for FCC ID 2AEUPBHACP021 made by Ring LLC. Document Includes Internal Photos EMC TEST REPORT

–jeroen

Posted in Development, Hardware Development, IoT Internet of Things, Network-and-equipment, Power User, Ring Doorbell/Chime (Amazon) | Leave a Comment »

Some ESXi 7.x notes

Posted by jpluimers on 2021/12/16

Yes, I know this is late in the game, but I’m still catching up with some of the things after from autumn 2019 to spring 2021 spending most of my time on rectum cancer treatment and other core things.

So here are some links on ESXi 7.x so I know what to expect to upgrade existing ESXi 6.x installations and get some new ones up. This will hopefully make some software development easier too, as I plan to have a build-rig some day.

But first of all a surprise for me:

ESXi 7 on ARM

I had not expected ESXi 7 to be available on ARM in 2020 yet, but it’s there and certified to run on Raspberry Pi 4. So here are some links:

ESXi 7 on x64

The bulk of the links:

–jeroen

Read the rest of this entry »

Posted in ESXi6, ESXi6.5, ESXi6.7, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

Always develop and test your application on multi-core machines

Posted by jpluimers on 2021/12/15

It’s an advice from a very long time ago, but wort to repeat every 20 years or so.

Develop and test your code on multi-threaded machines, not in single threaded VMs.

[Archive.is] Jeroen Wiert Pluimers on Twitter: “This sounds like @danny_thorpe on a BorCon some 20 years ago in the Windows XP era. Thread slices going down from ~10 millisecond to CPU instruction execution magnitude highly increases the chance of race conditions.… “

–jeroen

Read the rest of this entry »

Posted in Development, Software Development | Leave a Comment »

Easiest way to move the C:\MSOCache directory to another drive is to create symbolic link to the new location

Posted by jpluimers on 2021/12/15

I always forget that, when moving a folder, instead of finding all references to that folder and fixing them, you can create an NTFS symlink from the old location to the new one.

[Wayback] how to move MSOCACHE folder from C-drive to D-drive ?? – Microsoft Community (thanks [Wayback] tgunda numbering and casing updates mine):

There are too much entries in the registry to correct them manually one by one.

An easier and quicker solution is to copy the full MSOCache folder to a new place and to make a soft link to it:
  1. Create a new folder, e.g. F:\MSOCache
  2. Copy everything from C:\MSOCache to the new one.
  3. Rename the old folder  C:\xMSOCache  (Don’t delete it, just in case).
  4. Open a command prompt window in administrator mode.
  5. Write:  mklink /d c:\MSOCache f:\MSOCache
Now there is an MSOCache link at C, pointing to the new place.
If everything is OK, you can delete  C:\xMSOCache

This can be very handy when moving around large software development installations, circumventing a full uninstall/install sequence loosing lots of configuration settings.

–jeroen

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

Operame: Dutch open source CO2 sensor device for indoor usage: shows green/yellow/red for good/okay/bad CO2 ppm levels

Posted by jpluimers on 2021/12/15

Since all information is in Dutch, I keep only the title and this short explanation in English.

[Archive.is] Sebastian Oort on Twitter: “Gaat jouw school binnenkort weer open? Wil je jouw klas veiliger maken? Hang een CO2 sensor op. Ze zijn weer op voorraad bij OperameNL ! We hebben nog ruim 100 stuks op voorraad en maandag komen de volgende 250 binnen! @OperameNL van @revspacenl… “

 

Read the rest of this entry »

Posted in Development, ESP32, Hardware Development, Hardware Interfacing, IKEA hacks, LifeHacker, Power User, Software Development | Leave a Comment »

Delphi: workaround doing math with generic types preventing “E2015 Operator not applicable to this operand type” with TValue (as there is no way to constraint the generic type to be floating point or ordinal)

Posted by jpluimers on 2021/12/14

A while ago on Facebook (it’s a private group, so you cannot see the posts unless you both have a Facebook account and are member of the group), [Archive.is] Niels Tjørnhøj-Thomsen (coming from a C++ templates background) asked why the below method would throw a E2015 Operator not applicable to this operand type in the complex expression:

function TAxis<t>.Calc(const AScalar: T): single;
begin
  Result := fStart + ( ( ( AScalar - fMin ) / fRange ) * fExtent );
end;

The type itself was very simple:

TAxis<T> = record
  fMin, fMax, fRange: T;
  fStart, fEnd, fExtent: single;
  function Calc( const AScalar: T ): single;
end;

He used these small example specialisations that put me on the wrong foot, as the order was TDateTime followed by single:

var
  rXAxis: TAxis<TDateTime>;
  rYAxis: TAxis<single>;

So at first I thought this might be caused by TDateTime to be defined in the System unit as a typed type:

type
  TDateTime = type Double;

It wasn’t.

Splitting the code in 4 lines with assignments of single expression operations would make the error appear in all expressions.

Casting parts of the expression to simple would not help either.

A small test program [Archive.is] might put you, like me, on the wrong foot because the specialisation is in the same source file as the generic type:

program DelphiMathAndGenerics;

type
  TAxis<T> = record
    fMin, fMax, fRange: T;
    fStart, fEnd, fExtent: single;
    function CalcCasted( const AScalar: T ): single;
    function CalcPlain( const AScalar: T ): single;
  end;

function TAxis<T>.CalcCasted(const AScalar: T): single;
var
  Offset: single;
  NormalisedOffset: single;
  ScaledOffset: single;
begin
  // First 2 lines give the same error: E2089 Invalid typecast
  Offset := single(AScalar) - fMin;
  NormalisedOffset := Offset / single(fRange);
  ScaledOffset := NormalisedOffset * fExtent;
  Result := fStart + ScaledOffset;
end;

function TAxis<T>.CalcPlain(const AScalar: T): single;
var
  Offset: T;
  NormalisedOffset: T;
  ScaledOffset: T;
begin
  // All 4 lines give the same error: E2015 Operator not applicable to this operand type
  Offset := AScalar - fMin;
  NormalisedOffset := Offset / fRange;
  ScaledOffset := NormalisedOffset * fExtent;
  Result := fStart + ScaledOffset;
end;

var
  rXAxis: TAxis<TDateTime>;
  rYAxis: TAxis<single>;

begin
end.

Splitting this in two files [Archive.is], a AxisUnit unit having only the TAxis<T> type, and a main program (even without having the specialisations) shows that even the unit itself would not compile.

This shows a major difference between Delphi (and similar C#) generics and C++ templates:

  • generics are compiled and fully verified at the generic stage
  • templates are pre-processed, then finally verified at specialisation stage

A solution would be that Delphi could constraint the generic type T into something like float or ordinal so the compiler would know that more operators are allowed in the code. But alas, Delphi – like C# – has a very limited number of constraints (C# only would allow a constraint for enumerations in version 7.3): Delphi Constraints in Generics – RAD Studio XE documentation wiki.

This StackOverflow question is very similar, and has the same answer (generics in Delphi work differently than templates in C++): [Source] templates – Arithmetic operations with generic types in Delphi – Stack Overflow

I’m new in Delphi. For a project required by my company, I need to translate some code from our existing C++ classes to Delphi. Some of these classes are templates, such …

Workaround: use the TValue.From<T>() function

There is a workaround though, but it is slow, as you need to convert from the generic T type to the actual (in this case floating point) type you can apply the operators on.

This is possible with the (Delphi 2010 introduced) TValue.From<T>() method which returns a TValue record. That TValue record has instance methods like AsExtended to extract or convert the embedded value as a specific type.

Initially, [Wayback] Delphi 2010 Rtti.TValue documentation had the From method signature wrong, maybe because of many wiki and blog HTML editors kill angle bracket pairs < and > in code blocks:

function From(const Value: T): TValue; static;

Since the [Wayback] Delphi XE System.Rtti.TValue documentation, the From method signature is fixed (see the bold parts):

class function From<T>(const Value: T): TValue; static;

With the [Wayback] Delphi XE2 Rtti.TValue documentation, the unit got renamed from Rtti into System.Rtti and has not changed further.

When using TValue.From<T>(), the AxisUnit becomes this:

unit AxisUnit;

interface

type
  TAxis<T> = record
    fMin, fMax, fRange: T;
    fStart, fEnd, fExtent: single;
    function Calc( const AScalar: T ): single;
  strict private
    function AsSingle(const Value: T): single;
  end;

implementation

uses
  System.Rtti;

function TAxis<T>.AsSingle(const Value: T): single;
begin
  Result := TValue.From<T>(Value).AsExtended
end;

function TAxis<T>.Calc(const AScalar: T): single;
var
  Offset: single;
  NormalisedOffset: single;
  ScaledOffset: single;
begin
  Offset := AsSingle(AScalar) - AsSingle(fMin);
  NormalisedOffset := Offset / AsSingle(fRange);
  ScaledOffset := NormalisedOffset * fExtent;
  Result := fStart + ScaledOffset;
end;

end.

–jeroen

Read the rest of this entry »

Posted in .NET, C#, Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »