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

Archive for 2018

Tumbleweed: Comparing your local version with the on-line versions

Posted by jpluimers on 2018/04/05

Comparing your local version with the on-line versions

Before upgrading a Tumbleweed system, it makes sense to check which is your local and which is the on-line version. This is actually a tad more complicated than it sounds.

There are three versions involved:

There is a mismatch between the last two as a side effect of decoupling the arm port a bit from the high checkin frequency of openSUSE:Factory; ARM simply has not enough power to build the snapshot in the same time Intel and PowerPC can do.

[WayBack] Dominique a.k.a. DimStar (Dim*) – A passionate openSUSE user thinks the last two are mismatched is a side effect off [WayBack] osc service remoterun operates on outdated sources (product builder) · Issue #4768 · openSUSE/open-build-service · GitHub.

He also tech-reviewed this post.

Your local release version

There are various ways to get your local version:

The easiest is to inspect the file  /etc/os-release, for instance 20180208 in the file content:

NAME="openSUSE Tumbleweed"
# VERSION="20180208 "
ID=opensuse ID_LIKE="suse"
VERSION_ID="20180208"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20180208"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

You can also perform rpm --query --provides openSUSE-release | grep "product(openSUSE)" which for the same install returned this product(openSUSE) = 20180208-0.

Finally, you can use zypper to query the installed product which also includes the version:

$ zypper search --installed-only --type product --details
Loading repository data...
Reading installed packages...

S  | Name     | Type    | Version    | Arch    | Repository       
---+----------+---------+------------+---------+------------------
i+ | openSUSE | product | 20180228-0 | aarch64 | (System Packages)

The on-line release version

I will explain this for the aarch64 architecture, but the mechanism holds for all architectures, it is just that the directory names vary.

Architectures and base directories you can use this mechanism with:

Each architecture contains the version number in two kinds of places:

  1. The content of the repository meta data in a file named *-primary.xml.gz referenced from repomd.xml in the repodata subdirectory
  2. The filename of a package named ?P=openSUSE-release-2*

Back to the aarch64 architecture:

The on-line build version

I will explain this for the aarch64 architecture, but the mechanism holds for all architectures that build on openQA, it is just that the directory names vary and not all architectures are running on openQA.

Architectures and base directories you can use this mechanism with:

Architectures not on openQA:

  • armv6hl
  • armv7hl

Each platform contains the version number in two kinds of places:

  1. The content of the repository meta data in the file named media.1/media and media.1/products
  2. Names used in the openQA links

Back to the aarch64 architecture on the ARM platform:

–jeroen

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

Do not use non-ASCII characters as identifiers – not all your tools support them well enough

Posted by jpluimers on 2018/04/05

For a very long time I’ve discouraged people from using non-ASCII characters in identifiers. It still holds.

In the past, transliterations messed things up. Even with increased support for Unicode, tools still screw non-ASCII characters up.

Delphi is not alone in this (the most important one is the DFM view as text support), see this report: [RSP-16767] Viewing a form as text fails with non ascii control or event names – Embarcadero Technologies (you need an account for this, but the report is visible for anyone):

Viewing a form as text fails with non ascii control or event names Comment

Steps:

  1. create a new VCL forms application
  2. drop a label onto the form
  3. change the name of that label to lblÜberfall (note the U-umlaut)
  4. switch to view as text
  • exp: DFM content shown as text
  • act: first line is shown incorrectly (see screenhsot)

–jeroen

Source: [RSP-16767] Viewing a form as text fails with non ascii control or event names – Embarcadero Technologies

via: [WayBack] Code of the day – – Thomas Mueller (dummzeuch) – Google+:

function TNameGenerator.StrasseToStrasse(const _Strasse: string): string;
begin
Result := _Strasse;
end;

Strasse := StrasseToStrasse(_Strasse);

Read the rest of this entry »

Posted in ASCII, Conference Topics, Conferences, Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Encoding, Event, Mojibake, Software Development | Leave a Comment »

Wizard to change Delphi Icon so it used the Projects’ Icon

