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.
13:41:40
beach
So I think I introduced the entire chain of classes and methods for LOGAND, LOGIOR, LOGXOR, and also LOGNOT, including HIR-to-MIR.
14:10:25
beach
I was worried for a while that it would be inefficient to compute ODDP and EVENP for bignums, but I don't see a problem.
14:13:05
beach
So I will make generic binary versions of LOGAND and LOGIOR, and once we have sealing, they could be inlined.
14:14:43
beach
We haven't heard from aun since end of June, but the last message was that bignums are still being worked on.
14:21:19
froggey
maybe. x86's NOT instruction isn't that useful, at least not for fixnums, as it ends up flipping the tag bit too
14:23:05
beach
It is good that you pointed that out. I remembered it yesterday, but totally forgot it today when I turned HIR into MIR. Thanks.
14:42:43
Bike
i ask because the library we're using uses sign magnitude, which seems to be the norm for such libraries, and it makes some things a real pain
15:20:11
froggey
for typed/sequence-based structures defstruct needs to be able to save the structure description in the environment somewhere for future use
15:20:14
froggey
is there a SICL-approved way to do this? presumably some first-class global environment accessor
15:45:04
beach
Either way, yes, we just add what is needed to first-class global environments. And if many (all?) implementations need this, we will also ask jackdaniel to add it to Clostrum.
15:46:29
froggey
the important bits would be the type, slots, and parent (if any). essentially like a class, but not quite
15:47:44
beach
The directory is First-class-global-environments, I think, and there are generic functions and then there is a subdirectory for a simple implementation.
15:48:46
beach
Sorry, I am off and on, because it is my night to fix dinner, so I need to prepare a bit, so as to avoid spending a solid hour without interruption in the kitchen.
15:54:26
jcowan
Well, the R7RS editors started with the R5RS spec (also in LaTeX) and edited it until done.
15:56:45
beach
Is that a recommendation for me? The problem is that, apparently at the time, it was not possible to create a single document for the entire Common Lisp specification, so the dpANS is one document per chapter, and it is not LaTeX or any other established markup. They invented their own, I suppose because LaTeX did not exist?
15:57:49
froggey
I see some existing defstruct related functions, structure-type and structure-size. that's not enough to hold what's needed, so I'll remove them and add what I need