-- Leo's gemini proxy

-- Connecting to republic.circumlunar.space:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

CII Revisited


I integrated CII into Easy-ISLisp without much hassle. Looking back I think it was worthwhile. My main motivation was to regain the more readable & safer string processing that C++ provided, without all the accompanying complexity. However, I found other features useful too.


CII


First, I did the same refactoring as for OpenCOMAL:


Use the tracking memory allocator. This is fully enabled with the 'DEBUG=1' make option.

Replace printf, etc. with the Fmt_xxx functions (although I had to back this out again for printing floating-point numbers)


then I went a bit further:


Replace setjmp/longjmp with TRY/EXCEPT/END_TRY

Use the Str_xxx functions where it seemed to make things simpler

Use the Text_xxx functions, again where it seemed to make things simpler


There are more parts of CII that are potentially useful, but I think this is good to start with. In particular, this refactoring paid for itself when with the simpler string processing code I was able to figure out how to reduce RAM usage (although more could be done here).


To conclude, I'd recommend using CII (with plain C) for future *low-level* projects. Obviously I'd prefer ISLisp for the majority of projects that don't require low-level coding.


Back to my gemlog

-- Response ended

-- Page fetched on Sun Nov 10 19:40:59 2024