changeset 1: |
4b49701b8c04 |
parent 0: |
87b04952fb18 |
child 2: |
04e86b94ef1a |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Sun, 02 Jun 2024 20:08:07 -0400 |
files: |
inbox-notes.org query-lang.org skel-readme.org |
description: |
import |
1.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2+++ b/inbox-notes.org Sun Jun 02 20:08:07 2024 -0400
1.3@@ -0,0 +1,59 @@
1.4+#+title: notes on a shared inbox workflow
1.5+#+author: Richard Westhaver <ellis@rwest.io>
1.6+#+date: [2024-05-05 Sun]
1.7+
1.8+I think roadmap should be product/management oriented. Agile
1.9+terminology applies and things are grouped into
1.10+sprints/trains/PIs/etc. There's really no need for that currently at
1.11+least not until there's at least 10 or so contributors. The
1.12+=inbox.org= workflow is much more 'agile' in fact, e.g. hackable.
1.13+
1.14+I would like to make use of the core/inbox.el and ORGAN, perhaps move
1.15+inbox.el to a new repository, where it will live as a package, which
1.16+we can contribute to MELPA.
1.17+
1.18+#+begin_src org
1.19+ ,*
1.20+#+end_src
1.21+
1.22+* Inbox Architecture
1.23+
1.24+* Inbox Metadata
1.25+** Tags
1.26+Pandora's box. I guess we should make use of decorators/capitalization
1.27+for significant tags, and the rest are user-defined.
1.28+** IDs
1.29+Not entirely commited to uuid, but maybe it makes the most sense to
1.30+use the timestamp one.
1.31+** Status
1.32+A Status should be applied to tasks only.
1.33+
1.34+We need a significant number of 'in progress' types, but each
1.35+completed task will start as TODO and end up at DONE.
1.36+** Dates
1.37+Deadline,Scheduled,DATE property,LOGBOOK
1.38+** Log
1.39+The logbook should be used to record progress throughout the lifetime
1.40+of an item.
1.41+** Description
1.42+Descriptions can be blank, but tasks in need of review require a
1.43+description.
1.44+** Properties
1.45+- Effort
1.46+- Category
1.47+** Links
1.48+I don't think we need org-roam for this? TBD. The thing is that I want
1.49+link data to end up in a set of rocksdb instances instead of sqlite.
1.50+
1.51+For the time being we should limit the scope to a set of properties:
1.52+- PREVIOUS
1.53+- REQUIRES
1.54+- RELATED
1.55+- PARENT
1.56+
1.57+Note there's no forward references.
1.58+
1.59+* Notifications
1.60+discord bot?
1.61+prob use rust, parse json or something
1.62+
2.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2+++ b/query-lang.org Sun Jun 02 20:08:07 2024 -0400
2.3@@ -0,0 +1,14 @@
2.4+This file is for notes on different query languages.
2.5+
2.6+Queries are extremely important in software development and having a
2.7+robust query engine is a must for CC.
2.8+
2.9+Our goal is to develop a query-language compiler (Q) which can be
2.10+tuned at compile-time to meet the needs of any database backend.
2.11+
2.12+The query languages that interest us most are derived from Prolog
2.13+(/datalog) and SQL, but we won't be supporting all of their features -
2.14+only the ones that can be reasonably coerced to all supported frontends.
2.15+
2.16+Q will require an Intermediate Representation (IR) - the encoding will
2.17+be based on S-expressions with a specialized reader.
3.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2+++ b/skel-readme.org Sun Jun 02 20:08:07 2024 -0400
3.3@@ -0,0 +1,291 @@
3.4+#+title: skel
3.5+#+author: Richard Westhaver
3.6+#+description: Project Skeletons
3.7+* Overview
3.8++ status :: WIP
3.9++ forge :: [[https://lab.rwest.io/ellis/skel][Heptapod]]
3.10++ mirror :: [[https://github.com/richardwesthaver/skel][Github]]
3.11+
3.12+This system provides functions and macros for building and deploying
3.13+project skeletons. /This is not a general purpose templating
3.14+system/. It is specifically for my software stack.
3.15+
3.16+** Goals
3.17+- vaporize boilerplate code and docs
3.18+- integrate reasonably well with my tools (Emacs/etc)
3.19+- object-oriented project management
3.20+** Resources
3.21+- [[https://www.gnu.org/software/emacs/manual/html_node/autotype/Skeleton-Language.html][skeleton-lanaguage (emacs)]]
3.22+- [[https://github.com/emacs-mirror/emacs/tree/master/lisp/cedet/ede][cedet/ede (emacs)]]
3.23+- [[https://www.gnu.org/software/make/manual/make.html][GNU make]]
3.24+- [[https://docs.factorcode.org/content/article-vocabularies.html][Factor (forth) definitions]]
3.25+* Quickstart
3.26+Make sure you have sbcl installed:
3.27+#+begin_src shell :results pp :exports both
3.28+sbcl --version
3.29+#+end_src
3.30+
3.31+#+RESULTS:
3.32+: SBCL 2.3.12+main
3.33+
3.34+Then compile the program. This command produces a binary called =skel=
3.35+in the project root:
3.36+#+begin_src shell :results raw silent
3.37+sbcl --noinform --non-interactive --eval '(ql:quickload :app/cli/skel)' --eval '(asdf:make :app/cli/skel)'
3.38+#+end_src
3.39+
3.40+Run the binary without any args, which will print a skeleton of the
3.41+current project directory (=*skel-project*=).
3.42+
3.43+#+begin_src shell :results output replace :exports both
3.44+ skel -h
3.45+#+end_src
3.46+
3.47+#+RESULTS:
3.48+#+begin_example
3.49+skel v0.1.1
3.50+ usage: skel [global] <command> [<arg>]
3.51+
3.52+ A hacker's project compiler and build tool.
3.53+ options:
3.54+ -h/--help* : print this message
3.55+ -v/--version* : print version
3.56+ -d/--debug* : set log level (debug,info,trace,warn)
3.57+ -c/--config* : set a custom skel user config
3.58+ -i/--input : input source
3.59+ -o/--output : output target
3.60+ commands:
3.61+ init : initialize a skelfile in the current directory
3.62+ -n/--name : project name
3.63+
3.64+ show : describe the project skelfile
3.65+ -f/--file : path to skelfile
3.66+
3.67+ inspect : inspect the project skelfile
3.68+ -f/--file : path to skelfile
3.69+
3.70+ make : build project targets
3.71+ -t/--target : target to build
3.72+
3.73+ run : run a script or command
3.74+
3.75+ push : push the current project upstream
3.76+
3.77+ pull : pull the current project from remote
3.78+
3.79+ clone : clone a remote project
3.80+
3.81+ commit : commit changes to the project vc
3.82+
3.83+ edit : edit a project file
3.84+
3.85+ shell : open the sk-shell interpreter
3.86+
3.87+#+end_example
3.88+
3.89+Here's skel's skelfile:
3.90+
3.91+#+begin_src shell :results output replace :wrap src skel :exports results
3.92+cat skel.sk
3.93+#+end_src
3.94+
3.95+#+RESULTS:
3.96+#+begin_src skel
3.97+;;; skelfile @ 2023-10-08.02:37:25 -*- mode: skel; -*-
3.98+:name skel
3.99+:author "ellis"
3.100+:version "0.1.0"
3.101+:description "a hacker's project compiler"
3.102+:license "MPL"
3.103+:vc :hg
3.104+:tags ("lisp")
3.105+:rules ((build () (print (asdf:make :skel/cli)))
3.106+ (clean () #$rm -rf */*.fasl$#))
3.107+:documents ((:org "readme"))
3.108+:components
3.109+((:elisp "sk")
3.110+ (:lisp-system
3.111+ "skel"
3.112+ :version "0.1.0"
3.113+ :maintainer "ellis <ellis@rwest.io>"
3.114+ :bug-tracker "https://lab.rwest.io/ellis/skel/issues"
3.115+ :class :package-inferred-system
3.116+ :defsystem-depends-on (:asdf-package-system)
3.117+ :depends-on (:uiop :asdf :sb-posix :sb-bsd-sockets :sb-concurrency :cl-ppcre :std :organ :skel/pkg)
3.118+ :in-order-to ((test-op (test-op skel/tests)))
3.119+ :perform (test-op (op c) (uiop:symbol-call '#:rt '#:do-tests))))
3.120+:stash "~/dev/comp/stash"
3.121+:shed "~/dev/comp/shed"
3.122+:abbrevs nil
3.123+:snippets
3.124+((autogen #$sbcl --eval '(ql:quickload :app/cli/skel)' --eval '(asdf:make :app/cli/skel)'$#))
3.125+#+end_src
3.126+
3.127+This is just a form without the top-level parentheses - you're free to
3.128+omit them in a skelfile.
3.129+
3.130+** describe
3.131+The =describe= command can be used to check the currently active
3.132+skelfile, printing any errors and the parsed object.
3.133+
3.134+#+begin_src shell :results output replace :exports both
3.135+ skel show
3.136+#+end_src
3.137+
3.138+#+RESULTS:
3.139+#+begin_example
3.140+#<SKEL:SK-PROJECT :ID 1e61-38b1-c5fe-7eac>
3.141+ [standard-object]
3.142+
3.143+Slots with :INSTANCE allocation:
3.144+ NAME = SKEL
3.145+ PATH = #P"/home/ellis/dev/skel/skelfile"
3.146+ AUTHOR = "ellis"
3.147+ VERSION = "0.1.0"
3.148+ TAGS = ("lisp")
3.149+ DESCRIPTION = "a hacker's project compiler"
3.150+ LICENSE = "MPL"
3.151+ AST = NIL
3.152+ ID = 2189093230060928684
3.153+ VC = :HG
3.154+ RULES = ((BUILD NIL (PRINT (ASDF/OPERATE:MAKE :SKEL/CLI)))..
3.155+ DOCUMENTS = ((:ORG "readme"))
3.156+ COMPONENTS = ((:ELISP "sk")..
3.157+ SCRIPTS = NIL
3.158+ SNIPPETS = ((AUTOGEN "sbcl --eval '(asdf:make :skel/cli)'"))
3.159+ STASH = #P"~/stash"
3.160+ SHED = #P"~/shed"
3.161+ ABBREVS = NIL
3.162+ IMPORTS = NIL
3.163+#+end_example
3.164+
3.165+** TODO compile
3.166+Skelfiles can be compiled to produce a new project skeleton or update
3.167+an existing one.
3.168+
3.169+Try compiling skel's skelfile:
3.170+
3.171+#+begin_src shell :results output replace :exports code
3.172+ skel compile
3.173+#+end_src
3.174+
3.175+You may also compile individual components of the project structure,
3.176+for example, to compile the rules into a makefile:
3.177+
3.178+#+begin_src shell :results output replace :exports code
3.179+ skel compile --rules
3.180+#+end_src
3.181+
3.182+#+begin_src shell :results output :wrap src makefile :exports both
3.183+cat makefile
3.184+#+end_src
3.185+
3.186+#+RESULTS:
3.187+#+begin_src makefile
3.188+### SKEL @ 2023-09-14.01:47:59 --- A hacker's project compiler -*- mode:makefile ; -*-
3.189+LISP=sbcl --noinform --non-interactive --eval "(asdf:load-asd \"skel.asd\")" --eval "(ql:quickload :skel)"
3.190+.PHONY: compile clean
3.191+compile:;$(LISP) --eval "(asdf:compile-system :skel)"
3.192+test:compile;$(LISP) --eval "(ql:quickload :skel/tests)" --eval "(in-package :skel.tests)" --eval "(compile-file \"tests.lisp\")" --eval "(load-file \"tests.lisp\")" --eval "(do-tests :skel)"
3.193+clean:;rm -rf *.fasl
3.194+debug:compile;$(LISP) --eval "(start-repl)"
3.195+#+end_src
3.196+
3.197+* Examples
3.198+** Default
3.199+When you run =skel init= this is the basic skelfile that will be
3.200+generated in the current directory, depending on the following
3.201+contexts:
3.202+- default user config
3.203+- directory contents
3.204+- cli args
3.205+With no cli args or user config and an empty directory the output
3.206+looks like this:
3.207+#+begin_src skel
3.208+;;; examples @ 2023-10-09.23:38:23 -*- mode: skel; -*-
3.209+:name "examples"
3.210+#+end_src
3.211+** Imports
3.212+** Multi
3.213+* Tests
3.214+The unit tests may also be a useful reference:
3.215+
3.216+#+begin_src lisp :results output replace :wrap src lisp :exports both :package :skel.tests
3.217+ (ql:quickload :skel/tests)
3.218+ (in-package :skel.tests)
3.219+ (setq *log-level* nil)
3.220+ ;; (setq *catch-test-errors* nil)
3.221+ (setq *compile-tests* t)
3.222+ (list (multiple-value-list (do-tests :skel)) (test-results *test-suite*))
3.223+#+end_src
3.224+
3.225+#+RESULTS:
3.226+#+begin_src lisp
3.227+To load "skel/tests":
3.228+ Load 1 ASDF system:
3.229+ skel/tests
3.230+; Loading "skel/tests"
3.231+..................................................
3.232+[package skel.vc].................................
3.233+[package skel.virt]...............................
3.234+[package skel.comp.asd]...........................
3.235+[package skel.make]...............................
3.236+[package skel.ext.asdf]...........................
3.237+[package skel.tests].
3.238+in suite SKEL with 6/6 tests:
3.239+#<PASS VM-TEST788>
3.240+#<PASS MAKEFILE-TEST787>
3.241+#<PASS SKELRC-TEST786>
3.242+#<PASS SKELFILE-TEST785>
3.243+#<PASS HEADER-COMMENTS-TEST784>
3.244+#<PASS SANITY-TEST783>
3.245+No tests failed.
3.246+#+end_src
3.247+
3.248+* API
3.249+- TODO :: CLOS-based core classes
3.250+- TODO :: EIEIO-based wrapper classes
3.251+
3.252+#+begin_src dot :file api.svg :exports results
3.253+ digraph { splines=true; label="CLOS API"; labelloc="t"; node [shape=record];
3.254+ sk [label="(skel :ID :AST)"]
3.255+ methods [label="(sk-compile sk-expand sk-build\nsk-run sk-init sk-new sk-save\nsk-tangle sk-weave sk-call sk-print)"]
3.256+ skmet [label="(sk-meta :NAME :PATH :VERSION :DESCRIPTION)"]
3.257+ skvcs [label="(sk-vc-meta :VC)"]
3.258+ skcmd [label="(sk-command)"]
3.259+ sktar [label="(sk-target)"]
3.260+ sksrc [label="(sk-source)"]
3.261+ skrec [label="(sk-recipe :COMMANDS)"]
3.262+ skrul [label="(sk-rule :TARGET :SOURCE :RECIPE)"]
3.263+ skdoc [label="(sk-document)"]
3.264+ skscr [label="(sk-script)"]
3.265+ skcfg [label="(sk-config)"]
3.266+ sksni [label="(sk-snippet)"]
3.267+ skabb [label="(sk-abbrev)"]
3.268+ skpro [label="(sk-project\l:RULES\l:DOCUMENTS\l:SCRIPTS\l:SNIPPETS\l:ABBREVS)\l"]
3.269+ sk -> skmet
3.270+ skmet -> skvcs
3.271+ sk -> skcfg
3.272+ sk -> sksni
3.273+ sk -> skabb
3.274+ sk -> sktar
3.275+ sk -> skrul
3.276+ sk -> sksrc
3.277+ sk -> skcmd
3.278+ skvcs -> skpro
3.279+ skmet -> skdoc
3.280+ skmet -> skscr
3.281+ skrul -> skpro
3.282+ skscr -> skpro
3.283+ skdoc -> skpro
3.284+ sksni -> skpro
3.285+ skabb -> skpro
3.286+ sktar -> skrul
3.287+ sksrc -> skrul
3.288+ skrec -> skrul
3.289+ skcmd -> skrec
3.290+ }
3.291+#+end_src
3.292+
3.293+#+RESULTS:
3.294+[[file:api.svg]]