• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp1023
r3wp10555
total:11578

results window for this page: [start: 5601 end: 5700]

world-name: r3wp

Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public]
mhinson:
15-May-2009
Hi, I am after some advice on creating a data structure please.
I read data from my file in this sort of order.
disabled
2/34
2/35

vlan 3
2/35
2/48

vlan 5
2/3
2/24

name
2/1 name one
2/35 second name

Then I want to export it in this sort of format.
port <tab> disabled <tab> vlan <tab> name 
2/1                                  name one
2/3                        5
2/24       disabled
2/34                       5
2/35       disabled        3         second name
2/48                       3


I am hoping that I can create a structure that mimics the data its 
self.
maybe like
data/2/35/disabled = "disabled"
data/2/35/vlan = "3"
data/2/35/name = "second name"


Then some how use the input data to define what part of the structure 
the item is recorded in.

Once I have it in a structure like this I am expecting it to be simple 
to enumerate each part to do my export.
mhinson:
15-May-2009
That looks exactly the structure I had in mind, but how do I get 
the data into the right part of the structure?
if I have data of   3 2/1 & I know it refers to a vlan.
I will have up to about 1500 of these for each file
Geomol:
15-May-2009
You can also do it without using PARSE, if that's too much to start 
with. Read the input as lines with READ/LINES
A line could then be:

line: "vlan 3"

And you can pick the parts with something like:

>> copy/part line find line " "
== "vlan"
>> next find line " "
== "3"


Using PARSE is the elegant way to do it, but can be a bit tricky, 
until you've used it a few times.
mhinson:
15-May-2009
I have done this
template: make object! [
i2: reduce [[vlan 0][disabled " "][name " "]]

i1: reduce [[i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2]]

data: reduce [[i1][i1][i1][i1][i1][i1][i1][i1][i1][i1][i1][i1][i1]]
]
record: make template []

 probe record/data/13/48  returns none ol
but >> probe record/data/13/48/vlan
** Script Error: Cannot use path on none! value

do I need to do somthing to make it construct deeper levels?
sqlab:
15-May-2009
I did not follow exactly your intentions,
am I correct, you want to get a structure with 4 qualities?

Then why you do not add for every line you are parsing your 4 elements:
either with 
append data reduce [port disabled vlan name]
or with
append/only data reduce  [port disabled vlan name]
?
sqlab:
15-May-2009
maybe I still do not get what you want to do.(
mhinson:
15-May-2009
if I have this
mike: array/initial 3 array/initial 3 array/initial 3 none
modAndPort: "2/2"
UpState: 2
data: "disabled"

How do I use the variables to create this logic please
mike/2/2/:UpState: data

mike/ModAndPort/:UpState: data

Something like this I was hoping
mike/(ModAndPort)/:UpState: data
** Script Error: Invalid path value: 2/2
BrianH:
15-May-2009
I don't know, Maxim. We have to do better about that in future R2 
releases.
Maxim:
15-May-2009
every single day (and often a few times that day):

- I open up a rebol console from quick-launch bar in windows (taking 
about 0.1 sec to appear)
- type help 'some-func 
- test the 'some-func with some-data I'm using. 
- close the console.  


overall it takes about a few seconds, to do a unit test of something 
I'm adding.
 no bloat,  no dangling window.

python offers something similar... but:
- python takes anywhere from 3-10 secs on load.  

- then you have to know in what lib the most basic function is (alread 
half as usefull) 
- the console itself is really bad, 
- previous commands browsing is really stupid

- having to type so much more code to get the simplest function test 
going is a pain
- in the end, its a non-feature.
Henrik:
15-May-2009
nah, it's just that Carl has secretly figured out how to do random 
compression.
mhinson:
15-May-2009
is there a neat trick to do this with less verbosity please ?
a: first parse {1/2} "/"  
b: second parse {1/2} "/"
Maxim:
15-May-2009
in any case, I do think carl does not want rebol to become an include 
festival.
Steeve:
15-May-2009
but managing them well is the job of the programmer, we can do dirty 
design with modules too, having them now don't prevent us to do trashes
Maxim:
15-May-2009
this is a serious flaw in R2... if you want to store encryption keys 
within an application and want to provide some sort of plugin interface, 
you are pretty much fucked... people can rip your application appart, 
and there is nothing you can do about it...


a part creating a dialect, which is complicated as hell if you want 
to provide do-like syntax.
BrianH:
15-May-2009
It also makes it easier to copy-run the examples. If you have a rebol 
[] header in front of your code, you can copy it and do clipboard://
Sunanda:
16-May-2009
It would be simple to add the ability to execute a script embedded 
in the REBOL.org archive of this world, eg:
do http://www.rebol.org/aga-execute-post.r?post=r3wp174x26

Provided the post (like the one in the example) consists solely of 
script. Headers can be added if needed.

Is this a common need?
mhinson:
16-May-2009
Something I have learnt today...

I have been looking again at some of the examples I have been given 
here & now I have a bit more understanding of Rebol I am able to 
reformat the examples into multiple lines and indent them appropiatly 
which makes them more understandable for a noob like me. I needed 
enough understanding to see where one complete statement part ended 
& the next one began before I could do this. What I have learnt is 
that I should have tried harder, sooner to do this & it would have 
speeded up my learning...


I am looking at graphics today & giving parse a break for the rest 
of the weekend.
Henrik:
16-May-2009
Then there is also DRAW, which is another engine used in conjunction 
with View. In REBOL 2 it works as a slap-on solution to more complex 
drawing with anti-aliasing, etc. It also has a separate font rendering 
engine, but DRAW is close to useless for layout. It's best for pretty 
drawings, that do very little.


REBOL 2 generally suffers here with multiple overlapping solutions 
for slightly different purposes, so it can be a bit confusing. View 
and VID is probably the most hacked part of REBOL.


In REBOL 3, DRAW is the only engine combined with the concept of 
GOBs: Light weight graphical objects. There are now 3 wholly separate 
parts and that concept is much less confusing.
mhinson:
16-May-2009
I have studied all the information about VID that I can find, for 
2 hours mostly trying to find out how to use a slider that is shown 
horizontaly, rather than verticaly but I cant find where this is 
described.  Have deliberatly not asked how I do this because I want 
to learn how to find the answers to these sorts of questions myself.. 
Without telling me the answer directly, can anyone suggest how I 
should learn to find this information for myself please?
mhinson:
17-May-2009
Hi, I have read the recomended http://www.rebol.com/docs/view-guide.html
 so I have an idea of some of the stuff to expect from VID, but as 
soon as I try to do anything not explicity shown in that document 
I find my understanding is really very thin & flimsy. This is an 
example of me failing to get the results I expected. Perhaps there 
is just one basic step I have omitted that is messing everything 
else up?  Any tips would be welcome & appreciated, but dont miss 
a Sunday snooze on my account please :-)
mmm: layout [

 space 0x0         ;; thought this would make items touch each other. 
 dosnt work?
	my-sldr1: slider 300x10 [print "1 clicked"]  ; ok
	my-sldr2: slider 300x10 [print "2 clicked"]  ; ok

 space 1x1         ;; thought this would make items 1 pixel further 
 apart. dosnt work
	my-sldr3: slider 300x10 [print "3 clicked"]  ; ok
	name1: text "Inital text" 100x30             ; ok

 button "Change text" [name1/text: "Text now changed"  show name1] 
  ; ok

 button "Cente" [my-sldr2/size: 100x40 show mmm]  ;; this breaks, 
 but does make a change

 my-sldr1/step: 25             ;; imagined this did soemthing, but 
 cant see or guess what, seems to break the lat button

    my-sldr3/edge/color: blue     ;; this works but also applies its 
    self to the last button
	my-sldr3/dragger/color: red   ;; doesnt seem to work 
]

view mmm   ;; ok

? mmm      ;; shows components of object, reference for what they 
all mean is not available
? my-sldr1 ;; again guessing what they do is frustrating 

probe my-sldr1 ;; I know what the parts are but cant guess which 
ones work or what they do.
Henrik:
17-May-2009
When altering a facet of a face, it must be shown before the change 
can be seen.


This is a little complicated to explain: You have chosen to resize 
a slider, which is a face with subfaces. Thus if you resize a slider, 
you need to access its internal resize function, in order for it 
to properly resize the knob as well. if you alter the size of a face 
like above, you are literally only altering the size of the outer 
face of the slider. VID does not know what you are trying to do there.


BUT: Given it's incompleteness, SLIDER does not have an internal 
resize function. :-) This is not intentional, and you've stepped 
into the mud here. This is one of the most lacking parts of VID, 
in that when the layout is set up, it can be laborious to change. 
Fortunately there are unofficial solutions to that, so I suggest 
you don't bother with this and try something else.

Alternatively, try working a bit with RebGUI.
mhinson:
17-May-2009
Resizing a slider is on reflection a fairly odd thing to want to 
do, and I was only doing it because "size" was the first thing I 
came across that sounded straight forward to do to test my understanding. 


On reflection, I think that it is unlikely for me to grasp much of 
what can be done with VID until it gets a makeover with the documentation. 
Perhaps I could contribute to the documentation on the Wiki by listing 
all the items that can be changed for slider & then discovering what 
each one does by trial & error.  would this be helpfull, or just 
cause another job for someone to delete it in favor of a master plan?
Maxim:
17-May-2009
there is also glayout, which works very out of the box and is built 
over VID.  the api isn't document though.


you can look at the glayout-demo app on rebol.org so have an idea 
of all it can do.  it layout engine is very complete, and seems like 
the basis for how R3 was implemented... they use the same philosophy.


glayout handles ALL resizing automatically, and it even includes 
real scrollpanes, which react to content, as it changes (scrollbars 
resize automatically, for example)
mhinson:
17-May-2009
how do I get to the r3 console please?  I just get a dos type box 
with a >> prompt.
mhinson:
17-May-2009
I have to format the code in indented blocks to not lose track of 
what I am trying to do. Sorry to be so lame.
mhinson:
18-May-2009
I have found an example for R3 here  (about the only one I could 
spot so far)

http://rebol.net/wiki/Script_Writing_With_The_Visual_Interface_Dialect

It looks quite nice with rounded corners to the buttons too.

The example crashes when you try to exit so I suppose there is lots 
to do before this is ready for general use. I know how long developmnet 
cycles can take so I won't be holding my breath :-)    


I suspect the R2 functions built in will do more than enough for 
what I want & that I just need stick with one thing till I can understand 
it enough to know what it will do & what its limitations are. 


I showed my parsing project ot a work coleague & he suggested some 
additional data that it should colect, he was very impressed when 
I implimented his suggestion & tested it all in under 3 minutes.
mhinson:
21-May-2009
Hi, I am puzzling over this and would really appreciate some pointers 
please.  How do I get from this:
d1: "random1"
d2: "data2"

;;to this?
b1: [random1 ["data2"]]

so I can reference the data2 by its association with random1 e.g.
b1/random1/1
mhinson:
21-May-2009
I think I need to learn more before I can use this to the effect 
I need.   I was expecting your construct to all me to do this:
foreach [key val] b1 [print b1/:val/1]
BrianH:
21-May-2009
I don't get what you want to do. Perhaps some sample data and the 
desired output?
mhinson:
21-May-2009
Thank you very much for you time & help.  I will need a while to 
digest this & make it work with my existing code.

I think this type of structure is going to be the core of most of 
the data extraction I need to do, so I must get to understand it 
very well. I have a section that uses an array, but some of the more 
interesting data manipulation needs to cope with more varied keys. 
Thanks.
BrianH:
21-May-2009
This a pretty standard way for REBOL to do lightweight data structures. 
Blocks are lighter-weight than objects. Enjoy :)
mhinson:
22-May-2009
I know I could put "" values in when I create the structure, but 
I wondered if the was a neater way to do this.
Henrik:
22-May-2009
I like to do things like:

any [attempt [this/leads/nowhere] "Unknown"]
mhinson:
22-May-2009
I cant work out how to turn that into a function, because if I do
att: func [paf][any [attempt [paf] ""]]
att this/leads/nowhere 

the invalid path returns an error before it can be passed to the 
function.   I bet there is a good answer. I have been looking at 
using :paf, but that makes it return the invalid path
mhinson:
22-May-2009
Thanks Steeve, I will try not to post here any more unless I am invited. 
 I have enjoyed trying to learn Rebol & will continue, but I do understand 
that my constant questions are an anoyance, and I dont want to be 
banned from this very usefull forum. :-(
Maxim:
22-May-2009
people usually stop asking basic questions when they don't need to. 
  some people learn quick, some learn slow, some have a lot of catching 
up to do.. there are many reasons for someone not to *get* rebol 
from the bat.
Steeve:
22-May-2009
Well, have someone answered to the mhinson's question ? 

What is the worst ?

- Having some doubts, even rude words (meaning i want to know you)
- Or apathy (do what you want, i don't care)
Gregg:
23-May-2009
Mike, by all means keep asking questions here, this is absolutely 
the right place to do so.


Conversing in plain text can be tough, and the rate at which people 
can respond here--as opposed to email--can contribute to misundertandings, 
with posts coming fast and furious. And we all interact in slightly 
different ways.
mhinson:
23-May-2009
Thanks Brian, I am afraid I didn't manage to solve this without your 
explicit example. "do" seems like a powerfull function that I have 
minunderstood. I have created a similar solution using lit-path! 
as well (just to learn).
Henrik:
23-May-2009
mhinson has just not yet learned, how to learn a programming language. 
I've noticed that by his stumbling on every little bit of basics, 
such as lit-path and why it doesn't make sense to him, because he 
can't extrapolate how it works inside a function.

mhinson,


REBOL, like any other programming language, is a system. It's a design 
with intentions, methods and patterns and it's designer has spent 
about 25 years thinking out how REBOL should work, in order for you 
to see the elegance and simplicity of the system.


A good programmer can predict what happens in a programming language 
with a specific piece of code, not by remembering what every little 
single thing does, but by knowing how the system behaves. If you 
study the works of Ladislav (such as Bindology), you'll see how much 
time he spends on figuring out the system of REBOL. REBOL wasn't 
put together randomly. Figure out the system of REBOL and programming 
becomes way, way easier. This goes for any programming language.


It helps to, when you get to a problem, to try to figure out why 
REBOL does this and that, while you're trying to figure out how to 
solve the problem. Why do you have to pass a lit-path to a function 
for it to be understood as a path in the function?
mhinson:
23-May-2009
You are right Henrik, even the programming I have done years ago 
was based on learning a set of tricks that worked in the context 
I needed, then sticking to those tricks for everything.  I can see 
that Rebol demands to be taken more seriously & I also appreciate 
the potential for "elegance and simplicity". I ride a unicycle & 
part of the appeal there is also the enjoyment of minimalism, no 
chain, no gears, no freewheel etc.


My understanding of "the system of REBOL" is about 5% I think & I 
feel like I haven't grasped enough of it yet to make my understanding 
move forward efficiently. I am just at the start of passing data 
to functions & because REBOL seems to automatically typecast a lot 
of data, it has not been in my mind that I may have to do it manually 
in some cases, but now I know that, I still can't predict which cases 
yet. 


With the lit-path! and path! data passing I understand that the invalid 
path I want to test must not be evaluated before it gets into the 
ATTEMPT section of the code, so I would expect to need to pass the 
data in a literal form I suppose (or as a string perhaps). One of 
the conclusions I am drawing from the example given is that I can 
pass this thing called a literal (I don't fully grasp what that is 
yet) but receive it in the function as a path! so it would seem that 
the passing of data to the function is also doing a type conversion.. 
At that point I don't know how the path! is not evaluated enough 
to cause an error.  If I search the core manual for "type conversion" 
it has only one mention, & not in this context. This is the sort 
of thing I do a lot to try & understand without asking too many questions, 
but my techniques must be flawed as I often fail to find anything 
relevant. (This isn't intended to be a question, just a picture of 
the muddle inside my mind).


Now I will read Bindology & hope that my understanding will be transformed. 
 Thanks again for all the help.
BrianH:
23-May-2009
There are two types that get evaluated to get the value ther refer 
to and DO them: word! a and path! a/b.


If you want to just get the referred to value and not DO it you use 
get-word! :a, and in R3 get-path! :a/b, or in R2 a more complex expression 
that depends on the type of what a refers to.


If you want to set a new value you use a set-word! a: or a set-path! 
a/b: - this will evaluate as a SET expression.


If you want a literal word or path, you use a lit-word! 'a or a lit-path! 
'a/b. When a lit-word! 'a evaluates, it returns the corresponding 
word! a, not the value assigned to a. You can then pass the resulting 
word! value around, assign it to stuff, and maybe DO it later.


That lit-word! 'paf formal parameter in the first version of ATT 
that I posted blocks evaluation of the actual argument. It is treating 
the actual argument path! as a value, rather than evaluating it. 
In the second version of ATT the formal parameter is specified  with 
a regular word! paf, so the actual argument is evaluated normally. 
In order to get a path! value you have to use a lit-path! 'a/b and 
let it evaluate to get the corresponding path! a/b.
Henrik:
24-May-2009
So if you are in a situation where you have the unbound or incorrectly 
bound word 'b, BIND will allow you to change its context:

>> do [b]
** Script Error: b has no value
** Near: b

; no context above, so we bind:

>> do bind [b] c
== 9


This allows you also to refer to words inside a specific context 
without path notation.
mhinson:
24-May-2009
I think I have understood what it is that has been preventing me 
from understanding BIND.

I was expecting BIND to make a persistant difference to the contexts, 
but now I have realised that is not the case, it only acts as a function 
to return information when it is called.  That was a tough one to 
fight through.   However, now I understand Henrik's example, but 
the example in the manual still confuses me.  
words: [a b c]

    fun: func [a b c][print bind words 'a]  ;; why is this not  ... print 
    bind words 'a 'b 'c]

Does this mean that bind causes fun to be joined to the context of 
words, for all the variables used in the words context? 

I think I am also still confused about which direction the context 
moves.  Sorry to be asking again, but I do want to understand this 
completely. In Henrik's example it seems to be "do b in the context 
of c" but in the manual example it seems more like "print words (which 
in the global context ) as if the context variables of words had 
been assigned the values of the current context....  I am off to 
bed now to sleep on it.   Thanks.
mhinson:
25-May-2009
I think I need to work on something that is chalanging, but that 
I can do without resorting to too much guessing.
mhinson:
27-May-2009
Hi, I am back to learning by guesswork I am afraid :-(    I am trying 
to do something like this
animal: "fish"  breed: "trout"
creature: reduce[to-word animal [type reduce[breed]]]
But I want the result to be 

[fish [named ["trout"]]]              what do I need to learn about 
to understand why reduce dosn't behave how I want it too please?
mhinson:
30-May-2009
Thanks Chris.  There are several things I have learnt from this: 
 COPY has more varied use than I was aware of. In this case I think 
COPY is making sure I am adding a unique empty block, rather than 
a link to this one.


I still cant quite get my head round an empty block being something 
that can be referenced again later, although I know I have read about 
it previously & know it is important.

Why do I not seem to need COPY in my following example?
StructuredData: copy []
thing: copy "toy"
append StructuredData reduce[to-word thing[]]
owner: copy "child"

append StructuredData/(to-word thing) compose/deep [owner[(owner)]]

thing: copy "house"
append StructuredData reduce[to-word thing[]]
owner: copy "adult"

append StructuredData/(to-word thing) compose/deep [owner[(owner)]]

probe StructuredData
[toy [owner ["child"]] house [owner ["adult"]]]
Chris:
30-May-2009
mh: In the case above, when you were using 'reduce, you were evaluating 
the first block, in which the second block is just a value.  When 
you evaluate a block value, it is not in turn evaluated:

	>> [i'm not code]
	== [i'm not code]

It's important to remember when you do some deeper evaluation:

	>> code: [[]]  ; block containing a block value
	== [[]]
	>> append code/1 'a  ; modify block value
	== [a]

 >> result: do code  ; evaluate block, block value returned - now 
 referenced by 'result
	== [a]
	>> append code/1 'b  ; modify block value
	== [a b]
	>> result  ; result is referencing the same value
	== [a b]
	>> append result 'c
	== [a b c]
	>> code
	== [[a b c]]


Every value in REBOL is merely referenced to by the language.  Sometimes 
explicitly:

	result: []
	probe result

Or not:

	code: [[]]
	probe code/1

Or both:

	code: [[]]
	result: code/1
	probe same? code/1 result
mhinson:
31-May-2009
;Thanks Izkata, I predicted the outcome correctly. I went on to try 
this:
D: [{bar}]                                        ;; global D
foo1: func [D][D: [] print mold append D {d}]     ;; 
foo2: func [D][D: [] print mold append D {d}]     ;; 
foo1 D  ;; value of global D passed to function (but not used)

foo1 D  ;; function references its own local value of [] to which 
it keep appending {d}
foo2 D  ;; same as foo1 but references its own [] ?pointer? thing
D       ;; still references un changed global D

foo1: func [D][D: [] print mold append D {d}]   ;; rewriting foo1 

foo1 D                                          ;; new foo1 function 
has new [] pointer

foo3: func [][D: [] print mold append D {d}]    ;; D is not passed 
to the function

Foo3          ;; now we are changing global D and making it reference 
foo3 [] pointer 
D             ;; proof global D has changed

;; I think the bit that was making it hard for me to understand was 
that 

;; referencing the same empty block in a function means the actual 
exact function, 

;; a second copy of it even with the same name, sets up a new local 
pointer. And also the unexpected localness confused me.


;; Question, do my comments show that my understanding is now correct 
please?
mhinson:
31-May-2009
Those lines I posted still do strange stuff with a single ;  at the 
beginning.  Could it be a bug with the console?  I do 2 ;; to make 
them stand out more, although syntax highliting does that already. 
Thanks.
Sunanda:
1-Jun-2009
A tip I picked up off of the Mailing List years ago (thanks to whoever 
it was)
   doc: does [do clipboard]
then you need to just type
  doc
to
  DO Clipboard://
mhinson:
3-Jun-2009
Hi, is thre a neater way to do this please an avoid so many reduce 
statements please?
QQ: []

func1: func [o1] [append QQ copy/deep reduce [reduce o1 reduce reduce 
[reduce o1]]]
owner: "Luke" 
func1 'owner
[owner ["Luke"]]
mhinson:
4-Jun-2009
With the shortcut  to do clipboard://  it complains if there is no 
 rebol[]   header.  Do folk only use it for bigger blocks of code, 
rather than a few lines that need testing?  As I suppose pasting 
it straight into the console for small chunks works pretty well? 
Thanks.
Sunanda:
13-Jun-2009
Use of 'return is partially a personal style issue. It is, literally, 
not needed if the last value your function handles is the one you 
want returned; in that case omiting the 'return can speed up a function 
considerably.


On the other hand, consider "literate programming" conventions: it 
can be polite to spell out the details so future code readers do 
not need to recapitulate your clevernesses just to work out what 
is returned......The code snippet below can return three separate 
things: spelling it out would help future generations!

    f: func [a b][
      either a > b [
          print a
         ][
         if a = b [b + 5]
        ]
     ]
Gregg:
14-Jun-2009
I take that back, I've messed up a couple times and created uncontrolled 
growth in the memoized data. You do have to watch out for that. :-)
Oldes:
15-Jun-2009
instead of:
any [ do[a: 1 false] ]
why not to use just:
any [ (a: 1 false) ]
mhinson:
15-Jun-2009
That is interesting Oldes.  I thought I tried something like that, 
but now I see I must have been confused about what the () do.

so does the ANY cause the () to evaluate its contents?  If I just 
put [(true)] it is not evaluated, but all[(true)] is.   Then again 
to-logic [(false)] is not evaluated. There must be a trick I am missing 
here I think.  Thanks,
mhinson:
17-Jun-2009
Hi, I have done a bit with fairly basic parse expressions, but I 
am now trying to understand more.

Am I right to think that ALL SOME & ANY are the only controls of 
this type?  Or am I missing another in the set?

Do ALL & ANY work in the parse dialect the same way that they do 
described above?  Thanks.
mhinson:
17-Jun-2009
I started looking at the R3 Gui too.  I am mostly intrested in drawing 
my own graphics on screen, controled by a bit of maths & trig, but 
with real-time interaction from sliders etc.  I suspect this is not 
the sort of thing that newbies are expected to do, but writing text 
in different fonts on coloured buttons dosn't do anything for me.. 

I am finding that using any part of Rebol makes it easier to understand 
the discussion here & get more in tune with what behaviour to expect.
mhinson:
17-Jun-2009
I have been working on my Parse understanding and came up with this:
parse/all {aX--baX~~a--aX~~} [some
  [
    "a" h: some[ 
      [ 
        ["--" :h copy result to "--" (print result) thru "a" h:]
        |["~~" :h copy result to "~~" (print result) thru "a" h:]
      ] |[skip]
    ]
  ]
]
I am extracting the text between "a" and either "--" or "~~" 

Is my method a reasonable aproach or is there a simpler or more readable 
way to do this sort of thing please?
mhinson:
20-Jun-2009
Looks like the instructions are written for someone who already knows 
how to use it...
- run the script  ## this dosn't seem to do anything

- Run the parse-analysis.r script and use the tokenise-parse function 
to get the base data.  ## dont understand what this means, tried 
a few things but they all give errors.

The example works, but I cant even see the parse expressions in it 
so I dont understand why it works or how to adapt it for my own example.

When I first looked at this in April I got quite frustrated because 
it looked as if it was there to help newbies learn about parse, but 
it was too hard for newbies to understand how to use... now I can 
at least understand how to run the example.  Thanks
Gregg:
21-Jun-2009
I often have trouble visualizing how things work, and I don't feel 
that I really understand something until I can do that.  With PARSE, 
even though it can be tedious and create volumes of output, it may 
help to write some simple grammars and have it print output for every 
rule. Have a probe at the start of the rule, and a probe if it's 
successful, nesting the output helps a lot too.


Don't get discouraged, it's not an easy thing to grok for a lot of 
people.
Izkata:
21-Jun-2009
The main thing I do is, at some point that happens a lot in the code, 
display the data.  Makes it easier to step through the code and do 
- in your head - what the code is doing.  If it suddenly doesn't 
match up, the loic somewhere was wrong.  For example, when working 
on the last one, I had to debug part of it and did this:

parse/all {aX--baX~~a--aX~~aXX~~} [                              
          

   some [                                                           
             

      ["a" S: (? S) some [E: ["--" | "~~"] (print copy/part S E) break 
      | skip] | skip] 
   ]
]
mhinson:
23-Jun-2009
I seem to be going backwards with learning this. Perhaps I think 
I know the grammer, but don't.

I am trying to write out long hand what I want to do, then convert 
it to a parse, but I dont have any words to describe how parse skips 
back to a previous point, so I cant write what I want to do long 
hand either..  e.g. gather the x in pairs from {fd doixx s x x x 
oie    x }

test for "x" or skip  then when x is found do the same thing but 
escape to the outside loop.   

If I could write the above in a format that made more sense I think 
I would have a better chance of then converting it to a parse.

test for "x" or skip seems to be   ["x" | skip]

doing it twice to get the x in pairs would seem like  ["x" | skip] 
["x" | skip] 

but that dosnt work because it lacks the loop control so I add that 
by a bit of guess work because I dont understand it properly.
parse/all data [some[["x" | skip] ["x" | skip]]]

but this is just completly wrong & I think the reason it is wrong 
is because I have completely misunderstood some or skip or | or where 
the point in the string the parse pointer gets to after each step.... 
 I have tried using OPT & break in the second section but just get 
more muddled.
mhinson:
23-Jun-2009
Thanks PeterWood. I like to think I am ok with the most basic concepts, 
so now I am trying to learn things that will help me some my real 
life probelms in a better way.  I use parse pretty much every day 
& always have a rebol console up on my work PC, but ANY SOME & OPT 
& |  I do not understand in context.  I understand them in abstract 
terms, but not how to apply them in conjuction with [] . I do understand 
your examples of some & any (these examples are usefull to me). skipping 
an un-known number of chars to get to the next match is the bit I 
find hard to understand how to construct, paticularly if it needs 
to be done in the context of a previous match.
mhinson:
4-Jul-2009
so does Rebol always reference the system/locale when printing a 
DATE! but only store the inteeger values?  or does it store the date 
in julian format & do more complex stuff to output even things like 
date/year
Gregg:
22-Dec-2009
Yeah, R2 isn't great for creating "slick" interfaces without the 
use of graphics. Use can draw text with anti-alias, but most scripts 
just do things the easy way.


The pencil icon is handy as well, so you can use ctrl+s to send. 
I imagine you've already done that, but for others listening in...
Fork:
23-Dec-2009
And my favorite is wiki.  Now here we are -- you want to recategorize. 
 How do you?
joannak:
26-Dec-2009
One thing that I noticed (an obviously *doh* moment) is that it's 
hard not to accidently start trying to reinvent the wheel with Rebol 
programs. There are so many excellent tools, utilities, and games 
allready made..  Question is more ofthem than not, where do I find 
whatīs been made, how well itīs been kept updates etc.?
Pekr:
26-Dec-2009
I did not tell that porting would be difficult, but I better try 
to tell ppl, that simple do %my-r2-script.r in R3 might not work 
right away ...
Ladislav:
26-Dec-2009
I bet, that it would be easy to port the old VID from R2, to R3, 
but it is unlikely, that anybody would want to do it.
Ladislav:
26-Dec-2009
To make you feel better: there are at least 20 proposals in the article 
I personally don't mind about (alternatives, that weren't chosen, 
as well as some keywords I do not plan to use).
Ladislav:
26-Dec-2009
The most recent Parse finding is probably CureCode #1401, which serves 
as a proof, that While is more "universal/fundamental" than Any (or 
Same), which may be found "crippled" in some situations, just because 
it "knows better than the user what to do" - I personally hate such 
software and am happy we convinced Carl to at least introduce the 
While keyword/operator.
Paul:
27-Dec-2009
The problem I do see with using REBOL3 is that you then need to use 
REBOL3.1 etc... as new versions come out.
joannak:
27-Dec-2009
I do admit I have not searched trough old posts (blogs, vikis, archives. 
whtever is available) to see if this is obviously an old issue (and 
not necessary to talk again?).
shadwolf:
27-Dec-2009
all the scrpts made accross the 10 last years usng REbl 2 wll then 
not be usable with R3 ... Ans this have been discussed lke 2  years 
ago when carl proposed to do a major verson upgrade that was wth 
the discuton arund the "Because no one knows it  do i change rebol's 
name ?". It was sad to say that rebol after 10  yeas was stll in 
the underground limbus....
BrianH:
3-Jan-2010
Joanna, the reason for that is that REBOL has 3 different types of 
function arguments, and they have different evaluation rules. If 
you want to know how an expression should evaluate you need to know 
what kind of argument it will be going into, if any. The first expression 
evaluated is the one that returns the function value, the a expression 
in your example. Once that expression is evaluated it no longer matters 
what is assigned to 'a, since the function to be called is now referenced 
by DO.
Graham:
3-Jan-2010
Awesome Stevee ... it will free up Brian to do other stuff
Reichart:
3-Jan-2010
I'm the co-founder of BIL (www.BILConference.com) , an open conference, 
the rule is "OPEN".  That simple.  Even from teh get go, my co-founders 
started trying to be "open" but controlling others.
It was really interesting... 



But, I STOOD STRONG on, let everyone do anything...  and... it worked, 
REALLY WELL.


That is not to say that as a group (mob) we did not "direct" people 
to help improve the s/n.
Gregg:
4-Jan-2010
Some things you don't notice from the inside, until you're on the 
outside again. In support of making things open: I've recently read 
up on a few technologies and, while their blog entries and such are 
very nice, there were a number of typos. I wanted to just correct 
these little things, but I can't. I can't help in a very small, controlled 
way without talking to someone first, setting up an account, getting 
permission of some kind, etc. And that's just too much trouble to 
do for more than a small number of sites. 


It will get better, and it shouldn't be too hard to have even simple 
rules to control anonymous edits, but right now things are often 
all-or-nothing.
Reichart:
4-Jan-2010
 To get back into noob level questions:
 


What is more noob than "is there documentation that explains things?"


Gregg, right, so in simple terms, REBOL is so small, and so much 
a clique... what do we have to lose by not just opening everything 
up? (Docs I mean).
BrianH:
4-Jan-2010
Assming you meant "what do we have to lose by just opening everything 
up?"
BrianH:
4-Jan-2010
Reichart, we have already answered the question of openness by providing 
both: One wiki that is open, for community management, and one wiki 
that is "official", for accuracy. You have to demonstrate a certain 
level of cluefulness to make changes to the official manual. We could 
modify the official wiki so that it links to the community wiki for 
comments, but history has proven that an open wiki can't be counted 
on to have a consistent structure, so we can't count on the pages 
we're linking to to be there. We may do that anyways, since it's 
a good idea (from you).
Fork:
9-Jan-2010
BrianH: Thanks (for above).  I do think that a wiki with only two 
people editing it is not quite going to demonstrate the potential.
YueM:
15-Jan-2010
hello does someone have a working script sample of a dsn less odbc 
connection script. I tried the example in the "database reference" 
page, but it doesn't work.

the dsn example works.  However  I need the dsn less to work for 
the piece of code I am trying to do.
NickA:
17-Jan-2010
Sunanda, your work on the web archive for AltME and the mailing list 
is fantastic.  A web based front end for _posting_ and reading messages 
to/from both would do wonders for REBOL community involvement and 
growth.  The Darknet really does keep us from having a larger community. 
 It's a shame :(   I created a little hack script a while back that 
would allow web based posting to the mail list, but no one seemed 
interested...  Having a web based forum which aggregates access to 
these two communication channels would do so much to help with promotion 
and community growth.  I'm 110% sure of that!  ...and rebol.org would 
be a great place for it :)
KeithM:
21-Jan-2010
I am new to Rebol and have been a lurker for a little while. I used 
R2 to do some work with HTML pages and was sold on its power and 
simple syntax.
KeithM:
21-Jan-2010
ok, good to know. For now, I will use R2 for some GUI work I need 
to do.
Henrik:
21-Jan-2010
Graham, I don't know. I personally don't have the time to delve into 
dealing with reverting those changes. It could take many hours to 
do.
joannak:
25-Jan-2010
For A) just pointing to someone who happen to have access..  Near 
start of the document   " it and report it in [CureCode]]. "  looks 
to me there is one braket missing..  


For the B... it was related to this Unicode-sorting problem.  After 
some digging I got the impression that Rebol uses Utf-8 as a internal 
string format even at runtime. It will make comparisions quite costly 
operations since the strings must be (at least as far as I can understand) 
be expanded to 16/32 bits/char before comparision.  I do assume this 
is well known (undocumented) issue and accepted tradeoff (trying 
to optimize size)?
Maxim:
25-Jan-2010
pekr, Carl has been doing the most important work on R2 for the last 
2 monts...  its a SINGLE huge task.   The web site is also part of 
R3 mission.  Carl has putting off the seb site for years, I am happy 
he decided to put a hold on things and "just do it".
Gabriele:
26-Jan-2010
as I said, whenever you do a change that requires the internal representation 
to change, the string is converted. So if you have the string "joannak", 
that is represented as the sequence of bits 6A6F616E6E616B internally. 
if you do something like insert string #"^(1000)", the internal representation 
becomes 1000006A006F0061006E006E0061006B (endianess issues aside).
Henrik:
15-Feb-2010
3.0 is not production ready at this point. Still under heavy development, 
so maybe just stick with 2.7.6. LIST-VIEW is untested under 2.7.7. 
I haven't had the time to test it (but please do, and tell me if 
it fails :-)).
jonty:
16-Jun-2010
OK, now I can start working on my real little problem I was trying 
to do in rebol.

In regards to that, is there a way to format days without resorting 
to 'pick'ing from blocks of day names etc?
Toma:
16-Jun-2010
so do they have functions that are abel to connect to phones or stuff 
like that?
Henrik:
16-Jun-2010
That depends if you have access to libraries that already do this. 
REBOL can't do this directly, but it may be possible through a DLL.
Toma:
16-Jun-2010
i wanted to do it in java first, but then some one told me about 
this language
Henrik:
16-Jun-2010
it's probably easier for you to do it in java, if you already know 
it.
Toma:
16-Jun-2010
thanks that was helpfull, o its actually possible to do it
Toma:
16-Jun-2010
i think i start tomorrow with the basics, i think i will be abel 
to do this with rebol
5601 / 1157812345...5556[57] 5859...112113114115116