• 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
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 33401 end: 33500]

world-name: r3wp

Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public]
JosDuchIt:
22-May-2011
Everytime i change the Master's password from "pass" to a more robust 
password, i am not able any more to vist the newly created World.

I think i followed the  AltMe guidelines and tried sequentially new 
worlds till i got a message that  i had reached a creation limit.

I did sent to AltMe a message asking to delete those failed worlds 
and explaining as here, what happened.Till now no answer;
Any idea what i am doing wrong?
JosDuchIt:
22-May-2011
Next question then. How do i get tot the first messages of a group?
GrahamC:
22-May-2011
each client syncs on connection to download all the messages ... 
which could take quite a while
GrahamC:
22-May-2011
to see the first message you have to either use a 3rd party message 
browser ... or set your messages to a high number eg. 10,000 but 
that will slow everything down.
JosDuchIt:
22-May-2011
Seems i have a settings of 800
Looks OK to me.    
What 3d party browsers do exist?
todun:
4-Oct-2011
how can I remove the newline from the end of a file I wrote to? thanks.
MikeL:
5-Oct-2011
todun - read http://www.rebol.com/docs/core23/rebolcore-6.htmlIt 
shows you how to handle a series.   Getting to the End, backing up 
a character, and removing it might work.   If you just want to remove 
the last character you can always do that in one simple line.  Remember 
to save the full series from the head.    If you are not sure the 
last character is a LF then you need to add a test ... still in the 
same line if you want to scrunch it.
todun:
5-Oct-2011
How can I make a file containing a tokens on each line be displayed 
one at a time in an info field(ie not modfiable, just readable) on 
the view when I click a button?
todun:
5-Oct-2011
is there a way to make the ALTME push my message to you guys without 
having to do "CNTRL + S" all the time?
Henrik:
5-Oct-2011
you can disable the pencil icon, then it allows you to simply press 
return. but then you can only send one line of text at a time, which 
may not be practical.
todun:
5-Oct-2011
is the ! a special character in rebol?  For isntance I come across 
an example where it is used to define a varaibel like so.....model!: 
context [...]
todun:
5-Oct-2011
does using the ! have any significant meaning or it's just a choice 
of variable naming?
Geomol:
5-Oct-2011
Yeah, if I didn't put the : in front, it would look up, what NOT 
means, found it to be a function taking one argument and give an 
error, because the argument isn't there. With :not, it takes the 
value of NOT without evaluating it, and that's the function itself.

>> !: not
** Script Error: not is missing its value argument
Geomol:
5-Oct-2011
:not is called a get-word! datatype. You get same result as normal 
words for most datatypes, like

>> a: 42
== 42
>> b: :a
== 42

That would be the same as writing:

>> b: a
== 42

But for functions, operators and such, get-words are useful.
todun:
5-Oct-2011
@Geomol, I mean that for non-integer values(functions etc), using 
the get-word! datatype seems to pass a function into a variable.
Geomol:
5-Oct-2011
Well, I'm not sure, exactly what you mean, but in REBOL you don't 
have keywords. Functions, operators and such are often referenced 
by words. So NOT is just a word like ! can be a word. I just defined 
! to mean the same as the NOT word.

You can redefine everything in REBOL.
todun:
5-Oct-2011
Geomol, Ok. That makes sense. What I mean perhaps is not neccessary 
in this context where everything is a word.
Izkata:
5-Oct-2011
Linux copy/paste:


To copy from AltME to somewhere else, right-clicking on a URL will 
copy it to the clipboard, right clicking on text will copy the entire 
thing to the clipboard, or highlighting it and pressing CTRL + C 
will copy it to the clipboard.  To paste it somewhere else, use the 
middle mouse button.


To go from somewhere else to AltME, highlight the text (which automatically 
copies it), then in AltME press CTRL + V


