World: r3wp
[!REBOL3]
older newer | first last |
Paul 6-Mar-2010 [1423] | So if I went to falcon or Lua and said do that and they did they could say they could handle such code safer than REBOL could. |
Andreas 6-Mar-2010 [1424] | That's not an safety issue. |
Paul 6-Mar-2010 [1425x3] | The hell it aint. |
Maybe your confortable with it. Oh well. But if you don't think the chain evaluation should be a safety concern then I think your not being rational. | |
let's say you have a service oreient protocal that is sending unencrypted blocks of data that is getting sent into contstruct on the other end. All I have to do is capture it midstream alter the block and forward on and I can cause your code to behave differently. | |
Henrik 6-Mar-2010 [1428] | why is that a safety concern? in that case REBOL would be one big security hole as this is standard syntax. |
Paul 6-Mar-2010 [1429] | Are you saying it isn't true Henrik? |
Andreas 6-Mar-2010 [1430] | Paul, construct is using standard REBOL syntax in this case. If that is a safety concern for your purposes, that's outside the scope of CONSTRUCT. |
Chris 6-Mar-2010 [1431x2] | If you're already iterating through your block to convert every second word to set-word, then why not also neutralise any set-words that should be - seems that is where the flaw is... |
..should not be... | |
Paul 6-Mar-2010 [1433] | But what if I'm not the one doing it. |
Henrik 6-Mar-2010 [1434] | Paul, you don't create services that carelessly evaluate data that is potentially manipulated by an attacker. That's a security hole and bad coding. That's one of the good things about dialects. |
Chris 6-Mar-2010 [1435] | Agreed, and that's what this is - a dialect - as Rebol's sop is chaining... |
Paul 6-Mar-2010 [1436x3] | I'm not saying to stop chaining am I? |
I'm saying to offer a case where we don't chain. | |
But obvoiusly you guys are not in favor of options. | |
Andreas 6-Mar-2010 [1439x2] | Why not also offer a case where we drop all strings encountered? |
Or a case where we double all integers? | |
Paul 6-Mar-2010 [1441x3] | Are the strings a concern? |
are single integers a concern? | |
We have build in code to handle those things don't we? | |
Andreas 6-Mar-2010 [1444x2] | Do we? |
I don't know of a construct refinement that drops all strings. | |
Paul 6-Mar-2010 [1446] | Then we just make sure they get assigned to the proper place don't we? |
Henrik 6-Mar-2010 [1447] | yes, we do. with PARSE and dialects. |
Andreas 6-Mar-2010 [1448] | And that's what you should do too, Paul. |
Paul 6-Mar-2010 [1449] | I do Andreas, I have to currently use more bloat just like all of us do to handle it. |
Andreas 6-Mar-2010 [1450x3] | That's not bloat, that's application specific code. |
And no, it's not "all of us", as none of us have those specific needs. | |
Just as you don't seem to have the need to drop all strings ... | |
Paul 6-Mar-2010 [1453x2] | bloat is in the eye of the beholder. To me where it takes more code to do something that could be done elsewhere is bloat in my book. |
You all have that need. | |
Henrik 6-Mar-2010 [1455] | if it made general purpose sense then it probably would be looked at, but with the amount of discussion here, how generic is it exactly? it helps with some code examples that significantly reduce the code size in a general way. |
Gregg 6-Mar-2010 [1456] | I vote against the proposed change to CONSTRUCT. I believe the need is better served with a mezz. If it becomes popular and useful, then consider making it part of the standard distro. |
Paul 6-Mar-2010 [1457x7] | I'll add the solution to another power type mezz package. |
Tbat is what is great about NO! | |
Anyone know how Lua handles this? | |
http://host4.altme.com/altweb/rebol3/chat771.html | |
sorry | |
wrong place to paste | |
trying to do a bit of marketing/advocacy | |
BrianH 6-Mar-2010 [1464x2] | There is a plan to create a library of community-supplied modules full of useful code that isn't generally useful; we've been calling it R3/Plus. Code that would go in /Plus is called library code, as opposed to code that gets built into R3 itself, which is called mezzanine code. Paul's suggestion seems like a good candidate to be library code. |
Carl, if you make RETURN and EXIT definitionally scoped, it would help if the throw: attribute would disable that, so functions like USE would work properly. Also, please keep BREAK, CONTINUE and THROW dynamically scoped - most of the functions that they break out of don't do definition, so making them do so would add unwanted BIND/copy overhead. | |
Ladislav 7-Mar-2010 [1466x6] | I am not sure I understood the plan, is it so, that the plan is, to have two types of functions depending on an attribute: -functions with dynamically scoped Return/Exit -functions with definitionally scoped Return/Exit ? |
BrianH, definitonally scoped Return/Exit need not be disabled, it would "automatically" work as expected, that is the beauty of the approach | |
(my article discussing function attributes illustrates that) | |
http://www.compkarori.com/vanilla/display/Function-Attributes | |
What's the quickest way to detect R3 vs R2 for hybrid scripts? - see e.g. http://www.rebol.org/art-display-article.r?article=w24v | |
Note to the "Should we catch unwinds?" question in the http://www.rebol.com/r3/notes/errors.html article - the subject of the CureCode #1506 is, that it is (or should be) possible for the interpreter to find out, whether the unwind would cause a "No catch for throw" type error, and, that Try should catch such an "unhandled" unwind. | |
Gregg 7-Mar-2010 [1472] | Excellent article Ladislav. Thanks for taking the time to write that. |
older newer | first last |