changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > org > docs / core/stats.org

changeset 17: 2601788ab805
parent: 46fb6a10d2e1
child: 93bea7513a3e
author: Richard Westhaver <ellis@rwest.io>
date: Wed, 10 Jan 2024 19:02:43 -0500
permissions: -rw-r--r--
description: sub up
1 # -*- org-export-babel-evaluate: nil -*-
2 {{{header(docs/core,Richard Westhaver,ellis@rwest.io)}}}
3 * files
4 #+property: header-args :dir /home/ellis/dev/comp/core/
5 #+begin_src shell :results pp :exports results
6  cd rust && cargo clean && cd ..
7  tokei -t=rust,lisp
8 #+end_src
9 
10 #+RESULTS:
11 #+begin_example
12 ===============================================================================
13  Language Files Lines Code Comments Blanks
14 ===============================================================================
15  Lisp 264 30965 23547 3360 4058
16 -------------------------------------------------------------------------------
17  Rust 145 12513 10807 462 1244
18  |- Markdown 102 813 0 718 95
19  (Total) 13326 10807 1180 1339
20 ===============================================================================
21  Total 409 43478 34354 3822 5302
22 ===============================================================================
23 #+end_example
24 
25 * lisp
26 ** systems
27 ** packages
28 ** symbols
29 #+name: tally-package-symbols
30 #+begin_src lisp :exports both
31  (quickload-core-systems)
32  (defparameter *core-packages* '("STD" "PARSE" "CLI" "XKB" "ALPM" "BTRFS" "BQN" "K"
33  "TREE-SITTER" "URING" "ZSTD" "BLAKE3" "ROCKSDB" "RDB" "SKEL"
34  "ORGAN" "NLP" "DAT" "OBJ" "LOG" "NET" "PACKY" "GUI" "SYN" "DOC"))
35  (defvar *core-symbols* nil)
36 
37  (loop with n = 0
38  for pkg in *core-packages*
39  do (loop for s being the external-symbols of (find-package pkg)
40  do (incf n)
41  (print (type-of s))
42  (pushnew s *core-symbols*))
43  finally (return (cons (length *core-packages*) n)))
44 #+end_src
45 
46 #+RESULTS: tally-package-symbols
47 : (24 . 1571)
48 
49 #+name: tally-functions-and-symbols
50 #+begin_src lisp :exports both
51  (defvar *core-functions* nil)
52  (defvar *core-variables* nil)
53  (loop for s in *core-symbols*
54  do (let ((f (fboundp s))
55  (v (boundp s)))
56  (when f (pushnew s *core-functions*))
57  (when v (pushnew s *core-variables*)))
58  finally (return (cons (length *core-functions*) (length *core-variables*))))
59 #+end_src
60 
61 #+RESULTS: tally-functions-and-symbols
62 : (1098 . 75)
63 
64 ** fasls
65 #+begin_src shell :dir /home/ellis/dev/comp/infra/
66  for f in dist/fasl/*; do
67  du -s $f
68  done
69 #+end_src
70 
71 #+RESULTS:
72 | 240728 | dist/fasl/cli.core |
73 | 240920 | dist/fasl/organ.core |
74 | 244152 | dist/fasl/pod.core |
75 | 274504 | dist/fasl/prelude.core |
76 | 240760 | dist/fasl/rdb.core |
77 | 241400 | dist/fasl/skel.core |
78 | 240664 | dist/fasl/std.core |