« first day (3250 days earlier)      last day (530 days later) » 

3:53 AM
Thanks, I didn't think of using use.
 
 
5 hours later…
8:46 AM
@HostileFork Has the feature to access the last console value been removed consciously, or just because it has never been tested?
 
@ingo Didn't think it had been removed: last-result
>> 1 + 2
== 3
‌
‌>> system/console/last-result
== 3
 
9:06 AM
@HostileFork Thanyou. Seems I was looking in the wrong place, still at some time you could use shove to get to the last result, and this doesn't seem to work anymore.
 
@ingo People seemed to be confused by that feature, if you like it you can put it in a config: forum.rebol.info/t/…
 
9:27 AM
So I have a plan I think on the FUNC / FUNCTION unification, which is to leave FUNCTION alone and phase out its usage over time. In the system and files as we go, convert existing FUNCTIONs to FUNC using LET (if and when they want a local). One day, flip the switch and say FUNCTION is deprecated. Then later, make them synonyms.
The one catch is, I kind of want SET-WORD! inside a FUNC(TION) to default to causing usages (including the SET-WORD!) to being unbound. But JavaScript doesn't do that; if you do an assignment to a variable without a let statement, it just writes into whatever variable it can see in scope.
My overprotective nature for the defaults may be missing the premise: This is a language where if you find something is too permissive or bugging you, then Make Your Own Safety. If you get mad enough at a category of mistakes, you can make your own FUNCTION replacement without being much of a language developer.
 
 
1 hour later…
10:57 AM
Can someone with Altme access let DideC know that I have a working CGI in renc
Can someone with Altme access let DideC know that I have a working CGI in renc in the web group
 
11:12 AM
So it's pretty critical that this whole indexing model be sorted out, as per "Where the series ends". This is foundational. Whether you are concerned as a user about whether it has been defined or not, keeping the internals from crashing and such really depends on it.
What I have proposed is that series contain integer indices that can be positive, negative, or zero...and that operations like BACK and NEXT do not editorialize on that number. Hence next next next back back back next [1 2 3] gives you [2 3].
For most practical purposes, having the index in the same value cell as the series would be no different from holding an index in a separate INTEGER! variable.
This creates questions about zero and negative indices...plus those that are out of range past the end, like what should for-each x back back [1 2 3] [print [x]] do? I would propose that if anything seems like a gray area, make it an error for now.
 
 
2 hours later…
1:47 PM
@HostileFork What this means is that only the resulting index value is important even if intermediate results could have been out of range.
 
 
2 hours later…
3:37 PM
@iArnold That is, indeed, what that means.
 
@iArnold It seems weird to me to have a series in a state where everything fails on it except index getters/setters. Unavoidable, perhaps, but still weird. PS I don't know how to make it not weird yet.
 
@MarkI Some can do soft failure, but I'm not sure about how to decide.
‌>> pick [a b c] 100
; null
‌
‌>> pick [a b c] -100
; null
 
4:00 PM
There's always been the situation where you can get out-of-bounds indices if the series size changes out from underneath one value from another reference. But the handling seems rather haphazard... some operations check and others don't. It's probably squeaky-wheel syndrome, where the operations that do the check and clip it (or error) were just places reported as bugs.
A systemic solution would have something like a plain VAL_INDEX() which would error if out of bound, then a VAL_INDEX_UNCHECKED() which gets you the value and then you have to test against the bounds, and maybe something like a VAL_INDEX_CLIPPED() which clips to head or tail. I dunno.
 
4:20 PM
@MarkI On the other, hand, if the index were seperate from the series, it wouldn't be weird at all. And as the series can be changed underneath you from other referencese, it seems to me that thinking about it as being seperate makes the most sense. And that it is part of the series is purely an implementation detail.
 
In this sense, it makes it like any other language. That is likely best, if you don't have anything notable or new to bring to the table. Which for this, Rebol does not.
Iterators have these same problems in non-pure-functional languages. Every C++ iterator has to document what changes they are robust to or not:
503
Q: Iterator invalidation rules