It's confusing because AltME accesses the X clipboard, and uses CTRL+C/CTRL+V 
to do so, while traditionally the X clipboard is just highlight to 
copy/middle-click to paste.  CTRL+C/CTRL+V elsewhere on linux accesses 
a different clipboard
todun:
8-Oct-2011
It seems that a list is always considered to begin at the head, regardless 
of the sublist you are dealign with. Is there a way to ensure that 
when you specify a sub-list you are always in a sub-list?
Henrik:
8-Oct-2011
if by modification you mean, moved index, then simply:

>>b: next a: [a b c]
== [b c]
>> same? b a
== false
>> head? b
== false
>> head? a
== true
>> same? head b a
== true
>> a/2: 'y
>> a
== [a y c]
>> b
== [y c]


The word "modified" is usually used when changing something in the 
series, except for the index. It's important to know when a function 
modifies a series or not, as you then will have to copy it first, 
if you don't want the original series modified.
Henrik:
8-Oct-2011
is SWAP a pseudo function or a real one?
todun:
8-Oct-2011
@Henrik, not a  problem. You've been helpful, by helping :D
Henrik:
8-Oct-2011
yes, it's the same list, because SWAP does not modify the index, 
only the content. you will probably need to use AT in a separate 
operation afterwards to move the index to the desired position.
Henrik:
8-Oct-2011
because AT does not store the new index. it works like this:

>> a: [a b c]
>> index? a
== 1
>> index? next a
== 2
>> index? a
== 1
>> index? a: next a ; stores new index
== 2
>> index? a
== 2
Sunanda:
8-Oct-2011
SWAP ... AT should work in R3.

Are you on R2 or R3 -- SWAP exists only in R3 .... Though it is easy 
to write a version for R2.
Henrik:
8-Oct-2011
so, todun, the general mechanism is that you can store a new index 
of a series, by simply by first move the index and storing the series 
under the same word again:

a: at a 4

This works for BACK, NEXT, AT, SKIP, HEAD, TAIL.

The series will not be modified or copied.


Note that when you COPY, COPY will only copy from the current index 
and forward.


If your index is not at head, HEAD is useful to temporarily reference 
the series from the head, like if you use AT several times in a loop 
or something:

at head a 4
Sunanda:
8-Oct-2011
Okay -- then you do have SWAP.....That's a start :)
todun:
8-Oct-2011
@Henrik: better still, can I just send you a pastebin linke
Henrik:
8-Oct-2011
do you have a cards.txt file?
Henrik:
8-Oct-2011
yes, thanks. gives a better idea of the stored data.
todun:
8-Oct-2011
oh...I'm actually using that as is based on a suggestion I got on 
here.
Henrik:
8-Oct-2011
so, the user clicks "Show Question" to see a question. then he clicks 
"Show answer" to see if he's correct?
todun:
8-Oct-2011
that'll be wonderful. I've been banging my head on these issues for 
over a week.
todun:
8-Oct-2011
....to move the current question to a forward location in the pool 
of questions becasue the user doesn't have the answer yet.
Henrik:
8-Oct-2011
is there a particular reason that you split the questions and answers 
in separate files?
todun:
8-Oct-2011
since I was new to rebol/view and vid, I didn't know of a better 
way to make two streams of data, one going to questions and another 
to asnwers. The prospect of updating two sides of the same list seemed 
confusing to me hence my split.
Henrik:
8-Oct-2011
ok. I think in general you will have an easier time not doing this 
split. Instead you can work on using the card data directly. Then, 
what you would save, would be a REBOL formatted copy of those card 
data. I think this will simplify your program.


you are already taking advantage of reading the cards with READ/LINES. 
when you parse that data, you can turn it into a record with two 
elements in each, the question and the answer. then by using SAVE/ALL, 
you can directly save this as your questions and answers, in the 
custom order that the user likes.
Henrik:
8-Oct-2011
there is a typo in line 54: quesiton-list.txt
Henrik:
8-Oct-2011
it simply writes a new file, so the code is syntactically correct.
Henrik:
8-Oct-2011
as for my writing above, an approach would be to load the cards file 
and parse it into a format that is comfortable to work with in REBOL.
Henrik:
8-Oct-2011
here is a cheap console version:

