Adam Tornhill, a software developer and author, writes about code analysis, Lisp, Smalltalk, and book reviews.
HN links it for his "Code as a Crime Scene" work on measuring code complexity, a FizzBuzz C++ compiler errors piece, and his metaobject protocol review.
I've been wanting to try something like this for a long time! Is there any way to sign up for updates?
(In particular, I'm waiting for the option to turn off the AI stuff, at least for when I am trying things out.)
I especially love the ability to zoom into a function and hide the rest of a file. I've wanted that sort of thing a surprising number of times. I'm thinking one could also use this to virtually rearrange a single file by pulling the functions in that file that you are working on next to each other easily?
In addition to the editing interface, I think there are probably a lot of visualization opportunities in editors:
- what's the interaction between my code and third-party dependencies? - what are the dependencies/call graph of my code? or perhaps just a portion of it? - call graphs can be nested — perhaps you care for a dependency graph at the class or module level, or perhaps you want to "drill down" into the call graph inside an object
In all these cases, being able to seamlessly transition between the visualization and editing — like you seem to be aiming towards — seems like the killer feature.
And, of course, there are lot of other interesting visualization opportunities once you have any sort of graphics in your editor:
- heatmaps of code churn - heatmaps of code performance - tracing variable usage - and, of course, lots more (https://adamtornhill.com/articles/crimescene/codeascrimescene.htm)
One last thought: if you haven't read _The Programmer's…
One of the core points about metaobject protocols is that while it's important to language design, a good language to me also exposes & makes flexible the object system to users of the language too.
From a review (https://www.adamtornhill.com/reviews/amop.htm),
> The metaobject protocol behaves like an interface towards the language itself, available for the programmer to incrementally customize. Just as we can specialize and extend the behavior of the classes we define in our own applications, we can now extend the language itself using the very same mechanisms.
One of the points that has rather surprised me is that we devs have not more broadly explored what we could do with our metaobject protocols. We havent had a boom in metaprogramming, we haven't seen a largescale return of AOP; we've been letting objects stay dumb unextended objects for a long time now.
The one sizable exception I have on my radar is React's Higher Order Components, where components/classes were wrapped/composed in other classes. Slices of object behavior were spliced into place.
Now that's replaced with hooks, which invert the relationship, making the function up front composed all behavior it might want as hooks that it calls.
I don't know enough about how Rust macros are made & used. My vague impression is they are very scarcely considered. Maybe I just missed the discussions but I'd expect there to be lots of blogging about this topic if metaprogramming here was really as fertile a field…
>Does anyone here use any lisp for Web Development?
Saw this recently:
http://www.adamtornhill.com/articles/lispweb.htm
It might be useful, even though is from 2008, if it focuses on fundamentals.
Saved it for later reading, since I'm not learning Lisp currently, though had read a part of the Practical Common Lisp book earlier. (Had liked what I read of it.)
detaro,
Just going through the exercises in this book by Paul Graham : http://ep.yimg.com/ty/cdn/paulgraham/onlisp.pdf. --- There doesn't seem to be anything in there about web development for Lisp though ...
Also saw this book on static web development by Adam Tornhill : http://www.adamtornhill.com/articles/lispweb.htm --- do you think this will help ?
I like the mindset, it reminds me of "Your code as a crime scene" by Adam Tornhill:
https://www.adamtornhill.com/articles/crimescene/codeascrimescene.htm
Also, very tangentially, to the notion of the Developer's Legacy Index:
https://www.javaadvent.com/2021/12/using-jgit-to-analyse-the-legacy-of-individual-developers.html
They do but those aren't made available to you like a database, just through their search tool and indirectly through their contextual lookups.
See also tools that build databases from code history, like
https://www.adamtornhill.com/articles/crimescene/codeascrimescene.htm