Three small libraries in pure Ring (QR, barcodes, font metrics)

74 views
Skip to first unread message

Gaiamap

unread,
Sep 4, 2026, 7:27:18 AMSep 4
to The Ring Programming Language
Hello everyone,

I would like to share the first results from a project I'm working on.

Three libraries: ringqr for QR Codes, ringbc for barcodes, and ringfm, which reads the metrics out of a font file and tells you how wide a line of text comes out. Each has its own command line and its own test. There is also a tool that demonstrates all three, putting labels on a page from an ASCII drawing and a CSV.

They behave here, on Windows and on Linux. What I cannot see is how they behave in your hands: whether the tool is comfortable to use, whether a code comes out readable, whether a font is found where the library looks on your platform.

One small thing, if any of you works on a Mac. The name helvetica tries to find /System/Library/Fonts/Helvetica.ttc there, a file that holds several faces, and the library reads the first one. From the render folder,

  ring ringfm.ring "Test" helvetica 20 0

writes fm_stats.txt, and its Path and Family lines are the whole answer.

Everything is in the attached archive: the three libraries are in its render folder, with their tests beside them. As with the report I posted before in this group, the code and its documentation were written with an AI assistant I work with, and I have read them through.

Thank you for your time.

With kind regards,
Cesare G. Fanelli (Gaiamap)
ascii2label.zip

Mahmoud Fayed

unread,
Sep 4, 2026, 4:05:48 PMSep 4
to The Ring Programming Language
Hello Cesare 

>> "Three libraries: ringqr for QR Codes, ringbc for barcodes, and ringfm, which reads the metrics out of a font file and tells you how wide a line of text comes out. Each has its own command line and its own test. There is also a tool that demonstrates all three, putting labels on a page from an ASCII drawing and a CSV."

Thank you very much for sharing the libraries 

I will be very useful if they are shared as RingPM Packages too


>> "the code and its documentation were written with an AI assistant I work with, and I have read them through."

If you don't tell me I think I will not know because the code format, comments and organization look like a human work, So it's very nice that you are using modern technology while keeping the code readable.

Keep up the GREAT WORK :D

Greetings,
Mahmoud

Gaiamap

unread,
Sep 5, 2026, 8:11:10 AMSep 5
to The Ring Programming Language
Hi Mahmoud, Thank you very much for looking so well at the code. When I mentioned readability I was thinking of the bar/qr-codes themselves, whether a reader decodes them. I really appreciated that you noticed the human work in coding instead: the time once spent correcting one's own mistakes is now spent correcting the mistakes of AI assistants, hoping the result is better all the same. Attached, the three RingPM packages: ringqr-1.0.0.zip ringbc-1.0.0.zip ringfm-1.0.0.zip With kind regards, Cesare G. Fanelli (Gaiamap)
ringfm-1.0.0.zip
ringqr-1.0.0.zip
ringbc-1.0.0.zip

Mahmoud Fayed

unread,
Sep 5, 2026, 8:18:38 AMSep 5
to The Ring Programming Language
Hello Cesare

>> "Attached, the three RingPM packages:"

This is beautiful, it will be great if you published them in GitHub so we can add them to RingPM registry
In this way more Ring developers could discover/install the packages using RingPM without the need to revisit this discussion

Keep up the GREAT WORK :D

Greetings,
Mahmoud

Gaiamap

unread,
Sep 5, 2026, 9:30:02 AMSep 5
to The Ring Programming Language
Hi Mahmoud,

I understand you probably have an automated workflow via GitHub.
Since I don't use that platform in my workflow and creating a temporary account goes against best practices, I will find a colleague to follow the right procedure on my behalf. This way, your pipeline will run normally while correctly preserving my authorship in the Git history through the package metadata.

Thanks for your patience,
Cesare

Mahmoud Fayed

unread,
Sep 5, 2026, 9:53:44 AMSep 5
to The Ring Programming Language
Hello Cesare

>> "I will find a colleague to follow the right procedure on my behalf. This way, your pipeline will run normally while correctly preserving my authorship in the Git history through the package metadata."

Nice plan, Thanks for sharing :D

Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages