Re: how to solve <<error printing object>>
Jacek Podkanski via Sbcl-help <[email protected]> Thu, 2 Apr 2026 01:13:09 +0100
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <CAE9ibtqh44RY0ibK=SUMRrFsKzuJHJctEAkDmVvXuf-xv+xmnw@mail.gmail.com> |
--===============1399144469174719093== Content-Type: multipart/alternative; boundary="0000000000006c05e8064e6f113e" --0000000000006c05e8064e6f113e Content-Type: text/plain; charset="UTF-8" setting *print-circle* to T did not work On Thu, 2 Apr 2026 at 00:44, Jacek Podkanski <[email protected]> wrote: > I was able to make progress with replacing slot values with todos, but > still do not know how to fix such problems > > (defmethod print-object ((obj male) stream) > (print-unreadable-object (obj stream :type t :identity t) > (format stream "bbbb ~a" > (list :name :todo ;; (~> obj name) > :mother :todo ;; (~> obj mother name) > :father :todo ;; (~> obj father name) > :children :todo ;; (loop for c in (~> obj children) > collect (~> c name)) > :wives :todo ;; (loop for w in (~> obj wives) collect > (~> w name)) > )))) > > On Thu, 2 Apr 2026 at 00:40, Jacek Podkanski <[email protected]> > wrote: > >> I am looking for guidelines on solving <<error printing object>> error. >> >> I am trying to learn CLOS parts related to relationships between objects. >> >> I tried to model ancient family relations where some lived in monogamous >> and some polygamous relationships. And it's not simple. >> >> I suspect there is going in circles involved, but I have no idea how to >> solve it. >> >> I can provide full source if needed. >> >> ;;; === classes ================= >> (defclass/std arb () >> ((id))) >> >> (defclass/std person (arb) >> ((name :type string) >> (mother) >> (father) >> (children))) >> >> (defclass/std male (person) >> ((wives))) >> > --0000000000006c05e8064e6f113e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">setting *print-circle* to T did not work</div><br><div cla= ss=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_at= tr">On Thu, 2 Apr 2026 at 00:44, Jacek Podkanski <<a href=3D"mailto:ruby= [email protected]">[email protected]</a>> wrote:<br></div>= <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">I was ab= le to make progress with replacing slot values with todos, but still do not= know how to fix such problems<div><br></div><div>(defmethod print-object (= (obj male) stream)<br>=C2=A0 (print-unreadable-object (obj stream :type t := identity t)<br>=C2=A0 =C2=A0 (format stream "bbbb ~a"<br>=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (list :name =C2=A0 =C2=A0:todo ;; (~>= obj name)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 :mother =C2=A0:todo ;; (~> obj mother name)<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :father =C2=A0:todo ;; (~> obj= father name)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 :children :todo ;; (loop for c in (~> obj children) collect (~>= ; c name))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 :wives =C2=A0:todo =C2=A0;; (loop for w in (~> obj wives) collect (~= > w name))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 ))))<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" = class=3D"gmail_attr">On Thu, 2 Apr 2026 at 00:40, Jacek Podkanski <<a hr= ef=3D"mailto:[email protected]" target=3D"_blank">ruby.object@goog= lemail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex"><div dir=3D"ltr">I am looking for guidelines on solving=C2=A0=C2= =A0<<error printing object>> error.<div><br></div><div>I am try= ing to learn CLOS parts related to relationships between objects.</div><div= ><br></div><div>I tried to model ancient family relations where some lived = in monogamous and some polygamous relationships. And it's not simple.= =C2=A0</div><div><br></div><div>I suspect there is going in circles involve= d, but I have no idea how to solve it.</div><div><br></div><div>I can provi= de full source if needed.</div><div><br></div><div>;;; =3D=3D=3D classes = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>(defclass/std arb ()= <br>=C2=A0 ((id)))<br><br>(defclass/std person (arb)<br>=C2=A0 ((name :type= string)<br>=C2=A0 =C2=A0(mother)<br>=C2=A0 =C2=A0(father)<br>=C2=A0 =C2=A0= (children)))<br><br>(defclass/std male =C2=A0 (person)<br>=C2=A0 ((wives)))= <br></div></div> </blockquote></div> </blockquote></div> --0000000000006c05e8064e6f113e-- --===============1399144469174719093== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============1399144469174719093== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sbcl-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sbcl-help --===============1399144469174719093==--