-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C API #53
Comments
That is an interesting question. Best, |
As of now, I have a data structures library (with dynamic arrays, dynamic buffers, linked lists, and binary search trees) and I'm using it in the test program to build my DataFrame emulator. First I did a working program where I hard-coded many things, and now I'm transforming the program into a library by generalizing it. The API I envisioned is this one:
The dataframe would consist of a linked list of rows, and a linked list with column configurations and descriptions. The rows are also linked lists of cells, which in the end contain the data in dynamic buffers. A simple program using it would be the following (Its a prototype; it may have errors; also, I didn't care about error handling):
|
The problem with what I have now, as I see it, is that i have zillions of mallocs, and I'm concerned about performance. Maybe your library could be faster. Nevertheless, as it's relatively easy and simple, I'll first finish my library just to measure its performance. It'll take me some time, though. If yours relies on arrays, it will probably be much faster. That's why I thought of porting or wrapping it to C. |
So, I followed a few principals in this library
|
Regarding 2 & 3: I first tried to do that, but I don't know how to do it, and I don't know if it is possible in C. How do you store all data from a column contiguously, if every field can have a different type? Do you use templates for that in C++? Would you know how to do a C interface for your library similar to what I wrote? I don't know much about the internals of your library (I don't know much C++). I could help in the C code. |
Yes, this library relies very heavily on templates. I am not sure how/if that is possible in C. I suggest you look at my documentation and code to get some ideas. You could just use it as is in your apps |
Hi,
Recently I wanted to write something similar to pandas in C. I was starting (I have been working on that for a few weeks), when I thought someone would have done something similar already, and then I found this.
Do you think it can be ported to C, or at least write an interface between this and C code that would link to the C++ code? If so, maybe I could help you.
Kind regards,
Alex.
The text was updated successfully, but these errors were encountered: