Buffet

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • SaaSHub - Software Alternatives and Reviews
  • buffet

    All-inclusive Buffer for C

    (following a discussion from https://github.com/alcover/buffet/commit/eab9648ff19483f57fd...)

    > if nobody's looking, we are go

    https://github.com/alcover/buffet/blob/dee3eb65f37ca07ea3d27...

    And otherwise, when is it freed?

    The refcount mechanism looks wrong to me: either the ownership of internal data is shared between instances (it seems it is not the case), either the owner is well defined and does not need a refcount.

    It appears that the refcount is used to avoid freeing the owner data if Buffet views are still alive. But using the views after freeing the referenced data is incorrect usage anyway, so it looks like defensive programming, trading a use-after-free for a leak.

  • swift

    The Swift Programming Language

    This is somewhat similar to how Swift represents Strings internally (https://github.com/apple/swift/blob/main/stdlib/public/core/...).

    Swift needs to support a few other options (it tracks UTF-8 vs UTF-16 encodings, and needs to know if a String is bridged from an Objective-C object), and it doesn't cap lengths or offsets at 32b. Those details aside, this is a very familiar approach.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • utf8

    utf8 C library by Jeff Bezanson

    I used https://github.com/kumkee/utf8 (along with a bit of hacking) in my toy scheme interpreter to get Unicode strings.

    Had to adapt some script I found to generate character class lookup functions to make it fully work IIRC and still need to plug-in some sort of copy on write mechanism since the strings managed in a shared buffer but other than that it works pretty well…if you’re into the unicorn strings that is.

  • SDS

    Simple Dynamic Strings library for C

  • julia

    The Julia Programming Language

  • nbdkit

  • stricks

    Managed C strings library

    > I was thinking about Simple Dynamic Strings but I like this better.

    Oh! here's my chance to plug https://github.com/alcover/stricks ! It follows the same principle as SDS (i.e user-facing type is char*) but is much faster (see bench) and frankly nicer to read through.

    Not as feature complete, though.

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.

  • CPython

    The Python programming language

    Python is similar[1]

    >The growth pattern is: 0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ...

    https://github.com/python/cpython/blob/3.7/Objects/listobjec...

  • libds

    A collection of data structures for C

    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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts