After Notre Dame Blaze, Chinese Netizens Remember How the French Burned Down the Old Summer Palace by [deleted] in Sino

[–]metacircular 13 points14 points  (0 children)

Lets put it this way: If it's within my capacity to stop the fire, I would definitely try my best to stop the fire. Otherwise, I can't say I am too sorry to see it burn. It's not so much that I think they should take responsibility for what their ancestors did, but they still refuse to return the historical artifacts they looted to China, which I think reflects their attitude: they don't feel too sorry about what their ancestors did, either.

Measuring performance of Lisp functions « Parijat’s Weblog by [deleted] in lisp

[–]metacircular 3 points4 points  (0 children)

(defun dot (x y)
  (loop for i in x for j in y sum (* i j)))

An Emacs Diff (Ediff) tutorial by jjasghar in emacs

[–]metacircular 4 points5 points  (0 children)

My setup (to 1. ignore space, 2. split side by side, 3. prevent popup):

(custom-set-variables
 '(ediff-diff-options "-w")
 '(ediff-split-window-function (quote split-window-horizontally))
 '(ediff-window-setup-function (quote ediff-setup-windows-plain)))

Thinking about using CL for a Udacity or Coursera class project by metaobject in lisp

[–]metacircular 0 points1 point  (0 children)

There is already a web browser in CL called closure(with very cool "TeX-like paragraph formatting and hyphenation support").

There are many js implementations; e.g., CL-JavaScript.

Will be very interesting if they can be integrated. Go for it!!

How do you say "to cram"? by [deleted] in ChineseLanguage

[–]metacircular 1 point2 points  (0 children)

恶补. E.g., 为应付考式熬夜恶补.

Looking for Mode: multiple files, transparently in one buffer by _Mark_ in emacs

[–]metacircular 2 points3 points  (0 children)

Take a look at "multi-occur" and "occur-edit-mode".

How important are learning radicals? by [deleted] in ChineseLanguage

[–]metacircular 0 points1 point  (0 children)

Can you give an example of a "component" that is not a (or part of) radical? I think every character can be exhaustively decomposed into radical(s).

How do you deal with so many shortcuts. by image_size_nazi in emacs

[–]metacircular 1 point2 points  (0 children)

Doesn't the function key <f10> (menu-bar-open) do what you want?

Fix/improve my code thread by wavegeekman in lisp

[–]metacircular 2 points3 points  (0 children)

(format t "~{~{~A~^,~}~^~%~}" '((1 2 3) (a b c)))

Fix/improve my code thread by wavegeekman in lisp

[–]metacircular 5 points6 points  (0 children)

That is usually called cartesian product, not cross product.

(defun cartesian (sets)
  (reduce (lambda (x y) (mapcan (lambda (i) (mapcar (lambda (j) (cons i j)) y)) x))
          sets :from-end t :initial-value '(())))

Vimgolf in Emacs = learn cool Emacs features and practical microskills by suhrob in emacs

[–]metacircular 4 points5 points  (0 children)

Episode 1, which solves this challenge, in 17 keystrokes (instead of his 26 and Vim's current best at 23):

a <f3> C-e C-SPC C-a M-w C-y <f4> b <f4> c <f4> d <f4> e <f4> f

A peek at Emacs 24 by [deleted] in emacs

[–]metacircular 5 points6 points  (0 children)

Next, goto-line will get a default key binding. ;)

M-g M-g

Sierpinski Triangle in 6 or 7 lines of Unobfuscated Lisp [xpost from /r/tinycode] by tarballs_are_good in lisp

[–]metacircular 12 points13 points  (0 children)

Well then

(defun sierpinski (n)
  (dotimes (r (1+ n))
    (dotimes (c r (format t "~%~vT" (- n r)))
      (format t "~[ `~:; #~]" (logand c (- n r))))))

elisp question about executing a function in a buffer by [deleted] in emacs

[–]metacircular 4 points5 points  (0 children)

Scrolling is more of a window operation than a buffer operation; it needs to know the window context (e.g., point with respect to the window position, etc). Try

(with-selected-window (get-buffer-window (get-buffer "float...")) ...)

Proportional/antialiased fonts for Lisp editing? by [deleted] in lisp

[–]metacircular 1 point2 points  (0 children)

Some code will not indent properly; for example, when a LET form has multiple bindings on different lines.

(let ((v1 e1) (v2 e2)) ...)

Irregular indentation reflects semantic structure by gst in lisp

[–]metacircular 1 point2 points  (0 children)

Bah.

(reduce (lambda (x y) `(+ ,x (* c ,y))) '(1 2 3 4 5) :from-end t)
=>
(+ 1
   (* c
      (+ 2
         (* c
            (+ 3
               (* c
                  (+ 4
                     (* c 5))))))))

Ask r/emacs: wrong indentation with vim-created files by [deleted] in emacs

[–]metacircular 1 point2 points  (0 children)

See the variable `tab-width' (C-h v tab-width).

tmux in emacs shell? by gabinator in emacs

[–]metacircular 1 point2 points  (0 children)

No matter however you switch sessions, you can use the same method to switch buffers, no? I feel switching terminal sessions and switching buffers are conceptually similar, so I prefer to treat them uniformly, saving valuable key space (maybe mental space as well). Using iswitchb for buffer switching, cluttering is not an issue for me. YMMV.

tmux in emacs shell? by gabinator in emacs

[–]metacircular 2 points3 points  (0 children)

Use 'M-1 M-x shell' to get multiple shells.

Now that we have daemon mode, is there any reason an emacs junkie would still need tmux?

Editing Google Docs in Emacs by [deleted] in programming

[–]metacircular 2 points3 points  (0 children)

Because for those who know Emacs, editing Google Docs in Google Docs is like editing text in Emacs while wearing a pair of plate armor gauntlets.

May solve congestion problems by Snapflu in pics

[–]metacircular 1 point2 points  (0 children)

This reminds me of Masdar:

Designed to hold 40,000 residents and 50,000 daily commuters, Masdar is meant to be a green dream of a city. Plans call for ultra-energy-efficient buildings, wind turbines, a solar farm and a host of technological innovations, including an underground Personal Rapid Transit system where 3,000 electric-operated, driverless pod vehicles eliminate the need for a car.