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

Raspberry Pi as CD changer in pre 09/2002 E46 BMW 320i touring

Posted by jpluimers on 2018/10/05

My pre 09/2002 E46 BMW 320i touring didn’t come with a CD-changer, and since the Business CD head-unit didn’t support the regular AUX mechanisms (see links further below), I’m researching how to add a Raspberry Pi as CD-changer.

A few things I want to accomplish:

  • Raspberry Pi powers up as it has ignition signal
  • Raspberry Pi powers down soon after it has lost ignition signal
  • Connected via the CD-changer connectors (iBus and audio) in the back

Some links:

Supplying power:

iBus/kBus/CanBUS:

If the model was more recent, it would at least support AUX, but it doesn’t by default and the work-arounds seem to emulate a CD-changer after all:

Read the rest of this entry »

Posted in cars, E46 320i touring, LifeHacker, Power User | Leave a Comment »

Syncthing – on my research list

Posted by jpluimers on 2018/10/05

On my research list:

Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized.

[WayBackSyncthing

Though it’s ont easy to get right: [WayBackSyncThing for Android – twm’s blog

which references:

Via: [WayBack] I blogged about SyncThing before, when BitTorrentSync started to annoy the hell out of me. SyncThing is an open source tool for synchronizing directory trees between different devices without requiring a cloud service (it needs a discovery server though… – Thomas Mueller (dummzeuch) – Google+

–jeroen

Read the rest of this entry »

Posted in Cloud, Infrastructure, Power User | Leave a Comment »

To help understanding combinations of boolean operators: Truth table – Wikipedia

Posted by jpluimers on 2018/10/04

Most software developers know they exist, but some (including me) find them hard to visualise, especially for combinations of operators, or for less common operators: the Truth table – Wikipedia.

The common operators that everyone seems to understand are these:

  • logical true
  • logical false
  • logical negation
  • logical and
  • logical or
  • logical xor

It becomes harder with a series of combinations, for instance series of and (not ...) and (not ...) and (not ...) – not to be confused with nand, similarly or (not ...) or (not ...) or (not ...) – not to be confused with nor, which both can be transformed according to the De Morgan’s laws – Wikipedia:

In set theory and Boolean algebra, these are written formally as

{\displaystyle {\begin{aligned}{\overline {A\cup B}}&={\overline {A}}\cap {\overline {B}},\\{\overline {A\cap B}}&={\overline {A}}\cup {\overline {B}},\end{aligned}}}

Using truth tables

Read the rest of this entry »

Posted in Algorithms, Conference Topics, Conferences, Development, Event, Software Development | 2 Comments »

What’s the point of having abstract classes in Delphi? 

Posted by jpluimers on 2018/10/04

There was an interesting thread a while ago: [WayBack] What’s the point of having abstract classes in Delphi? – Agustin Ortu – Google+

The answer is none (the documentation warns you against it – see Constructing instance of abstract class –  the compiler doesn’t), so Stefan Glienke submitted this bug: RSP-10235: No warning for .Create on class declared as TClass = class abstract

This post is a reminder to myself to see if any progress has been made by the compiler engineers.

–jeroen

Posted in Delphi, Development, Software Development | 9 Comments »

Raspberry Pi Power Limitations – Raspberry Pi Stack Exchange

Posted by jpluimers on 2018/10/04

There are very many, often contradictory, claims about the power requirements and limitations of the Pi. What are the exact requirements?

has a very elaborate answer at [WayBackRaspberry Pi Power Limitations – Raspberry Pi Stack Exchange covering all non-zero models.

I’ve archived some of the links it points to:

And some links on how to power a Raspberry Pi when you only have a 12V power source:

Read the rest of this entry »

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

Fred Hebert on Twitter : “honest programming books… “

Posted by jpluimers on 2018/10/03

[WayBack] Fred Hebert on Twitter : “honest programming books… “:

  • The CVE Programming Language; ANSI C; Second Edition
  • The Rust Programming Language; The C++ that Feels Like Haskell (this book cannot be borrowed)
  • Librertarian Programming; The Ideology Behind Heartbleed, by a Racist Misogynist Taken Seriously; Revised and Expanded; I don’t think the cops in that video hated anybody. They were just doing their job. And their job included strangling a man to death for having sold untaxed cigarettes.
  • The Go Fuck Yourself Language
  • Continuous Integration; Pushing Retry Until Flaky Test Pass and the Build Succeeds

More images at [WayBack] Thread by @mononcqc: “honest programming books more honest books (including my own) […]”.

  • Please Use my Language; A Beginner’s Guide

  • Again: Please Use my Language

–jeroen

Read the rest of this entry »

Posted in Development, Fun, Quotes, Software Development | Leave a Comment »

On my list to try (about half a year since it appeared): A new mutlti-threading library for Delphi. (darkThreading) – Chapman World

Posted by jpluimers on 2018/10/03

With fresh libraries – like new Delphi and Windows versions – I usually take a pause to see if any major updates have been published to stabalise things.

So about half a year after the release of A new mutlti-threading library for Delphi. (darkThreading) – Chapman World [WayBack], this is a reminder for me to try it.

With the Task Parallel Library still not being up to par, I wonder how DarkThreading compares to the very stable [WayBack] GitHub – gabr42/OmniThreadLibrary: A simple and powerful multithreading library for Delphi.

The source is at [WayBack] GitHub – chapmanworld/darkThreading: Platform agnostic light-locking threading library for Delphi (part of the DarkGlass project).

Note that by now it has moved to [WayBack] DarkGlass/darkLibs/darkThreading at master · chapmanworld/DarkGlass · GitHub (thanks Stefan Glienke for figuring that out)

One comment already: the [WayBack] darkThreading/Building.md at master · chapmanworld/darkThreading · GitHub describes dependencies on the below libraries, but does not use git modules (see [WayBack] Git – git-submodule Documentation) to reference to known stable commits of them:

In the man time, Edwin Yip has reviewed it: [WayBack] Simple Comparison of OmniThreadLibrary and darkThreading (http://chapmanworld.com/2018/05/24/a-new-mutlti-threading-library-for-delphi-darkthreading/) … – Edwin Yip – Google+ after in may he indicated he would look into it at a later stage [WayBack] http://chapmanworld.com/2018/05/24/a-new-mutlti-threading-library-for-delphi-…

–jeroen

Via [WayBackCraig Chapman on Twitter: “My threading library for Delphi (darkThreading) https://t.co/Jo7nVGzsNY”

 

Posted in Delphi, Development, Software Development | 2 Comments »

Just curious, Is there ever a benefit to not providing a GUID in an interface…

Posted by jpluimers on 2018/10/03

An interesting question [WayBack] Just curious,Is there ever a benefit to not providing a GUID in an interface? – Johan Bontes – Google+

The answer is simple: The benefits are almost none and you loose compiler assisted casting ease.

The interesting bits are the discussion where even Embarcadero isn’t sure what kind of magic the compiler does on generic interfaces.

–jeroen

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

Not just C++: Thoughts on Dealing with Signed/Unsigned Mismatch – IT Hare on Soft.ware

Posted by jpluimers on 2018/10/02

[WayBack] C++: Thoughts on Dealing with Signed/Unsigned Mismatch – IT Hare on Soft.ware.

I have seen things like this happen in way to many places, not just C/C++:

static_assert( -1 < 1U );//fails!

Take away:

Never ever use explicit casts merely to get rid of warnings (whether signed/unsigned or otherwise)

A way to set various C/C++ compilers apart: [WayBack] GitHub – shafik/determine_c_or_cpp: Determine programatically C from C++ as well as various versions

Via: [WayBack] C++: Thoughts on Dealing with Signed/Unsigned Mismatch – IT Hare on Soft.ware: Kevlin Henney – Google+

–jeroen

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

aha (Ansi HTML Adapter) with clickable URIs

Posted by jpluimers on 2018/10/02

aha is great to generate HTML from ANSI text (i.e. the coloured output on a Linux console).

But it doesn’t generate clickable URIs (it can’t yet by itself as it only looks one character in the future).

The thread at https://github.com/theZiz/aha/issues/20 suggested a case-insensitive regex through sed but the exact suggestion failed for a few reasons I will explain below.

First the bash alias (requires both aha and perl):


#!/usr/bin/env bash
# based on https://github.com/theZiz/aha/issues/20#event-797466520
aha-with-expanded-http-https-urls()
{
aha | perl -C -Mutf8 -pe 's,([^"])((https?|s?ftp|ftps?|file)://.*?)([\s]|\&quot;\s),$1<a href="$2">$2</a>$4,gi'
}

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, bash, Development, Perl, Power User, RegEx, Scripting, Software Development | Leave a Comment »