Disclaimer

The content of this blog is my personal opinion only. Although I am an employee - currently of Nvidia, in the past of other companies such as Iagination Technologies, MIPS, Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.

See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.

Friday, December 11, 2015

Finally got emacs compilation-error-regexp working for perl CPAN Test::Unit::TestCase

Summary: Finally got emacs compilation-error-regexp working for perl CPAN Test::Unit::TestCase



Not only did I need to add a regexp,
but I also needed to disable a compilation-mode-font-lock-keywords pattern
- apparently there may be some phase ordering.

This woukd be more reliably if there were the ability to return ALL possible substrings matching a regexp,
as opposed to being maximally or minimally greedy.

    ;; adding patterns to compilation-error-regexp-alist and/or compilation-error-regexp-alist
    ;; to try to get a perl CPAN Test::Unit error message, like

    ;; There were 3 failures:
    ;; 1) TestCases_for_FrameMaker_MIF_AG.pm:875 - test_another_error(TestCases_for_AG_FrameMaker_MIF)
    ;; expected '', got 'deliberate mismatch'
    ;;
    ;; 2) TestCases_for_FrameMaker_MIF_AG.pm:879 - test_yet_another_error(TestCases_for_AG_FrameMaker_MIF)
    ;; expected '', got 'deliberate mismatch'
    ;;
    ;; 3) TestCases_for_FrameMaker_MIF_AG.pm:898 - test_special_stuff__format_tuple_to_MIF_string__Cell_context__WIP(TestCases_for_AG_FrameMaker_MIF)

    (require 'compile)

    (add-to-list 'compilation-error-regexp-alist
'("\nThere were [0-9]+ failures:\n1) \\([a-zA-Z0-9_.-.---]+\\):\\([0-9]+\\) - test_"
  1 2)
    (add-to-list 'compilation-error-regexp-alist
'("\n[0-9]+) \\([a-zA-Z0-9_.-.---]+\\):\\([0-9]+\\) - test_"
  1 2)
      )
    (if nil  ;; the regexp below causes compilation-error-regexp-alist to stop working completely - no matching
      (add-to-list 'compilation-error-regexp-alist
'("\nThere were [0-9]+ failures:\n1) .*\\(\\w\\|\\W)*\n[0-9]+) .*\\(test_\\)"
  2)
)
      )


Diffs:


    === modified file '.emacs'
    *** .emacs 2015-12-12 00:18:53 +0000
    --- .emacs 2015-12-12 00:26:30 +0000
    ***************
    *** 4129,4139 ****
     ;; perl CPAN Test::Unit
     ;; 1) TestCases_for_FrameMaker_MIF_AG.pm:763 - test_special_stuff_to_insert_wip(TestCases_for_AG_FrameMaker_MIF)
     '(("\\([a-zA-Z0-9_.-.---]+:[0-9]+\\)"
    !      ;;(0 'compilation-line-face nil t)
    !      ;; (0 'ag-test-result-unexpected) ;; works (modulo filename matching)
    !      ;;(1 'ag-test-result-unexpected) ;; works (modulo filename regexp
    !      (1 compilation-line-face nil t)
    !      ))
     '(("expected\s+.*got\s+.*"
 (0 'ag-test-result-unexpected)
 ))
    --- 4129,4139 ----
     ;; perl CPAN Test::Unit
     ;; 1) TestCases_for_FrameMaker_MIF_AG.pm:763 - test_special_stuff_to_insert_wip(TestCases_for_AG_FrameMaker_MIF)
     '(("\\([a-zA-Z0-9_.-.---]+:[0-9]+\\)"
    ! ;;      ;;(0 'compilation-line-face nil t)
    ! ;;      ;; (0 'ag-test-result-unexpected) ;; works (modulo filename matching)
    ! ;;      ;;(1 'ag-test-result-unexpected) ;; works (modulo filename regexp
    ! ;;      (1 compilation-line-face nil t)
    ! ;;      ))
     '(("expected\s+.*got\s+.*"
 (0 'ag-test-result-unexpected)
 ))
    ***************
    *** 4628,4637 ****
      (add-to-list 'compilation-error-regexp-alist
 '("\nThere were [0-9]+ failures:\n1) \\([a-zA-Z0-9_.-.---]+\\):\\([0-9]+\\) - test_"
    1 2)
)
    ! (if nil
(add-to-list 'compilation-error-regexp-alist
    !     '("\nThere were [0-9]+ failures:\n1) .*\\(\\w\\|\\W)*\n[0-9]+) \\([a-zA-Z0-9_.-.---]+\\):\\([0-9]+\\) - test_) "
    !        2 3)
 )
)
    --- 4628,4640 ----
      (add-to-list 'compilation-error-regexp-alist
 '("\nThere were [0-9]+ failures:\n1) \\([a-zA-Z0-9_.-.---]+\\):\\([0-9]+\\) - test_"
    1 2)
    + (add-to-list 'compilation-error-regexp-alist
    +     '("\n[0-9]+) \\([a-zA-Z0-9_.-.---]+\\):\\([0-9]+\\) - test_"
    +        1 2)
)
    ! (if nil  ;; the regexp below causes compilation-error-regexp-alist to stop working completely - no matching
(add-to-list 'compilation-error-regexp-alist
    !     '("\nThere were [0-9]+ failures:\n1) .*\\(\\w\\|\\W)*\n[0-9]+) .*\\(test_\\)"
    !        2)
 )
)



