changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > org > docs / core/stats.org

changeset 16: 46fb6a10d2e1
child: 2601788ab805
author: ellis <ellis@rwest.io>
date: Fri, 29 Dec 2023 00:43:43 -0500
permissions: -rw-r--r--
description: stats
1 # -*- org-export-babel-evaluate: nil -*-
2 {{{header(docs/core,Richard Westhaver,ellis@rwest.io)}}}
3 #+property: header-args :dir /home/ellis/dev/comp/core/
4 #+begin_src shell :results pp :exports results
5  tokei -t=rust,lisp
6 #+end_src
7 
8 #+RESULTS:
9 #+begin_example
10 ===============================================================================
11  Language Files Lines Code Comments Blanks
12 ===============================================================================
13  Lisp 259 29567 22520 3163 3884
14 -------------------------------------------------------------------------------
15  Rust 142 12407 10732 443 1232
16  |- Markdown 101 804 0 709 95
17  (Total) 13211 10732 1152 1327
18 ===============================================================================
19  Total 401 41974 33252 3606 5116
20 ===============================================================================
21 #+end_example
22 
23 #+name: tally-package-symbols
24 #+begin_src lisp :exports both
25  (quickload-core-systems)
26  (defparameter *core-packages* '("STD" "SXP" "PARSE" "CLI" "XKB" "ALPM" "BTRFS" "BQN" "K"
27  "TREE-SITTER" "URING" "ZSTD" "BLAKE3" "ROCKSDB" "RDB" "SKEL"
28  "ORGAN" "NLP" "DAT" "OBJ" "LOG" "NET" "PACKY" "GUI" "SYN" "DOC"))
29  (defvar *core-symbols* nil)
30 
31  (loop with n = 0
32  for pkg in *core-packages*
33  do (loop for s being the external-symbols of (find-package pkg)
34  do (incf n)
35  (print (type-of s))
36  (pushnew s *core-symbols*))
37  finally (return (cons (length *core-packages*) n)))
38 #+end_src
39 
40 #+RESULTS: tally-package-symbols
41 : (24 . 1571)
42 
43 #+name: tally-functions-and-symbols
44 #+begin_src lisp :exports both
45  (defvar *core-functions* nil)
46  (defvar *core-variables* nil)
47  (loop for s in *core-symbols*
48  do (let ((f (fboundp s))
49  (v (boundp s)))
50  (when f (pushnew s *core-functions*))
51  (when v (pushnew s *core-variables*)))
52  finally (return (cons (length *core-functions*) (length *core-variables*))))
53 #+end_src
54 
55 #+RESULTS: tally-functions-and-symbols
56 : (1098 . 75)