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

World: r3wp

[!REBOL3-OLD1]

BrianH
10-Apr-2009
[13180]
Not as quickly, and those work on blocks, not objects.
Pekr
10-Apr-2009
[13181]
then object should be a series :-)
BrianH
10-Apr-2009
[13182x5]
Resolve is good for assignment of values in objects to other objects 
without them having to be in the same order or even have all the 
same fields. If anything, it makes objects even *less* series-like 
than they were before :)
RESOLVE is *fast*, even in the R2 mezzanine version, much faster 
than the typical ugly loop it replaces.
Here's the R2 version of RESOLVE:

resolve: funco [
	"Set known values in target from those given by the source."
	target [object! port!]
	source [object! port!]
	/only from [block!] "Only set words listed here (exports)"
][

 set/any bind either only [bind/copy from] [words-of source] target 
 get/any source
	also target set [source target] none
]
I think. The /only changes are still being tested. Here's the pre-/only 
version:

resolve: funco [
	"Set known values in target from those given by the source."
	target [object! port!]
	source [object! port!]
][
	set/any bind words-of source target get/any source
	also target set [source target] none
]
It took a lot of thought to get that code so small :)
Pekr
10-Apr-2009
[13187]
It takes a lot of thought in order to understand the code (for me) 
:-)
BrianH
10-Apr-2009
[13188x5]
Darn, /only doesn't work there. I was trying to come up with it on 
the fly and I failed, miserably :(
The version without /only works perfectly.
It works in R3 of course. I just haven't had the time to backport 
the changes in the last 9 alphas (in two weeks) to R2-Forward yet..
Sorry, 10 alphas in 2 weeks :)
Two alphas yesterday evening alone - that's my kind of release pace 
:)
Pekr
10-Apr-2009
[13193]
What do you think of system object? It looks chaotic to me. It makes 
no sense for me to rename, or move stuff around.
BrianH
10-Apr-2009
[13194x2]
Oh, I love it. The old system object was chaotic. This one will be 
organized. We need this for memory protection and multitasking.
R2 works now, but it has a lot of design flaws and bugs we are fixing. 
That's why R3 is different than R2.
Pekr
10-Apr-2009
[13196]
I can understand. But I liked e.g. system/components, which listed 
internal modules. Now we have some stuff in codecs, some stuff in 
contexts, View is separate, etc.
BrianH
10-Apr-2009
[13197x2]
Think of modules as the new components, except you can write them 
in REBOL too. They even use the same Needs header.
Codecs are like port schemes, but for encoding and decoding. Different 
thing.
Pekr
10-Apr-2009
[13199x3]
So why is View separate, and not in Modules section?
... and  - what is Contexts?
btw - Codecs were moved away from Catalog, because Codecs will change. 
Where's the catalog/file-types placed now? (it will not be immutable 
too)
BrianH
10-Apr-2009
[13202x3]
SYSTEM/view is View settings - we'll have View modules too, in with 
the rest of the modules. We just haven't modularized the code yet 
- we needed to have modules first. The file-types setting is in system/options 
with the rest of the general system options.
As for system/contexts: Do you remember system/words ? We have more 
than one now. It's a module thing - separated contexts.
We need to have volatile settings separated from unchanging settings, 
becuase the unchanging stuff can be shared between tasks and the 
volatile stuff can't. And the hidden stuff can be tricky to access 
if you don't know what you're doing, so that is separate too. The 
new organization strategy makes sense. The only thing I miss is system/user/home, 
so we'll need a new place for that too - maybe system/options/user-home.
Pekr
10-Apr-2009
[13205]
I am thinking of a preferences system too. But that is not really 
a problem - user.r can be good place to place various settings. What 
we haven't solved or even thought about is - localisation. Messages 
and other stuff are hardwired into the system. I don't want to translate 
REBOL itself, but e.g. R2 does not allow easily callendar data being 
translated. Other thing is currency, flating number separator (for 
display purposes, etc.)
BrianH
10-Apr-2009
[13206]
The main thing you need system/user/home *for* is to know where to 
look for %user.r - it is not safe to look for it in the current directory, 
and not multi-user-friendly to load it from the same directory as 
%rebol.r. R2 is horribly broken in that.
Pekr
10-Apr-2009
[13207]
having user.r in current directory is really simplistic though ...
BrianH
10-Apr-2009
[13208]
And really BAD. It's a security hole.
Pekr
10-Apr-2009
[13209]
I hate those system specific ways where Windows put it into your 
profile /somewhere/shitty/really/terrible/brokenly/even/worse/than/linux/long/path 
...
BrianH
10-Apr-2009
[13210]
Oh, do you mean %USERPROFILE%, which is similar to %HOME% on Linux? 
It's the same either way, really.
Reichart
10-Apr-2009
[13211x2]
Perk, that is very funny.... thanks.
I so miss the Amiga's alias command...
Pekr
10-Apr-2009
[13213]
BrianH: yes, but I work in Total Commander, and I work with directories. 
I need to learn how to do some shortcuts, because going down that 
directories to locate some file is a pain :-)
BrianH
10-Apr-2009
[13214x2]
I use junction points on Windows all the time - it makes all sorts 
of things tolerable :)
Those work at the NTFS level, so Total Commander can use them.
Pekr
10-Apr-2009
[13216x2]
Hmm, there is maybe even something like Alias in Windows, no? At 
least in DOS there was some command .... but - never mind, I went 
off-topic here ...
BrianH: do we post R3 beta item list somewhere here in non web-public 
group, or we keep the link in Chat only?
BrianH
10-Apr-2009
[13218]
We're public now. If it is really important that it be quiet, use 
private chat here or in R3 chat.
Geomol
10-Apr-2009
[13219]
I think, you mean Amiga's ASSIGN command. It was a very clever feature.
Pekr
10-Apr-2009
[13220x2]
I will post in Links group, OK?
BrianH: what is outcome of read/text discussion? I did not like the 
proposition, because while text operations might be common, text 
is just format as any other is, so should be decoded using codecs 
(which can be chained). OTOH just yesterday I used read/lines. I 
use it very often for external formats, to parse in foreach loop. 
So - what will be the equivalent in R3? 1) 'read gives me a binary 
2) I convert to string 3) then I parse .... or 1) I use load 2) which 
does read it for me and converts to text using some codec ... but 
still - where is the place to turn it into line delimited mode? Will 
we have to use parse rules then, or where would you put something 
like /lines /with R2 equivalents?
BrianH
10-Apr-2009
[13222x2]
READ/text seems like a lock, sorry. You may think that text is just 
another data format, but it is the *most common* data format, and 
tends to be processed in large quantities. You say that codecs can 
be chained, but they currently can't - you can apply them one at 
a time, with all of the intermediate forms in memory at some point. 
If we do text the way you ask, then every load of text for processing 
will have the additional overhead of a full duplicate of the ram 
and two series moves, plus a few lines of code. READ/text is a shortcut 
that will save a *lot* of overhead during what may be REBOL's most 
common operation.
The /lines refinement of READ has been moved to the DELINE function 
- try that.
Pekr
10-Apr-2009
[13224x3]
I don't agree that text preloading would cause a duplicate. Are you 
trying to suggest, that codecs are such pigs, that they do first 
read the whole file, and then decode? Then the system is flawed, 
because what you do with the 9GB video then?
BrianH - the thing is, that I don't like exceptions ... :-) ... but 
I can understand, if some exception covers some 80% of usage cases. 
REBOL is not about purity, but about practical aproach. But I still 
don't believe in the explanation you provided :-) and btw - Carl 
said, that codecs should be chainable, so hopefully it comes?
I thought that text (the same as jpg, video, whatever format) will 
be loaded in chunks needed to identify the format (codec responsibility), 
so I really don't understand, why text should be twice in memory?
Steeve
10-Apr-2009
[13227x2]
So, no way to open a codec as port to inject chunked data ?
So, no further streaming in Rebol again...
Pekr
10-Apr-2009
[13229]
Steeve - I posted read/text follow-up to codec Chat section. I really 
don't like it. I added even your question about ports. I think, that 
Carl is trying to make his life easier =  give me some whole C code 
for particular format, I will pack it with REBOL via tiny interface.