5 ms·
I found this a while ago but the compatability matrix turned me away very quickly. This is one of the least portable C libraries for data structures I've ever s
by Sir_Cmpwn 10y ago
I found this a while ago but the compatability matrix turned me away very quickly. This is one of the least portable C libraries for data structures I've ever seen.
- ape4 10y agoI guess they are using very specific machine instructions to achieve their ends.
- liblfds 10y agoYes and no. On Linux, the library uses the GCC atomic intrinsics. As such, the library funamentally supports any platform GCC supports with its atomic intrinsics. So the instructions are indeed machine specific, but they're provided by the compiler through a standard API. Of course, actually getting something to work means actually compiling in on a given platform and seeing the test programme pass.
- ape4 10y agoThanks for the info. This is the first time a library has replied to me ;)
- liblfds 10y agoGoogle's huge investment in AI. You'll be hearing a lot more of it in the future :-) ("Do you REALLY want to use that API? I think you should space your comments out a bit more. Hey, your battery is getting low! BTW, I've just emailed your entire source base to Google for assimilation.")
- benbenolson 10y agoYeah, they refer to it as "portable", but then go on to show that they haven't tested it on anything except x64 and ARM32; not only that, but it also depends on what you use to compile it (kbuild, GNU make, etc.).
- liblfds 10y agoThat's not the case. What you get depends only on the processor type. What does vary is whether or not any given platform has actually been tested - i.e. the code compiled on that platform, and the test programme run. Currently, only ARM32, MIPS32 and x64 platforms are available, and so the test programme has only been run on those platforms. Finally, I think you may have been misled in the same way another reader further down was; note that the matrix is the matrix of toolchains which are supported out-of-the-box, i.e. where the library ships with build files for those platforms. It is NOT the matrix of the ONLY tooclhains which can be used.
- liblfds 10y agoInteresting. Why did it turn you away? do you run code on many of the given platforms?
- Sir_Cmpwn 10y agox86, yes, and the limitations on the toolchains you can use is weird and bad.
- liblfds 10y agoWhen you say "limitations", I'm not sure what you mean. I wonder if there's a misunderstanding here - the matrix describes the toolchains which are supported out-of-the-box, i.e. build files for them are provided, and they have all been tested and should work. It's not a matrix of the ONLY platforms which CAN work. Is that what you're thinking? Other platforms might well need the porting abstraction layer to be implemented (the Intel compiler might offer a different set of atomic intrinsics, for example), but that's what it's there for.
- Sir_Cmpwn 10y agoIt's not very clear, then. Reading the page leads me to believe that if x is my toolchain then y won't work, and the idea that such a thing could even be possible for your library speaks very poorly for it. I suggest tweaking it if this is not the case. In any case, I did re-review the library today and I'll still pass on it because I'm very opinionated about C and this library doesn't match my opinions. And I would like to see ARM64 support before I depend on this sort of thing, too, for what it's worth.
- liblfds 10y agoWell, to be fair! the page does say this immediately above the matrix - "The following toolchains and processors are supported out-of-the-box" However, this is certainly not fully explanitative, and of course is just one line immediately above a large and eye-catching matrix. I will change it, to make it more clear, and more eye-catching. Regarding ARM64, it's something I want very much. I will finally have time for it now 7.1.0 is out. I Googled a bit just the other day and there are Pi-like ARM64 dev boards out there now, so I'm going to get one. Which leaves me needing a SPARC dev board, and a POWERPC dev board, and an x86 dev board, and a MIPS64 dev board, and a... :-)