<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">The popular Raspberry Pi Pico chip (RP2040) is a remarkable microprocessor with <i>memory resources</i> not dissimilar from the Mac 512k, CCL’s debut target. Here are some quick facts. <div dir="ltr"><div><ul style="-webkit-text-size-adjust: auto; box-sizing: border-box; font-family: Roboto, sans-serif;"><li style="box-sizing: border-box;"><p style="box-sizing: border-box; margin: 0px 0px 15px; padding: 0px; font-size: 0.95em; line-height: 1.5em;">Dual ARM Cortex-M0+ @ 133MHz</p></li><li style="box-sizing: border-box;"><p style="box-sizing: border-box; margin: 0px 0px 15px; padding: 0px; font-size: 0.95em; line-height: 1.5em;">264kB on-chip SRAM in six independent banks</p></li><li style="box-sizing: border-box;"><p style="box-sizing: border-box; margin: 0px 0px 15px; padding: 0px; font-size: 0.95em; line-height: 1.5em;">Support for up to 16MB of off-chip Flash memory via dedicated QSPI bus</p></li></ul><div>Some might argue it’s not comparable to a Mac 512. I claim it is: consider that the RAM would <i>only</i> used for the heap, stack(s), and housekeeping? It is the off-chip flash support that makes all the difference. That’s where you can store static code and data segments that make up the bulk of a CCL image. </div><div><br></div><div>My big questions:</div><div><br></div><div>1) Could this chip run CCL?</div><div><br></div><div>2) Would it be worth the effort?</div><div><br></div><div>I think <b>yes</b> on both fronts. A lot of embedded code is truly modest, so a small heap is useful enough. This is the arena where microPython shines—itself sporting a garbage collector. </div><div><br></div><div>3) Does anyone want to try?</div><div><br></div><div>CCL already has 32-bit ARM support. There is no OS interfacing work to do here (only work to make up for the <i>lack</i> of OS). </div><div><br></div><div>This could be a fun little project that would a great way to become familiar with CCL internals without a lot of distractions from OS and GUI issues. First get it working from a serial port console (over Bluetooth maybe?) and focus on embedded applications. Slash and burn the rest, at least for starters. </div><div><br id="lineBreakAtBeginningOfSignature"><div dir="ltr">--Tim</div><div dir="ltr"><br><blockquote type="cite">On Jul 28, 2024, at 01:32, R. Matthew Emerson <rme@clozure.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span></span><br><span></span><br><blockquote type="cite"><span>On Jul 27, 2024, at 8:23 PM, Grégory Vanuxem <g.vanuxem@gmail.com> wrote:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>In FriCAS  built on top of Clozure CL I obtain this output in a terminal (WSL2)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>(gamma(x) Ã¢ÃÂàreals && Re(x) > 0) || (x Ã¢ÃÂàintegers &&</span><br></blockquote><blockquote type="cite"><span>gamma(x) Ã¢ÃÂàreals)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>instead of (SBCL)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>(gamma(x) ∈ reals && Re(x) > 0) || (x ∉ integers && gamma(x) ∈ reals)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>if I (print ...) a string with, for example, ∈, in a pure Clozure CL</span><br></blockquote><blockquote type="cite"><span>(recently git cloned) this is correctly printed, no problem.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>So I wonder if I have to modify the output stream character encoding</span><br></blockquote><blockquote type="cite"><span>or the output routine.</span><br></blockquote><span></span><br><span>Check that the external format of the FriCAS output stream is what you expect. In other words, if you pass an explicit :external-format argument to cl:open, make sure it matches what your terminal requires.</span><br><span></span><br><span>Doing (describe *terminal-io*) might show something interesting. Here’s what it shows for me:</span><br><span></span><br><span>? (describe *terminal-io*)      </span><br><span>#<ECHOING-TWO-WAY-STREAM input #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (TTY/0) #x1824C7D6>, output #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (TTY/1) #x1824C2A6> #x1825FBE6></span><br><span>Class: #<STANDARD-CLASS ECHOING-TWO-WAY-STREAM></span><br><span>Wrapper: #<CLASS-WRAPPER ECHOING-TWO-WAY-STREAM #x18039A16></span><br><span>Instance slots</span><br><span>SHARED-RESOURCE: NIL</span><br><span>OPEN-P: T</span><br><span>INPUT-STREAM: #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (TTY/0) #x1824C7D6></span><br><span>OUTPUT-STREAM: #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (TTY/1) #x1824C2A6></span><br><span></span><br><span>The default external format has been #<EXTERNAL-FORMAT :UTF-8/:UNIX #x18249C6E> for quite a long time now. </span><br><span></span><br><span>https://ccl.clozure.com/docs/ccl.html#characters-and-external-formats</span><br><span></span><br><span></span><br><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>And more importantly, how can I achieve that?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>- Greg</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>PS:</span><br></blockquote><blockquote type="cite"><span>(1) -> )lisp CCL:*DEFAULT-EXTERNAL-FORMAT*</span><br></blockquote><blockquote type="cite"><span>Value = :UNIX</span><br></blockquote><span></span><br><span></span><br></div></blockquote></div></div></div></div></body></html>