[julia-users] Reading one field from a file
I have a text file of the following format: --- snip --- Nx Ny dx dy v(x1,y1) v(x2,y2) ... v(xNx,y1) v(x1,y2) ... v(xNx,yNy) --- snip --- In C, I would normally use fscanf to read in the four fields at the top first, then loop through and read in the rest. What is the idiomatic way of achieving the same thing in Julia? I would like the list of numbers to end up in a matrix of the proper size. As far as I can tell, there's no simple way of reading only one textual field from a file at a time.
[julia-users] Creating a package with bundled C++ code
I am trying to create a Julia package that bundles with it some C++ code (in this case, just a single file). I would like, when installing the package, to have the C++ code compiled as a shared library which then a Julia module in the package can ccall into. What is the best way to do this? I am looking into the BinDeps package, but that seems to pull in dependencies from web sources rather than compile local files. Furthermore, the C++ code needs to link against Julia's Lapack library, which I also am unsure how to do.