http://pastebin.com/K9w9BEQ1


it does not work entirely the same as yours, but you can use it for 
inspiration. just ask, if there is something that you don't understand.
todun:
8-Oct-2011
I get the following error and haven't a clue what is wrong. What 
normally causes this? Thanks.
todun:
9-Oct-2011
Is there a standard list of  what goes into the block following the 
REBOL flag? I'm thinking javadocs here. Thanks.
Henrik:
9-Oct-2011
todun, I would work on learning about the design of REBOL, since 
this is one of the primary features; It's generally well designed, 
very deep and ignores conventions of other languages in that it was 
not designed to be a "satellite language" for java or some such. 
It was developed on its own merits by a person who is very difficult 
to outsmart. I've used it for a decade and there are still concepts 
in it that are beyond my intellectual reach. Once you get the basic 
design, the rest comes on its own.
Henrik:
9-Oct-2011
todun, also, the structure of the program that you wrote hopefully 
shows that it requires a bit of discipline in organizing REBOL code, 
as it can be extremely free form, and it can be a little frustrating 
around generating VID code, because there is a lot going on in that 
type of code. So learning what the LAYOUT function does, (it simply 
generates a tree of objects, that's all), helps you to handle layout 
data with more confidence.


I didn't write the console version through some kind of convention 
(other than basic formatting), but by knowing how to organize data 
sensibly in REBOL for the needs of the program and how simple it 
is to store and retrieve that from disk. There are dozens of ways 
that program could have been written, each equally as valid as the 
other.
todun:
9-Oct-2011
@Henrik, thanks for hte advice. How do I go about learning about 
the design of REBOL without going through specification manuals? 
Did you have a resource in mind?
todun:
9-Oct-2011
@Henrik, for seem reason I always get the second item in the next 
block. Using the same notation is there a way of getting the second 
item in the current block(head)?
todun:
9-Oct-2011
@Henrik, I do need to do a next in the button so that whenever the 
button is pressed, the next question comes up. Is there a way of 
 "holding" the list so it doesn't move around while I try to modify 
it?
todun:
9-Oct-2011
@Sunanda,  the tutorial helped me figure out a solution. I made a 
temporary variable to hold the current series then used "back". Then 
simply read the new series.
todun:
9-Oct-2011
Is there a way of making the name of a file the header of the view?
todun:
9-Oct-2011
For instance, in the REBOL block, the Title will be displayed as 
the title of the layout view. Is there a way to make this title be 
the name of the file read in the program?
Henrik:
9-Oct-2011
the FORM converts the file! to a string!.
todun:
10-Oct-2011
Is it possible to update a series outside of the button that triggers 
it? I run into the problem whereby my series is being prematurely 
updated.
Henrik:
10-Oct-2011
With VID, each action should not be run, unless you are passing some 
kind of event to a face. you are probably describing your actions 
in blocks in VID, like this:

button "hello" [do stuff here]


it should not do anything outside it, unless you have set up a timer 
(which I doubt) or a FEEL (which I'm not sure you have learned yet), 
so there is probably something wrong in the action code that is run 
as you click your button.
Henrik:
10-Oct-2011
you could also be running into a copy trap, which makes it look like 
your blocks are changed by some unknown source.
Henrik:
10-Oct-2011
maybe there is a timeout on pastes
todun:
10-Oct-2011
the display shows a  series that didn't change
Henrik:
10-Oct-2011
result-answer/text: " "
show result-answer


This will assign a new string to the TEXT facet of the RESULT-ANSWER 
face. What to be careful of here is that every time you pass that 
bit in the code, it is the exact same string (same memory location) 
and not a new string that gets assigned. That means that if something 
is put in there from another location, that memory location will 
no longer be empty, and the content will be shown in RESULT-ANSWER.
Henrik:
10-Oct-2011
which is a clever way for not needing to assign a word to a block 
to use it, even just temporarily.
Henrik:
10-Oct-2011
so, if you type:




in the console, a string is really made. you don't need to assign 
it. you just have no way to reach it by reference, so it's now left 
in "oblivion" until the garbage collector picks it up.
Pekr:
10-Oct-2011
todun -  I am not a good programmer, so difficult to say :-) But 
- many ppl get into some gotchas, when using REBOL. Btw - do you 
know, that subobjects (objects inside objects) are shared?
todun:
10-Oct-2011
@Pekr, I'm actually a new programmer myself. But I didn't start with 
REBOL thus my confusion.
Pekr:
10-Oct-2011
>> person: context [name: copy "" address: context [street: copy 
""]]
>> a: make person [name: "petr"]
>> probe a
make object! [
    name: "petr"
    address: make object! [
        street: ""
    ]
]
>> b: make person [name: "henrik"]
>> a/address/street: "petr's street"
== "petr's street"
>> probe a
make object! [
    name: "petr"
    address: make object! [
        street: "petr's street"
    ]
]
>> probe b
make object! [
    name: "henrik"
    address: make object! [
        street: "petr's street"
    ]
]
Pekr:
10-Oct-2011
I mean - when you have a prototype object, which uses subobjects, 
those are shared between the clones ...
todun:
10-Oct-2011
@Pekr, in this context, what is a prototype object?
Henrik:
10-Oct-2011
contexts... also a deep topic. objects in rebol are contexts. there 
are not really prototypes as any object can act as one.
todun:
10-Oct-2011
@Henrik, I still am not sure what prototypes are. So REBOL uses a 
different structure called a CONTEXT and not an OBJECT?
Henrik:
10-Oct-2011
Some object oriented programming languages use specially notated 
prototype objects, from which other objects can be created. REBOL 
does not. You simply have objects. Prototypes here would be only 
a concept that you use as a part of your program to discern a "mother" 
object from other objects.
Pekr:
10-Oct-2011
Following document might be a bit dated, but it still contains some 
usefull explanation of REBOL core concepts ... http://www.rebol.com/docs/core23/rebolcore.html
Henrik:
10-Oct-2011
it's simpler than one might think:

if you have two objects, one made from the other:

a: make object! [num: 5]
b: make a [num: 7]


if you do this without showing this part to another person, that 
person can't tell which object came first, only that two objects, 
A and B exist in memory. so there are no real prototypes.
Kaj:
10-Oct-2011
Henrik, I have to object. REBOL is prototype based. Any REBOL object/context 
is a prototype
todun:
11-Oct-2011
Going back to my flash cards problem for instance, which I still 
cannot make work, if I wanted to just apply knowledge on series and 
VIEW to design this, how can I fix it (pastebin) and/or re-wrie this? 
I'm really curious to know if there is a design pattern and or way 
to go about thinking or doing REBOL coding. Thanks.
Kaj:
11-Oct-2011
Implementing a design, you'll be doing series manipulations all the 
time
DideC:
12-Oct-2011
Could you also Pastebin a sample of  %temp-cards.txt so we can test 
the code to see in action what you want it do do ?
todun:
15-Oct-2011
@DideC: sure thing. I'll pastebin a sample of the temp-cards.
james_nak:
15-Oct-2011
todun - thanks for posting your code. You know, I never knew there 
was a "move" function. in R2.
james_nak:
15-Oct-2011
Todun, just some of my thoughts. I think you are changing the order 
of the cards ito indicate the difficulty of a question. When you 
are saving the %temp-cards.txt, you are at a particular position 
in your series because of the  "qa: next qa"  so when you save/all 
it is saving the series from the current position to the end. If 
you want to save the whole series, you can add  "head qa" which will 
bring the pointer back to the first  item for the save but leave 
your pointer at the current question.
It may help to do some simple tests:
>> a: [1 2 3 4 5 6 7 8 9 10]
== [1 2 3 4 5 6 7 8 9 10]
>> a: next a
== [2 3 4 5 6 7 8 9 10]
>> save %test.txt a
>> read %test.txt
== "2 3 4 5 6 7 8 9 10"
>> save %test.txt head a
>> read %test.txt
== "1 2 3 4 5 6 7 8 9 10"
 move/to a 5
== [6 7 8 9 10]
>> save %test.txt head a
>> read %test.txt
== "1 3 4 5 2 6 7 8 9 10"

etc. 


Also I like to add "probe" as in "probe qa" to different places in 
my code so I can see what is happening internally as I do stuff.


Finally, might I suggest that you actually approach the issue in 
a different way altogether? You can have a block that  has some metadata 
in it so that a question's difficulty can be assessed by other means 
such the word "hard" or some number such as 1 = easy and 10 = hard, 
for example. And allong with that you could keep track of how many 
times the person missed the question.
[ 1 "California"  "Sacramento"  1  1  0  1 ]

where the block above refers to  [ index Question  Answer  difficulty 
 Attempts Wrong Correct]

There's a lot more work to do this but if you can then search for 
the difficult questions, etc. Your program would control the order 
of the questions based on some filter such as difficulty, attempts. 
The user could just mark a question as difficult.

Anyway, just a thought.  I don't want to make your life hard and 
I need to go back to my own mess I started. I am in block-o-rama 
myself.
Duke:
23-Oct-2011
Sorry about the previous msg - still getting used to Altme :o

I'm taking the examples right from the URL in my previous msg. Is 
there a simple and bullet-proof way to enter the code at the REBOL 
console?
Henrik:
23-Oct-2011
When developing scripts, I like to use my favourite editor and hook 
up REBOL to a keyboard shortcut, which is a nice and quick way to 
study longer REBOL scripts.
Duke:
24-Oct-2011
@Izkata I see that! Thanks. My problem was that CORE's "line continuation" 
symbol - [ - was confusing me. Is there a way to change that to another 
symbol? I was getting it mixed up with the code's own [ and ].
Pekr:
24-Oct-2011
So let's say, that we have kind of Windows REBOL registry in here 
:-) A system structure, you can access to get some configuration, 
etc.
Pekr:
24-Oct-2011
in fact, we have two continuation chars, [, and {, and both make 
sense - the first one is the continuation of a program, or a block, 
the secong one is for a multiple line string
Ladislav:
24-Oct-2011
This is a misunderstandin, Duke. #"[" is not a "line continuation" 
symbol
Duke:
24-Oct-2011
@Ladislav I don't understand what you mean? I might have used the 
wrong terminology - sure! MY corcern is that IF I had a choice, I 
would NOT want to see a { symbol at the beginning of a multi-line 
REBOL snippet, entered at the console. So how does what your advise 
above relate to MY concern?? :)
Duke:
24-Oct-2011
@Sunanda  I see! So the "[" character is simply a hint. Wouldn't 
it have been more intuitive to have used the "]" char - to indicate 
that an open '"[" needs to be closed?? I'm glad that the LISP REPL 
doesn't do this - not the ones that i use anyway :)) But thanks! 
 You've cleared things up a bit....
Ladislav:
24-Oct-2011
The REBOL console is trying to be helpful in indicating that at least 
one 

]" or "}" needs to be supplied to complete an expression." - yes, 
and that is where I wanted to point out, that there is no "line continuation 
symbol", since what is going on is not that the interpreter encountered 
a "line continuation symbol" (it did not), but that it expect you 
to close the open block
Ladislav:
24-Oct-2011
I would NOT want to see a { symbol at the beginning of a multi-line 
REBOL snippet, entered at the console.
 - that is easy
Duke:
24-Oct-2011
@Ladislav Thanks for clearing that up!  At the moment, I'm simply 
reading http://www.rebol.com/docs/words/wswitch.htmland trying out 
the snippets to do 2 things:
1. Learn to use the REBOL console
2. Learn REBOL syntax etc


Entering those multiline snippets is what was a problem - until now. 
The console prints a "[" after each CR. For a noob, this chars looks 
and feel just like the ones IN the code. :))
Sunanda:
24-Oct-2011
here's a cheap'n'cheerful console replacement that concatenates an 
expression until it reads a blank line. Then it executes it. (Two 
blank lines to exit).

