freenode/#clasp - IRC Chatlog
Search
6:42:41
drmeister
Everyone - I pushed to the 'work' branch a version of clasp that I think fixes this very random problem with compile-file-parallel.
16:27:11
catchme
libbsd-dev should be added as a dependency for Debian/Ubuntu. Or at least ubuntu 18.04 which I am using.
17:07:47
drmeister
(:= *smarts-graph* (chem:make-chem-info-graph (chem:compile-smarts "[N:1][C:2]")))
17:08:15
drmeister
It finds two solutions to that smarts search - which is correct and not what we get from my code - it would only find one.
17:08:37
drmeister
Now I just need to figure out how to take control of the callback to record the results.
17:36:55
selwyn
could one define a clbind translator that would convert a common lisp function to and from a function pointer?
17:37:17
selwyn
the motivation would be to pass this pointer to c++ libraries that expect a callback
17:38:58
drmeister
selwyn: I've done that many times - I just create a C++ lambda and invoke the Common Lisp function object within it. Then I pass the lambda to the C++ code.
17:39:51
drmeister
This is not quite the same thing - but it should lead you in the right direction...
17:40:55
drmeister
Be careful not to pass Clasp tagged pointer to C++ code that will hang onto them - that will lead to problems.
17:41:09
drmeister
But in this case the function object shouldn't live beyond the function invocation.
17:41:59
drmeister
There is a way to tell the GC that objects are to be allocated in a non-moving pool.
17:43:50
drmeister
That policy tells the GC that the class chem::MoleculeGraph_O is to be allocated in a non-moving pool but it can be collected if the GC can't trace to it from a root.
17:46:15
selwyn
one more question: what do _sp and _O stand for? I see them everywhere in c++ source code
17:46:49
drmeister
_O is a C++ class that is managed by the GC. _sp is a template class that contains a tagged pointer to a _O object.
17:47:11
drmeister
_sp is a wrapper for tagged pointers. the _sp came from waaaaaaay back where I was using boost::smart_ptr
17:49:29
selwyn
right. and the pointers are tagged in order to implement the GC? do they include reference counts or something
17:51:03
drmeister
It's tracing garbage collection in boehm and copying, tracing garbage collection with MPS.
17:51:42
drmeister
The three least significant bits mean different things are stored in the single word that is wrapped in an _sp object.
17:53:14
drmeister
https://github.com/clasp-developers/clasp/blob/work/include/clasp/gctools/configure_memory.h#L41
17:53:58
drmeister
There are three immediate types. Fixnum (62bits) single-float (4bytes) and character(4bytes)