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

Archive for 2016

Traces of Nuts – Brutally sliced in to multiple pieces | Comedy Card Company

Posted by jpluimers on 2016/10/07


“Looks like the victim was brutally sliced in to multiple pieces”;  “It’s over here, Sarge” Humorous cartoon by award winning Australian artist Tim Whyatt.

Source: Traces of Nuts – Brutally sliced in to multiple pieces | Comedy Card Company

Much better image quality than the one I saw floating around on G+ a while ago.

Even larger high quality images are at 1 and 2.

–jeroen

Posted in Fun | Leave a Comment »

installing the joe terminal/console text editor on Mac OS X: brew to the rescue

Posted by jpluimers on 2016/10/07

The most recent versions of Joe don’t even build from stock in OS X any more and there are no direct installers for them.

But there are two most recent older versions that have installers, and a formula recent brew based HomeBrew installation:

  1. joe-3.7-0.pkg – rudix-snowleopard – JOE – Rudix: The hassle-free way to get Unix programs on Mac OS X – Google Project Hosting.
  2. PROJECT DETAIL for Joe’s Own Editor.
  3. Homebrew Formulas – Joe.

After experimenting for a while without brew preferring the first over second, I’ve installed the the third as:

  1. The first actually installs version 3.6, but has the syntax highlighting files installed in the correct place, so you get syntax highlighting.
  2. The second does install version 3.7, but since the syntax highlighting files are in the wrong place: you get no syntax highlighting.
  3. The brew formula has an up to date joe version 4.0 and installs the syntax highlighting in the right place: you get syntax highlighting.

Before making a choice, you might want to consider reading about joe versions in JOE – Joe’s own editor / … /NEWS.md.

Having a background partially in the Linux world, I tried building joe from source on my Mac following the steps at JOE – Joe’s own editor / Discussion / joe-editor-general:Mac binary for 3.3 does not run on OS/X 10.8. It failed because the Mercurial 3.8 branch required automake and autoconf which are not available on  just a Mac + Xcode. So I’m happy that others have bit the bullet and make a good HomeBrew build.

What makes HomeBrew so great is that it is based on a fully versioned git/ruby combination, allows for multiple Python versions, allows for binaries through bintray served bottles and has zillions (well, thousands) of installable formulae, all versioned.

–jeroen

Posted in *nix, *nix-tools, Apple, joe, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | Leave a Comment »

Intellectual Ventures Case: Why Software Patents Will Take a Big Hit

Posted by jpluimers on 2016/10/06

Very interesting read: Intellectual Ventures Case: Why Software Patents Will Take a Big Hit [WayBack]

Some more background information (most by or via Jan Wildeboer):

–jeroen

Posted in Development, Software Development | Leave a Comment »

Real nullable types will probably never make it to the language, but wel can still dream

Posted by jpluimers on 2016/10/06

Allen Bauer (ex Delphi R&D team) wrote the brilliant piece about a year and a half ago. We can still dream, right?

Allen Bauer, May 25, 2015

Current working theory of Nullable<T>.

Nullable<T> = record

property Value: T read FValue; default;

end;

Using the default directive to “hoist” the operators of “T“. Currently the default directive only works for array properties by “hoisting” the ‘[]‘ operator. Marking a non-array property with default will make the containing type behave as that type.

This, coupled with some intrinsic compiler knowledge of the Nullable<T> type will make Nullable<T> work without any addition of keywords or other standard functions or procedures.

Using the “default” directive on a non-array property will work for any type, except for having the null-propagation semantics.

When considering language features, I try and not only make it work for the intended purpose, but also broaden reach of any supporting feature. In the above scenario, even user-defined operators on “T” will be properly hoisted and used.

This was part of a very interesting G+discussion at Delphi’s New Feature Desired: Nullable Types and Null Propagation….

It covered topics like these:

–jeroen

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

Offline Installer :: JetBrains Developer Community

Posted by jpluimers on 2016/10/06

DotPeek offline installers are available:

They are loacated on this page, as ‘Other distribution options’: http://www.jetbrains.com/decompiler/download/

–jeroen

via Offline Installer :: JetBrains Developer Community.

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

In `System.SysUtils`, `class function TCardinalHelper.Parse` throws errors for valid Cardinal values

Posted by jpluimers on 2016/10/05