Feel free to change the console prompt characters.

my-con: func [
  /local
   in-line
   in-buff
   err
][
forever [
    in-buff: copy ""
    in-line: copy ""
    forever [ 
      in-line: ask "In > "
      if in-line = "" [break]
      append in-buff join " " in-line
      ]
 if in-buff = "" [break]
 err: none
 if error? err: try [print ["Out > " do in-buff] true] [
    print ["Oops > " mold disarm err]
    ]
 ]
 exit
]
Duke:
24-Oct-2011
@Ladislav  [quote]do read clipboard://[/quote]


I see! I'm on a Linux Xubuntu box - so I just highlight the text, 
and then right-click paste it into the REBOL console. I get to "see" 
the code, then the results, after a CR. Your method works OK, but 
all I get is the results -- don't seem like "a full meal deal" :)) 
Thanks ...
Duke:
24-Oct-2011
@Sunanda  Works like a HOT DAMN!!  Thanks! BTW, the command history 
still works after the result is printed - so a person can go back 
and re-do everything, and fix errors.
Duke:
25-Oct-2011
This code:

val: 123
switch type?/word [
    integer! [print "it's integer"]
    decimal! [print "it's decimal"]
    date! [print "it's a date"]


produces an error msg in v2.7.8 Is it R3 speciffic? It is from the 
R3 docs, but it seemed fairly generic to me.
Sunanda:
25-Oct-2011
Looks like you are missing:

-- val after type?/word -- so REBOL knows which word's type  you 
are switching on
-- a closing ]
No idea why R3 is happy with that. This works for R2:

