In Ring 1.25 (GitHub) - Better Ring Object File (*.ringo) format

20 views
Skip to first unread message

Mahmoud Fayed

unread,
Dec 19, 2025, 2:54:52 AM (3 days ago) Dec 19
to The Ring Programming Language
Hello

This is one of the new features provided by Ring 1.25 (under development)

The Ring Object File (*.ringo) format is revised to Reduce storage and Increase performance by over 40%

For example, For PWCT2 project

(1) pwct.ringo size is reduced from 21MB to 12MB 
Note: You can compress this file to around 2MB file as zip file 

(2) loading time  
At first prepare the object file using specific Ring version
ring pwct.ring -go -norun

Then test the loading performance
Test: (ring pwct.ringo -norun -clock)

Using Ring 1.24: 565 ms
Using Ring 1.25: 315 ms

Things to remember about the Ring Object File (*.ringo)

(1) It's portable, the same ringo file could be loaded using Ring for Windows/Linux/macOS/etc.
i.e. compile once, run everywhere

(2) Using Ring State (Embedded Ring in Ring) you can load a Ringo file during runtime, for example (a Ringo file for Softanza Library) then execute some code. This is faster than compiling stzlib, also, using such a way it will be more easier to distribute StzLib updates (just distribute one file)

Example: 

pState = ring_state_new()
ring_state_mainfile(pstate,"stzlib.ringo")
ring_state_runcode(pstate,"? 'We can call functions from Ring Object File!' ")

ring_state_runcode(pState,`

oOrg = new stzOrgChart("Basic_Hierarchy")
oOrg {
    SetLayout("TD")
   
    # Add executive position
    AddExecutivePositionXT(:ceo, "CEO") # ceo is the ID of the node and CEO it's label
   
    # Add management positions
    AddManagementPositionXT(:vp_sales, "VP Sales")
    AddManagementPositionXT(:vp_eng, "VP Engineering")
   
    # Set reporting lines
    ReportsTo(:vp_sales, :ceo)
    ReportsTo(:vp_eng, :ceo)
   
    # Add staff positions with attributes
    AddStaffPositionXTT(:sales_rep1, "Sales Rep 1", [:region = "North"])
    AddStaffPositionXTT(:dev1, "Developer 1", [:skill = "Backend"])
   
    ReportsTo(:sales_rep1, :vp_sales)
    ReportsTo(:dev1, :vp_eng)
   
    View()
}

`)

ring_state_delete(pState)

? :done

Such a code could we wrapped in one class or function that call StzLib 
This requires stzlib.ringo file to be in the app folder 

Think of *.ringo files as DLL/So/Dylib files but contains Ring byte code 

Such a way to test StzLib samples is at least 2x faster (loading time) than using (load "stzlib.ring")

Greetings,
Mahmoud

Mansour Ayouni

unread,
Dec 19, 2025, 5:48:30 AM (2 days ago) Dec 19
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

This is magical and fantastic !
I'm so happy you made such a feature possible for us.
THANK YOU!
image.png

All the best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ring-lang/a0273f37-5e18-4e02-bc44-dcca64468800n%40googlegroups.com.

Mahmoud Fayed

unread,
Dec 19, 2025, 5:53:23 AM (2 days ago) Dec 19
to The Ring Programming Language
Hello Mansour

You are welcome :D

Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages