6:32:08contrapunctusHm...I could use some design suggestions.
6:50:43contrapunctusI'm working on a code browser which displays code as trees, which have directories, files, and top-level Lisp forms as nodes.
6:50:53contrapunctusCurrently, the constructor for file nodes takes a pathname and checks whether the file type is supported, by calling `(compute-applicable-methods #'parse-file (list pathname ... <file extension as a keyword>))` ...but I'm not sure I like this approach.
6:59:34contrapunctusProbably because it would error if there is no applicable method, and I haven't yet figured out how to add a method to `no-applicable-method`...
8:18:41pjba trivial representation is to use the product of powers of prime numbers.
8:19:29pjbpowers of 2 for position in the toplevel list. Powers of 3 for positions in sublists of level 1. Powers of 5 for positions in sublists of level 2, etc.
8:20:04pjbSo 1 is 2^2 (starting from 1), and A is 2^3*3^2
8:21:15pjbA to 1 is 2^2/(2^3*3^2) = 2^-1*3^-2 = go back 2, go up, go back 1.
8:22:11lisp123beach: Interesting to know. Seems like he would've liked Lisp if he was in this era
8:22:50lisp123pjb: Have you ever used this in your own code or seen it somewhere in lisp code as a way to navigate within lists?
8:23:32lisp123I was thinking more of the Zipper algorithm (which represents the path from the top to the final element), so something like DRDR or DRR (where d = down, r = right)
8:23:33rotateqlisp123: And he wasn't far discovering it himself around 1930.
8:23:58lisp123And was seeing if I could convert this 'string' view of element positions into a numerical equivalent
8:24:58lisp123rotateq: Connections like this between (C)Lisp and mathematical concepts really does seem to drive home the point that Lisp is the most natural language