The blog post details the author's process of livecoding graphics in Common Lisp using a combination of Quicklisp libraries, specifically cl-cairo2 and Qtools. They leverage the REPL's interactive nature to rapidly iterate and experiment with visual elements, modifying code and seeing immediate results in a Cairo graphics window. The author explains their setup and workflow, emphasizing the advantages of Lisp's dynamic environment for this type of creative coding, showcasing how functions can be redefined and tweaked on-the-fly to manipulate shapes, colors, and other graphical parameters. This approach allows for a fluid and exploratory development experience, turning the coding process itself into a performative act.
Discovery Coding is a software development approach prioritizing exploration and experimentation over rigid upfront planning. It emphasizes building small, functional prototypes to rapidly test ideas and gain a deeper understanding of the problem domain. This iterative process allows for continuous learning and adaptation, enabling developers to discover the best solutions organically, rather than being constrained by initial assumptions. The core principle is to treat coding as a tool for investigation, using it to uncover insights and refine the direction of the project as development progresses. This approach embraces uncertainty and recognizes that the best path forward often emerges through experimentation and discovery.
HN users generally praise the "discovery coding" approach described in the linked article. Several commenters share their own experiences with similar workflows, emphasizing the benefits of iterative exploration and experimentation for learning and problem-solving. Some highlight the importance of setting aside dedicated time for this type of coding, contrasting it with the pressure of deadline-driven work. Others suggest tools and techniques that can facilitate discovery coding, like using Jupyter notebooks or focusing on visual outputs. A few caution against over-reliance on this method for larger projects, advocating for more structured planning when necessary. There's also a discussion on how this relates to different learning styles and the potential downsides, such as getting lost in tangents or feeling unproductive.
Summary of Comments ( 47 )
https://news.ycombinator.com/item?id=43774726
HN users generally praised the author's technical skill and the visual appeal of the live coding demo. Some expressed interest in learning more about Common Lisp and the specific libraries used. A few commenters discussed the practical applications of live coding graphics, suggesting uses in game development, generative art, and data visualization. One commenter pointed out the potential accessibility issues related to color choices in the examples. Another highlighted the historical precedent of Lisp machines and their graphical capabilities, connecting the demo to that lineage. The perceived complexity of Common Lisp was also mentioned, with some users acknowledging its steep learning curve but also its power and flexibility.
The Hacker News post titled "Graphics livecoding in Common Lisp," linking to Kevin Gal's blog post about livecoding graphics in Common Lisp, has generated a moderate amount of discussion with a number of insightful comments.
Several commenters express enthusiasm for the elegance and power of Common Lisp for this kind of work, particularly its interactive development environment and the REPL. One commenter highlights the "joy" of using Lisp for livecoding, contrasting it favorably with other languages. Another commenter specifically praises the ability to redefine functions on-the-fly without restarting the application, a key feature enabling livecoding.
The discussion touches upon the specific libraries and tools used by the author, including CEPL, SLY, and Quicklisp. Commenters share their experiences with these tools and offer alternative suggestions. One commenter suggests using a library like cl-cairo2 for 2D drawing or a game library like Trial for a potentially smoother experience. Another commenter mentions using similar setups with Common Lisp and OpenGL for 3D graphics programming.
Some commenters delve into the technical details of livecoding and image processing, discussing double-buffering techniques and how to handle window resizing events. One commenter specifically mentions a technique of using a dedicated thread for rendering to avoid blocking the main thread during intensive graphical operations.
A couple of comments reflect on the historical context of Lisp and its influence on other livecoding environments, including Smalltalk. One comment points out the rich history of Lisp machines and their emphasis on interactive programming, which paved the way for modern livecoding techniques.
The comments also branch into related areas, such as generative art and music, and the potential of Common Lisp for creating these types of interactive experiences.
While the general tone is positive and appreciative of the author's work, there are a few constructive criticisms. One comment notes the potential performance bottlenecks of Common Lisp for graphics-intensive applications and suggests exploring other languages or libraries for optimization. Another comment points out the relative niche status of Common Lisp in the contemporary programming landscape, which may limit its adoption for livecoding graphics.
Overall, the comment section provides valuable insights and perspectives on livecoding graphics with Common Lisp, touching upon both its advantages and its potential limitations. The commenters' collective knowledge and experience enrich the discussion and offer valuable pointers for anyone interested in exploring this area further.