Skip to content

Instantly share code, notes, and snippets.

@atton
atton / tmux-ambiguous-width-cjk.patch
Last active August 29, 2015 14:21 — forked from waltarix/tmux-do-not-combine-utf8.patch
Fix tmux character width of east asian ambiguous optimized for Ricty 3.2.4
diff --git a/utf8.c b/utf8.c
index 63723d7..05ae973 100644
--- a/utf8.c
+++ b/utf8.c
@@ -194,7 +194,193 @@ struct utf8_width_entry utf8_width_table[] = {
{ 0x10a05, 0x10a06, 0, NULL, NULL },
};
+/* Random order */
+struct utf8_width_entry utf8_cjkwidth_table[] = {
@atton
atton / lisp.rb
Last active December 15, 2015 17:59 — forked from tompng/lisp2.rb
require './lisp_base.rb'
LISP do (cons 1,2) end
LISP do (cond true,(cond false,(cons 1,2),(cons 3,4)),(cons 5,6)) end
LISP do (defun :fact,:x,(cond (eq :x,0),1,(mult (sqrt (square :x)),(fact (minus :x,1))))) end
LISP do (defun :abs,:x,(cond (lt :x,0),(minus 0,:x),:x)) end
LISP do
(defun :sqrtrec,:x,:y,:d,
(cond (lt :d,0.0000000001),
:y,
(cond (lt (mult :y,:y),:x),