Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

libgeneralist

Name: Anonymous 2011-09-12 22:56

So, /prog/, I'm writing a general library in C, with the aim of being somewhat inspired by libraries such as glib, but far lighter and cleaner. So far, I have a linked list implementation and a Unicode string implementation (this is incomplete), totalling 670 SLOC. The build system is cmake, the code is fully documented with doxygen. Of course, the library is in its infancy and far from finished; what other things should I implement? Any data structures? OS abstractions?

Name: Anonymous 2011-09-17 6:46

>>1
C should have all this in stdlib, but it sucks so it doesn't. Let's see...

- I hope the Unicode strings library is not zero-terminated.
- A similar non-zero-terminated strings library for binrary-safe octet streams without any specific character encoding should be useful too, unless your Unicode strings library can handle invalid data and be used for this.
- Cons lists (as in Lisp)
- Variable-length, dynamically allocated vectors (as in Python)
- Dictionaries (as they work Python)
- Utilities to deal with and convert these as necessary
- Optional garbage collector? Don't implement a new one, see if you can include any other project.
- I'd leave OS abstractions last as you can use POSIX functionality, but if you get to it, overflows and shit C is missing, common terminal handling, low-level I/O, common ioctls, files and directories, sockets, threads and common process launching, handling and signaling are my top preferences.

>>5
He'll end making C useful?

>>6
I don't think C is fit for that (or anything lol), but if you think it is, esp. for dealing/iterating through lists and dictionaries, why not?

>>7-34
tl;dr

>>35
Die faggot

>>37
idiot idiot idiot idiot

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List