LambLisp 01 Red Fox Alpha
From AI to Actuator
Loading...
Searching...
No Matches
LLArduinoBufPrint Class Reference
Inheritance diagram for LLArduinoBufPrint:

Public Member Functions

size_t write (uint8_t c) override
const char * str () const
virtual size_t write (const uint8_t *buf, size_t n)
size_t write (const char *s)
Public Member Functions inherited from Print
size_t write (const char *s)
size_t print (char c)
size_t print (const char *s)
size_t print (const String &s)
size_t print (int n, int base=10)
size_t print (long n, int base=10)
size_t print (unsigned long n, int base=10)
size_t print (double v, int digits=2)
size_t println ()
size_t println (char c)
size_t println (const char *s)
size_t println (const String &s)
size_t println (int n, int base=10)
size_t println (long n, int base=10)
size_t println (unsigned long n, int base=10)
size_t println (double v, int digits=2)
size_t printf (const char *fmt,...) CHECKPRINTF_pos2

Detailed Description

Criterion 3 is "the same suite passes against the vendor core AND against LLArduino". These render through whichever Print is compiled in, which is what makes that comparison possible – Arduino's Print and LLArduino's both declare virtual size_t write(uint8_t) and the same print(long,base) / print(double,digits) overloads, so ONE implementation serves both.

THEY WERE LL_ARDUINO-ONLY AND THAT WAS THE BUG. Built that way, the ESP32 run returned #f from every accessor and the suite reported 10 FAILURES that were purely my own stub – on the ONE backend where comparing against Arduino is the entire point. A measuring instrument that cannot be pointed at the reference measures nothing.

Print's Arduino-specific behaviours – CRLF from println, no 0x prefix from print(n, HEX), two decimal places from print(double) – were documented in the header and then not exercised by anything, because Print is a C++ class with no Scheme binding. A documented guarantee that nothing checks is just a comment; this file has already watched that pattern cost days elsewhere in the tree. These three accessors render THROUGH Print into a buffer, so a Scheme test asserts what a device would actually emit rather than what the comment says.

Member Function Documentation

◆ write() [1/2]

size_t LLArduinoBufPrint::write ( uint8_t c)
inlineoverridevirtual

< truncate, never overrun

Implements Print.

◆ write() [2/2]

size_t Print::write ( const uint8_t * buf,
size_t n )
virtual

Reimplemented from Print.