Posted by jpluimers on 2018/04/05

Thomas Mueller (dummzeuch) – Google+ wrote this: [WayBackJust an inspiration from attila kovacs (too many guys with this name on G+ to…:

A Delphi Wizard that adds a menu item so the Delphi Icon will change into the icon of the currently loaded project.

Can be useful if you have many Delphi instances open.

Source at [WayBackhttp://pisil.de/bds_icon.txt

via: [WayBackIs anybody able and have time to create an extension … change the icon with Application.Icon… – Attila Kovacs – Google+

–jeroen

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Werkgevers mogen mensen met handicap onder minimumloon gaan betalen, dus gaat hun pensioen omlaag, ondanks aanvulling loon door de gemeenten

Posted by jpluimers on 2018/04/05

Het wordt voor werkgevers aantrekkelijker om mensen met een handicap in dienst te nemen. Zij mogen hen onder het minimumloon gaan betalen. Toch gaan de gehandicapte werknemers dan meer verdienen dan nu omdat zij van de gemeente een aanvulling tot het minimumloon kunnen krijgen. Wel verliezen zij hun recht op pensioen en bouwen zij minder aanspraak op voor de werkloosheidsuitkering en de arbeidsongeschiktheidsuitkering.

Het is toch veel handiger voor de overheid om dit voor mensen met een modaal salaris te doen?

Die staan vast geregeld bij de koffie automaat, zijn actief met katten-foto’s op social-media of hebben andere manieren om on-productief te zijn. Daar scoren ze gemiddeld vast wel een procent up 10 op.

Dan haal je al gauw op rijks-niveau een paar miljard binnen: een paar miljoen modalen met EUR 3000 minder per jaar waarvan rijkspremies ongeveer een derde zijn.

Dat is veel meer dan de in de toekomst (2050!) een half miljard te besparen (nu pakweg 10 miljoen per jaar).

Of verhoog de BTW met o.1%. Dan haal je direct al per jaar ongeveer 250 miljoen extra op, en verdeel je dat naar draagkracht evenredig over de bevolking.

Wat is eigenlijk productiviteit? Hoe productief zijn wetgevers eigenlijk? En hoe nuttig is productiviteit eigenlijk. Kun je dat wel objectief meten?

En waar komt het geld voor de gemeenten ineens vandaan? En de aanvulling op de pensioenen omdat gehandicapten – zonder vermogen, want dat is voor de meestel al lang opgegaan aan eigen bijdragen – straks echt onder het bestaansminimum zitten?

–jeroen

Bron: [WayBack] Werkgevers mogen mensen met handicap onder minimumloon gaan betalen – Binnenland – Voor nieuws, achtergronden en columns

Gerelateerd:

Read the rest of this entry »

Posted in Opinions | Leave a Comment »

C# 8.0 features – an exiting list of new possibilities on the horizon

Posted by jpluimers on 2018/04/04

Shamelessly adapted from [WayBack] C# 8.0 features Extension everything — a new syntax for extension methods that will also allow extension “other things,” like the much-anticipated exte… – Lars Fosdal – Google+, including the original posts where the topics were covered:

C# 8.0 features

Post 1

[WayBack] C# 8.0 Features: A Glimpse of the Future – NDepend: C# 8.0 is on the horizon and will be here before you know it, bringing with it some interesting functionality. Let’s take a peek into the future.

Extension everything — a new syntax for extension methods that will also allow extension “other things,” like the much-anticipated extension properties.

Default implementations on interfaces — this allows you to implement methods on interfaces, giving them a default implementation. That will enable you to add new methods to interfaces without breaking its clients.

Nullable reference types — probably one of the most anticipated features ever. It’s a reinterpretation (a “retcon” for you comic book geeks out there) of all the reference types as nullable and the introduction of a new syntax to denote nullable types, accompanied by several types of static checks, to prevent several classes of errors regarding these types. Say farewell to the null reference exception!

Post 2

[WayBack] C# 8.0 Features: Another Glimpse of the Future – NDepend This post covers two probable C# 8.0 features: null coalescing assignment and records. It explains what they are and reports on their current statuses, as well.

Null coalescing assignment — a very simple feature to shorten the check for null before assigning to a variable.

Records — this one is pretty interesting. It’s basically a very short way for you to declare classes that are only data holders. The compiler gives you Equals and GetHashCode implementations, a constructor, properties, and immutability for free, allowing you to do something more interesting with your life than writing loads of boilerplate code.

Post 3

[WayBack] C# 8.0 Features: A Final Glimpse Of The Future – NDepend: Here’s our final post in our C# 8.0 series, where we glimpse into the future. Today we’ll cover another two possible features: target-typed new expressions and covariant return types.

Target-typed “new” expressions — a way for you to omit the type from a constructor call, making the code simpler and less redundant.

Covariant return types — a much-anticipated feature that allows an overriding method to return a more derived type than the original type from the base class.

I really hope they publish the full specs soon, but given that the C# 7 specs yet have to (see [WayBack] C Sharp (programming language) – Wikipedia: Versions), I do not hold my breath, even though it had lots of interesting new stuff too:

–jeroen

Posted in .NET, C#, C# 7, C# 8, Development, Software Development | Leave a Comment »

Efficient and easy-to-use JSON and BSON library – grijjy blog

Posted by jpluimers on 2018/04/04

Cool library for Delphi: [WayBackEfficient and easy-to-use JSON and BSON library – grijjy blog

On my list of stuff to use when I’m in need for JSON or BSON.

–jeroen

via: [WayBack] Looking for an efficient JSON/BSON library that supports a DOM, reader/writer interface and automatic serialization? Maybe this one has what you need… – Erik van Bilsen – Google+

Read the rest of this entry »

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

From the #AllesIstKaput department: DNS 1.1.1.1 is unusable for many; 9.9.9.9 has government affiliation

Posted by jpluimers on 2018/04/04

Abstract from this morning’s Twitter feed:

  • 1.1.1.1 [Wayback] DNS is broken in many areas (because of for instance AT&T, Vodafone, Cisco screwing up and 1.1.1.1 historically being marked for research purposes)
  • 9.9.9.9 [Wayback] DNS has government affiliation (owned by Quad9, but the partner list below does not look nice)

So what’s left?

There are a more interesting IPv4 addresses untaken for DNS, but I’m not sure they are likable enough:

Read the rest of this entry »

Posted in Cloud, Cloudflare, DNS, Infrastructure, Internet, LifeHacker, Power User | Tagged: , , , , | Leave a Comment »

Functional programming in C# – CodeProject

Posted by jpluimers on 2018/04/04

Interesting stuff:

This article discusses functional programming in C# through algebra, numbers, euclidean plane and fractals.

[WayBackFunctional programming in C# – CodeProject

Not the least because of images like below.

–jeroen

.

Posted in Development, Functional Programming, Software Development | Leave a Comment »

Nick Craver on Twitter: “Evidently they make USB rechargeable arc lighters now, most around $10 on Amazon…and they’re awesome:… “

Posted by jpluimers on 2018/04/03

Stuff to remember: [WayBackNick Craver on Twitter: “Evidently they make USB rechargeable arc lighters now, most around $10 on Amazon…and they’re awesome:… “

https://smile.amazon.de/s/ref=nb_sb_noss?field-keywords=plasmabogen+usb

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

Where am I?

Posted by jpluimers on 2018/04/03

Google is smart; you can ask it https://www.google.com/search?q=what%27s+my+location

This is accurate enough for many uses (it’s off for a couple of kilometers):

curl "https://maps.googleapis.com/maps/api/browserlocation/json?browser=firefox&key=AIzaSyDBgL8fm9bD8RLShATOLI1xKmFcZ4ieMkM&sensor=true"

Some links about the above API:

–jeroen

via: [WayBackI need help; I want to know the geographical location of the place where I am…

Posted in Development, Google, GoogleMaps, Power User, Software Development | Leave a Comment »