libera/#commonlisp - IRC Chatlog
Search
6:50:43
contrapunctus
I'm working on a code browser which displays code as trees, which have directories, files, and top-level Lisp forms as nodes.
6:50:53
contrapunctus
Currently, 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:34
contrapunctus
Probably 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:17:50
lisp123
and the subtraction of these two numbers will give you the direction to go from 1 to A
8:18:14
lisp123
And subtraction may not achieve this, but any sort of binary operation can be used in its place
8:19:29
pjb
powers 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:22:50
lisp123
pjb: 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:32
lisp123
I 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:58
lisp123
And was seeing if I could convert this 'string' view of element positions into a numerical equivalent
8:24:58
lisp123
rotateq: Connections like this between (C)Lisp and mathematical concepts really does seem to drive home the point that Lisp is the most natural language
12:18:11
lisp123
contrapunctus: re code browser, why worry about directories and files? better do based on packages and how functions depend on other functions
12:19:55
lisp123
an object browser for CLOS objects would be good - believe its already implemented in various forms, but worthwhile adding to any 'code browser'
12:20:53
lisp123
it would be good to read a function and automatically browser to the applicable method
12:21:45
lisp123
then it would be good to have a documentation browser and potentially some type inference
12:53:11
contrapunctus
lisp123: thanks for the input. Have a look at https://codeberg.org/contrapunctus/dryad#explanation to understand the reasons for it.
12:53:22
contrapunctus
«better do based on packages and how functions depend on other functions» I'm working on a view which does something similar, but using system definitions rather than packages.
12:54:27
contrapunctus
«it would be good to have a documentation browser» One part of this will be done when I implement source comment display. Another aspect is customizable views of source code, e.g. displaying any combination of code, [and wherever applicable] definition name, definition type, docstring, arglists, etc...the parsing for this is in place, but needs a UI.