Starred Links – April 2013

Starred Links – April 2013

1 Python and OpenERP

  • python-sh: a wonderful tool for system administrators

    Among the three most popular programming languages for system
    administrators, Shell scripts are both difficult to write and read, Perl
    scripts are easy to write but difficult to read, while Python is easy to
    read and write, but when it comes to interaction with the shell, Python is
    not as convenient as the former two.

    python-shell has been created to fill this gap, it provides a simple
    interface for subprocess module, which is in the Python standard
    library. With python-shell, you can call an external command just like a
    normal Python function, for example,"-lah", "/")

  • Some Python black magics for n00bs

    This article explains a few so called Python black magics with examples,
    including High-Order, Duck Typing, Generator and Decorator.

  • Entering the Python REPL

    A StackOverflow thread, introduces a few approaches to get into the REPL
    (Read-Eval-Print-Loop) of Python. The easiest way is to run the following

    import code; code.interact(local=locals())

    Also, Emacs users could evaluate this Elisp function, which can be used to
    insert the above snippet for you:

    ;; enter interactive python
    (defun python-interactive ()
      (insert "!import code; code.interact(local=vars())"))

2 Emacs and Elisp

  • Emacs WIKI

    Emacs WIKI has recently applied a nicer theme.

  • zenburn color theme

    I used to be a sutble-hacker color theme user, I then switched to
    tango-dark after Emacs 24 was released. Recently, I gave zenburn a
    go. zenburn is a low contrast color theme, which is said to be good for
    those who stare at a monitor all day. And after a few days of using it, I
    found it is quite comfortable. I have also adjusted the CSS of my blog
    according to zenburn.

  • Emacs Conference 2013

    The Youtube playlist of the Emacs Conference 2013, it includes a few videos
    worth watching.

  • Emacs Litable: on-the-fly evaluation and substitution

    A video that demonstrates the on-the-fly evaluation and substitution
    (Light Talbe-like functionality) for Elisp. The Github link of this
    project is included in the video description.

  • Google search from Emacs

    A very simple Elisp function that enables you to invoke a Google search
    from Emacs.

    With this function, you could reduce the steps of a Google search from:

    • Copy the keywords
    • Switch to the browser
    • Move to the search bar
    • Paste your keywords
    • Click “Search”


    • `C-c g’ (self-defined keybinding)
    • Type in your keywords
    • Press “Enter”
  • Essential Elisp libraries

    This article introduces a few libraries that could be used to simplify
    Elisp programming: `dash.el’ brings modern list operation functions such as
    slice, map and reduce; `s.el’ brings a few handy string operation
    functions; `ht.el’ brings hash tables; `loop.el’ brings syntactic sugar
    like loop-until, loop-do-with and loop-for-each.

    I recommend that you read the source code of these libraries. For example,
    `loop.el’ consists of a few Elisp macros. You could see how macros are used
    to extend Elisp.

3 GNU/Linux

4 Misc

  • PL101: Create your own programming language

    PL101 is an open course of Nathan’s University.

    The core task of PL101 is to write a parser, an interpreter and a compiler
    for a simplified version of Scheme. It might sound complicated, but it
    really isn’t due to the course’s high quality. PL101 requires prior
    programming experience (not necessarily JavaScript) and it would be very
    helpful if you have some knowledge of Lisp and Regular Expression.

  • Umano: News Read To You

    Umnao is an Android/iOS application which can be used to listen to news
    that is read by real people from various sources.

Date: 2013-05-09

Author: 任文山 (Ren Wenshan)

Org version 7.9.3d with Emacs version 24

Validate XHTML 1.0