libds

A collection of data structures for C (by lelanthran)

Libds Alternatives

Similar projects and alternatives to libds

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better libds alternative or higher similarity.

libds reviews and mentions

Posts with mentions or reviews of libds. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-05-16.
  • Common libraries and data structures for C
    15 projects | news.ycombinator.com | 16 May 2022
    I may as well throw my hat into the ring: https://github.com/lelanthran/libds

    I decided that I wanted to be able to simply drop a single .h file and a single .c file into any project without have to build a `libBlah.so` and link it to every project that needed (for example) a hashmap.

    The practical result is that using the hashmap only requires me to copy the header and source files into the calling project.

    It does build as a standalone library too, so you can link it if you want.

    My primary reason for starting this is that I was pretty unsatisfied with all of the string libraries for C. When all I want to do is concatenate multiple strings together, I don't want to have to convert between `char ` and `struct stringtype ` everywhere.

    The string functions are very useful as they all operate on the standard `char *` (nul-terminated) type.

  • Buffet
    11 projects | news.ycombinator.com | 7 Mar 2022
    That would be nice, then I wouldn't have to use non-standard stuff.

    I made my own easy-to-incorporate-into-any-project library - https://github.com/lelanthran/libds - just copy the ds_*.h and ds_*.c into a project and you're good to go.

    I'm not saying it will work for you, but it works for me.

  • BCHS: OpenBSD, C, httpd and SQLite web stack
    6 projects | news.ycombinator.com | 18 Jan 2022
    > Is there a good string-manipulation C library?

    You will have to define "good". My string library[1][2] is "good" for me because:

    1. It's compatible with all the usual string functions (doesn't define a new type `string_t` or similar, uses existing `char `).

    2. It does what I want: a) Works on multiple strings so repeated operations are easy, and b) Allocates as necessary so that the caller only has to free, and not calculate how much memory is needed beforehand.

    The combination of the above means that many common* string operations that I want to do in my programs are both easy to do and easy to visually inspect for correctness in the caller.

    Others will say that this is not good, because it still uses and exposes `char *`.

    [1] https://github.com/lelanthran/libds/blob/master/src/ds_str.h

    [2] Currently the only bug I know of is the quadratic runtime in many of the functions. I intend to fix this at some point.

  • Strings in C... tiring and unsafe. So I just made this lib. Am I doing it right, Reddit ?
    9 projects | /r/programming | 2 Feb 2021
    As an example of an opaque pointer library, see https://github.com/lelanthran/libds/blob/v1.0.5/src/ds_ll.h - See line 7 for the typedef. - Lines 9, 10, 11 and 67, 68 and 69 for making it callable from C++.
  • A note from our sponsor - WorkOS
    workos.com | 26 Apr 2024
    The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →

Stats

Basic libds repo stats
6
16
0.0
9 days ago

lelanthran/libds is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of libds is C.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com