Tuesday, March 6, 2018

Text Web Browser for Windows 10 - Surf the web in text only

Get a working Text Browser for Windows 10 +:
  • Emacs is a well know editor that comes with little know built-in browser 
  • Emacs is superbly supported on all platforms, a staple on UNIX

The Emacs Web Browser (Eww) is a very basic and fast text/image browser. Flash and Javascript are not supported which gets rid of ads. 

  • A note about Lynx browser, tried install but could not get it to work. 

Emacs Web Browser surfing http://www.google.ca/

Get latest version GNU EMACS 26.0.90 for Windows


How to get EMACS Web Browser to work

  1. Unzip emacs-26.0.90-x86_64-with-deps.zip - Depends library
  2. Unzip emacs-26.0.90-x86_64.zip - Compiled Emacs editor with browser
  3. Copy Compiled(2) sub-directories to Depends(1) sub-directories;
        bin -> bin
        lib -> lib
        libexe -> libexe
        share -> share - you can say NO to copy overwriting info and man directories.
  4. Run EMACS by clicking runemacs.exe in Depends bin directory
  5. In EMACS, choose Tools -> Browse the Web -> Enter your URL or Keywords: 
  6. Voila! it works!

  1. EWW, the Emacs Web Wowser, is a web browser package for Emacs.
  2. Download is huge at 716Mb combined, but running takes a scant 45 Mb of RAM. Unlike Google Chrome taking now a whopping 1.2Gb of RAM now !
  3. If you just use emacs-26.0.90-x86_64.zip it will complain about not loading LIBXML2.dll.
  4. You can download that here http://xmlsoft.org/sources/win32/, but then complains about gnutls not being installed, then we are into dependency hell. Hours later....

Monday, March 5, 2018

C# .NET How many bytes or number of files on disk or disk / hard drive size can a List<T> hold?

Assuming, that the average size of an office document is 321 kB in 2012 (we need an update please). 

1 million documents consume about 306 GB, or 2.98 TB for 10 million document.

The upper bound to List<T> has maximum upper bound of in Char.Int32 items  or  2,147,483,647 (2 billion items).

Therefore, a hypothetical 657.129995982 Terra-byte hard-drive holding office documents can approximately be enumerated into a List<T>. 

Tuesday, February 20, 2018

Performance Comparison of Existence Test for a Large Set using Big One Line If vs Else Ifs vs Dictionary Vs Fall Through Case Statement

Below is C# (Sharp) code compares performance for element existence in a large non-sequential set (only 312 elements) using in variety of typical code structures which are;

  1. one line IF (with  ORs) 
  2. multi-line Else Ifs 
  3. Fall Through Case Statement 
  4. Dictionary with Initialization Time
  5. Dictionary Lookup on Key, no init time
  6. Dictionary Lookup on Value, no init time
The live C# Code example below check's if a character is a vowel from a set of 312 Unicode vowels extending to Latin-Supplement Unicode code point.

Note: Under the hood C# compiler creates a dictionary for 6 or more case statements

The results are rather surprising!