The existence of two separate implementations of bubblesort (one for char, one for uint16_t), in and of it self, says everything that needs to be said about this. This was written by someone who refuses to use even the meager facilities C offers programmers, and doesn't know enough about them to even NIH things well. Moreover, he seems to like overtly complex, specialized code over simple, generic code.
(if the author of this library is reading this: qsort is a libc function that can sort an array of any type, in any way, and does so much more efficiently than bubblesort could ever dream, while not being very complex.)
Hello pikhq I am the author of the library and you are absolutely right about that. That bubblesort should not even have made it into the code of the library and that will be taken care of immediately. I was testing something in the past and it made it into the repository.
Thanks for the other comments. I will try to improve on it as much as is possible and would like to make it useful for other people other than myself. I am used to coding like this and this is the reason why I posted it in the net so that I can get feedback and start coding in a better way.
Please keep in mind that this is just in its starting point and is still in Beta. I will use your comments well and would welcome more, in order to know what direction all changes should take
It appears to be a subset of libc that depends on libc and is slower than libc in almost all respects. I'm not sure what the author was going for here, but it would be advisable to use libc instead of Refu in all instances where one might think to use Refu
Hello TodPunk. Your statement unfortunately currently stands true. I am going for a monolithic collection of low level to high level C libraries that can be modulary used for different purposes. I hope to achieve it sometime in the future.
It is in its very first stage and I just put it up in the net to get some feedback slowly. I certainly did not want it posted in HN yet but someone caught up with it and did it for me.
As I said to the other commenter any feedback with contstructive criticism is greatly appreciated. It is the first time I show my code to other people.
My only advice would be to ditch libc dependencies and build out things from scratch, and try for simpler approaches. I think you'll find the excercise good for you as a programmer, and good for your project here. Looking at a current libc implementation may help.
I will consider your feedback. I agree that libc dependencies should be minimized or even cut off completely but as I told you before the project just began and as such still has to have some minor dependencies. As with anything else free time is all that's needed for things to get implemented.
(if the author of this library is reading this: qsort is a libc function that can sort an array of any type, in any way, and does so much more efficiently than bubblesort could ever dream, while not being very complex.)