I'm still trying to come up with a way to read a feather (
https://github.com/wesm/feather) file in Julia. The available library that essentially defines the format is written in C++ and, while I can imitate existing code, I quickly tie myself in knots trying to access the heavily templated C++ code in a C function that can be called through ccall.
The file contains the binary representations of a number of columns, all the same length but not necessarily the same type. We want to return copies of the contents of the columns and their names and possibly other metadata. Before I open the file I don't know the number of rows, number of columns or types of columns. This information is all embedded in the binary file, the format of which is really only accessible through the C++ functions and methods.
I want to somehow create a C function that will take the path name, and possibly a pointer to a struct, open the file, determine the number of rows and the number and types of the columns, allocate storage that belongs to Julia and populate it. If I have a pointer to an array of n Float64 values, say, how would I create a Julia Vector{Float64} of length n so that I can copy the contents into it? And once I have created and populated the vector, how to I return it? I'm sort-of thinking of passing a Ref{<immutable type>} and assigning a field in there but that is just a guess.