freenode/#sicl - IRC Chatlog
Search
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
9:44:53
Harag
trucler-reference:environment is not type of sb-c::abstact-lexenv when binding sb-imple::env
9:47:25
beach
It is not often that the environment argument is used, but there are some cases where it is.
9:50:53
beach
I am off for my long-ish lunch break. I think you now know enough that you can figure out how to handle the problem.
12:20:13
beach
lonjil: Are you just doing PRINT-OBJECT, or are you also doing PRINT, PRINC, WRITE, etc.?
12:26:53
lonjil
I must say that I have not been working much on Incless lately, and probably wont for the next couple of weeks. I have important school work I'm behind on.
12:58:48
beach
jackdaniel: Are you totally opposed to bootstrapping ECL from an existing Common Lisp implementation?
13:08:47
froggey
beach: I think I'll need to introduce an initialize-closure entry in the hir-interpret's static environment, to match up with the enclose entry. is that ok?
13:15:35
beach
froggey: The new entry will then take over most of what enclose is doing now, I would think,yes?
13:24:40
jackdaniel
beach: I've never stated, that I'm opposed to that. In fact, when cross compiling, the child is bootstrapped from the host ecl
13:26:01
jackdaniel
that said, I find it being a very nice quality, that ecl may be boostrapped using only the c compiler
13:39:50
beach
jackdaniel: Oh, by the way, are you waiting for me to work some more on the Clostrum documentation?
13:40:58
beach
I kind of forgot about it the past few days, given how preoccupied I was with the condition system.
13:43:44
jackdaniel
I was prepared to wait some time more, I know that you were occupied (and I've said that you should take your time when we've talked about that the last time). Documentation is one thing, I'm more interested in a talk of what are your expectations of me and general terms of our cooperation on this project
13:44:17
jackdaniel
I've started some work on Clostrum already, but its mostly some preliminary hacks to get a hang of it (I've been working also on McCLIM in a meantime, as you might have noticed)
13:45:19
beach
Basically, what I expect is a repository that implements what is in the documentation.
13:46:37
jackdaniel
is there some sicl intergration I should make, or use i.e hash tables to store things?
13:47:21
beach
You can use whatever is most appropriate, typically hash tables for most things I would imagine.
13:48:31
jackdaniel
right; I think that fiveam is non-controversial choice as a test suite framework
13:51:33
beach
I think you had better ask him, because he has some bug in there that he hasn't found yet.
13:52:21
beach
Somehow, it behaves slightly differently from the HIR interpreter, which it shouldn't.
13:53:38
beach
I look at the static environment used by the HIR interpreter, and I wonder what I did, if it is more than a week or so ago.
13:56:48
beach
But, as Charles Simonyi remarked, "I do write better programs" (from the LUV slides).
13:57:32
beach
The nearly total lack of memory forces me to write in a way that I can understand it better when I look at it later.
14:07:58
jackdaniel
beach: would you rather merge pull requests against the clostrum repository or you want to give me access so I push there directly?
14:27:24
beach
Googling for how to add a collaborator, the first answer did not correspond to reality.
14:27:45
beach
It said click on settings, then invite a collaborator. But there is no invite a collaborator choice.
14:34:57
jackdaniel
yes, my server is down where I have a permanent session usually, but pidgin seems to keep disconnecting
14:42:10
Harag
beach: is trucler:describe-function supose to be able to deal with setf forms like this (SETF F1:MACRO-FUNCTION)?
14:43:38
Harag
mmm the implementation of the describe-function in First Class Environment checks if name is fboundp
14:45:13
beach
Oh, and I am not sure I imported functions with names like (SETF <mumble>) from the host.
14:47:27
Harag
so how would the import fos (setf <fucntion) then look and how are you going to make (setf <fucntion>) bound?
14:50:11
beach
In fill-environment.lisp, add another WHEN like (when (fboundp `(setf ,symbol)) (setf (sicl-genv:fdefinition `(setf ,symbol) environment (fdefinition `(setf ,symbol)))))
14:50:50
beach
You don't need to test for special operator or macro function, because they can not be named like that.
14:52:19
beach
In fill-environment.lisp, add another WHEN like (when (fboundp `(setf ,symbol)) (setf (sicl-genv:fdefinition `(setf ,symbol) environment) (fdefinition `(setf ,symbol))))
14:54:52
beach
I hope I made clear that the code was not complete, so additional work/thinking is to be expected.
15:07:28
beach
I am more and more convinced that we hit the right abstractions with Eclector and Trucler. Now, we need Clostrum to get it right for first-class global environments.
15:08:01
beach
Once that is done, we will be able to extract AST and CST-to-AST to separate libraries.