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

World: r3wp

[!REBOL3-OLD1]

BrianH
13-Feb-2009
[11278x3]
Here's the R2 version of GATHER:

gather: func [

 "Get the values of a given field from all objects in a block that 
 have it."
	block [block!] "A block which may contain objects"
	word [word!] "The field to look for"

 /into "Insert into a buffer instead (returns position after insert)"
	output [series!] "The buffer series (modified)"
][
	unless output [output: make block length? block]
	foreach item block [all [
		object? get/any 'item
		in item word
		output: insert/only output get/any in item word
	]]
	either into [output] [head output]
]
Do you want a /deep option?
That will require switching to PARSE for speed.
Henrik
13-Feb-2009
[11281x2]
I don't think it's worth it.
for me it makes the most sense to gather values from a particular 
level.
BrianH
13-Feb-2009
[11283x2]
We can always add another CureCode wish for /deep if we need it. 
The current function is fast, so that's nice.
I marked the ticket as pending, with the particular submitted files 
that contain it.
Henrik
13-Feb-2009
[11285]
I think there is merit for a cookbook recipe which briefly describes 
a table of all block manipulation functions, or we have a way in 
HELP to relate these functions, so they become very visible to beginners. 
The problem is that beginners are not likely to be looking for them, 
because they don't expect them to be there. They were created by 
experienced users who have been coding REBOL for years.
BrianH
13-Feb-2009
[11286]
Breaking them up into modules will make it easier to understand - 
digestible chunks.
Janko
13-Feb-2009
[11287]
will there be something like mezz fold/reduce function for r3? I 
would use it a lot
BrianH
13-Feb-2009
[11288x5]
Fold is called ACCUMULATE - only functional languages call it fold.
ACCUMULATE is basically fold-left.
Would you need a /reverse option? ACCUMULATE is already almost as 
fast as we can make it in REBOL, and more options would slow it down. 
The only way we could speed it up more now is to fix an APPLY bug 
with op! functions.
Filter is called REMOVE-EACH in REBOL.
I apologize, ACCUMULATE is whichever version of fold that starts 
at the beginning and ends at the end of series (left? right?).
Janko
13-Feb-2009
[11293]
thanks Brian :) great ! I don't have any use cases where I would 
want accumulate/reverse so far
[unknown: 5]
13-Feb-2009
[11294]
This group needs more abstraction.  The group is turned into mainly 
an R3 mezzanine group.  Should we have a different group for that? 
 Originally, I thought this would be about how R3  is developing 
  more along the native level.
Pekr
13-Feb-2009
[11295x2]
I agree with Paul. This group served as general R3 info channel for 
those, who were not available to other altme R3 related private worlds. 
Now as we go more into details, I propose to set-up groups as needed: 
R3-mezzanine, R3-plugins, R3-whatever ... what do you think?
... untill there is GUI to DevBase, many ppl will prefer Altme channel 
for quite some time ...
[unknown: 5]
13-Feb-2009
[11297]
I think it is a good idea Pekr.
BrianH
13-Feb-2009
[11298]
I prefer to have such discussions in R3 chat. Having them here means 
more work for me, since most of the rest of the crew that knows the 
internals doesn't come here, so it ends up being up to me to answer.
Oldes
13-Feb-2009
[11299]
the rest of the crew
.. do you mean Carl or someone elseas well? :)
BrianH
13-Feb-2009
[11300]
Mostly Carl, though Gabriele and Cypher also work on the C-level 
stuff. I mostly know about the C stuff because I get involved with 
the discussions and remember them. Also many of the C-level changes 
to the core functions (not graphics or ports) were based on discussions 
I started.
Oldes
13-Feb-2009
[11301]
If the data from users R3's command are correct, Gabriele last logged 
in 31 days and Cyphre 7 days ago. Both were here today.. so it was 
not good example:)
BrianH
13-Feb-2009
[11302x3]
Yes, but they haven't been involved with the discussions that resulted 
in the core changes and new functions of the last year.
I was speaking on Gabriele's behalf dring that time because he was 
busy. Now he doesn't answer these questions here.
Unofficially, of course. He's still busy.
Oldes
13-Feb-2009
[11305]
I was just wondering, it there is someone else "who know the internals"... 
I know that Cyphre is waiting for new sources from Carl to do something. 
And of course it's good to have a place where one can write message 
to Carl and with a feeling, that Carl will read it one day.
BrianH
13-Feb-2009
[11306]
Right now Carl is busy getting things in place to get the source 
out. Then we can discuss native changes that *don't* affect core 
code. We have already been discussing native changes that *do* affect 
core code, here and in R3 chat, a lot lately :)
Henrik
13-Feb-2009
[11307]
comment on #632.
Jeannot
13-Feb-2009
[11308]
Maybe it os not the right place to ask this request, but I would 
like to know if I can get access to the sources for MediaWiki.  If 
it is yes, the next question is How can I get access.  Thx.
Claude
13-Feb-2009
[11309]
hi, i would like to know if carl have a rebol3-db for us within R3 
 like the very good rebDB http://www.dobeash.com/rebdb.html?
Pavel
13-Feb-2009
[11310x2]
Many of us is waiting for diskbased datastore proposed RIF, on this 
you can build any DB schema of your need, other solutions are walking 
this way VBS or Tretbase, but neither finished or general, Cals will 
have final step.
Rebdb is not diskbased, rather memorybased with possibility to read/save 
to disk, no paging etc, otherwise very good.
Claude
13-Feb-2009
[11312x2]
i think that carl need it for DevBase
until we have a odbc plugin. we need a good diskbased datastore in 
R3
Pavel
13-Feb-2009
[11314x2]
If you look inside devbase you can see kind of DB there, but finally 
it should be a Module with methods, or Protocol with functions both 
simple and for general use IMHO.
It is not problem of ODBC you can have it today in Rebol 2, even 
better use SQLite or MySQL layer you have at hand, but SQL is not 
the only solution
Claude
13-Feb-2009
[11316x2]
a good demo In My Humble Opinion, will be a CRUD example application 
full R3
that take avantage of all greats features of R3
Pavel
13-Feb-2009
[11318x2]
You can see frm discussion in this thread R3 need to be fixed first
From CRUD you have CRU nowadays
Graham
14-Feb-2009
[11320x4]
I've just been reading a little about something called Unobtrusive 
Javascript which aims to separate the behavior from the structure 
of html document.  


Doesn't VID suffer with the same problems where behavior is closely 
tied to the structure of the GUI?  And shouldn't we be looking at 
also solving this problem?
So  for instance from the wiki we have this

files: read %*.r

view/across [
    text-list files do [set-face ca read-string pick files value]
    ca: code-area
]
when maybe somet hing this is preferable

actions: [
	tl:.on-click [  [set-face ca read-string pick files value] ]
]

view/across [
    tl: text-list files 
    ca: code-area
]
ignore the double [[ ]]
Anton
15-Feb-2009
[11324]
Couldn't you do something like this, using compose?

actions: [

 my-text-list [set-face my-code-area read-string pick files value]
]

view compose/only [
	my-text-list: text-list files do (actions/my-text-list)
	my-code-area: code-area
]
Graham
15-Feb-2009
[11325x2]
And the same for every other possible event?
Sure ... but just looking at cleaner ways of doing this separation 
... getting rid of the 'do
Anton
15-Feb-2009
[11327]
It should be pretty easy to write a function that maps an ACTIONS 
block such as the following into a window:

	actions: [
		my-text-list [
			do [set-face ... ]
			"other-event" [ blah blah..]
		]
	]