World: r3wp
[Core] Discuss core issues
older newer | first last |
Henrik 3-Apr-2008 [10119] | As I read here, I understand it. I also think that it would have been better for MOLD/ALL to be called SERIALIZE, because it is not an extension of MOLD, but perhaps a different mode. But I bet that Carl already has thought about this. |
Anton 3-Apr-2008 [10120x2] | Ingo, yes. |
As I remember, there was some debate about what to call mold/all when it was developed. We could probably just search some archives to find out... | |
Gregg 3-Apr-2008 [10122x2] | SERIALIZE implies to me that there would be a target to serialize to, which is SAVE. |
i.e. SAVE/ALL | |
Anton 3-Apr-2008 [10124x2] | disagree - check the expression "serialise to disk" |
serialise means "turn into a series" ie. a string. That's all. | |
[unknown: 5] 4-Apr-2008 [10126x7] | I have been thinking about this for sometime. I'm thinking we need an alternative set of mezzanines for those that need performance and want to build something off the /base product. Problem with existing mezzanines is that they need to maintain backwards compatibilitiy which means we may lack some of the performance we might gain from a current alternative. The goal of the new set of mezzanines is to be driven from the most recent distribution of the REBOL platform R2. Obviously, R3 should be accomplishing this task inherently. |
However, would anyone use them? Or would they just code as needed if they are going to use the /base product anyway? | |
Just some things to think about. | |
Kind of a niffty way to hide some code that I have been playing around with lately but it isn't full proof: | |
a: [] append a use [b][b: context [c: "Cool"] does [b/c]] d: first a | |
>> d == "Cool" | |
>> source d d: func [][b/c] | |
Anton 4-Apr-2008 [10133] | Essentially: d: does bind [print c] context [c: "Cool"] |
[unknown: 5] 4-Apr-2008 [10134] | Yep. |
Anton 4-Apr-2008 [10135x2] | >> d Cool >> source d d: func [][print c] |
But, like your version, if we can get the word, we can get its context: >> probe do bind [self] second second :d make object! [ c: "Cool" ] | |
[unknown: 5] 4-Apr-2008 [10137] | yep it can never be full proof in R2 as far as I know. |
Anton 4-Apr-2008 [10138] | fool proof |
[unknown: 5] 4-Apr-2008 [10139] | ahhh wasn't sure, lol |
Anton 4-Apr-2008 [10140] | actually "foolproof" |
[unknown: 5] 4-Apr-2008 [10141] | maybe fool-proof? |
Anton 4-Apr-2008 [10142] | full proof pertains to strength of alcohol. |
[unknown: 5] 4-Apr-2008 [10143] | indeed |
Anton 4-Apr-2008 [10144] | Well... we can unset 'self, so that the above method does not work: >> do bind [unset 'self] second second :d >> probe do bind [self] second second :d ** Script Error: self has no value ** Near: self |
[unknown: 5] 4-Apr-2008 [10145] | does that hide it completely? |
Anton 4-Apr-2008 [10146x2] | I haven't tested that much at all, so I don't know if that would break anything as rebol goes along... |
I'm not sure if there is another way in, quite possibly there is. | |
[unknown: 5] 4-Apr-2008 [10148x3] | Even if it does it might be useful in controlled situations. |
I know you can hide some things by simply declaring an object and afterwards setting the objects self to a different value | |
>> a/self: 3 == 3 >> a >> probe a make object! [ b: 2 ] >> a/self == 3 | |
Anton 4-Apr-2008 [10151x2] | See my code above. |
That still doesn't stop BIND? actually... Need to unset 'bind? as well :) | |
[unknown: 5] 4-Apr-2008 [10153] | that could cause way to many problems I would assume. |
BrianH 4-Apr-2008 [10154x4] | If your code can reference a word, then code that treats your code as data can reference the word in R2. |
If you want to sandbox R2, you have to sandbox the functions that can turn your code into data - that means the ordinals. | |
That will make the sandboxed code slow though, since it would mean PICK and the ordinals would be mezzanines. | |
R3 doesn't have that problem, since the ordinals are not used to turn code into data - another function is. Sandboxed code wouldn't need to have a reference to that function at all, or any functions that call it. | |
btiffin 5-Apr-2008 [10158x2] | Working on locate.r; saving a database after a scan of the library scripts can't be reloaded autoextract.r has the following inside it: output: [{Self-extracting REBOL-compressed file REBOL [ Title: "Self-extracting compressed file" Date: } now { File: } mold infile { Author: "Autoextract function by Bohdan Lechnowsky" Comment: ^{ Simply run this script and it will decompress and save the file for you ^} ] if exists? } mold infile { [ print ["} infile { already exists, please rename" " existing file and run again."] halt ] write } mold infile { decompress 64#} mold file ] write outfile to-string reduce output How do I get REBOL to keep the ^{ and ^} across a save/all and load? locate.r keeps a reference to all block! info for the tour sequence. LOADing this (after a SAVE/ALL) causes an invalid string error. Any hints? |
Oh, and the code is passed thru the pretty-print parser (to build up the references) before the save/all | |
Graham 5-Apr-2008 [10160x3] | one of my pet peeves is that to-block craps out if it encounters an unknown datatype |
why can't there be an option to turn illegal datatypes into strings ... | |
I'm using to-block so that I can use block parsing of course | |
btiffin 5-Apr-2008 [10163] | Yeah, me too ... always. But R3 TRANSCODE can trap that now ... umm, I just don't get the whole LOAD/NEXT thingy in context of parsing over block! and paren! Gabriele has posted links, just never dug in. |
Graham 5-Apr-2008 [10164x2] | >> to-block "23 May, 2008" ** Syntax Error: Invalid word -- May, ** Near: (line 1) 23 May, 2008 |
Ok, now why is "," in particular not allowed in a word? | |
btiffin 5-Apr-2008 [10166x2] | Has anyone ever detailed the voodoo of caret escapes in strings? ^^^{ does not return ^{ as I read it should. It's ==ing as ^^{, but I'm not sure if this a post process of the == result display. ?? Seems like voodoo. And instead of exploring, I'd rather just read something this time. |
Having nothing intelligent to add - to me the comma is a little voodoo too; I'll just ditto your sentiment. | |
Graham 5-Apr-2008 [10168] | which function allows me to traverse a series and remove at the same time? |
older newer | first last |