World: r3wp
[Core] Discuss core issues
older newer | first last |
Ladislav 3-Nov-2010 [346] | But, of course, Carl would know best! |
Anton 3-Nov-2010 [347x2] | What do you mean "Regarding the CONTINUE in R2" ? |
That you think it's not implemented in any loop construct (even under a different name) ? | |
Ladislav 3-Nov-2010 [349x2] | I wrote: "I don't think you get CONTINUE in R2". the above is just explaining, that I may not be the one knowing the policy in this respect |
replace "get CONTINUE" by "get native CONTINUE" to make it more understandable | |
Anton 3-Nov-2010 [351x2] | Ah yes. |
Well... I think we should still aim high and make a wish. | |
Ladislav 3-Nov-2010 [353x4] | Sure |
How about a C-AWARE name, it looks a bit shorter, would it sill be acceptable? | |
sill: :still (pardon the typo) | |
http://www.rebol.org/view-script.r?script=c-aware.r | |
Gregg 3-Nov-2010 [357] | CC makes me think of "Call with Continuation", but I agree that MAKE-CONTINUABLE is a little long. Just CONTINUABLE? Without 'continue in the name somehow, even if abbreviated, you lost the connection to the keyword. |
Rebolek 3-Nov-2010 [358] | It would be nice to have /PART refinement for SWAP. |
Pekr 3-Nov-2010 [359] | CC is also commonly known in digital photo area as Comment & Critique .... |
BrianH 3-Nov-2010 [360x5] | Ladislav, your request to make HALT catchable was in CureCode already as #1520. Please add your concerns in a comment there. That ticket needs a use case to catch HALT in addition to everything else. |
According to that use case CATCH/all would catch QUIT/now as well - you should mention that too. | |
There is no need to worry about the name CC - it won't be used. A CATCH option is more likely. | |
Oh, nevermind about the CC. I missed the change in subject :) | |
CONTINUE is more likely to be added as a native in R2 than it is as a hack. We already have BREAK, so the mechanism is there. | |
Maxim 3-Nov-2010 [365] | use case is simple to catch halt... make sure sandboxed code doesn't stop the interpreter. same for quit/now. only the outer app should be allowed to use those. |
BrianH 3-Nov-2010 [366] | Right, but the top-level script *is* the outer app, so these need to be made available at least at that level. |
Maxim 3-Nov-2010 [367] | yes... which is why putting a catch/all when executing code in a sandbox (I often use CONTEXT [ ] to do so) is very usefull to prevent the outer script from halting or quiting because of some externally loaded code.. |
BrianH 3-Nov-2010 [368] | If MAKE object! specs catch RETURN and EXIT, that's an error. |
Maxim 3-Nov-2010 [369] | I don't think it does. |
BrianH 3-Nov-2010 [370x2] | CONTEXT catching RETURN and EXIT is error #520. |
Sorry, #539 | |
Sunanda 3-Nov-2010 [372] | An R3 suggestion..... -- Ability to execute HALT, QUIT etc should be controlled by SECURE -- DO should have a refinement DO/SECURE ... meaning the DOne thing cannot change any SECURE settings That would be a big step towards safer sandboxing. - |
Maxim 3-Nov-2010 [373x2] | what I mean is this: catch/all [ context load %file.r ] this has to be completely 100% bullet proof. |
where you can replace 'CONTEXT by any of the control/eval funcs | |
BrianH 3-Nov-2010 [375x3] | Look at the #1520 proposal, with the clarifying comments. Combined with TRY it should catch everything short of an interpreter crash. |
We want the separate TRY in order to distinguish between errors and unwinds. | |
Sunanda, SECURE isn't scoped, it is "from now on". You need user permission to undo it. If we did this with SECURE we wouldn't be able to quit our own apps. | |
Maxim 3-Nov-2010 [378x2] | maybe we could start thinking about using a new word for what we are talking about extending CATCH to do... its starting to look like a long list of groceries for a single word. reading Andreas' notes on 'CATCH I agree that it should only manage throws. /all should mean catch any named or unnamed throw /quit /unwind and other proposals should fall into another function. |
something like 'SANDBOX | |
BrianH 3-Nov-2010 [380] | CATCH is a sandbox already, just not a very good one. SANDBOX would need to be mezzanine because it would need to provide wrapper functions as well. And we need the subtle differences in the various CATCH options for different circumtannces. |
Andreas 3-Nov-2010 [381] | Ah, a SANDBOX function sounds like a good idea. |
Maxim 3-Nov-2010 [382x2] | well, I'd argue that its meant to do exception handling on ERROR! |
I think we should even remove its /quit refinement. | |
Andreas 3-Nov-2010 [384] | Then we could get rid of CATCH/quit and move it to SANDBOX and also move the desired CATCH/all to SANDBOX. |
Maxim 3-Nov-2010 [385] | well, catch/all for should be just to catch any and all throws... no? |
Andreas 3-Nov-2010 [386] | That's what CATCH already does at the moment. |
BrianH 3-Nov-2010 [387x2] | CATCH/all would also catch BREAK, CONTINUE, and dynamic RETURN and EXIT. |
SANDBOX would need to be mezzanine. CATCH/quit and CATCH/all need to be native, whatever functions they are in. That means that SANDBOX would use CATCH/all, but not be able to implement it. | |
Maxim 3-Nov-2010 [389] | brian I don't agree... all of that whould be a separate function. its a different level of failure control. |
Andreas 3-Nov-2010 [390] | I don't think it's important whether SANDBOX is mezz or not. |
BrianH 3-Nov-2010 [391] | I don't care if it is a separate function, I am just using those names for the concept. There are practical reasons to put these in CATCH, but it's not strictly necessary. But SANDBOX would *have to be mezzanine* to be able to do its job, so we need native functions or options for it to call. |
Andreas 3-Nov-2010 [392] | The point is not polluting CATCH with options that are better placed elsewhere. |
Maxim 3-Nov-2010 [393x2] | yes my point to. why would sandbox *have* to be mezz? |
(btw, I'm not arguing , I really wondering what's the difference) | |
BrianH 3-Nov-2010 [395] | But they're not better placed elsewhere. CATCH already has the code in it to do this task. Putting it elsewhere would mean moving that code to an internal function that CATCH calls. Not a bad thing, really, but that is the practical reason. Also, we don't want to polute the namepace in lib with too many predefined words that could be better used for other functions. |
older newer | first last |