Lightness Races in OrbitWhat are the iterator invalidation rules for C++ containers? Preferably in a summary list format. (Note: This is meant to be an entry to Stack Overflow's C++ FAQ. If you want to critique the idea of providing an FAQ in this form, then the posting on meta that started all this would be the plac...

 
4:40 PM
Unlike C++, we don't want to crash if you break the rules...but I don't think sweeping it under the rug is great either.
 
5:15 PM
@ingo Sure, a number separate from a series can be anything and not be weird. If, on the other hand, you interpret that number as an index into the series, then having it not point within the series is weird.
 
5:30 PM
So ever since R3-Alpha, the process of "relativizing" function bodies when copied has involved two passes. One walk to make the copy, then one walk to poke into words that are args or locals a pointer to the identity of the function they refer to. I've said that someday, it would copy and relativize in one pass...and that someday is today, apparently.
 
Point being that a series having a (current) index is inextricably intertwined with what it means to be a series, for otherwise, MOLD would always be MOLD/ALL.
Furthermore, that concept becomes a non-sequitur if said index is off the ends.
Ladislav has tried to reconcile this and failed, and he is no dummy.
 
@MarkI I've suggested MOLD be MOLD/ALL, and then any tricks in the console which give you another output be display helpers.
>> skip [a b c d e f g h i j k l m n o p q r s t u v w x y z] 25
== 25@...[z]
Or similar.
I'm raising these points about concreteness, e.g. remarks above about type of 10 being @[integer] and then you can take that to the bank when (first [@[integer]]) = (type of 10). Hidden state isn't doing people good. Demonstrating cool features that actually work does do good.
Anyway, as mentioned, you can't really get around the fact that an index past the range of a series can come up if the series data changes. And it can be kind of arbitrary as to whether you hit a state when new data is inserted or not to come back to that index. This has all the character of a disjoint index in any other language.
So I think the best way to think of it is as an optimization of the disjoint index. You happen to be able to store an index in a cell (though not necessarily if we deem any INTEGER! to be a valid index). You happen to be able to pass both index and series through a single named variable. But there's zero other magic beyond what other languages have.
 
5:49 PM
Yeah, I'm probably just spiraling into some dumb semantic argument. A disjoint index is weird, makes no sense, whatever, who cares. We get them, we should do something sane when we get them.
 
So one problem with switching from SET-WORD! to using LET in order to signify locals is that PARSE has been able to do set x: and copy x: to signify locals gathering in those cases. We probably don't want set let x:. And it seems inconvenient to force people to separate out their intent for locals from the parse rules themselves (the reason for adding this in the first place).
One answer was to make the move to where instead of copy x: to "whatever" it follow a more normal pattern of x: copy to "whatever", which could then easily accomodate let x: copy to "whatever". This follows a line of thinking in Topaz PARSE.
If you wanted to capture the current parse position you would thus say x: here instead of just x:. To jump to a parse position you would say seek x or similar.
 
6:12 PM
@MarkI pragmatically, one does not care about the state it is in until the actual use of it.
 
 
2 hours later…
7:46 PM
posted on September 24, 2019 by Oldes

Current behaviour: >> mold/flat make image! 8x1 == {make image! [8x1 #{ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF }]} Expected result (like in Red): >> mold/flat make image! 8x1 == {make image! [8x1 #{FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}]}

posted on September 24, 2019 by Oldes

Current behaviour: >> mold/flat #{FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} == {#{ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFF }} Expected: >> mold/flat #{FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} == {#{FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}}

 
 
2 hours later…
9:45 PM
So with refinements being their own arguments, that removes a block to expanding frames to add more refinements in derived functions. I'm wondering if that should be its own operation...the ability to merely extend a FRAME!. This might result in some kind of inefficiency, but you don't know whether people want to ADAPT or ENCLOSE or CHAIN. So saying "hey, I want to make another version of a function...just one with parameters I know it won't use" seems best.
redbol-switch: chain [
    extend 'switch [/default [block!]]
        |
    function [result [any-value!]] [
        :result else (default)
    ]
]
^-- that's pretty awesome, if you ask me. Anyway, there's my concept. Rather than fret over how to make versions of ADAPT or CHAIN or ENCLOSE or whatever that add parameters, make the parameter-adding-but-otherwise-a-noop operation.
It won't really be that inefficient; the extended function will take the place of the original, so it won't be like the other deriving operations. There won't be a step in the invocation where this CHAIN will first call the extended switch, then that goes and calls the original switch. This chain only has extended switch in it--and runs it directly using switch's implementation in one step...just on a frame larger than it expected.
 
10:30 PM
I'd like to figure out a way so that if you've specialized parameters out with a certain name, you can extend them and reuse that name. At the moment I'm not sure how to do this. I will point out that at least since refinements name their own arguments (if they have them), in the current world where you can't do that we aren't using up names quite as fast.
Hm, I guess you can't really chain that, you'd have to enclose it...the chain won't have access to default as the extended switch has finished.
redbol-switch: enclose (extend 'switch [/default]) function [f [frame!]] [
    do f else (f/default)
]
 
11:03 PM
^-- this would be contingent on the new plan that frames do not expire their parameters after execution has finished. Here we see another benefit: ENCLOSE isn't as hard to write when you want to do something with the input values if you are certain the function you are enclosing isn't going to change the values that were input. (Not any kind of guarantee in Rebol...)
Here you would be safe--because the when the extended switch runs the original switch, it doesn't know about default, so it wouldn't (or at least shouldn't) be reading or writing it.
But by and large, you really should still cache anything you want to use after the DO of the frame; because there's no promise the function didn't treat its arguments as scratch space while it ran.
 

« first day (3250 days earlier)      last day (530 days later) »