freenode/#clasp - IRC Chatlog
Search
18:15:45
drmeister
How would we implement first class global environments? I just read the paper and it provides the protocol functions and says that symbol value slots and function slots are stored outside of the symbols in CONS cells (in SICL) and within a structure that represents the global environment.
18:16:47
drmeister
For thread local bindings for special variables I'm attaching a unique fixnum to each symbol so that it can index into thread local arrays of bindings - is it like that - but every symbol has a fixnum?
18:18:09
drmeister
I'm asking now because I'm thinking about putting Cando demos on the internet so people can fool around with them.
18:20:06
drmeister
For demos to specific people I can get away with what I have now. But a wider release - to develop "apps" to build different kinds of molecules using jupyter notebooks and then giving people access to those apps is precluded by not being able to sandbox Cando.
18:21:23
Bike
to get the function or value cell for a symbol you do kind of a hash lookup. but that's only necessary for actual global function and variable lookups, ie fdefinition and symbol-value
18:21:54
Bike
if you know the symbol at compile time you just refer to the cell in the compiled code (with load-time-value)
20:03:19
drmeister
I guess thread local bindings are handled the same as before - each symbol with thread local bindings is given a small integer index from a pool of indices that index into a thread local binding vector.
20:05:13
Bike
Like, if you have (foo 4) in your code, that gets compiled as something like (cleavir-primop:funcall (get-cell-function (load-time-value (lookup-function-cell 'foo))) 4)
20:05:30
Bike
so lookup-function-cell looks in whatever the present environment is at load time, and links in the right cell