Live data from Hacker News

Tbox: A GLib-like cross-platform C library

github.com

11–20 of 71 posts

Re: Tbox: A GLib-like cross-platform C library

#13
post #9

how does it handle u_128 (IPv6 comparison/sorting/hashing) two u_64 is .. sad (sometimes unavoidable) no bzip2 but other good modern compressors which I guess is about what you need for jar and zip files. openssl compatible crypto .. oy vey the chain of "who audits the code is now a mile long at the microphone"

There is no support for u_128 yet, but I can consider it.

Re: Tbox: A GLib-like cross-platform C library

#14
post #13
post #9

how does it handle u_128 (IPv6 comparison/sorting/hashing) two u_64 is .. sad (sometimes unavoidable) no bzip2 but other good modern compressors which I guess is about what you need for jar and zip files. openssl compatible crypto .. oy vey the chain of "who audits the code is now a mile long at the microphone"

There is no support for u_128 yet, but I can consider it.

If you think about radix tries and other data structures (AVL) it would be useful to be able to code good x>y tests against the binary state of IPv6. If you have to segment into two u_64 then shift-and-mask stuff becomes harder. So, purely for IPv6 (and I work with internet addresses a lot so my bias is showing) I think this makes sense.

But I totally get it may not be in your use case or first pass. Tiny home router builds? they'd want this. Anything doing IPv6 packet work testing or finding IPs in a structure will want this unless people code to the /64 model.

Re: Tbox: A GLib-like cross-platform C library

#15

I’m working on a compiler right now that generates C. Should I use this for the generated code? (Or should I use glib, musl, or uclib?) A comparison chart would be helpful! Similar to: http://www.etalabs.net/compare_libcs.html

> Should I use this? (Or should I use glib, musl, or uclib?)

I agree that a comparison would be good, but musl and glibc are low level fundamental API's for things like printf and opening files.

Glib and this are higher level libraries to build applications with. If you're building a compiler you probably want one of these, for the generated code it would depend a lot on the specifics.

Edit - I'll also add that a lot of people's experience with C seems to com from college or beginner material where they're learning in a very bare bones environment. Combine C and libraries like this and it's not just good for app development but can be great for scripting where python or bash would typically be used.

Re: Tbox: A GLib-like cross-platform C library

#18
Your source files contain the following in the commented header:

"Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements."

Did you in fact specifically license it to the ASF? Or are you just licensing it under the Apache license?

Re: Tbox: A GLib-like cross-platform C library

#19

Your source files contain the following in the commented header: "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements." Did you in fact specifically license it to the ASF? Or are you just licensing it under the Apache license?

I just used the Apache license.
Post reply on HN