Fixed: the SSD freezing my computer!

My new Samsung SSD was causing strange lockups. Everything worked fine during the lockups except for disk activity. I found, which gave me a fix: make sure the IDE drivers are enabled, then change the drive mode from AHCI to IDE. It’s been a week or two problem-free!

Samsung 860 EVO

Biostar A960D+ mobo (AMD chipset, which is apparently the issue.)

I installed Rakudo Star

It’s the reference implementation of the Raku programming language.

The installer ran very quickly and the REPL worked out of the box. Nothing else to report yet, but I’m sure I’ll have more to say in the future.

Happy hacking!

Updated 1: Rakudo won’t build from source on Cygwin because libuv is still a bit dicey there.  However, cascent/neovim-cygwin looks like a promising step forward.

Filename searching in Explorer – Windows 8.1 Enterprise

Some tips for filename searches in the “Search” box in an Explorer window in Windows 8.1 Enterprise.  I just found these out by trial and error.

  • You can specify “filename:” rather than “system.filename:” to search filenames.
  • The text after “filename:” will, by default, only match at the beginning of a word within the filename.
  • “filename:*foo” will search for foo, whether at the beginning of a word within the filename or not.
  • As far as I can tell, search filenames get an implicit “*” added on the end unless you specify otherwise.
  • To search for a word in the name and also the extension, use “filename:foo AND ext” where DOS would have required “*foo*.ext”.  I tried “filename:*foo*.ext” and “filename:(foo AND ext)” without success.  Remember, the “AND” has to be uppercase!

Happy searching!

C++11 with MinGW

Using standard MinGW (cc 4.9.3), I couldn’t compile C++11 test programs without lots of errors.  The answer: use -std=gnu++11 rather than -std=c++11.  Obvious, right?…

Test program:

#include <memory>
#include <iostream>
using namespace std;
int main()
    shared_ptr<int> x(new int(42));
    cout << (*x) << endl;
    return 0;

Error messages with “c++11”:

$ g++ --std=c++11 -o test test.cpp 
In file included from c:\mingw\include\wchar.h:208:0, 
  from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:44, 
  from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\postypes.h:40,
  from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iosfwd:40,
  from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\memory:72, from test.cpp:1: 
c:\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type 
struct _stat __struct_stat_defined( _off_t, time_t ); 

and many, many more (444 lines total).

By contrast:

$ g++ --std=gnu++11 -o test test.cpp
$ ./test.exe

Much better!

Exercise for the reader: try TDM-GCC and tell me in the comments whether it works with c++11.

Boolean searching in Microsoft Outlook

Turns out it can be done!  This article from Slipstick Systems shows you how to enable the Query Builder in the Advanced Find dialog box.

I was trying to search for two partial words in the Subject of my emails in Outlook 2013.  Turns out the “Search” box in the folder view only finds matches at the start of a word.  The Advanced Search dialog box, Advanced pane, looked promising.  However, when I added multiple criteria, I think it was ORing them rather than ANDing.  Not sure, but I do know that I added two separate Subject terms and not all the results had both terms in their Subject fields.

With Query Builder, each search criterion I entered was automatically added to an AND group, and the search results were what I expected.  Now if only you didn’t have to tweak the registry to enable this incredibly useful feature…

How not to waste disk bandwidth

In the Windows 7 search boxkeywords are case-insensitive, but Boolean operators are case-sensitive.  Typing

System.FileName:~=".doc" AND datemodified:‎1/‎5/‎2016

works fine. Typing

System.FileName:~=".doc" and datemodified:‎1/‎5/‎2016

doesn’t given an error message or a warning — it just burns a lot of disk searching and finding nothing. Live and learn!