archive-fm.com » FM » G » GREER.FM

Total: 127

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Geoff's site: Visualizing Interstellar Distances
    a fortunate coincidence there are 63 360 inches in a mile So if Sol was an inch from Terra Alpha Centauri would be four miles away Our farthest probes would be 100 inches away traveling three inches per year In this miniature model light takes 8 minutes to move an inch Space is vast but it s not beyond our comprehension Another tidbit Distances to nearby stars are measured using

    Original URL path: http://geoff.greer.fm/2015/02/20/visualizing-interstellar-distances/ (2016-02-15)
    Open archived version from archive


  • Geoff's site: Optimizing Ag: Special-casing File Extensions
    gitignore agignore hgignore etc In addition it must check for matching patterns in the file s parent directores Is code ag tests one device t err ignored The answer can depend on ignore files in code ag tests code ag code and even the user s global ignore patterns Ag must do all of this for every file it comes across To get some idea of the complexity and magnitude of these operations try searching with debug Most of Ag s output will be related to ignores Correctly ignoring files is difficult doing it efficiently is even trickier If tar is in gitignore Ag must run fnmatch tar on every file it encounters The number of calls to fnmatch are doubled with two regexes in the root ignore tripled for three and so on Algorithmically speaking this is O n m where n is the number of ignore patterns and m is the number of files With so many patterns and files it s amazing Ag is fast at all I ve known about this bottleneck for a while and tried to ameliorate it with some basic optimizations Patterns without regex characters etc are stored in sorted arrays These can be binary searched giving O log n m performance Unfortunately many patterns are regexes For those there s simply no way to avoid the inefficient calls to fnmatch Until a few weeks ago that s where I was stuck When it came to making regex patterns faster I had no promising ideas Then I realized many regex patterns are for file extensions Typically people just want to ignore gz or zip If I special cased these patterns I could reduce calls to fnmatch Even better I could reuse a trick and store them in sorted arrays for efficient searching Behold

    Original URL path: http://geoff.greer.fm/2015/02/08/optimizing-ag-special-casing-file-extensions/ (2016-02-15)
    Open archived version from archive

  • Geoff's site: Why Neovim is Better than Vim
    OS Classic IRIX These preprocessor statements may seem innocuous but they slow development and inhibit new features Also Vim doesn t even work on most of these platforms anymore It s just that nobody has an ancient system with which to test Vim Neovim developers analyzed many of the preprocessor statements and found a significant number that could never be included in a working Vim Complexity stemming from cross platform support may be excusable but even something as simple as reading keyboard input is a nightmare in Vim Stepping through with a debugger will result in call stacks such as inchar in getchar c calling ui inchar in ui c which calls mch inchar in os unix c which calls WaitForChar which calls RealWaitForChar This call stack can be completely different on different platforms It also differs when running in command line versus GUI mode Figuring out Vim s control flow is harrowing Even when you hit paydirt in RealWaitForChar the code is extremely hard to follow Here s a snippet You can view the whole function at my Vim Hall of WTF if defined HAVE GETTIMEOFDAY defined HAVE SYS TIME H Remember at what time we started so that we know how much longer we should wait after being interrupted define USE START TV struct timeval start tv if msec 0 ifdef FEAT XCLIPBOARD xterm Shell Widget 0 if defined USE XSMP defined FEAT MZSCHEME endif endif ifdef USE XSMP xsmp icefd 1 ifdef FEAT MZSCHEME endif endif ifdef FEAT MZSCHEME mzthreads allowed p mzq 0 endif gettimeofday start tv NULL endif That if statement s conditions span 17 lines and 4 different ifdef s All to call gettimeofday Amusingly even the body of that statement has a bug times returned by gettimeofday are not guaranteed to increase User intervention or ntpd can cause the system clock to go back in time The correct solution is to use a monotonically increasing time function such Linux s clock gettime or OS X s mach absolute time The Developer Community Matt and I worked for months to add asynchronous functionality to Vim From that experience I have few good things to say about Vim s dev community In fact out of all the developer communities I ve encountered Vim s is the most hostile to change Anything that isn t a bug fix is frowned upon Patches are often criticized for ridiculous reasons After we posted our patch to the Vim dev mailing list the first reply was NOTE Don t use ANSI style function declarations A few people still have to use a compiler that doesn t support it Seriously C89 is a quarter century old The number of people stuck on older compilers can be counted on one hand This is a non concern Still I acquiesced It was easier to make the change than argue with the critic The rest of that thread is me being as civil as possible despite discouragement at every turn The replies might

    Original URL path: http://geoff.greer.fm/2015/01/15/why-neovim-is-better-than-vim/ (2016-02-15)
    Open archived version from archive

  • Geoff's site: Burnout is in the Mind
    sound equally silly Speaking of which I sometimes wonder if burnout is the western version of fan death When you think about it burnout makes little sense People get depressed and tired from what exactly Working too much Working too hard Excessive drudgery Bull We are working less than ever before Just over a century ago the average work week exceeded 60 hours Today it s 33 1 Past occupations also involved toil and danger far greater than any employment today Yet burnout is a modern phenomenon Strange eh Another argument against burnout comes from biology The brain is not a muscle Stress and sleep deprivation can take a toll but no amount of thinking can hurt it 2 And burnout is not universal even in cultures where it is well known and accepted There are people who simply don t burn out You may not have noticed them when they were your coworkers but they certainly exist They re not superhuman many of them seem quite normal There is no equivalent population when it comes to constraints such as sleep food or physical exertion Everyone succumbs to biology eventually I m not saying those who claim to be burnt out are faking I don t doubt that burnout describes a real phenomenon What I do doubt is the accepted cause work and the accepted cure time off from work It seems much more likely that burnout is a form of depression 3 which has a myriad of causes and cures It is only after making all this noise about burnout that I feel comfortable suggesting the following Don t worry about working too much The important thing is to avoid depression People more knowledgable than I have written on that subject but to sum up their advice Get out

    Original URL path: http://geoff.greer.fm/2015/01/07/burnout-is-in-the-mind/ (2016-02-15)
    Open archived version from archive

  • Geoff's site: Ten Years of Progress in Laptops
    5 9 lbs 2 3 lbs 2 4 lbs Dimensions 1 35 x 12 7 x 10 2 0 11 0 68 x 11 8 x 7 6 0 11 0 68 x 11 8 x 7 6 Cost 1700 1500 1200 Turbo boost allows clocks up to 2 7GHz for short periods Bottlenecked by 142MHz front side bus The specs don t tell the full story but they give you some idea of how little laptops have advanced in the past half decade My current hardware is significantly faster than the 2010 MacBook Air but it s not the same leap up from the iBook It s hard to distinguish the two Airs without closely inspecting them The form factor is identical The new Air has a backlit keyboard a MagSafe 2 connector and a dual microphone for noise reduction Welcome improvements but not exactly revolutionary This picture summarizes the progress Phones and tablets have made huge advances in the same time In 2005 my phone was a Motorola Razr In 2010 I had an iPhone 3G Now I have an iPhone 6 It s a similar story for tablets The original iPad was released in 2010 Today s iPad Air 2 puts the original to shame This stagnation worries me It s not just Apple neglecting their laptop line I ve looked at other brands and nothing seems enticing I have a ThinkPad X140e It s the smallest screened though not lightest ThinkPad and it looks monstrous next to the Air This ThinkPad isn t in the same price range as the Air but more expensive models make the same design mistakes It has three always on LEDs They were so distracting that I had to cover them with black nail polish The microphone is on the palm

    Original URL path: http://geoff.greer.fm/2015/01/03/ten-years-of-progress-in-laptops/ (2016-02-15)
    Open archived version from archive

  • Geoff's site: Help Me Get to Ag 1.0
    repos Correctly parsing patterns requires complicated code Adding accurate ignore behavior will make Ag slower In typical usage Ag already spends more time figuring out which files to search than actually searching files Some patterns are inherently slow I don t want users to blame Ag when the true cause is their own ignore rules Recently I paired with Theo Spears to fix some of the ignore pattern issues Theo has a sharp mind and a great personality Together we were able to make significant progress on ignores Hopefully our schedules will allow us to collaborate in the future Theo was also kind enough to triage many duplicate issues which I have been slowly closing There s only one other issue I want to fix before tagging a 1 0 release context doesn t work when searching pipes Once that s taken care of I think most future additions will be tests and bug fixes If I had to bet on Ag 1 0 s release date I would say January My real work consumes me Any time I spend on Ag is time I don t spend working on Floobits Progress on Ag happens when others want to pair

    Original URL path: http://geoff.greer.fm/2014/10/13/help-me-get-to-ag-10/ (2016-02-15)
    Open archived version from archive

  • Geoff's site: The Long Now of Software
    OS X use a descendant of the original code Every Mac has software with roots going back over 40 years Sorry Linux users GNU grep was created in 1999 Considering all that has changed how has grep survived for so long The original grep was compiled for the PDP 11 The file encodings it supported are long dead Computers have gotten a million times faster since it was created I think there are several factors explaining grep s longevity The code is permissively licensed It was written in a language that remains popular C The problem it solves searching text files streams is still a problem today People maintain it mostly because of the reasons above Anything we build today should satisfy similar criteria Just as a binary compiled on a PDP 11 in 1973 won t run on a modern computer I doubt that anything compiled today will run on a computer a century hence Even if the source code is available it will require maintenance There are simply too many unpredictable ways in which computers will change New CPU architectures and operating systems will arise New protocols and encoding formats will be standardized New interaction paradigms will be invented Hardware will probably get a million times faster So what if anything won t change Which of today s programming languages will still be supported Which file formats used today will still be popular in 2114 When it comes to language support in 2114 few of today s languages will survive If I had to put my money on one it would be C Fortran and COBOL might still be used but they re niche languages even today Newer languages such as Python Ruby and JavaScript may still be around but they evolve more quickly than C Any software

    Original URL path: http://geoff.greer.fm/2014/09/21/the-long-now-of-software/ (2016-02-15)
    Open archived version from archive

  • Geoff's site: Noise
    sapping time and willpower The lost time adds up to hours every week I seem to be more sensitive to distracting noise than most but noise affects everyone to some extent This is a bigger problem than most people realize Take a typical example of noise pollution Riding a loud Harley around San Francisco It affects thousands of people Though most are only slightly bothered the damage is significant in aggregate The end result is equivalent to the Harley rider running around blasting an air horn near random people We put up with the former but would never tolerate the latter Certain sounds seem to be grandfathered in as acceptable It is crazy that our society tolerates so much unnecessary noise Having been to other countries I can say the US isn t the worst when it comes to noise but could be improved significantly Japan is the best example I ve experienced 1 Their social mores heavily censure noise and the result is sublime You can go on a train and not be annoyed There is no music being played out of a cell phone There are no one sided phone conversations Few converse and those who do are

    Original URL path: http://geoff.greer.fm/2014/08/27/noise/ (2016-02-15)
    Open archived version from archive