News for hackers. Stuff that matters.
Re:Vstr: C string library designed to work optimally with ve... by tyingq on Tuesday March 10, 2020 @06:39AM (#22534322)
Sds from Antirez has a lot of the same features (not all), and is kept updated since it's used by redis and other projects. https://github.com/antirez/sds/blob/master/README.md

Vstr appears to have last been updated in 2006. It does have a comparison of different string libraries, though that's also dated: http://www.and.org/vstr/comparison

Re:Vstr: C string library designed to work optimally with ve... by endorphone on Tuesday March 10, 2020 @08:44AM (#22534914)
"Vstr" seems to target zero-copy by storing a string as a collection of blocks of data. Sds, from my reading, is essentially Pascal strings for C.

They don't seem to be comparable.

Re:Vstr: C string library designed to work optimally with ve... by tyingq on Tuesday March 10, 2020 @09:09AM (#22535090)
It also targets "string like buffers" with arbitrary nulls, appends, splitting on a delimiter, and tokenizing. Yes, it works differently, and isn't readv/writev centric.
Re:Vstr: C string library designed to work optimally with ve... by bvrmn on Tuesday March 10, 2020 @10:52AM (#22535925)
SDS has no special primitives to support scatter/gather io. In this regard sds-strings are the same as plain c-strings.
Re:Vstr: C string library designed to work optimally with ve... by tyingq on Tuesday March 10, 2020 @10:55AM (#22535948)
I mentioned that.
Re:Vstr: C string library designed to work optimally with ve... by cowsandmilk on Tuesday March 10, 2020 @08:09AM (#22534711)
SDS and this library are implemented completely differently...
Re:Vstr: C string library designed to work optimally with ve... by optimuspaul on Tuesday March 10, 2020 @10:25AM (#22535693)
2006 being the last update makes me not want to use it. But I suspect it is a stable library that doesn't need much update. I'm just getting back into c/c++ development and I'm very interested in libraries like these.
Re:Vstr: C string library designed to work optimally with ve... by coliveira on Tuesday March 10, 2020 @12:33PM (#22536925)
C is an old language, some of the best libraries are stable for 20 years now.
Re:Vstr: C string library designed to work optimally with ve... by robobro on Tuesday March 10, 2020 @11:45AM (#22536420)
> 2006 being the last update makes me not want to use it. Why
Re:Vstr: C string library designed to work optimally with ve... by optimuspaul on Thursday March 12, 2020 @12:45PM (#22558732)
security concerns, might be unfounded, but something to consider