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,366 other followers

Archive for the ‘.NET’ Category

The 68 things the CLR does before executing a single line of your code (*) · Performance is a Feature!

Posted by jpluimers on 2018/04/16

Because the CLR is a managed environment there are several components within the runtime that need to be initialised before any of your code can be executed. This post will take a look at the EE (Execution Engine) start-up routine and examine the initialisation process in detail.

Lots of interesting stuff happening before your code even gets executed. Many of the pieces can log.

Source: [WayBackThe 68 things the CLR does before executing a single line of your code (*) · Performance is a Feature!

Via: [WayBack] Good stuff to know! – Ondrej Kelle – Google+

–jeroen

Posted in .NET, C#, Development, Software Development | 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 »

PascalABC.net – .NET version of Pascal with its own IDE

Posted by jpluimers on 2018/03/29

Interesting to try:

The new generation Pascal programming language that combines simplicity of classic Pascal, a great number of modern extensions and broad capabilities of Microsoft .NET Framework

I didn’t know about it either.

–jeroen

Read the rest of this entry »

Posted in .NET, Development, Pascal, Software Development | Leave a Comment »

A Post-Mortem on the Recent Developer Story Information Leak – Meta Stack Overflow

Posted by jpluimers on 2018/03/27

I wish many other companies would disclose post mortem information like this: [WayBackA Post-Mortem on the Recent Developer Story Information Leak – Meta Stack Overflow

via: [WayBackInteresting and very appropriate top commenthttp://meta.stackoverflow.com/questions/340960/a-post-mortem-on-the-recent-developer-story-information-leak – This is why I Code – Google+

–jeroen

 

 

Posted in .NET, Delphi, Development, Pingback, Power User, Software Development, Stackoverflow | Leave a Comment »

libssh-delphi will migrate from Mercurial on BitBucket to git on GitHub soon (or finding about “fatal: repository … not found”, “MSVCR120.dll is missing” and “D3DCOMPILER_47.dll is missing” when prepping a fresh VM for a presentation)

Posted by jpluimers on 2018/03/08

When git on Windows suddenly gives you this when the repository URL opens fine in Chrome:

C:\Users\jeroenp\Versioned>git clone https://bitbucket.org/jeroenp/libssh2-delphi
Cloning into 'libssh2-delphi'...
remote: Not Found
fatal: repository 'https://bitbucket.org/jeroenp/libssh2-delphi/' not found

but this worked fine:

C:\Users\jeroenp\Versioned>git clone https://github.com/jpluimers/GExperts.git
Cloning into 'GExperts'...
remote: Counting objects: 12031, done.
remote: Total 12031 (delta 0), reused 0 (delta 0), pack-reused 12031R
Receiving objects: 100% (12031/12031), 9.77 MiB | 1.36 MiB/s, done.

Resolving deltas: 100% (9284/9284), done.

I first thought “huh?”.

Then I remembered: this was a Mercurial repository, but I hardly use Mercurial any more…

C:\Users\jeroenp\Versioned>hg clone https://jeroenp@bitbucket.org/jeroenp/libssh
2-delphi
destination directory: libssh2-delphi
requesting all changes
adding changesets
adding manifests
adding file changes
added 30 changesets with 56 changes to 25 files
updating to branch default
12 files updated, 0 files merged, 0 files removed, 0 files unresolved

Since I wanted to switch away from bitbucket for a long time anyway, it was time to say goodbye and find out how to make the conversion to git.

A quick search revealed there were many tedious manual ways involving command-lines: [WayBack] Convert Mercurial project to Git – Stack Overflow

But then I found out that github can fully automagically import a Mercurial Repository (of course without the BitBucket attached bells and whistles like issue tracker):

So it is now at github.com/jpluimers/libssh2-delphi with one user still to be mapped at github.com … libssh2-delphi/import/authors: Zeljko Marjanovic. If I ever get in contact with him (I tried over the last 2 years), then I will add him.

For now, I will be in touch with Vadum Lou (a.k.a. https://github.com/pult, full nameVadim V. Lopushansky) who already made another manually copied fork and get his additions integrated.

I might redo the conversion process later on as at least some of his submissions are at least partially in a Mercurial pull request.

Then I need to merge the develop branch into the master branch and prepare a release.

Oh: if it fails to debug in Delphi, then run the EXE alone. You will get an error like this:

---------------------------
SftpClientDemo.exe - System Error
---------------------------
The program can't start because MSVCR120.dll is missing from your computer. Try reinstalling the program to fix this problem.
---------------------------
OK
---------------------------

I need to document this better in the README.md: the underlying libssh2 DLLs require the Visual Studio 2013 C++ run-time library to be installed. The latest version I could find as of writing is vcredist_x86.exe version 12.0.40649.5 from the Update for Visual C++ 2013 and Visual C++ Redistributable Package at https://support.microsoft.com/en-us/kb/3138367 (download selection) or http://download.microsoft.com/download/C/C/2/CC2DF5F8-4454-44B4-802D-5EA68D086676/vcredist_x86.exe (direct download).

I need to update If a program you wrote can’t start becuase MSVCR*.dll is missing, then you forgot to ship the Visual C++ runtime… from 2012 on this as well as there are more versions available now than listed there.

Another error I got was the one below when running .NET stuff, but that might be because Windows Update was in progress:

---------------------------
SourceTree.exe - System Error
---------------------------
The program can't start because D3DCOMPILER_47.dll is missing from your computer. Try reinstalling the program to fix this problem.
---------------------------
OK
---------------------------

Later: yes, that was indeed fixed during Windows update. Apparently, Microsoft has an update installation order issue or a dependency requirement issue where part of .NET depends on that DLL, even though it is not yet present.

–jeroen

Posted in .NET, Delphi, Development, Power User, Software Development, Windows, Windows 7 | Leave a Comment »

 
%d bloggers like this: