r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

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
[19087x4]
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.
Even if we can't get that it would be cool to at least to get a some 
form of symbol file for the core.
Just think of how much more bugfixes could be made if that were the 
case.
Chris
18-Oct-2009
[19091]
The serialised would be acceptable, if that were the literal form 
too, instead of - make map! []


It's too bad there's no succinct way left to represent that (and 
objects for that matter)
BrianH
18-Oct-2009
[19092]
MOLD/all generates the serialized form, and LOAD reads it. You can 
even write the serialized form literally in your scripts. For map! 
there is no problem with using the serialized form. For objects and 
functions, you'll have binding issues.
Chris
19-Oct-2009
[19093x4]
I understand that, I use that notation in some work - it's just a 
case where Rebol notation is a little less economical.
I also understand that at a point, you have to say that it's good 
enough. I use Rebol a lot and at times think, it would be great if... 
Many times I get this with apparently trivial details - but then 
perhaps I overly obsess over details.
I do wonder if as the serialized notation used an almost valid Rebol 
sequence #[] (actually, that may well have been valid at one point?) 
you could take a similar approach with regard to maps?  ![] @[]
=[] |[] - not pretty, and perhaps not as graphically immediate as 
other types, but an improvement over make map! [] perhaps?
Sunanda
19-Oct-2009
[19097]
Stackoverflow question:

     >  Is it possible to know the script/object/function that is executing 
     ?
     > If not will this be possible in R3 ?
            http://stackoverflow.com/questions/1585603


I've given an R2-ish answer.....Perhaps R3 has a better way via stack, 
debug or other guru trick
Pekr
19-Oct-2009
[19098]
hehe, found-out Carl started to address bitsets, as new doc starts 
to appear here - http://www.rebol.com/r3/docs/datatypes/bitset.html
:-)

He also restructured a bit main R3 Doc page ....
Pekr
20-Oct-2009
[19099]
2.100.91: PARSE: adds DO and ACCEPT. Adds COMPLEMENT on bitsets (first 
draft.)
Henrik
20-Oct-2009
[19100]
Pekr, could you describe find/first?
Pekr
20-Oct-2009
[19101]
Yes, although I don't know much. You can find it in Carl's own priority 
list - http://rebol.com/r3/docs/project.html, described as - "FIND 
/first with list of targets", priority high. I do remember Carl planned 
to add it because of GUI? You simply want to check on multiple targets, 
and it returns first match ...
Henrik
20-Oct-2009
[19102]
I wonder if it has something to do with templates. Can't still see 
what exactly it does.
BrianH
20-Oct-2009
[19103x2]
Same a finding a charset, except it's a set of longer values than 
single characters. Position of the first in the set found returned.
Basically the same as PARSE TO multiple (and might use the same code).
Henrik
20-Oct-2009
[19105]
oh, so this would be possible:

find/first string ["steeve" "brian"]
== "steeve came first, brian came second"
BrianH
20-Oct-2009
[19106]
Yup. And like TO multiple, the alternative is exponential time and 
tricky to program.