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

World: r3wp

[Rebol School] Rebol School

Gregg
11-Aug-2011
[3736]
make-csv: func [block] [rejoin delimit copy block #","]
Endo
12-Aug-2011
[3737x2]
Nice indeed.
Here is improved version of mine:

merge: func [
	"Merge a block using a delimiter. Default is coma."
	b [block!] "Block to merge."
	/with c [char! string!] "Delimiter char or string."
	/local t r
] [
	r: make string! 64
	c: any [c ","]
	parse reduce b [some [t: any-type! (
		append r join first t either tail? next t [""][c]
	)]]
	r
]
>> merge [a "x" 234 '*]
== "5,x,234,*"
>> merge/with [a "x" 234 '*] ":"
== "5:x:234:*"
>> merge/with [a "x" 234 '*] "---"
== "5---x---234---*"


Benchmark results are almost same with Gregg's. Executing the function 
for 1 million times take 16, 17 second for both on my machine, core 
2 duo, 2.8 Ghz, xp pro.
sqlab
12-Aug-2011
[3739]
since many years I use this function from  Andrew from time to time
rejoin: func [ 
    "Reduces and joins a block of values." 
    block [block!] "Values to reduce and join" 
    /with string; [ string! ] 
][ 
    if empty? block: reduce block [return block] 

    if with [ block: next block forskip block 2 [ insert block string 
    ] ] 
    block: head block 
    append either series? first block [copy first block] [ 
        form first block] next block 
]
Awi
12-Aug-2011
[3740]
This is all great, many thanks!
Marco
20-Aug-2011
[3741]
Is it possible to "copy" a face?

I want to open a window with some gadgets, the user modifies them 
but then I want to restore the previous situation.
This does not work:

win: layout [slider 100x20]
win-copy: make win []
view win
win: make win-copy []
view win


If you move the slider in the first window it appears the same in 
the second.
Any hint? Thanks in advance.
Henrik
20-Aug-2011
[3742]
better or easier to simply layout the same layout twice.
Sunanda
20-Aug-2011
[3743]
Would using multiple layouts and subpanels do what you are looking 
for?
   http://www.rebol.com/how-to/subpanels.html
Gregg
20-Aug-2011
[3744]
When you call LAYOUT, REBOL interprets the VID spec and creates face 
objects. Faces are nested objects. If you do some expermenting in 
the console, with making objects that contain nested objects, then 
making other objects from those, it may help. The SAME? function 
is very handy when comparing  objects and blocks as well.
Marco
21-Aug-2011
[3745]
The things are a bit more complicated. The situation is this:

win-copy: copy/deep win: [
	slider 100x20 across
	btn "ok" [win-copy: make win [] hide-popup]
	btn "Cancel" [win: make win-copy [] hide-popup]
]
win: layout win
win-copy: layout win-copy
view layout [btn "second win" [inform win]]


When the user presses ok the win layout should be copied to the win-copy 
face,

when the user presses Cancel the win-copy layout should be copied 
to the win face

so when the user presses ok it appears the previous modified layout,

when the user presses cancel it appears the previous layout but unmodified.

Obviously I could copy the faces values but in my application there 
are a lot
of gadgets and this would be a more general and simple solution.
Henrik
21-Aug-2011
[3746]
I'm not sure I understand entirely. Are you simply trying to store 
the face values?
shadwolf
21-Aug-2011
[3747x7]
rebol school without a proper documentation on parse how futile is 
that ?
first properlt explain n parse from nothing to makedoc pro level 
parse then you will have a cahnce to stand as a rebol school
you guys talk big but act low and it's your responsability to proove 
me wrong with FACTS with documents
how is it that rebgui brought the shit out of me and that RMA just 
 let me unsensible  ?
yeah you try to avoid this conversation cause it doesn't suits you 
be please do the effort lower your godess self to my level and have 
a proper discussion I let you live for the  past year with humm  
the less possible of my hate and ranting so  now be man anough to 
face my full power
and be aware I'm not this noob around I' m a ten year contributor 
 of rebol bringing stuff I was the only one to bring  sone how I 
managed to get myself  helped this has to be acknoleged liek the 
fact that now  in day the only rebol dicionary in french is due  
to me
I  LOVE REBOL I  AM COMITED TO REBOL  AND IT MAKES ME SUFFER THE 
SITUATION WE ARE IN ... rebol is suich a great work that even his 
author ran far from it how sensless is that ?
Marco
21-Aug-2011
[3754]
@Henrik If you move the sli
shadwolf
21-Aug-2011
[3755x3]
you all forgot about the basic rebol = carl  no carl no rebol that 
it  .. why commenting r3 mopre than r2 and if we comment r2 can we 
do it forgetting about rebplug rebservices rebplug etc ?
rebcode ?
rebconsole  rebol/desktop ? can you say to me serriously thar the 
actual r3 isn't even on part to r2/core ?
Marco
21-Aug-2011
[3758]
@Henrik If you move the slider and press ok and then re-open the 
window it should be where you left it.

If you move it and press Cancel it should return to its previous 
value. (In my program I have lots os sliders).

So it would be better to store the entire object and copy it rather 
then store a lot of faces values.
shadwolf
21-Aug-2011
[3759x3]
and if you dare say so .... as I'm not a ne chicken around I wiukd 
ask ytou why there is no viva'-rebol in r3 and why there is no cheyenne! 
based on r3
not talking on SQL  protocol since you guys just don't care
don't you see all you do is endless talking about thing that don't 
mean a thing ? who cares if r3 split splits ,,, carl is gone  for 
mounth now And I won't let you rest until you take some position 
and  do something
Henrik
21-Aug-2011
[3762]
Marco, that is problematic, as copying face objects may destroy certain 
bindings in a face, essentially causing faces to be "entangled", 
some functions work only with the old face and some only with the 
new face. It depends on the style and how it was written. Memory, 
speed and complexity of the operation gets worse, the bigger the 
layout.


It's easier to just generate the face once, store the values and 
use GET-FACE and SET-FACE on the layout.
shadwolf
21-Aug-2011
[3763x2]
actually you do like carl wasn't missing and you all  dream of a 
better world
yeah ignore me like you ignored the thousand telling you that rebol 
lacked  implication and commitement 
in the end those are right
Henrik
21-Aug-2011
[3765]
store the values and use GET-FACE and SET-FACE

 - more accurately, "store and retrieve the values using GET-FACE 
 and SET-FACE".
shadwolf
21-Aug-2011
[3766x3]
who cares henrik get face set face who cares there is no r3gui
and r2 VID we went as far as we could on  it and it ended to be bugged 
 reason why we started 5 years ago  r3
so yeah you can endlessly talk about r2  ... a product that was abandoned 
by it's author to do r3 ... and he abandoned r3 too ....
Henrik
21-Aug-2011
[3769]
Marco, the one thing that VID then doesn't do so well is allow groups 
of faces to be SET-FACEd and GET-FACEd easily, which is probably 
what scared you. The VID Extension Kit solves this by allowing these 
functions to work on entire layouts.
shadwolf
21-Aug-2011
[3770x2]
we all knew that  carl lackled commitement toward r3 those missing 
phased where even at first called "Carl's cave thinking process" 
all those years you lied to us
and he lied to us .. he never gived enough  work to rebol to make 
rebol something big and you as a community acknoledged it and played 
that game
Marco
21-Aug-2011
[3772]
@shadwolf I didn't know about viva rebol. I knew about areatc because 
I found it somewere I can't recall.

Why don't you upload it to rebol.org so other can benefit from it. 
I personally will download and start examining it
to learn thing expecially the menu bar ;)
shadwolf
21-Aug-2011
[3773x2]
rebol is all about carl's working 2 moth for it his ass off and letting 
the rest of the year pass by  unfortunatly for the people her  2 
moth of of carl's work is worthwhile
marco I'm sad but not surprise you don't know about me ... who will 
tell you about who I Am ? HENRIK ? Robert Muünch  ? do robert münch 
the all mighty RMA guru told you I was the only one in betting on 
his MAkje doc Pro dialect when everyone else was considering him 
as a  spinoff project of carl's MAke doc ?
Marco
21-Aug-2011
[3775]
@shadwolf Why don't you upload viva rebol to rebol.org so others 
can benefit from it ?
shadwolf
21-Aug-2011
[3776x4]
do robert told you that in that era  (6 years ago) his make doc pro 
was one of the many spin off project  around carl ?  do robert tells 
you that slapping me  steeve and ashley on their face by totally 
ignoring rebgui  to do r3gui  wasn't the brightesdt idea ?
marco cause I don't want to support a stupid rebol.org that make 
me a pain to submit my creation and trust me I really tryed ard to 
make this sucker of sunanda understand thsi point ...
since 2004 rebol.org not changed a bit
HOW can I support that we are  just  SEVEN YEARS LATER !!! what was 
 hum a fault of youth in 2004 is just a stupid lack of work and comitement 
in 2011 and to tell yopu the truth rebol.org  was done as response 
of french commity script sharing tool I PRESEN TED  IN REBOL DAYS
Marco
21-Aug-2011
[3780]
@shadwolf I am new to the rebol "scene". Why is it a pain to submit 
a script?
shadwolf
21-Aug-2011
[3781x3]
this is the  main thing here ...  lots of bunch  orf rebol world 
were entrusted to us the rebol comunity and we  just wasted it !!! 
have you ever seen sunanda  asking for help  ? have you ever seen 
RMA asking for help ?  have you seen my  viva-rebol page ? don't 
I ask for help ?! do that help  is granted so far ?! look the people 
realy helping me on area-tc where maxime and steeve and steeve wrote 
the mote of the code I was just he lucky dumb ass to show the way 
and I assume it
but htis community just do like I don't exist like my10 years of 
work for rebol was nothing and I should be down with that without 
a word ?!
@marco rebol is not worth carl time how can it be worth you time 
?!
Marco
21-Aug-2011
[3784]
@shadwolf Fortunatly I don't use rebol for earning money. If so I 
probably will think similar to you.
Why is it a pain to submit a script?
shadwolf
21-Aug-2011
[3785]
I was one of te  main contributor to RebGUI I was the one that  convinced 
ashley to do rebgui .... in fact here is how it went after a rebolday 
in paris france I ended talking with some in the time french gurus 
and then told me what is a core truth .... the strong point of rebol 
is VID  but VID isn't suited enought to stand on par with other products 
like wxwindows QT GTK+ or win 32