<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Hello everyone,</div><div class=""><br class=""></div><div class="">How’s it going?</div><div class=""><br class=""></div><div class="">Firstly, bug #1 was triaged incorrectly by me. The main issue was handling of the “preamble”.</div><div class="">BUG #1 and BUG #2 are the same bug. Going by the triage, BUG #1 turned out to be a duplicate of BUG #2.</div><div class="">From a communications perspective it seems better to document that BUG #2 was a duplicate of BUG #1</div><div class="">and amend the triage of BUG #1.</div><div class=""><br class=""></div><div class="">There is a proposed solution to BUG #1 and BUG #2 at "<a href="https://dapperdrake.neocities.org/faster-loops-javascript#h2-revision-history" class="">https://dapperdrake.neocities.org/faster-loops-javascript#h2-revision-history</a>" .</div><div class=""><br class=""></div><div class="">The code now comes as a .tar.gz and as a .zip suitable for unpacking and placing in #p”~/quicklisp/local-projects/“.</div><div class="">This makes (ql:quickload :parenscript-tagbody-go) work as expected and also pulls parenscript in as a dependency.</div><div class="">Keyword :parenscript-tagbody-go is pushed to *features*.</div><div class="">A defpsmacro for cl:tagbody is established by parenscript-tagbody-go.</div><div class="">This means, that (ps* ‘(tagbody (go x) (alert “hi”) x)) should now work as expected.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Andrew</div><div class=""><br class=""></div><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 28, 2023, at 06:19, Andrew Easton <<a href="mailto:Andrew@easton24.com" class="">Andrew@easton24.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><span style="caret-color: rgb(0, 0, 0);" class="">Hi Jason,</span><br style="caret-color: rgb(0, 0, 0);" class=""><br style="caret-color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0);" class="">Thank you very much for raising the preamble issue.</span><br style="caret-color: rgb(0, 0, 0);" class=""><font class="">It seems like it is fixable, see below. The idea of a “preamble” will probably be removed.</font></div><div class="">Fix still needs to be implemented by me.<br style="caret-color: rgb(0, 0, 0);" class=""><br style="caret-color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0);" class="">The blog post has been amended to document this bug. Search for “TODO BUG #2”.</span><br style="caret-color: rgb(0, 0, 0);" class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">;; TODO BUG #2 2023-02-28</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">(parenscript:ps*</div><div class=""> '(defun bar () (tagbody (go x) (alert "hi") x)))</div><div class=""><br class=""></div><div class="">#|</div><div class="">returns</div><div class=""><br class=""></div><div class="">"defun(bar, null, (function () {</div><div class=""> go(x);</div><div class=""> alert('hi');</div><div class=""> var switchVar295 = 1;</div><div class=""> while (true) {</div><div class=""> switch (switchVar295) {</div><div class=""> case 1:</div><div class=""> 'tagbody-go-tag: X';</div><div class=""> };</div><div class=""> __PS_MV_REG = [];</div><div class=""> return;</div><div class=""> };</div><div class="">})());”</div><div class="">|#</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">This output is incorrect.</div><div class="">There should be no "go(x);" under any relevant circumstances</div><div class="">as by the CLHS definition of (tagbody ...) and (go ...) .</div><div class=""><br class=""></div><div class="">The problem seems to be that the search for the</div><div class="">"preamble" only checks for go-tags and not for</div><div class="">(go ...) forms. This seems to be easily fixable</div><div class="">by amending the preamble search to terminate upon</div><div class="">encountering a top-level (go ...) form.</div><div class="">Problem: (tagbody (funcall (lambda () (go x))) (alert "hi") x)</div><div class="">still has the same behaviour, *without* involving</div><div class="">a (go ...) form at the top level of the (tagbody ...).</div><div class=""><br class=""></div><div class="">Alternative proposal:</div><div class="">Do away with the preamble and instead add a</div><div class="">dummy gensymmed jump tag at the beginning</div><div class="">of the (tagbody ...). That jump-tag should,</div><div class="">conceptually, be unreachable. All (go ...)</div><div class="">forms are then affected by the (macrolet ((go ...)) ...)</div><div class="">wrappers being placed already.</div><div class="">Then the preamble analysis becomes dead code and can</div><div class="">be removed.</div><div class=""><br class=""></div><div class="">See Jason Miller's first bug reported on 2023-01-27</div><div class="">for current problems with wrapping (go ...) forms</div><div class="">inside of (lambda ...) forms.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Andrew</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jan 27, 2023, at 15:16, Jason Miller <<a href="mailto:jason@milr.com" class="">jason@milr.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">(parenscript:ps (defun bar () (tagbody (go x) (alert "hi") x)))</span></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>