World: r3wp
[Core] Discuss core issues
older newer | first last |
Maxim 27-May-2009 [13892] | I mean, the interpreter, dynamically. |
BrianH 27-May-2009 [13893] | Function argument stacks are handled in function-specific value frame stacks in R2. They are stored in stack frames in R3, which changed the stack allocation to be more task-safe and have faster function calls. |
Steeve 27-May-2009 [13894] | Brian, i would be very suprised. Rebol uses his own way to handle stacks, if not it would be unportable. |
Maxim 27-May-2009 [13895] | I think that last post from brian wasn't speculation... I think he actualy knows, being in the R3 internal loop ;-) |
Steeve 27-May-2009 [13896] | i mean it's not platform specific. |
BrianH 27-May-2009 [13897x2] | This is one aspect of the internals that I actually am aware of, since it affects contexts. It's true: REBOL implements its own stacks, and doesn't use the C stack to call REBOL functions, just natives. |
The platform-specific aspect could be affected by page and/or pointer alignment. | |
Steeve 27-May-2009 [13899] | well, it an easy deduction, if not Rebol could not be portable |
BrianH 27-May-2009 [13900] | REBOL is not fully portable. The platform-specific parts are wrapped in APIs internally. |
Steeve 27-May-2009 [13901x2] | yes but the VM need to be fully portable |
the core engine must be | |
BrianH 27-May-2009 [13903] | This is why the R3 host code is separate, and will be open-sourced. The host code is non-portable. The VM can call API functions provided by the host code. This would be necessary for a variety of reasons, not the least of which is that memory management, tasking, networking, any number of things are implemented by different platforms differently. |
Henrik 29-May-2009 [13904] | http://www.openldap.org/lists/openldap-devel/200304/msg00123.html Anyone made a REBOL version of this? It's a UTF-8 <-> ISO-8859-1 converter in C. |
Maxim 29-May-2009 [13905] | hasn't peterwood just uploaded a pretty nice string en/decoder on rebol.org? |
Henrik 29-May-2009 [13906] | will check |
Sunanda 30-May-2009 [13907] | Peter's code detects the encoding, and can do several comversion between encoding types: http://www.rebol.org/view-script.r?script=str-enc-utils.r |
Henrik 30-May-2009 [13908] | wow, very nice. thanks. |
Maxim 30-May-2009 [13909x2] | used on rebol.org I suppose ? :-) |
peterwood can I make a wish? I really need a function which can detect if a file is binary or text... do you think its possible to have such capabilities in your module? | |
Sunanda 30-May-2009 [13911] | I have a printable? function that checks if a string has only ASCII printable characters. Would that meed your need, Maxim? |
Maxim 30-May-2009 [13912] | its already very usefull, its for detection of how to process files in distro-bot. right now it just treats any non rebol script as a binary, but I'd like to add some processing to other text files. maybe peter can extend the concept and figure out if there are only printable characters in other encodings :-) |
amacleod 6-Jun-2009 [13913] | just "discovered" 'alter' fuction...very handy |
Sunanda 7-Jun-2009 [13914] | Sadly, 'alter has not made it into R3: http://www.rebol.net/r3blogs/0124.html |
Graham 7-Jun-2009 [13915x4] | Doesn't seem a very suitable name for what it does ... |
How about 'swap instead ? | |
>> flags: [] == [] >> swap flags 'resize == true >> flags == [resize] >> swap flags 'maximize == true >> flags == [resize maximize] >> swap flags 'resize == false >> flags == [maximize] | |
Does it read better than 'alter ? | |
Sunanda 7-Jun-2009 [13919] | 'alter was always a poor choice of name -- short for 'alternate apparently, but too short to be obvious. Anton has suggested 'toggle as a better name for it. |
Graham 7-Jun-2009 [13920x3] | toggle implies something is always there ... but in a different state. Swap is to imply that something goes in and out :) |
Rotate is another possibility | |
Never had the need to use this word though :) | |
Henrik 7-Jun-2009 [13923] | I've used ALTER once for user selection in a list, and it was even a special case. I think having the ability to just conditionally append to a block if the value does not exist is more useful. I.e. an ALTER, split in two functions. |
Graham 7-Jun-2009 [13924x2] | Trying to think of where I could use this function ... |
>> a: [ b b c d ] == [b b c d] >> alter a 'b == false >> a == [b c d] | |
Sunanda 7-Jun-2009 [13926] | 'alter is a hard one to name. The operation is: * if the target value exists in the series: remove the first instance of it * if it does not exist in the series: append it to the end. The "remove first instance" makes it more generic than rotate/swap/toggle when there is more than one instance of the target in the series. |
Chris 7-Jun-2009 [13927] | flag/deflag ? |
Sunanda 7-Jun-2009 [13928] | 'cull almost works :-) An english defintion being: "To take someone or something (from somewhere)." |
Chris 7-Jun-2009 [13929] | 'cull would be a great name for 'remove-each : ) cull deer herd [deer = not smart] |
BrianH 7-Jun-2009 [13930x2] | ALTER is still in R3, though its usefulness is so limited it may be moved to R3/Plus. The enhanced logic flags that were supposed to replace it were removed in the latest release - they were never refined or documented to the point of being useful. |
In theory, ALTER is a set function, so the series in question is not supposed to have duplicates. | |
Sunanda 7-Jun-2009 [13932] | You are quite right -- 'alter is still in R3 ..... My mistake. Several of REBOL's set operations operate on series. Series are more like bags than sets, hence they can have duplicate values. That adds value for a programmer, but dilutes academic purity. Perhaps 'alter could have a purer set defintion by becoming a no-op if the target value exists more than once in the series. |
amacleod 7-Jun-2009 [13933] | Is there a way to adjust computer time from rebol? |
Graham 7-Jun-2009 [13934] | 'call |
amacleod 7-Jun-2009 [13935x4] | you are a real tease, Graham. |
I thought it might be some registry stuff | |
I saw some third party tools to do it but they are nearly half meg in size and I thought one line of rebol might do it.. | |
Why is the time zone displayed by rebol 'now not changed when I change the time zone on my computer in date and time properties? | |
Chris 7-Jun-2009 [13939] | Should be correct in its offset from UTC/GMT? |
amacleod 7-Jun-2009 [13940x2] | No matter what I change the rime zone to on the computer I get a rebol time with -4:00 |
Just discovered that allnew instances of rebol consol produce new zone. I guess the consol reads zone info at start but not at each time get.. | |
older newer | first last |