Using lex, yacc and cons-cells to transform a node-centric hierarchical circuit to a cad-ready net-centric model. This would be the "dual" of the initial representation.
.
From a conversation August, 2023.
There is something magical about lisp, but it might not be what you think. Paul shared with me yesterday this 2010 presentation by Closure author Rich Hickey where he describes the part of problem solving best done with eyes closed. I once spent a few weeks at MIT and got to know folks from their AI lab, a hotbed of lisp. I remember observing their confidence, "if they could think it, they could program it." This led me to study their "flavors" version looking for that magic. But as Hickey explains, the thinking-it is actually the hard part. youtube
Yeah, this also occurs to me at times. As I'm doodling in C I find it that all memory problems are solved easily after I sit down for a bit to think through as if it were Rust move semantics. By the way, progressing with my Web0/JS0 interpreter in C (after completing it in JS), I do think about whether it would simplify and improve the overall implementation if I rather implemented a "buggy Lisp interpreter in C" first and finished parsing & evaluation in that.
I kinda did the lisp in c thing once. I was exploring VLSI opportunities from the computer research lab. The "pros" in our IC CAD group suggested I come work with them for a month or so to learn how the real work is done. I thought of this as a vacation and made some lasting friends. But they had a specific problem in mind: Text to Text translation of a circuit description language. They couldn't get a yacc parser to work and asked me to help. I understood yacc's weird messages so that part was easy. But the next step was to take the hierarchal circuit description and turn it inside out. To do this I wrote CONS cell functions and the typical recursive traversals. Their problem reduced to a page of c code. The trick was I never had to reclaim any memory because once the work was done the program terminated.