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 the ‘C++’ Category

roelandjansen/pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources.

Posted by jpluimers on 2017/10/25

History: Borland C++ source code for the PC-MOS/386 5.01 version at roelandjansen/pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources.

Related:

–jeroen

Via: [WayBack/Archive.is] PC-MOS/386 is na dertig jaar opensourcesoftware – Computer – .Geeks – Tweakers

Posted in Borland C++, C, C++, Development, History, Software Development | Leave a Comment »

Building OpenSSL on Windows

Posted by jpluimers on 2017/10/03

Some very interesting links:

–jeroen

Posted in C, C++, Development, Software Development, Visual Studio C++ | Leave a Comment »

What is the right way to convert into UNIX timestamp from the date and time in C/C++? – Stack Overflow

Posted by jpluimers on 2017/08/16

Thanks R.. for answering this:

POSIX has a formula for exactly what you want:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_15 [WayBack]

tm_sec + tm_min*60 + tm_hour*3600 + tm_yday*86400 +
    (tm_year-70)*31536000 + ((tm_year-69)/4)*86400 -
    ((tm_year-1)/100)*86400 + ((tm_year+299)/400)*86400

This works whenever you have a broken-down time in GMT, even if the underlying system’s mktime, etc. functions do not use the same format time_t as “Unix timestamps”.

If your original time is in local time, you can use mktime and gmtime to convert it to GMT using the system’s notion of timezone rules. If you want to apply your own timezone offset rules, just do that manually before using the above formula.

Source: What is the right way to convert into UNIX timestamp from the date and time in C/C++? – Stack Overflow [WayBack]

For testing and more examples: Epoch Converter – Unix Timestamp Converter [WayBack]

Hopefully this will help me getting better implementations for these:

–jeroen

Posted in Algorithms, C, C++, Development, Software Development | Leave a Comment »

https://www.youtube.com/watch?v=INzECItF6ew Delphi, where are you? 

Posted by jpluimers on 2017/07/12

Edit: in the mean time, the author took his video off-line. The G+ thread however is still interesting.

From a while ago:

[WayBack] https://www.youtube.com/watch?v=INzECItF6ew
Delphi, where are you? – Jacek Laskowski – Google+

 

YouTube video C++ Cool Debugging Tips and Tricks

–jeroen

Posted in C++, Delphi, Development, Software Development | 4 Comments »

instead of x86, msbuild is creating an x64 solution configuration via sln.metaproj – Stack Overflow

Posted by jpluimers on 2017/05/02

Sometimes msbuild will throw an error like this  for an x86 project:

"C:\Users\Developer\Versioned\libssh2\build\libssh2.sln" (default target) (1) ->
(ValidateSolutionConfiguration target) ->
C:\Users\Developer\Versioned\libssh2\build\libssh2.sln.metaproj : error MSB4126: The specified solution configuration "Debug|X64" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties
form="Any CPU") or leave those properties blank to use the default solution configuration. [C:\Users\Developer\Versioned\libssh2\build\libssh2.sln]

Cause:

vsvars64.bat will set the environment variable Platform=x64 but vsvars32.bat will not empty this environment variable.

Easiest is to run set Platform= then run vsvars32.bat.

Adopted from MSBuild creating an x64 solution configuration via sln.metaproj – Stack Overflow [WayBack]:

If you are running this in the Visual Studio x64 command window it will set an environment variable Platform=x64 that will be used by msbuild. You can verify this by running echo in the command prompt you are using.

echo %platform%

So you will need to override the default when using x64 cmd, or run from the x86 cmd.

malexander

–jeroen

Posted in .NET, C++, Development, Software Development, Visual Studio 2015, Visual Studio and tools, Visual Studio C++ | Leave a Comment »

Maybe Probably Dance wrote the fastest hashtable implementation ever

Posted by jpluimers on 2017/02/27

