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

Latency Numbers every Programmer and Architect should know

Posted by jpluimers on 2016/07/06

Via +Martin Blais, Philippe Beaudoin, Lars Fosdal as Useful resource……:

Hit the cache, Jack…

Interactive Chart of Latency Numbers every Programmer Should Know (from 1990s until 2020s including script to draw the cart).

Also, this variant by Erik Meijer from Coursera (https://www.coursera.org/course/reactive): https://d396qusza40orc.cloudfront.net/reactive/lecture_slides/Latency%20as%20an%20Effect%201.pdf#page=10

Via Asbjørn Heid:

Following up on +Lars Fosdal’s earlier post here’s a talk by Herb Stutter which goes into more detail of where the performance is these days.

It’s a general talk, not C++ specific. Recommend it to get some idea of what goes on under the hood these days,  and so one doesn’t try to do some premature optimization which may turn out to be bad.

--jeroen

October 2017 updates thanks to Kristian Köhntopp:

Table as of 2016:

  • 1 ns: L1 cache reference
  • 3 ns: Branch mispredict
  • 4 ns: L2 cache reference
  • 17ns: Mutex lock/unlock
  • 100ns: Main memory reference
  • 2000ns: Compress 1 kilibyte with Zippy
  • 16000ns: SSD random read
  • 19000ns: Read 1000000 bytes sequentially from memory
  • 500000ns: Round trip in same data center
  • 100000ns: Read 1000000 bytes sequentially from SSD
  • 3000000ns: Disk seek
  • 1000000ns: Read 1000000 bytes sequentially from disk
  • 150000000ns: Packet round trip California to the Netherlands

Part of the 2015 numbers:

 

Related: [WayBack] XKCD – Radiation Dose Chart

2024 update via Tweets I saved:

Posted in Development, Software Development | Leave a Comment »

With 3 days notice. Yay. Another timezone database fire drill. Fixed in tzdata and tzcode.

Posted by jpluimers on 2016/07/05

Not as bad as #brexit but still: With 3 days notice. Yay. Another timezone database fire drill. – Peter da Silva – Google+:

[tz] Egypt cancelled DST

Additional reports concur that DST has been permanently canceled in Egypt, by both the Cabinet and the Parliament.

http://www.sis.gov.eg/En/Templates/Articles/tmpArticleNews.aspx?ArtID=105572

http://english.ahram.org.eg/NewsContent/1/64/232478/Egypt/Politics-/Egypts-cabinet-abolishes-daylight-saving-time.aspx

http://www.egyptindependent.com/news/cabinet-cancels-daylight-saving-time-following-parliament-vote

http://www.parlmany.com/News/7/101143/-

-Matt

It is already fixed in eggert/tz: Time zone database and code as mentioned in the announcement [tz] [tz-announce] 2016f release of tz code and data available

Via: With 3 days notice. Yay. Another timezone database fire drill. – Kristian Köhntopp – Google+

–jeroen

Don’t forget to watch The Problem with Time & Timezones – Computerphile – YouTube (thanks Andre Naumann)

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

git svn broken on Mac OS X under SourceTree but not from the terminal: how to fix it.

Posted by jpluimers on 2016/07/05

Not on the terminal, but only in SourceTree I got this error (full text below):

Can't locate SVN/Core.pm in @INC

Well, the Xcode binaries were here:

 $ xcode-select -p
/Applications/Xcode.app/Contents/Developer

On Mavericks, perl is this version:

$ perl --version | grep -w for
This is perl 5, version 16, subversion 2 (v5.16.2) built for darwin-thread-multi-2level
(with 3 registered patches, see perl -V for more detail)

and git is this:

$ git --version
git version 1.9.5 (Apple Git-50.3)

Steps for fixing are at these blog entries:

All these solutions point you to change the system Perl installation, but since on my system it failed only on SourceTree, but from the terminal, I wanted to fix SourceTree.

Read the rest of this entry »

Posted in Apple, Development, DVCS - Distributed Version Control, git, Mac OS X / OS X / MacOS, OS X 10.9 Mavericks, Power User, Source Code Management, Subversion/SVN | 4 Comments »

pip: tool for installing Python packages.

Posted by jpluimers on 2016/07/05

pip is a great tool for installing Python packages.

But upgrading them still isn’t so great. Here are two statements: the first to list packages needing an update. The second updating them:

pip freeze –local | grep -v ‘^\-e’ | cut -d = -f 1  | xargs -n1

pip freeze –local | grep -v ‘^\-e’ | cut -d = -f 1 | xargs -n1 pip install -U

If you’re interested in pip, it is easy to install if it isn’t already included in your version of Python that is..

–jeroen

via:

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

Google Maps Local Guides Level 4 benefits can take a while

Posted by jpluimers on 2016/07/04

Just so you know:

Yann Penduff said: …

I’ve read reports that it seems to take 2 or + weeks for the 1TB promotion to take effect.

Source: Local Guide – Level 4 (1TB on Google Drive) – Google Product Forums

In practice it’s usually not that bad as most of the times it’s a matter of days not weeks though it can take up to 5 weeks.

It’s nice to be a Google Local Guide as you learn a lot of new things and people that way for instance through the Local Guide events.

If you’re interested, read Level 0-4 in 40 days, what I’ve learned from Google Local Guides – Pocketables

I only discovered about this a while ago as it was early last year for Google Replacing City Experts with Local Guides Program | Understanding Google My Business & Local Search

What really helps contributing is to view your Google Maps Timeline

–jeroen

Posted in Google, GoogleMaps, Local Guides, Power User | Leave a Comment »

So I got myself an Epson V500 scanner. And threw a negative at it from a…

Posted by jpluimers on 2016/07/04

Jan Wildeboer wrote a while ago: So I got myself an Epson V500 scanner. And threw a negative at it from a picture I took 15 years ago with my Olympus OM1. I am impressed.

Alternatives: Film Scanners: A Buying Guide | explora.

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

The new Google Maps/Earth satellite imagery allows to count our solar panels…

Posted by jpluimers on 2016/07/01

I checked our home using the recently improved Google satellite imagery: from Google Earth you can get better detail than from Google Maps.

You can even count our solar panels and see one is misaligned after a storm (a few days after this image was taken I managed to re-align that panel).

13 PV panels and one hot water panel lowered our energy bills for more than EUR 1000/year.

–jeroen

Posted in About, Google, GoogleEarth, GoogleMaps, Personal, Power User, Solar Power | Leave a Comment »

Mac OS X: finding the DNS servers available

Posted by jpluimers on 2016/07/01

DNS and Mac OS X are a bit of a tricky situation as OS X can use more than the default DNS servers: its resolve can do a multi-client DNS search.

The default DNS servers can be listed like this:

scutil --dns | grep 'nameserver\[[0-9]*\]' | sort | uniq

The effective DNS server like this:

dig whoami.akamai.net | grep "^;; SERVER" | cut -c 12-

Sometimes you want to know if you have manually configured DNS servers, or only DHCP assigned ones. This statement shows that for my Wi-Fi network-service:

networksetup -getdnsservers Wi-Fi

Because of the multi-client setup, you need to run this for all network-services configured on your OS X installation. You can get the list like this:

networksetup -listallnetworkservices

I’ve not yet found a way to list only active services, as the networksetup documentation indicates the -listnetworkserviceorder option will mark inactive ones with (*), but it reality does so only for disabled ones. So this does not work:

networksetup -listnetworkserviceorder

I might one day dig into combining the output of ifconfig with networksetup to figure out a shell based solution to this question.

–jeroen

Posted in Apple, Mac OS X / OS X / MacOS, Mac OS X 10.7 Lion, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, Power User | Leave a Comment »

windows 7 – Available memory differs by several GiB from what is installed – Super User

Posted by jpluimers on 2016/07/01

Very interesting question and answers: windows 7 – Available memory differs by several GiB from what is installed – Super User.

Basically the missing memory can be due to:

  • Windows licensing limitations
  • Mapping of device memory into virtual memory space (especially on x86 systems)

This affects both server and client versions of Windows. Client versions are more restrictive because of the vast amounts of potentially faulty drivers involved.

Some links (read the full question for details):

–jeroen

Posted in Power User, SysInternals, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows NT, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP | Leave a Comment »

Built-in Delphi XE6, XE7 and XE8 Fast Reports have issue “F2051 Unit fs_iinterpreter was compiled with a different version of fs_isysrtti.TfsSysFunctions”

Posted by jpluimers on 2016/06/30

I’ve seen this compiler error in Delphi XE8 and others in Delphi XE6 and XE7 using a project depending on the built-in FastReports:

F2051 Unit fs_iinterpreter was compiled with a different version of fs_isysrtti.TfsSysFunctions

This will probably fail in more recent versions as well.

The easiest workaround is this:

  • Fast Report XE6 (4.15.10)
  • Fast Report XE7 (Version 5.1.5)
  • Fast Report XE8 (Version 5.2)

The problem could be solved with help of technical support (Paul Gursky).

The solution is to remove all pas files from:

  • LibD20 (XE6)
  • LibD21 (XE7)
  • LibD22 (XE8)
  • LibD22x64 (XE8)

The above is paraphrased from Fast Reports forum > Fatal Error F2051 when compiling under Delphi XE6 and XE7

The core of the problem is that Fast Reports stores .dcu/.hpp/.pas files in the same directory whereas Delphi itself stores the .dcu/.hpp/.o files in one directory (actually usually in debug and release directories for each supported platform like win32, win64, etc).

Note: the built-in Fast Reports limits a few features, for instance export to Excel is not supported.

–jeroen

Posted in Delphi, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »