Multi-queue replacement algorithm for second level buffer caches

I have read a nice article written by Yuanyian Zhou and James F. Philbin “Multi-queue replacement algorithm for second level buffer caches”. Authors compares well known implementations LRU, MRU, LFU etc and introduces new, more efficient method based on multiple queues, which performs better than other described implementations. I highly recommend to read it.

List non latin file names in git

Imagine you have commited file which name contain non latin letters. git init test-repo cd test-repo echo "test" > тест.тэхэтэ git add . git commit -m "initial commit" Ok, lets list files changed at revision git log -p Here you can see escaped file name, and obvious its hard to read. diff --git "a/\321\202\320\265\321\201\321\202.\321\202\321\215\321\205\321\215\ new file mode 100644 index 0000000..9daeafb --- /dev/null +++ "b/\321\202\320\265\321\201\321\202.\321\202\321\215\321\205\321\215\321\202 @@ -0,0 +1 @@ +test To handle this case there is config options ‘core.

Export files changed at revision from mercurial

Sometimes (more precisely - rarely) you need to export files changed at given revision as directory tree instead of patch file. Mercurial vcs has archive command which let you to export selected files at given revision: hg archive --type files --rev $REVISION -I list_of_files To list files changed at revision: hg log -r $REVISION --template '{files}\n' | sed 's/\n / -I /g' Here end of line character is used to handle the case of using space character in filename.

Church numerals

Church numerals is a great example of introducing abstraction in terms of composition of functions. This concept demonstrates that “data” (naturals numbers in particular) and operations on data can be defined in the same way - using higher-order functions. Summary: type Church a = (a -> a) -> a -> a zero, cone, ctwo :: Church a zero s z = z one s z = s z two s = s .