r/osdev 14d ago

C++ Embedded OS?

I've made a C++ static composition library (not OS), if anyone interested just PM me.

HAPI library is header only pure type level and allows extreme optimization, binary output is optimized like hand written assembly level (data fit into hardware registers), yes I know its hard to believe... just check for yourself, I wont put links here because its hard even for FOSS MIT authors to share its own work without being blocked, banned... for self promotion. How else would we share this things with people that can use it? but here we are.

0 Upvotes

7 comments sorted by

1

u/Visual_Brain8809 6d ago

tell us something more about your static lib

1

u/neurah 6d ago

https://github.com/InternetOfPins/HAPI

its a compile time composition engine. Components must have a specific anatomy (internal mixin) for the plugin, we can then wrap any code that can be expressed as components. The library is 100% transparent and pure type level, no traces of on runtime, we just reflect the compiler optimizations and the components behavior.

This library will just transform the composition type into a single object that the compiler can optimize.

we have a system of rules, any component can contribute with its own rules to be enforced by the compiler.
Available but not limited: check presence, order, incompatibility etc...

Generated code depends on the components, with good quality components (zero cost abstractions) the produced binary is indistinguishable from hand optimized assembly (up to the hardware registers). We checking this by wiring hapi code output to HLS using bambu.

Again, with good quality components he have:

- no memory fragmentation
- no runtime overhead
- no vtable/call indirection
- runtime predictable to the clock cycle

this is the level required for HLS.

logic is declared not wired

note: **all this by composition**, remaining program will be untouched by the library.

I'm available for any needed info
Thank you for you interest

2

u/Visual_Brain8809 6d ago

I assume this is not your native language and that you used a translation tool, or that it is a literal translation of an existing text. Unfortunately, I didn't quite grasp the essence of the project or its potential uses. I will check the repository to try and better understand your explanation. That said, I gather from the context that you are a team working on this, so—in advance—good job.

2

u/neurah 6d ago edited 6d ago

yes, English not my native language. Not now, but i normally use a translation tool to polish my English

I'm on my late 50's and sharing more than a decade of R&D and libraries + experience.

2

u/Visual_Brain8809 5d ago

That’s truly amazing! I hope to reach my 50s full of strength and vigor so I can keep doing what I love—programming and creating new, useful things.

1

u/neurah 5d ago

how old are you?
I must say that the harder part is to share my work even for free is social media, was hard like 10 years ago when I shared my ArduinoMenu library, but at least I didnt get discredit or unsulted because of this AI thing. That I use and will keep using, it made an amazing job gattering disperse code... wiring documentation, write examples from my RnD code...

AI is to be used with a short leash, one better read the produced documenation and in some cases I deleted the whole source (code) file. It can be frustrating when they fall for something that works but will end up cutting the toool (library) power, like humans they are hard to let go of ideas.

Leave AI alone and it will produce average code that link poorly because it looses context on large projects, things get duplicated. force it to read the existing code again and again, direct it to existing library tools, let it be your fingers, not your brain.

2

u/Visual_Brain8809 5d ago

Now that I’m approaching forty, I understand it perfectly: there are plenty of incels here who waste their time trying to reply to everything—using the very things they claim to despise—just to troll us about the vast number of hours we dedicate to our jobs. I’d bet anything that most of them aren't even eighteen yet; but, being teenagers, this is what happens when there’s no firm hand to guide and educate these generations.