Tag Archives: gotcha

How to close the sudden Camera app from Windows 8

Table of Contents 1. introduction 2. how to get out 3. how did I end up there 4. how to turn off the feature 5. further reading The readers are assumed to be familiar with names of basic Windows 8 … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Lisp lists and destructive functions

Table of Contents 1. nil and non-nil 2. cons cell 3. cons cells in diagrams 4. lists 5. improper lists and proper lists 6. check for empty list, non-empty list, list 7. sequence 8. literal list 9. shared structure 10. … Continue reading

Posted in Emacs, Lisp | Tagged , | Leave a comment

mod 0 equivalence of sub-sigma-algebras and gotchas

Table of Contents 1. closure of a sub-sigma-algebra 2. closed sub sigma algebra 3. mod zero equivalence of sub sigma algebras When we are building some theory involving measures, there are cases where we should ignore null sets (sets of … Continue reading

Posted in Mathematics | Tagged , | Leave a comment

default argument in Python and Lisp

Table of Contents the Python mutable default argument gotcha how to give default arguments in Lisp comparing Lisp and Python the None trick and the nil trick further reading optional reading more on the Python gotcha the gotcha will get … Continue reading

Posted in Emacs, Lisp, Python | Tagged , , | Leave a comment

Emacs Lisp lexical binding gotchas and related best practices

Table of Contents 1. motivation 2. non-local variables and closures 3. gotchas and best practices 3.1. code as data 3.2. invasion of special variable 3.3. – – – 3.4. mixing iteration, closures, and asynchronous programming together 4. testing tools 4.1. … Continue reading

Posted in Emacs, Lisp | Tagged , , , | Leave a comment

Invasion of local variables in Emacs Lisp

Table of Contents 1. some simple example 2. what Bob can do (full measures) 3. – – – 4. What Bob can do (half measures) 5. what Francesca can do 6. comparison with invasion of special variables This article is … Continue reading

Posted in Emacs, Lisp | Tagged , | 1 Comment

lexical scoping and dynamic scoping in Emacs Lisp

In this article, I demonstrate: difference between dynamic scoping and lexical scoping in Emacs Lisp what to watch out for with dynamic scoping what you can do with lexical scoping and lexical closures what happens when you mix lexical scoping … Continue reading

Posted in Emacs | Tagged , , , , | 16 Comments