Friday, December 04, 2015

p4 status - misleading Perforce command name

So, I want to run a command in a script that asks Perforce if a file exists in the depot.



I wonder what such a command might be callewd. Let's try "p4 status".



Strange... google "p4 status".



!!!! "p4 status"  `Open files for add, delete, and/or edit in order to reconcile a workspace with changes made outside of Perforce.1





This is stupid.  In English, in 99.99% of programming systems, "status" is a read-only query.


Wednesday, December 02, 2015

.ignore files for version control systems

It is good to have .ignore files at the root of a project's repo. (bzr, hg, git, but not Perforce)

It is good to have global ignores - as the bzr manuals say "ignored files which are not project specific, but more user specific. Rather than add these ignores to every project, bzr supports a global ignore file ~/.bazaar/ignore

In addition to "per-user global", it is also good to have "global across an installation". Git has this, but not bzr.

How to Get a Refund For an iPhone, iPad, or Mac App From Apple

How to Get a Refund For an iPhone, iPad, or Mac App From Apple:



'via Blog this'



Many iPhone apps do not work as expected.



But getting refunds for them is more painful than on Android.



Another reason to prefer Android - if they can stop the security bleeding.


Wednesday, November 11, 2015

I hate Outlook!: the continuing whining, bitching, and moaning

I very carefully recovered circa 251 emails that were misclassified as spam.

Bug reports that I wanted to ensure were not lost, etc.

And then I accidentally deleted them. Wrong folder.

No undo.



I hate Outlook!

Friday, November 06, 2015

Stupid Blogger does not understand difference between symbolic link and data deduplication

See the quote from a UNIX bigot's blog at bottom.



Now, I am a UNIX bigot.  But I also try to be an unbiased UNIX bigot.



In particular, I understand the difference between data deduplication - a filesystem where two completely separate files that happen to have the same contents will be transparently linked, behind the user's back, to share physical storage.



Linked in such a way that, if one file is modified and the other is not, then the change is NOT propagated to the other.



I.e. linked transparently to the user.  Invisibly, except for occupying less disk space.



Symlinks are sometimes used as a "poor man's" approximation to this.  But symlinks are definitely not transparent.  E.g. if the target file is removed, the symlink dangles.  That should not happen in a proper "single instance store".



For this matter, UNIX hardlinks can be used as a "poor man's" approximation to this.   But, again, not transparent.



Now, I do not know if Microsoft's single instance store is fully transparent.  But I suspect it is - or at least more so than symlinks or hardlinks.



The Civilized Explorer Travel Bizarre Link Page: "Microsoft Innovations. This is an actual press release dated February 28, 2000, on the actual Microsoft Web site wherein Bill Bolosky and two Microsoft colleagues claim to have invented symbolic links three years ago!
... an idea occurred to them -- why not save operating system disk space by storing duplicate files as links that point to a single file housed in a central location?
Are these guys brilliant ...
During the next 1-1/2 years, Bolosky, a researcher in Microsoft Research's Systems and Networking Group, and three of his researchers worked full time with the Windows 2000 team to build the technology, now known as the Single Instance Store.
Or what?
And you thought Microsoft's only innovations came from other companies that they either bought or crushed."


Stupid UNIX bloggers unite!  You have nothing to reveal to the Internet except your ignorance, and inability to absorb new concepts!



'via Blog this'

Thursday, October 15, 2015

Google Chrome browser shows corrupted content on Mac OS X – DisplayLink Support

Google Chrome browser shows corrupted content on Mac OS X – DisplayLink Support: "This issue is due to the browser attempting to use hardware acceleration functions not currently available on virtual screens."



I got bit by this bug - disabling hardware graphics acceleration in Chrome, but not elsewhere, fixed the problem, as recommended by DisplayLink.



I wonder why the DisplayLink cannot hook the acceleration calls, and report ion error when applied to their display?



But I also wonder why Chrome does not check the capabilities of the display.  Here, the problem is probably confusion, since some of my displays have acceleration, and some do not.   Heterogeneity - gotta love it!  



Q: why does MacOS expose use of accelerators to apps?





'via Blog this'