;;; ll-big-emacs --- ll big emacs -*- lexical-binding: t -*- ;; ;;; Comments: ;; ;;; Code: (require 'cl-lib) (cl-pushnew "." load-path :test #'string=) (require 'll nil t) (require 'll-type nil t) (require 'll-buffer nil t) (defun ll-big-ob () (let* ((pnt (point)) (beg (pos-bol 2)) (funs 0) (faces 0) (num 0) (cols [12 7 9]) (bar-l (cl-loop for a across cols sum a into res finally return (1+ res))) (bar (make-string bar-l 45))) (mapatoms (L (a) (& (functionp a) (++ funs)) (& (facep a) (++ faces)) (++ num)) obarray) (@i 10 10 bar 10 (lpad (1st cols) "functions |") (lpad (2nd cols) (@f "%d" funs)) (lpad (3rd cols) (@f "%.1f %%" (* 1e2 (// funs num)))) 10 (lpad (1st cols) "faces |") (lpad (2nd cols) (@f "%d" faces)) (lpad (3rd cols) (@f "%.1f %%" (* 1e2 (// faces num)))) 10 bar 10 (lpad (1st cols) "obarray |") (lpad (2nd cols) (@f "%d" num)) (lpad (3rd cols) (@f "%.1f %%" (* 1e2 (// num num)))) 10 bar) (comment-region beg (pos-eol 2)) (goto-char pnt) (save-buffer) num)) (defun ll-big-ob-how-many (&optional pred oba) (or (functionp pred) (setf pred #'facep)) (or (obarrayp oba) (setf oba obarray)) (cl-loop for a being the symbols of oba when (funcall pred a) count a)) ;; eval: (ll-big-ob) ;; ----------------------------- ;; functions | 17631 47.7 % ;; faces | 396 1.1 % ;; ----------------------------- ;; obarray | 36931 100.0 % ;; ----------------------------- ;; ----------------------------- ;; functions | 17619 47.8 % ;; faces | 396 1.1 % ;; ----------------------------- ;; obarray | 36857 100.0 % ;; ----------------------------- ;; ----------------------------- ;; functions | 22807 34.1 % ;; faces | 592 0.9 % ;; ----------------------------- ;; obarray | 66958 100.0 % ;; ----------------------------- (provide 'll-big-emacs) ;;; ll-big-emacs.el ends here