I'm trying to make an interface to the Proj library for handling geographic coordinates, but I am having trouble with "const" parameters ... usually things like constant character strings, but sometimes more exotic. Is there a "const" indicator I can use when defining C types?
I plan on a netCDF interface too, but proj seemed easier to start with ;-)
Marc Feeley
@feeley
@snarkypenguin unfortunately const is not supported by the C interface... it has been on my todo for a while. most C compilers have a switch to not treat the absence of const as an error, so this might be a workable temporary measure
Marc Feeley
@feeley
@amirouche yes I'll reboot the server later today (actually turned it off yesterday due to overheating and forgot to turn it back on)
Randall Gray
@snarkypenguin
Thankyou, I didn't even think of that (randall smack his forehead foolishly). When it is working and tested, I'd like to contribute it to the dumping ground.
Marc Feeley
@feeley
@snarkypenguin I'm sure a better place than the dumping ground can be found for your module. more on this later...
Marc-André Bélanger
@belmarca
@feeley Are you going to release a package manager?
That one mentions the missing syntax-rules, however I wouldn't necessarily go looking for that information inside the r7rs issue
there is one project but it is dated 2017
amirouche
@amirouche
well that is true
maybe we should go through the whole R7RS and create table and flag features that are done and those that are missing
Marc-André Bélanger
@belmarca
from what I understand there should be discussion about this in october
amirouche
@amirouche
FWIW, I am willing to move to use gambit both in the frontend and backend...
even if the backend requires multi threads and gambit smp support is new
what I holding me back, was mostly the lack of R7RS library system
Marc-André Bélanger
@belmarca
why do you absolutely need smp?
amirouche
@amirouche
I build a database on top of wiredtiger which is embedded key-value store library, so I need queries not to block other queries.
Bradley Lucier
@gambiteer
@amirouche I did something like this using threads, but no smp.
Does using wiredtiger mean you need smp?
amirouche
@amirouche
@gambiteer what is the difference between smp and threads? I was under the impression that thread in gambit were different from POSIX threads.
I need that one "thread" doesn't block other threads, as concurrency issues are dealt with by wiredtiger.
Marc Feeley
@feeley
@amirouche where is the blocking happening? if it is on a file descriptor then Gambit's green threads will be sufficient because the thread scheduler multiplexes the CPU so that Scheme threads waiting on a fd are put to sleep without blocking other threads. Scheme-level mutexes and condition variables also don't block other threads than the one blocking.
amirouche
@amirouche
the blocking call happen on ffi call
the main resource used is cpu
Marc Feeley
@feeley
I'm not sure what you mean with that. I'm asking to know what the OS thread is blocking on (reading a fd, locking a mutex, etc). I don't know how wiredtiger is implemented.
amirouche
@amirouche
wiredtiger is implemented in C, the scheme code is blocking on C calls
Marc Feeley
@feeley
in that case, a possible approach is to allocate an OS thread with each Scheme thread, and have the OS thread do the calls to wiredtiger, and to communicate with the OS thread through a pipe... it is not as complex as it sounds