freenode/#sicl - IRC Chatlog
Search
2:37:55
Harag
does anybody know where function (global-environment environment) in get-setf-expansion for sicl-env is defined or comes form, maybe I am just tired but I cant find it
3:54:32
beach
no-defun-allowed: I saw that you are giving a presentation for the online Lisp meeting. Congratulations!
4:02:34
no-defun-allowed
I did not, I had said I would need to think about what to present and left it at that.
8:07:25
beach
OK, I think SICL has a condition system. I am not proud of the state of the code, but I'll clean it up little by little. The debugger (as it is) is entered on unhandled conditions, and handler-case can be used to handle them.
8:09:22
beach
We are now up to 5 minutes of bootstrapping time, and there are noticeable delays the first time forms are typed in the REPL. I think it has to do with generic functions needing to have their discriminating functions created. But it does come back eventually, and further similar interactions are much faster.
8:11:33
beach
I don't want normal SICL code to depend on the CLIM-based backtrace inspector, so I set that up manually after boot. That way, if I end up in the "debugger", I can type :BT and start the backtrace inspector.
8:21:37
beach
I don't think the functionality of the "debugger" is important right now. It should be entered only if something goes wrong, and then that problem should be fixed. More important is the signaling, the handlers, and the restarts.
8:24:38
beach
So I guess next on my list is the adaptation of the Mezzano stream hierarchy to SICL. It should be straightforward, at least if we ignore threads for the time being.
8:26:28
beach
About I/O, I think it would be possible to use Gray streams everywhere. That way, during bootstrapping, there would be only a few methods that invoke host functions. Everything else can be SICL code.
8:32:56
beach
It is still a bit unclear to me what I/O functions ultimately call the character I/O functions. There seems to be quite a lot of back and forth between PRINT-OBJECT, FORMAT, PRINT, PRINC, etc. I guess that's a decision to make.
8:46:24
Harag
in the sicl-global-environment (other-functions.lisp) there is a function get-setf-expansion
8:48:00
beach
It has to be entered into the environment once the environment is created. Let me see if I can find an example...
8:50:03
Harag
my question is, is the environment that needs to be passed a first-class environment or is it the cl environments that trucler uses
8:50:57
beach
The latter, as I recall. The function should take a single optional argument, and if it is not given, the first-class global environment is returned.
8:53:38
beach
So it closes over the environment in which it is defined, but if it is given an argument, it calls trucler. That way, we get the compilation environment instead of the startup environment during compilation.
8:58:51
beach
But if in, say, a macrolet, you capture the environment and you call get-setf-expansion on that environment, it is going to be a lexical compile-time environment.
8:59:41
beach
So, get-setf-expansion is given a lexical environment, but must go find the global environment for the expander.
9:00:21
beach
Trucler then just goes down the chain of lexical environments, until the end, and returns the global environment it finds.
9:06:10
beach
You don't see it in a typical Common Lisp implementation, because there, all the code is specific to that implementation, whereas we write implementation-independent modules.
9:08:45
beach
In the end, this modularity, I hope, is going to make the code much easier to understand. But to understand it, you need to know what the standard dictates, of course.
9:09:45
beach
I try my best, but then, I already know this stuff, so I tend to forget to make things more explicit.
9:10:03
Harag
I stripped first class environment out of sicl for sanddox (just until there is an official version) and this was the last peace of the puzzle to make setf passed to sandbox work
9:11:15
beach
As a side effect, you are learning about how we do things, and that's great as well. :)
9:11:19
Harag
just need to move defmacro defmacro up to sandbox level with demacro setf and it all should work
9:12:04
Harag
yeah I have read all the docs for sicl,cleaver,elector,trucler and pored over much of the source code
9:12:39
Harag
also stripping it out gave me a better understanding of intrinsic vs extrinsic use and how that is reflected in the code