World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Maxim 17-Oct-2009 [19039] | did you post this to curecode? carl will definitely give aheads up on the issue quickly. |
Steeve 17-Oct-2009 [19040x2] | (Arghh !!! Stupid busy Altme, it lost my note again) |
Not a bug | |
Maxim 17-Oct-2009 [19042] | why is this not a bug? |
Steeve 17-Oct-2009 [19043x2] | it's an willing change of the design from Carl, long time ago. It's not recent. |
but he never explained such change, IIRC | |
Maxim 17-Oct-2009 [19045] | posting it to curecode is a good way for him to see that a change isn't beneficial in real world use. he will comment it there, and it will be usefull as a reference for further users... I did a search for reduce on curecode, found a few things... but since curecode serves as a reference, this would be a good place to put your grievance. |
Steeve 17-Oct-2009 [19046] | IIRC, it's to optimize the dialect's parsers using the function DELECT |
Maxim 17-Oct-2009 [19047x2] | all changes are well explained in curecode tickets when people complain about them. |
some tickets have VERY in-depth explanations of R3 quirks wrt R2. this would be a good addition... cause it surely will come up again. | |
Steeve 17-Oct-2009 [19049] | but i would rather prefer, a special reduce function for his dialects, instead of enforcing us with such drawback |
Maxim 17-Oct-2009 [19050] | suggest your preference. as I said... curecode tickets are all handled seriously. I'll second your grievance if you put it up there. |
Steeve 17-Oct-2009 [19051] | I must first calm down :) |
Maxim 17-Oct-2009 [19052] | hahaha |
Steeve 17-Oct-2009 [19053x2] | See, why i can't remplace reduce by compose. I use such rule to parse draw blocks >> box: [ 'box origin destination] when i use this rule, it's auto intialising the variables origin and destination. The interesting thing is that, when i change the content of the variables somewhere else in my code, i can revert back the content of the draw block, just doing a: >> reduce ['box origin destination] You see, i use the same block of defintion to parse and change-back a draw block. |
i try to do bi-directional parser, if i can name it like that... | |
Maxim 17-Oct-2009 [19055] | ah nice idea :-) |
BrianH 17-Oct-2009 [19056] | It is beneficial for real-world use, because it makes the length of the block returned by REDUCE predictable. REDUCE [ three expressions ] should return a block of length 3. A *lot* of code depends on this in R3. If you want unset to go away, use COMPOSE or REMOVE-EACH. |
Gabriele 18-Oct-2009 [19057] | where do you see R2 removing unset! in reduce? |
Steeve 18-Oct-2009 [19058x3] | Arghh, It appears that I was arguing about a very old feature |
I am not yet adapted to this change | |
I want a reduce/clean refinement T_T | |
Chris 18-Oct-2009 [19061] | Will map! have a literal notation? |
BrianH 18-Oct-2009 [19062x4] | You can use the serialized notation with map!, but it won't otherwise have literal syntax. |
#[map! [a: 1]] | |
Afaik, we don't have any characters left that can be used for delimiters to surround some kind of literal value. [], (), <>, and {} are taken. | |
We don't want to go the Perl 6 route and start using Unicode symbols :( | |
Maxim 18-Oct-2009 [19066x2] | but a prefix can be used to identify the delimiters, its already done by rebol in a few case... there surely is a combination left. |
but the serialized notation isn't that bad in any case | |
Steeve 18-Oct-2009 [19068x3] | yep, interesting notation, and underused. |
>> mold/all reduce [next 'a/b] == "[#[path! [a b] 2]]" >> mold/all reduce [next [a b] ] == "[#[block! [a b] 2]]" | |
A serialized serie keeps his index, not bad -) | |
Maxim 18-Oct-2009 [19071] | yep. |
Steeve 18-Oct-2009 [19072] | Missing something till now. The sharing of same series is lost when they are serialized. They are duplicated instead. There is missing some internal unique surrogate in the serialized format of a serie. It's why RIF can't be realized until now, i guess... |
Maxim 18-Oct-2009 [19073x3] | yep that is a limitation. it would be easy to implement on top of it... because there is an explcit serialized form right in the language. |
something like #[string! 1: "hahaha" 3] #[string! :1 5] | |
they key being valid within one load session. | |
Steeve 18-Oct-2009 [19076x2] | yep, something like this |
it would be a big num, so a binary surrogate would be a better choice (more compact). #[string! "hahaha" 3 #FF00FF00] #[string! #FF00FF00 5 #FF00FF00] | |
Maxim 18-Oct-2009 [19078] | we could even use this within source code, so that when it loads an application, shared strings are pre-linked without needing to do init code. |
Steeve 18-Oct-2009 [19079x2] | In all cases, it will be a wast of space for all the small series. |
I mean in the source | |
Maxim 18-Oct-2009 [19081] | but mold/ doesn't have to add surrogates if they aren't being shared. The internals have reference counters to data, so it alerady knows if a value is shared. |
Steeve 18-Oct-2009 [19082] | you're right |
Maxim 18-Oct-2009 [19083] | it could even go a step further and check if the shared serie is used in the block of code being molded, but that would hamper speed a little bit... a /compact refinement could be used to switch this extra verification. |
Steeve 18-Oct-2009 [19084] | perhaps... |
Maxim 18-Oct-2009 [19085] | it sounds like an easy thing for carl to implement... it only modifies a very small subset of natives. |
Steeve 18-Oct-2009 [19086] | don't know :-) |
Paul 18-Oct-2009 [19087x2] | Would be cool if REBOL interpreter could generate some form of symbol file for encapped scripts. |
Not the interpreter per say but the REBOL encapsulator. | |
older newer | first last |