val: 123
switch type?/word val [
    integer! [print "it's integer"]
    decimal! [print "it's decimal"]
    date! [print "it's a date"]
   ]
Duke:
25-Oct-2011
I just did a "Help type? at the console, and got:

TYPE? value /word


Does this output not seem counter-intuitive to you guys? Especially 
when the syntax is:

TYPE?/word/ value   ; I used the / char to indicate an option


This tells me that the type? word is followed by an optional refinement, 
but always needs a "value" - in that order. The console help output 
seems to have it reversed. What do you think?
Endo:
25-Oct-2011
All the refinements are optional, it's a bit confusing for a beginner 
but otherwise it will be more confusing. Try:  help find

There are lots of refinement. HELP shows the normal usage and then 
the optional refinements and their arguments.
Henrik:
25-Oct-2011
Duke, refinements can have arguments as well, so the order as shown 
in the help is exactly the same as when you define a function header.
Henrik:
25-Oct-2011
Refinements are options, sometimes used in twos or threes, and the 
disadvantage here is that the argument list then can become hard 
to read. It's a good skill to create functions without too many refinements. 
I personally consider refinements to be one of the less stellar parts 
of REBOL.
Henrik:
25-Oct-2011
A refinement is latched onto a function, so that you know that the 
refinement is part of that function. Hence, you must type out the 
function name, followed directly by the refinement without spacing. 
Then you type the function arguments and after that, the refinement 
arguments.
Endo:
25-Oct-2011
The arguments has the same order with refinements after the non-optional 
arguments:

with a function that requires 2 arguments and have 2 refinements 
should be used as:


myfunc/ref1/ref2 arg1-to-func arg2-to-func arg-to-ref1 arg-to-ref2
Duke:
25-Oct-2011
@Henrik  Thanks for the examples ..

@Endo     That's what I needed - a definitive HOWTO.  IMHO, the Help 
system should be worded that way as well, in order to sync with actual 
usage
33401 / 6460812345...333334[335] 336337...643644645646647