World: r3wp
[!REBOL3]
older newer | first last |
BrianH 17-Feb-2010 [868] | Like I said, ", " could be replaced with " & " and it would do as well. Would you like that? Either is considered standard English... |
Robert 17-Feb-2010 [869] | Would it be possible to make R3 a Windows-Host-Script language? |
BrianH 17-Feb-2010 [870x3] | Yes, but it wouldn't be useful unril we have user-defined datatypes (to wrap the OLE objects in). |
unril -> until | |
There might be a workaround for that with extensions, but I'd wait until we have the next host kit before making an ActiveScripting host, so we can use embedded extensions and the revamped command! type. | |
Robert 17-Feb-2010 [873] | Ok. IMO we need callbacks as well. And a good documentation how this will be integrated into the event system. |
BrianH 17-Feb-2010 [874x2] | The plan has always been to implement callbacks and integrate them into the event system through devices. |
But you never know until it happens. | |
Robert 17-Feb-2010 [876x2] | Is there a way to get the literal of a function parameter? Example: "my-funct my-data" and "my-funct: funct [parameter]..." Can I get 'my-data within my-funct? |
In R2 I could write: in object 'self, but no longer in R3. What's the equivalent in R3? | |
Pekr 17-Feb-2010 [878] | Those things shold be defined by Carl ASAP, as those are pretty fundamental. We talk about u-types for ages, but noone knows, how in fact those are they going to be implemented or how they will work in the end. Ditto for callbacks :-) |
BrianH 17-Feb-2010 [879x4] | BIND? - and it works in R2 as well. |
That's the equivalent to in object 'self, bind? object. | |
As for your first question, try a lit-word parameter like this: my-funct: funct ['parameter]... | |
Unless you want no evaluation at all, not just for words, then use a get-word parameter. Yes, that's an awkward way to refer to it - it's already been reported. | |
Ladislav 18-Feb-2010 [883] | In R2 I could write: in object 'self, but no longer in R3. What's the equivalent in R3? - I do not understand all that "harakiri" going on in R3 with 'self. Nevertheless, the expression: first bind [self] object works |
Paul 18-Feb-2010 [884] | Self is still there but within its own context which is the way it should be. |
Ladislav 18-Feb-2010 [885] | Nevertheless, I think, that the fact, that first bind [self] object] works, while in object 'self does not, is at least surprising. What is that good for? |
Paul 18-Feb-2010 [886] | Probably to do with the new changes allowing us to protect object code. |
Ladislav 18-Feb-2010 [887] | Inconsistent |
Paul 18-Feb-2010 [888] | what is? - be more specific. |
Ladislav 18-Feb-2010 [889] | See above |
Paul 18-Feb-2010 [890] | Again, it may have to do with protection features. |
Ladislav 18-Feb-2010 [891] | No, as long as one of the above expression works, while the other does not |
Paul 18-Feb-2010 [892] | I don't know how you can say "NO" Ladislav. |
Ladislav 18-Feb-2010 [893] | just easy: the functions are equivalent for me - I do not mind whether I use the former or the latter. If one of them works, while the other does not, it is inconsistent, and not protecting |
Paul 18-Feb-2010 [894] | Protect feature is still evolving at last check so I don't see how you can say it isn't part of that direction. |
Ladislav 18-Feb-2010 [895] | well, "part of that direction" - maybe, just not working in this case, as demonstrated |
Pekr 18-Feb-2010 [896] | Then CureCode it, and maybe Carl will answer that one :-) |
Gregg 18-Feb-2010 [897] | Brian, if "Returns TRUE if the values are equal and of the same datatype & case." is OK, but "Returns TRUE if the values are equal and of the same datatype and case." is not, that's where I think uor priorities are out of order. Maybe the first thing we should do is write a clear goal for doc strings. What is their main purpose and what constraints should be placed on them for each purpose (or maybe I just haven't seen the doc that does this)? For example, are they be limited for console output only when listed with other funcs, or also when used with HELP individually? Should ? be short help and ??? link to a detailed help page for funcs? If console group list is the constraining factor, can it truncate and ellipsize longer strings? |
Robert 18-Feb-2010 [898x2] | Is there a difference between an object! or context! Any rules wheren to use one or the other? I use contexts more likea "class"(data, functions) and objects mor like blocks. |
I think that modules are the way to go, but than why we have context! and object! ? | |
Steeve 18-Feb-2010 [900] | wait... there is not context! datatype... |
Robert 18-Feb-2010 [901x2] | Hmm... true. So CONTEXT seems to be just a short-cut. |
How about an unblock function? This would help in cases like: reduce [words-of my-object] == [[my-words...]] reduce [unblock words-of my-object] == [mywords ...] | |
Geomol 18-Feb-2010 [903] | Your unblock returns a series of words. You need to have them in a series (a block). You can do these: first reduce [words-of my-object] or simple words-of my-object I can't see, an unblock would be possible. |
Robert 18-Feb-2010 [904] | word-of returns a block |
Geomol 18-Feb-2010 [905x4] | yes |
So unblock words-of .... should return what? | |
Remember every function and operator in REBOL returns exactly one return value. Some would argue, PRINT doesn't, but it returns a value of the unset! datatype. If you need to return many words, you have to put them in one return value, like a block. | |
>> type? print "Hello, World!" Hello, World! == unset! | |
Robert 18-Feb-2010 [909x2] | Example: I want to get ["some string" word1 word2 word3] If I write: reduce ["some string" words-of ...] will return: ["some string" [word1 word2 word3]] |
So I need to get rid of the 2nd block. | |
Geomol 18-Feb-2010 [911x5] | You can get that by: reduce ["some string" first worlds-of ...] |
sorry | |
haha, late here. Let me think. | |
Try this: join ["some string"] words-of ... | |
I see, what you want, but you can't do that in REBOL, because a function can't return more than one value. | |
Robert 18-Feb-2010 [916] | Yep, used the JOIN as well. But thought it's a generic pattern. |
Izkata 18-Feb-2010 [917] | Has 'compose been removed or changed in R3? compose [ "some string" (words-of ...) ] == [ "some string" word1 word2 word3 ] |
older newer | first last |