Sujet : Re: xxd -i vs DIY Was: C23 thoughts and opinions
De : malcolm.arthur.mclean (at) *nospam* gmail.com (Malcolm McLean)
Groupes : comp.lang.cDate : 30. May 2024, 16:41:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v3a6n5$1oh1h$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
User-Agent : Mozilla Thunderbird
On 30/05/2024 12:23, bart wrote:
On 30/05/2024 02:31, Malcolm McLean wrote:
On 30/05/2024 01:18, bart wrote:
On 29/05/2024 22:46, Malcolm McLean wrote:
Baby X can't compete.
>
Huh? I didn't know Baby X was an OS!
>
>
Its an API. You call the Baby X API to get buttons and menus and other graphical elements, instead of Windows APIs. And it has just got its own file system.
Hardly anybody uses the WinAPI directly.
Everyone uses wrapper libraries, usually cross-platform. Ones like GTK, SDL, Raylib, maybe even OpenGL.
Those are your competitors, although I'm not sure which one corresponds more closely with what BBX does (which I thought was also cross-platform?)
I'm not sure what you mean by having its own file system. But I don't use the file system calls of WinAPI either; I use the C standard library.
It's just being implemented.
I'm rather proud of the idea, and it seems to work well. You convert a directory to a XML file using directorytoxml, which recursively crawls it. Then you convert the XML to a C string with the Baby X resource compiler. Then you load it with the XML parser, and then you query for files using a little function I wrote to take a path and return a FILE *.
So you've a mounted embedded file system. It's rather an extravagant solution because you are duplicating the entire string by loading the DOM into RAM. A better approach would use a different parser which kept references to ther source strings in the node and gave data on demand, rather then duplicating it for every node - that would be quite a bit of work.
But for a small files system or a modern hosted platform with many gigabytes installed, it should be fine. I just want someone to use it for real.
-- Check out Basic Algorithms and my other books:https://www.lulu.com/spotlight/bgy1mm