Long read: well worth it. [WayBackI Wrote The Fastest Hashtable | Probably Dance

github repository: skarupke/flat_hash_map: A very fast hashtable

source download: https://github.com/skarupke/flat_hash_map/blob/master/flat_hash_map.hpp

–jeroen

Posted in C++, Development, Software Development | Leave a Comment »

RSS feed for Dave’s Development Blog – mostly OTA articles on the Open Tools API for Delphi and C++ Builder

Posted by jpluimers on 2017/01/16

TL;DR: http://www.davidghoyle.co.uk/WordPress/?feed=rss2

Since there is no RSS link  on the page [WayBackDave’s Development Blog – Software Development using Borland / Codegear / Embarcadero RAD Studio

Since I wanted to follow his “blog” (which is sort of a collection of WordPress pages, mainly about the programming OTA: the Open Tools API interface to Delphi and C++ Builder), I was looking for the RSS feed.

Luckily, Feedly knows how to detect most blogging platforms, so it came up with https://feedly.com/i/subscription/feed/http://www.davidghoyle.co.uk/WordPress/?feed=rss2 which indicates the final bit is the RSS feed URL.

Some interesting links from there:

via: [WayBackOTA Interface Search 1.1 and GitHub http://www.davidghoyle.co.uk/WordPress/?…

–jeroen

Posted in C++, C++ Builder, Delphi, Development, RSS, SocialMedia, Software Development | Leave a Comment »

Compiler Explorer – how various C++ compilers translate code into various machine code targets

Posted by jpluimers on 2017/01/03

The first implementation of Compiler Explorer supports many versions of the gcc, clang and icc compilers on ARM, ARM64, AVR and x86 targets.

On the left you type your C++ code, on the right you see the resulting assembler code optionally with byte code and colorised so you can correlate the C++ lines with the assembly.

A great way to start the year: learning new things!

Related:

–jeroen

via:

Some videos:

Read the rest of this entry »

Posted in ARM, Assembly Language, C++, Conference Topics, Conferences, Development, Event, Software Development, x86 | Leave a Comment »

Cool little trick to show all the preset variables for your GCC/Clang compiler

Posted by jpluimers on 2016/08/30

Thanks David Berneda for sharing this a while ago:

Cool little trick to show all the preset variables for your GCC/Clang compiler:

clang -E -dM - < /dev/null

I’ve always wondered how to get these. Some are kind of surprising, especially since there are 320 of them, at least on my system.

On my system (Mavericks, I wish the sw_vers console tool would tell that): 170 lines.

Read the rest of this entry »

Posted in Apple, C, C++, Development, Mac OS X / OS X / MacOS, OS X 10.9 Mavericks, Power User, Software Development | Leave a Comment »

Workaround for “Visual Studio 2015 C++ Compiler Secretly Inserts Telemetry Code Into Binaries” – Slashdot

Posted by jpluimers on 2016/07/20

Reader edxwelch writes:

Reddit user sammiesdog discovered recently that Visual Studio 2015 C++ compiler was inserting calls to a Microsoft telemetry function into binaries. “I compiled a simple program with only main(). When looking at the compiled binary in IDA, I see a call fortelemetry_main_invoke_trigger and telemetry_main_return_trigger. I cannot find documentation for these calls, either on the web or in the options page,” he wrote. Only after the discovery did Steve Carroll, the dev manager for Visual C++ admit to the “feature” and posted a workaround to remove it.

A Microsoft spokesperson confirmed the existence of this behavior to InfoQ, adding that the company wil be removing it in a future preview build. For those who wish to get rid of it, the blog writes:

Users who have a copy of VS2015 Update 2 and wish to turn off the telemetry functionality currently being compiled into their code should add notelemetry.obj to their linker command line.

Quoted in full as I’m baffled.

Source: Visual Studio 2015 C++ Compiler Secretly Inserts Telemetry Code Into Binaries – Slashdot

via: Dear developers, I thought you should know. Yours, privacy. http://m.slashdot.org/story/312289Jan Wildeboer – Google+

–jeroen

Posted in C++, Development, Software Development, Visual Studio C++ | 1 Comment »