Oh nice System.SysUtils.TCardinalHelper.Parse:

class function TCardinalHelper.Parse(const S: string): Cardinal;
begin
  Result := StrToInt(S);
end;

Which means you get this nice EConvertError with message ''4294967295' is not a valid integer value'. with this simple test (which doesn’t even reach the Assert):

uses
  System.SysUtils;

procedure Cardinal_Parse_High_Cardinal_Succeeds();
var
  Expected: Cardinal;
  Value: string;
  Actual: Cardinal;
begin
  Expected := High(Cardinal);
  Value := Expected.ToString();
  Actual := Cardinal.Parse(Value);
  Assert(Expected = Actual);
end;

So I write some unit tests (see below) of which helpers for these types fail in one way or the other:

  • Cardinal
  • NativeUInt
  • Single
  • Double
  • Extended

These work for the boundary cases:

  • SmallInt
  • ShortInt
  • Integer
  • Int64
  • NativeInt
  • Byte
  • Word
  • UInt64
  • Boolean
  • ByteBool
  • WordBool
  • LongBool

 

–jeroen

via: Oh nice, in System.SysUtils: “` class function TCardinalHelper.Parse(const…

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 5 Comments »

Happy 25th birthday Linux!

Posted by jpluimers on 2016/10/05

Linux turns 25 today: Linux – Wikipedia, the free encyclopedia

Happy birthday!

–jeroen

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

TMemIniFile have non-virtual SetStrings procedure. To add support processing of…

Posted by jpluimers on 2016/10/05

TMemIniFile have non-virtual SetStrings procedure.

One of the classic Delphi RTL examples of Delphi team members  not reading Delphi Component Design by +Danny Thorpe 

You can still get it for a few dollars, used: http://www.amazon.com/Delphi-Component-Design-Danny-Thorpe/dp/0201461366

–jeroen

via: TMemIniFile have non-virtual SetStrings procedure. To add support processing of….

Posted in Delphi, Development, Software Development | 1 Comment »

Delphi XE8 [dcc32 Fatal Error] dcc32_F2084_C2359.dpr(30): F2084 Internal Error: C2359

Posted by jpluimers on 2016/10/05

Fails in Delphi XE8 with a nice [dcc32 Fatal Error] dcc32_F2084_C2359.dpr(27): F2084 Internal Error: C2359

It is fixed in Delphi 10.0 Berlin, but of course a C2359 search does not reveal that as Quality Portal is behind a wall. So for future reference the bug: [RSP-13471] Int64 for loops can generate Internal Compiler Error – Embarcadero Technologies. Thanks +Stefan Glienke for mentioning the issue.

program dcc32_F2084_C2359;

type
  TNumber = Int64; // UInt64; // fails too; other numeric types do not fail. Fails in a unit as well.
  TNumbers = TArray;
  TNumberRange = record
  strict private
    function GetLowerBound: TNumber;
  public
    function Numbers: TNumbers;
    property LowerBound: TNumber read GetLowerBound;
  end;

{ TNumberRange }

function TNumberRange.GetLowerBound: TNumber;
begin
  Result := Default(TNumber);
end;

function TNumberRange.Numbers: TNumbers;
var
  lValue: TNumber;
begin
  for lValue := LowerBound to LowerBound do
  ;
end;

begin
end.

–jeroen

Read the rest of this entry »

Posted in Delphi, Delphi XE8, Development, F2084, Software Development | 1 Comment »

If you thought you could do multi-threading, then play “The Deadlock Empire” games

Posted by jpluimers on 2016/10/04

Slay dragons, learn concurrency! Play the cunning Scheduler, exploit flawed programs and defeat the armies of the Parallel Wizard.

Source: The Deadlock Empire

Via: Face the dragon. Learn the ropes of concurrent programming. – Lars Fosdal – Google+

Source code is available and focuses on C#; maybe one day I’ll make a Delphi version: deadlockempire/deadlockempire.github.io: The Deadlock Empire: Slay dragons, learn concurrency!

BTW: a great book (with nice illustrations at both github and kernel.org) is Source: Is Parallel Programming Hard, And, If So, What Can You Do About It? [WayBack]

–jeroen

Posted in .NET, C#, Delphi, Development, Multi-Threading / Concurrency, Software Development | Leave a Comment »