freenode/#sicl - IRC Chatlog
Search
5:32:51
Harag
beach: I realize last night that I have not done anything about clos in sandbox, and once again sbcl expansions are an issue. So I was thinking is there a way we could mark host cl expansions as safe so we dont have to implement so many cl functions just to get a safe expansion?
5:34:02
beach
I am confused. The term "expansion" is used for macros, but you are talking about functions.
5:35:42
beach
Look, I am not as smart as some people may think. You need to be very explicit and precise with me, or I won't understand.
5:37:50
Harag
basically a lot of code that the user writes ends up being expanded by the cl implementation, and those expansions are full of "internal package calls"
5:39:49
beach
Then you have a few choices. 1. You import the stuff they expand to as well. 2. You use a SICL version that was designed to use a lot less such specific stuff in the expansion, or 3. You rewrite the macro yourself.
5:41:43
Harag
I was hoping for a 4th option, I during expantion mark the expansion as a "host" expansion, that can skip some of the "enviroment" checking
5:43:52
Harag
during macro expansion if you find a cl:[macro] dont lookup the functions in the environment for expansion "internals"
5:46:20
beach
I.e., the expanded code is not traversed at macro-expansion time. It is traversed "lazily" by the compiler, so some internal function may be encountered a lot later, or not at all sometimes.
5:47:05
beach
It has to be that way, because expanded code may contain forms that determine how the rest is going to be compiled. In particular, it may contain other macro calls.
5:48:12
beach
Anyway, you caught me at a bad moment. I need to go buy food early before it gets crowded and before the weather gets hot. So I am off for 2 hours or so.
8:31:56
Harag
So far I have been "stripping/copying" macros and some other functions that I need to "shadow" to 1. get sane expansions and 2. to enforce "safety".
8:31:57
Harag
But now that I got round to clos "stripping/copying" no longer makes any sense, there is just to much code.
8:31:57
Harag
I might as well embrace sicl, IE use what ever sicl "projects" already have the code required.
8:31:59
Harag
Is it a viable plan? Is sicl far enough in its "evolution" for me to risk relying on so many of its sub projects?
8:33:31
beach
That's hard to say. I can tell you that I execute SICL code in a host Common Lisp implementation on a daily basis, and in particular, CLOS is quite complete, because that's what I start with during bootstrapping.
8:33:49
beach
But there is still code missing, and there are still bugs in code that hasn't been tested.
8:35:08
Harag
From what I have stripped so far I know I need First Class Environment, Conditionals, CLOS and data-control-flow at least, most probably loop as well and who know what else.
8:35:34
Harag
So I went and had a look at how you "load/fill" a sicl enviroment and found examples in Boot and in Compiler, and I think I get the "jist" of it.
8:35:43
Harag
But its beyond my skill set to set up such for sandbox, would need some hand holding to do it.
8:38:26
beach
Now that I think about it, it may not be easy. If you want to use SICL CLOS, you basically need to buy into the entire bootstrapping procedure, and that one is not only fairly complex, but also very hard for me to explain since the details are fairly intricate.
8:40:34
beach
Perhaps at this point you should investigate the technique suggested by stassats. Maybe he has come up with something that doesn't have the complexity that this one does.
8:58:10
Harag
I had a hard long look at other options and I cant see how it can be done otherwise, but like you say maybe he supprises me
9:03:27
Harag
if i stick to simple "scripting" then I can get away with cl-isolated as is, I already use it in a couple of places. But I wanted to use a sandbox in a whole lot of new places, but like you say the complexity and the amount of external dependencies is fast getting out of hand.
9:05:52
Harag
yeah I will give the Eclector catch it at symbol creation time a shot as well and see how far that gets me
9:12:09
Harag
... I might still bother you, I hate abandoning a project just because its hard to do... I am a bit on the stuborn side
9:15:53
Harag
I will still have a good couple of weeks time available because I am waiting for some high fidelity UX specs to be finalized before I need to really crack on with my actual project
9:16:46
beach
One thing you can do is run the SICL bootstrapping procedure to get an idea of the complexity.
9:20:18
beach
The nature of the representation of the SICL objects is different in different environments.