Yesterday I was printing text in my condition handling + restarts example, when (print condition) actually works with :report as detailed here.

https://screwlisp.small-web.org/fundamental/common-lisp-conditions-using-report/

#programming #commonLisp condition handling. #prettyprinting

CL-USER> (make-condition 'foo :format-arguments '(1 2 3))
#<FOO "With arguments ~@{~a~^, ~}" {100215BF33}>
CL-USER> (princ *)
With arguments 1, 2, 3
#<FOO "With arguments ~@{~a~^, ~}" {100215BF33}>
CL-USER> (prin1 *)
#<FOO "With arguments ~@{~a~^, ~}" {100215BF33}>

ANSI cl condition report example

#programming #techDiscussion of #commonLisp on #itch_io .
https://lispy-gopher-show.itch.io/moonclimb/devlog/791188/what-we-get-out-of-lisp

: A short pamphlet about what I think you get out of lisp. Namely #loop #format #clim #clos #conditions ie #iteration #prettyPrinting #GUI #oop #notCrashing

When I remember how to get any of my tildes back I will gopher the org doc.

What we get out of lisp - moonclimb by screwtape

In some way, lisp's facility for its programmers to traverse three score miles and ten by candlelight appears to be very important. This note seeks to describe some fast and dirty useage of the loop f...

itch.io
#CommonLisp #Mastoquestions #prettyPrinting
So I do want to pretty print some forms, but I don't want the "oh this is a when form" pretty printing. What to do?
(princ '((when the first atom is when this happens)))
(princ '((but otherwise this happens))
*but imagine these forms are really long

@phoe

Note that the #PrettyPrinting dispatch tables of #CommonLisp conceptionally are a #GenericFunction with #ParametricDispatch.

The function SET-PPRINT-DISPATCH is essentially an ADD-METHOD to the pretty printing parametric dispatch.

(Unfortunatly, the canonical, #ProofOfConcept implementation of PP by #RichardWaters is one single convoluted mess; basically a negative example of software design, even by standards of its time.)

🌺

🏷️ #Lisp #Scheme #CLOS #AMOP #MetaObject #MetaObjectSystem

The extended form of the Common Lisp <loop> macro as a Controlled Natural Language (CNL)

The extended form of the <loop> macro is a contribution of the InterLisp tradition to Common Lisp. It was an explicit aim to create an iteration facility in...

All these via the HN comments-thread:

https://news.ycombinator.com/item?id=22706242

related to this story:

"The Hardest Program I've Ever Written" [2015], Robert Nystrom (http://journal.stuffwithstuff.com/2015/09/08/the-hardest-program-ive-ever-written/).

#Programming #PrettyPrinting #Dart #CodeFormatting

The Hardest Program I've Ever Written – How a code formatter works (2015) | Hacker News