
| # | User | Message | Date |
| 4644 | Gregg | Robert extended makedoc, but I'm not sure if this doc might build under RT's makedoc. Robert might say, but it sounds like it's on the web anyway. | Fri 18:16 |
| 4643 | Endo | Yes it is in there. You can find that document online in Robert's blog. | Fri 16:00 |
| 4642 | yubrshen | Actually, I guess the generated html may already be available to me: reb-excel-docs | Fri 0:24 |
| 4641 | yubrshen | Gregg, thanks!. Please the pointer on how to generate the html file from *.RDML, is through make-doc? | Fri 0:23 |
| 4640 | Gregg | I don't have Excel on this machine, so can't test. | Fri 0:00 |
| 4639 | Gregg | The DLL should go in the dir with your script or encapped app. RDML is plain text, but I can send you the html generated from it if you want. I don't remember doing anything for finding cells with contents. | Thu 23:59 |
| 4638 | yubrshen | I guess that this is of some documenation, how can I open it, reb-excel-docs.rdml? | Thu 22:53 |
| 4637 | yubrshen | Also to make the Excel Interface to work, I'm wondering, where I should put the DLL file? | Thu 22:52 |
| 4636 | yubrshen | Hi, I'm tring to use "Excel Interface" of Gregg Irwin, with documentation dated 18-Dec-2004. I'm wondering if there is any way to select a worksheet's all used content, that's all cells having values? From the documentation, I don't see how. | Thu 22:51 |
| 4635 | Gregg | You can also use read/binary on the data, then EXTRACT with a value of 2 to just remove all the nulls (assuming wide chars). Unicode chars will be munged that way too though. | 9-Dec 21:46 |
| 4634 | Endo | then I found a very simple way to convert a unicode file to ascii in DOS,
TYPE my-unicode-file > my-ascii-file This line converts the file to ascii, just non-convertable characters looks wierd but rest is ok. | 8-Dec 15:47 |
| 4633 | Endo | Magnusso: I faced a problem parsing exported LDAP users using above CSVDE command-line tool. Because it fails if you don't use -u argument and if your ldap data has some unicode data. And if you use -u the exported file will be unicode and cannot be read/parse in R2. | 8-Dec 15:44 |
| 4632 | Endo | ; use following to have the functionality. I have a very long script and I don't want to put it inside a IF block do-block: [ long long script ] foreach a b [ if any [a = 3 a = 5 ...] do-block] ;continue on other values of a. | 8-Dec 13:42 |
| 4631 | Sunanda | You can fake 'continue in R2 using 'loop 1 ... as this (incorrect!) implemention of BuzzFizz shows: for n 1 100 1 [ loop 1 [ if n // 3 = 0 [print [n "buzz"] break] if n // 5 = 0 [print [n "fizz"] break] ] ] | 8-Dec 13:36 |
| 4630 | Endo | R3 does? I didn't know that. Thanks | 8-Dec 13:12 |
| 4629 | Henrik | R2 does AFAIK not have it, but R3 does. | 8-Dec 13:09 |
| 4628 | Endo | There is no "CONTINUE" in any loop in REBOL, right? We have BREAK but no CONTINUE as in other languages. Rarely I need it :x | 8-Dec 13:08 |
| 4627 | MagnussonC | Interesting. Thnx. | 1-Dec 12:37 |
| 4626 | Endo | I'm also working on very similar to your case right now. I don't know if its useful for you but here how I do (on Windows) command: {csvde -u -f export.ldap -d "ou=myou" -r "(objectClass=user)" -s 10.1.31.2 -a "" "" -l "DN,sn,uid,l,givenName,telephoneNumber,mail"} call/wait/console/shell/error command %export.err ;export all users, bind annonymous if 0 < get in info? %export.err 'size [print "error" editor %export.err halt] lines: read/lines %export.ldap ;create an object from the first line (field names, order may differ from what you give in the batch) ldap-object: construct append map-each v parse first content none [to-set-word v] 'none foreach line lines [ ( set words-of o: make ldap-object [] parse/all line {,} append users: [] o ) ] ;append all valid users as an object to a block probe users I hope it gives some idea. | 1-Dec 9:57 |
| 4625 | MagnussonC | Thank you all for the suggestions. I think it is my poor understanding of the LDAP syntax that's is the problem. I.e. how to get all users from the LDAP connection, and then loop through the user objects/blocks. | 1-Dec 8:45 |
| 4624 | Endo | Try using FIRST, SECOND and THIRD on your object, that's what words-of and body-of do for object values. >> bind remove first x x >> third x | 1-Dec 7:36 |
| 4623 | Izkata | nope, haven't really thought about it for a while now | 1-Dec 4:52 |
| 4622 | BrianH | They're in R2/Forward too, and that's 2.7.6 compatible. Have you tried 2.7.8? | 1-Dec 3:33 |
| 4621 | Izkata | (had several incompatibilities with 2.7.7 and never bothered to figure it out at the time) | 1-Dec 3:29 |
| 4620 | Izkata | Hm, I didn't know about body-of or words-of. Still on 2.7.6 here, apparently before they were introduced | 1-Dec 3:28 |
| 4619 | BrianH | Yup, and that's more efficient too, but if you need the code to be R2 compatible, there're good reasons to make it R3 compatible too. For one thing, the code is cleaner and easier to understand and secure than old-style R2 code. | 1-Dec 2:05 |
| 4618 | Steeve | Actually, R3 is more clever than that. >> foreach [key val] X [print [key "->" val]] | 1-Dec 1:59 |
| 4617 | BrianH | Shame on you, Izkata, for advocating the use of the old reflectors in the "I'm new" group. Don't teach bad habits :( In R2 and R3: >> foreach [key value] body-of X [print [key {->} value]] a -> 1 b -> 2 c -> 3 >> foreach key words-of X [print [key {->} get key]] a -> 1 b -> 2 c -> 3 | 1-Dec 1:33 |
| 4616 | Izkata | It can be done in R2, just a slight bit convoluted: >> X: make object! [a: 1 b: 2 c: 3] >> ? X X is an object of value: a integer! 1 b integer! 2 c integer! 3 >> first X == [self a b c] >> foreach key next first X [print rejoin [key { -> } get in X key]] a -> 1 b -> 2 c -> 3 | 30-Nov 23:53 |
| 4615 | BrianH | If you actually want to loop through the key/value pairs of the object itself, you need to use R3's FOREACH, or loop through a BODY-OF the object. | 30-Nov 19:01 |
| 4614 | Dockimbel | Loop through objects: I guess you're meaning looping through a block of objects, which can be achieved using any of the REBOL looping function. | 30-Nov 17:46 |
| 4613 | BrianH | That's just for display, like this: >> object [a: 1] == make object! [ a: 1 ] >> length? reduce [object [a: 1]] == 1 | 30-Nov 15:32 |
| 4612 | MagnussonC | ... and I'm not sure what to make of the "make object!" in the resulting block. | 30-Nov 13:00 |
| 4611 | MagnussonC | Is there a way to loop throu the objects in LDAP? I seem to be able to get just one object at the time. | 30-Nov 11:37 |
| 4610 | MagnussonC | Now I got connected at least. I used include instead of do. | 30-Nov 9:42 |
| 4609 | Dockimbel | Anonymous login with ldap-protocol.r should work fine. | 30-Nov 9:19 |
| 4608 | MagnussonC | Hmm, I think I found what was wrong ... *blushing* | 30-Nov 9:16 |
| 4607 | Dockimbel | Sure you can, but your syntax is maybe wrong, can you post here your connection opening code? | 30-Nov 9:14 |
| 4606 | MagnussonC | Thnx, can I not use IP-address for argument? | 30-Nov 9:08 |
| 4605 | Dockimbel | "Invalid port spec" means that you have provided an incorrect argument to OPEN native. | 30-Nov 9:06 |
| 4604 | MagnussonC | Is there a LDAP module with authentification available for R2? I tried ldap-protocol.r from softinnov.org, but didn't get that to work (with anonymous bind) ... Not sure why I get "Error: Invalid port spec". I'm on Win7 (x64). Maybe it is something on OS level I have to config to use ldap://!? | 30-Nov 9:02 |
| 4603 | PeterWood | This is a good place to ask questions about getting started with REBOL and getting used to AltME. | 22-Nov 2:56 |
| 4602 | Gabriele | yes, that's the latest version. | 15-Nov 10:44 |
| 4601 | Endo | I see, I thought that its a good way to keep the body clean. But curious about if there is another reason. Thank you. Btw, I loved functions in utility.r. Is it 1.22.1 (4-Feb-2005) the latest version? fortype, nforeach, import & export are very useful functions. | 14-Nov 10:34 |
| 4600 | Gabriele | Basically, it's so that the words in the USE are not easily accessible from the outside. A "poor man's module" if you wish. | 14-Nov 10:26 |
| 4599 | Endo | When I examine the functions in altjson.r and altwebform.r written by Christopher Ross-Gill, I see function definitions like below: load-json: use [...<lots of words>...] [... <lots of definitions etc.> func [...] ] is this method for hiding details in function body? or to make the function body cleaner? | 14-Nov 8:42 |
| 4598 | Burtm10 | Hello Helpful person. I have a need for a local no-server database function and have explored the sqlite tools which I can get working OK But. The data I want to be storing needs to be secure. I have looked at the encodings.r and that will work but I was wondering if there was another way. I have used Tsunami Records Manager in the past with good success. I have used Euphoria which has an excellent inbuilt database function and I would like something similar if possible. Any clues? | 12-Nov 10:15 |
| 4597 | MagnussonC | Thanks, Sunanda. | 11-Nov 18:46 |
| 4596 | Sunanda | You concatenate the args.
Example: as a GET
r-get: read http://www.rebol.org/st-topic-details.r?tag=domain//html&start-at=26&limit=25 Same request as a POST: r-post: read/custom http://www.rebol.org/st-topic-details.r [post "tag=domain//html&start-at=26&limit=25"] | 11-Nov 18:42 |
| 4595 | MagnussonC | About the example 8.6 on read/custom and post. I can't find any info about the arguments for post. There is no help for this word. Can I send several arguments at once or do I write one post line for each form field? | 11-Nov 18:25 |
| 4594 | MagnussonC | Interesting. Thanks, Geomol. | 11-Nov 17:23 |
| 4593 | Geomol | And more here: http://www.rebol.com/docs/core23/rebolcore-13.html#section-13.5 | 11-Nov 11:27 |
| 4592 | Geomol | Yes: http://www.rebol.com/docs/core23/rebolcore-13.html#section-8.6 | 11-Nov 11:25 |
| 4591 | MagnussonC | Is it possible to open a web page and fill in username, password and press send? It is a POST form. I'm thinking of using it to check if some (of my own) web pages work and it is possible to login. I've tried read URL. | 11-Nov 11:10 |
| 4590 | todun | @james_nak: thanks for your Oct-15th 8:33 PM reply. | 26-Oct 3:59 |
| 4589 | Ladislav | "eg HELP TRIM gives no clue that TRIM/HEAD/WITH is not acceptable" - yes, but that can be cured even without a change to the help system, it might suffice to just add that as a new information into the main help string. | 25-Oct 22:22 |
| 4588 | Ladislav | (I must admit, that I never tried some of the above) | 25-Oct 22:19 |
| 4587 | Ladislav | The COPY value /part range /deep actually means, that you can use any of: COPY value COPY/part value range COPY/deep value COPY/part/deep value range COPY/deep/part value range | 25-Oct 22:18 |
| 4586 | Ladislav | Nor I did understand how can I recognize that VALUE is a parameter of COPY, not of the /DEEP refinement | 25-Oct 22:14 |
| 4585 | Sunanda | The REBOL help system is remarkable concise and acts, usually, as an excellent aide memoire. It has weaknesses too -- for example, it does not give hints as to which refinements are incompatible with others. eg HELP TRIM gives no clue that TRIM/HEAD/WITH is not acceptable. A fresh look at the HELP system may help improve it. | 25-Oct 22:14 |
| 4584 | Ladislav | Aha, you tried to write something above. Well, I do not quite understand the stars you used - where should they be put? | 25-Oct 22:13 |
| 4583 | Ladislav | It would certainly suffice if you wrote a couple of examples, how it should look | 25-Oct 22:10 |
| 4582 | Ladislav | But, do not forget, that it must be something that describes what do you want, not a description what you do not like. | 25-Oct 22:07 |
| 4581 | Ladislav | "I still think that the REBOL Help sub-system should reflect EXACTLY how the function should be written" - this is easy. If you find a better way how to display the help, then simply propose it. In REBOL, it is easier to write the code, than to invent what the code should do. | 25-Oct 22:06 |
| 4580 | Henrik | "COPY */part, /deep* VALUE */deep range*" - not sure I understand this order, as it will fail to explain where VALUE belongs and where RANGE belongs (it does not belong with /DEEP). Anyhow, the notation is standard and should not change anywhere. You only need to learn it once, so hopefully, this is not too much of a hurdle. | 25-Oct 22:02 |
| 4579 | Duke | @Geomol I now understand the syntax of function arguments, function refinements and THEIR arguments. Endo summarized it well. However, I still think that the REBOL Help sub-system should reflect EXACTLY how the function should be written. Thta should be the programmer's first line of help. Like the Unix man pages. So, assuming that the * char indicates optional syntax, IMHO, ?copy should say:
USAGE:
COPY */part, /deep* VALUE */deep range* To me, that tells me exactly the order in which the optional refinements, the required function argument, and the optional refinement argument should be written. To me this makes more sense. :D | 25-Oct 21:44 |
| 4578 | Geomol | And checking help for COPY: >> ? copy USAGE: COPY value /part range /deep Read that as: - COPY takes one argument called VALUE - If you choose to use the /part refinement, you then need to give an additional RANGE argument - If you choose to use the /deep refinement, no additional argument is needed. | 25-Oct 18:51 |
| 4577 | Geomol | Another example with additional argument, when refinement is used. The normal COPY function: >> copy "abc" == "abc" >> copy/part "abc" 2 == "ab" | 25-Oct 18:47 |
| 4576 | Geomol | Maybe refinements for functions are more clear with examples like this: Let's say, we want a sine function, which default operate with radians, but you can give degrees refinement, if you like, exactly opposite of the normal SINE function: >> sin: func [value /deg] [either deg [sine value] [sine/radians value]] >> sin pi / 6 == 0.5 >> sin/deg 30 == 0.5 | 25-Oct 18:42 |
| 4575 | Endo | I faced a problem when I use a refinements, my function had an ref. /any Then I forgot it and use ANY native. It gives error about using none, because the function wasn't called /any, so the word ANY was defined and its value was NONE. It was difficult to find the problem. | 25-Oct 18:39 |
| 4574 | Geomol | I should have made my example more like this: >> f: func [arg /ref1 ref-arg] [print [arg ref1 ref-arg]] >> f/ref1 /ref2 /ref3 ref2 true ref3 | 25-Oct 18:37 |
| 4573 | Geomol | "I personally consider refinements to be one of the less stellar parts of REBOL." Henrik, do you prefer one additional function for each new way of calling a function, instead of refinements? | 25-Oct 18:35 |
| 4572 | Endo | Duke: Don't be confused. my-func/boo 6 If my-func requires an argument and /boo refinement does not require and additional argument, then 6 is for my-func. if my-func and /boo both require args then you will get an error. my-func expects more arg. if my-func doesn't require an arg but /boo does then it belongs to /boo | 25-Oct 18:33 |
| 4571 | Geomol | >> f/ref1 'arg 'ref-arg arg ref1 ref-arg | 25-Oct 18:32 |
| 4570 | Geomol | Yeah, that can be confusing! :) >> f: func [arg /ref1 ref-arg] [print [arg /ref1 ref-arg]] >> f/ref1 /ref2 /ref3 ref2 ref1 ref3 | 25-Oct 18:31 |
| 4569 | Henrik | ok :-) | 25-Oct 15:48 |
| 4568 | Duke | I'm getting TOTALLY confused here! I'm going to have to stop here and go study this - including all of you guys' advise - a bit more .... | 25-Oct 15:47 |
| 4567 | Henrik | Example: my-func/boo 6 Does the 6 argument belong to the function or the refinement? | 25-Oct 15:47 |
| 4566 | Henrik | The problem with wording the help differently is that arguments and their orders passed, might be different, depending on which refinements you use. Therefore help is formatted the same as function headers. A way to understand it, is that anything that comes directly after the function name is obligatory. When the first refinement appears in the help string, anything after that is optional. | 25-Oct 15:43 |
| 4565 | Henrik | If you study some unloaded data: a: [now/precise now /precise] a/1 is of type path!, which can be reduced to calling NOW with the /PRECISE refinement. a/2 is of type word!, which can be reduced to calling NOW without any refinements. a/3 is of type refinement!, which doesn't reduce. In principle, that refinement could be an argument to the function. What types you can pass to a function is almost entirely free-form. >> reduce a == [25-Oct-2011/17:39:39.218+2:00 25-Oct-2011/17:39:39+2:00 /precise] | 25-Oct 15:41 |
| 4564 | Duke | @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 | 25-Oct 15:40 |
| 4563 | Endo | 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 | 25-Oct 15:34 |
| 4562 | Henrik | 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. | 25-Oct 15:32 |
| 4561 | Duke | @Henrik But Sunanda responded above to my original question by indicating that the syntax was: switch type?/word val [ So val is an argument to TYPE?, but it's written after the refinement?? That is NOT intuitive to me!! | 25-Oct 15:31 |
| 4560 | Henrik | So, why isn't it just the other way around, like in the help? You could in principle do that. It just gives you many more arguments that you would be forced to type. TYPE? could look like this: type? 5 word So, if you didn't want the refinement, you would have to type: type? 5 none For functions with many arguments, you would have to type something like: my-function 1 none none none none none none which is no fun to type directly. | 25-Oct 15:30 |
| 4559 | Henrik | If you type: source type? you will see the function header as it is stated for the function. It comes in the same order as in the help documentation. | 25-Oct 15:25 |
| 4558 | Henrik | 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. | 25-Oct 15:24 |
| 4557 | Henrik | The format is name, followed by arguments to that name. So VALUE is an argument to TYPE and the /WORD refinement has no arguments. | 25-Oct 15:23 |
| 4556 | Duke | @Henrik So in the case of the word TYPE?, is "value" an argument of the refinement, or of the word itself? Because it seems to be used as if it was an argument of the /word refinement. | 25-Oct 15:22 |
| 4555 | Henrik | 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. | 25-Oct 15:15 |
| 4554 | Ladislav | Hmm, looks that I forgot (once again) how to log in to the R3 docs. | 25-Oct 15:05 |
| 4553 | Endo | 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. | 25-Oct 15:03 |
| 4552 | Duke | 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? | 25-Oct 14:55 |
| 4551 | Duke | Thanks Sunanda! Then there is an error in the docs at http://www.rebol.com/r3/docs/functions/switch.html. Who do I alert? | 25-Oct 14:45 |
| 4550 | Sunanda | 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"] ] | 25-Oct 4:49 |
| 4549 | Duke | 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. | 25-Oct 4:23 |
| 4548 | Duke | @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. | 24-Oct 18:28 |
| 4547 | Duke | @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 ... | 24-Oct 18:07 |
| 4546 | Duke | @Sunanda Thanks! Can't wait to try it out! :) | 24-Oct 18:02 |
| 4545 | Pekr | Duke - I think that in fact it is not much of an issue? How often do you use multiline expression in REBOL interactive console session? It does not allow you to go back anyway, so ... | 24-Oct 17:54 |
| 4544 | Sunanda | 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 ] | 24-Oct 17:40 |
| 4543 | Ladislav | But, anyway, what it is you would want to see? | 24-Oct 17:24 |
| 4542 | Ladislav | I do understand, but that does not answer my question. As far as I am concerned, I use the do read clipboard:// approach when trying some code snippets | 24-Oct 17:23 |
| 4541 | Duke | @Ladislav Thanks for clearing that up! At the moment, I'm simply reading http://www.rebol.com/docs/words/wswitch.html and 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. :)) | 24-Oct 17:21 |
| 4540 | Ladislav | What exactly it is you *would want* to see? | 24-Oct 17:21 |
| 4539 | Ladislav | "I would NOT want to see a { symbol at the beginning of a multi-line REBOL snippet, entered at the console." - that is easy | 24-Oct 17:19 |
| 4538 | Ladislav | But, OTOH, if you really do want to write an expression like 1 + 2 in the interpreter console, you can use this trick: do [ 1 + 2 ] | 24-Oct 17:15 |
| 4537 | Ladislav | "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 | 24-Oct 17:13 |
| 4536 | Duke | @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.... | 24-Oct 17:11 |
| 4535 | Sunanda | The REBOL console is trying to be helpful in indicating that at least one "]" or "}" needs to be supplied to complete an expression. But I'm with Duke -- more helpful visual indicators would be nice; as would the ability to override the default ones. | 24-Oct 17:03 |
| 4534 | Duke | @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?? :) | 24-Oct 16:56 |
| 4533 | Ladislav | Example: 1 + 2 >> do read clipboard:// == 3 | 24-Oct 16:47 |
| 4532 | Ladislav | use do read clipboard:// to input any number of lines | 24-Oct 16:45 |
| 4531 | Ladislav | It is simply so, that you can continue, because the interpreter "knows" you did not enclose the block yet | 24-Oct 16:44 |
| 4530 | Ladislav | This is a misunderstandin, Duke. #"[" is not a "line continuation" symbol | 24-Oct 16:43 |
| 4529 | Duke | @Pekr It might make sense to have 2 line continuation chars, but IMHO, it makes no sense to have those chars *the same* as symbols you'd find in REBOL code. It can become too confusing -especially for beginners. I suppose that is the reason why the console/prompt is set to >> and not {{ or ]] :) | 24-Oct 16:08 |
| 4528 | Pekr | 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 | 24-Oct 16:01 |
| 4527 | Pekr | just try e.g. system/console/prompt: "-->" | 24-Oct 16:00 |
| 4526 | Sunanda | The one thing you do not seem able to change is the [ continuation char | 24-Oct 15:59 |
| 4525 | Pekr | 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. | 24-Oct 15:59 |
| 4524 | Pekr | it is just normal object, so you can acces its value by path. | 24-Oct 15:58 |
| 4523 | Pekr | system/console/tab-size: 8 :-) | 24-Oct 15:58 |
| 4522 | Duke | It would have been too good to be true, if it had been there :D How would those values be changed from the console? Like say the tab-size? | 24-Oct 15:55 |
| 4521 | Pekr | Have you investigated Core System object? It's interesting. Try: "help system" :-) Hmm, I thought it might be there, but it is not: >> help system/console SYSTEM/CONSOLE is an object of value: history block! length: 2 keys none! none prompt string! ">> " result string! "== " escape string! "(escape)" busy string! "|/-\" tab-size integer! 4 break logic! true lookup function! Console filename completion lookup. | 24-Oct 14:39 |
| 4520 | Duke | @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 ]. | 24-Oct 13:58 |
| 4519 | Izkata | @Duke: It works in the console if you put the opening bracket of the final block on the same line as the closing bracket of the previous block, like it is in the example | 24-Oct 1:42 |
| 4518 | Duke | Anyway ... thanks you guys!! | 23-Oct 18:18 |
| 4517 | Duke | @Henrik That's my point !! :)) | 23-Oct 18:17 |
| 4516 | Henrik | I don't use emacs, hence I don't need the REBOL emacs mode. :-) | 23-Oct 18:16 |
| 4515 | Duke | @Henrik What??? Are you ill? LOL ... | 23-Oct 18:15 |
| 4514 | Henrik | There should be an emacs mode available. I have never used it, though. | 23-Oct 18:15 |
| 4513 | Duke | BTW, I just C&P the code into the console, and BINGO!!! :)) | 23-Oct 18:14 |
| 4512 | Duke | Is there an emacs mode for REBOL that you guys are aware of? | 23-Oct 18:13 |
| 4511 | Duke | @Ladislav nope! but I will ... :) | 23-Oct 18:12 |
| 4510 | Ladislav | Or, if you want to examine what exactly is in the clipboard, you can: print read clipboard:// | 23-Oct 18:12 |
| 4509 | Henrik | 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. | 23-Oct 18:12 |
| 4508 | Ladislav | have you tried the do read clipboard:// expression? | 23-Oct 18:11 |
| 4507 | Henrik | You should be able to somewhat safely paste multiline code, but otherwise it's best for single line entry. Also note that the console does not behave identically on different OS'es. | 23-Oct 18:11 |
| 4506 | Duke | 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? | 23-Oct 18:10 |
| 4505 | Duke | http://www.rebol.com/r3/docs/functions/switch.html | 23-Oct 18:07 |
| 4504 | Henrik | "rebcore v 2.7.8" - ok, the editor is not in this version, so you would have to use another editor. | 23-Oct 17:53 |
| 4503 | Henrik | for multi-line stuff, you can use the built-in very simple editor: >> editor "" write your script and save it and use CTRL-E (I think) to run it. | 23-Oct 17:53 |
| 4502 | Henrik | with the /default refinement, you need one more block, to trigger the default case. | 23-Oct 17:51 |
| 4501 | Duke | Having trouble with the "switch" function.
I'm entering the following at the REBOL terminal:
>> time: 14:00
== 14:00
>> switch/default time [
[ 8:00 [send wendy@domain.com "Hey, get up!"]
[ 12:30 [cindy@dom.dom "Joinme for lunch?"]
[ 16:00 [send group@every.dom "Dinner anyone?"]
[ ] For my trouble, I get: :) ** Script Error: switch is missing its case argument ** Near: switch/default time [ 8:00 [send wendy@domain.com "Hey, get up!"] 12:30 [cindy@dom.dom "Joinme for lunch?"] ... Am I using the REBOL terminal incorrectly? I'm using rebcore v 2.7.8 | 23-Oct 17:41 |
| 4500 | james_nak | 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. | 16-Oct 0:33 |
| 4499 | todun | @james_nak: I just found that out here too. | 15-Oct 23:11 |
| 4498 | james_nak | todun - thanks for posting your code. You know, I never knew there was a "move" function. in R2. | 15-Oct 22:46 |
| 4497 | todun | @DideC: thanks. sorry for the late reply. | 15-Oct 22:39 |
| 4496 | todun | http://pastebin.com/w84XhGmE | 15-Oct 22:38 |
| 4495 | todun | @DideC: sure thing. I'll pastebin a sample of the temp-cards. | 15-Oct 22:35 |
| 4494 | todun | @Kaj: thanks for the update. | 15-Oct 22:34 |
| 4493 | DideC | 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 ? | 12-Oct 7:54 |
| 4492 | Kaj | Implementing a design, you'll be doing series manipulations all the time | 11-Oct 23:07 |
| 4491 | Kaj | However, before objects, you should be thinking functional programming and data dialects | 11-Oct 23:00 |
| 4490 | Kaj | If you want to use objects, think in prototypes without inheritance, not classes | 11-Oct 23:00 |
| 4489 | todun | http://pastebin.com/ZEjScLyn | 11-Oct 22:41 |
| 4488 | todun | 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. | 11-Oct 22:41 |
| 4487 | todun | @Kaj, @Henrik: what do these points mean for design? What I mean is that what conceptual model can I use when thinking about my design of REBOL based applications? | 11-Oct 22:38 |
| 4486 | Henrik | I had classes and prototypes confused, if I'm not mistaken. So REBOL doesn't have classes. | 11-Oct 6:42 |
| 4485 | Henrik | you are probably right, Kaj. | 11-Oct 6:32 |
| 4484 | Kaj | Todun, contexts and objects are the same in REBOL. The object word is just used as an alias name because other languages call them that | 11-Oct 1:45 |
| 4483 | Kaj | Those are not called prototypes; those are called classes | 11-Oct 1:43 |
| 4482 | Kaj | "Some object oriented programming languages use specially notated prototype objects, from which other objects can be created." | 11-Oct 1:43 |
| 4481 | Kaj | Henrik, I have to object. REBOL is prototype based. Any REBOL object/context is a prototype | 11-Oct 1:42 |
| 4480 | todun | @Pekr, @Henrik, ok. | 10-Oct 19:25 |
| 4479 | Henrik | 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. | 10-Oct 19:08 |
| 4478 | Pekr | 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 | 10-Oct 18:59 |
| 4477 | Henrik | no, prototypes don't exist at all. | 10-Oct 18:59 |
| 4476 | Pekr | I think not. The prototype is any object you inherit from ... | 10-Oct 18:58 |
| 4475 | todun | @Henrik, so prototypes are nested objects and the fact rebol only deals in objects goes back to its homoiconicity? | 10-Oct 18:46 |
| 4474 | Henrik | 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. | 10-Oct 18:28 |
| 4473 | Henrik | try: source context | 10-Oct 18:24 |
| 4472 | todun | @Henrik, I still am not sure what prototypes are. So REBOL uses a different structure called a CONTEXT and not an OBJECT? | 10-Oct 18:18 |
| 4471 | Henrik | contexts... also a deep topic. objects in rebol are contexts. there are not really prototypes as any object can act as one. | 10-Oct 18:07 |
| 4470 | todun | thanks all the same. | 10-Oct 18:05 |
| 4469 | todun | @Henrik. ok | 10-Oct 18:05 |
| 4468 | Henrik | todun, "call-by-reference" I will defer that question to someone who better knows programming terminology, than me. | 10-Oct 18:00 |
| 4467 | todun | @Pekr, in this context, what is a prototype object? | 10-Oct 17:58 |
| 4466 | Pekr | I mean - when you have a prototype object, which uses subobjects, those are shared between the clones ... | 10-Oct 17:54 |
| 4465 | Pekr | >> 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" ] ] | 10-Oct 17:53 |
| 4464 | todun | @Pekr, I'm actually a new programmer myself. But I didn't start with REBOL thus my confusion. | 10-Oct 17:47 |
| 4463 | todun | @Pekr, uhm. do you mean like the scope or something similar? | 10-Oct 17:47 |
| 4462 | Pekr | 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? | 10-Oct 17:40 |
| 4461 | todun | @Pekr, what I mean to say is that will the code be useful in the situation where all of my code seems to be relying on different programming paradigms? | 10-Oct 17:30 |
| 4460 | todun | @Pekr, will this work in light of Henrik's remarks? | 10-Oct 17:29 |
| 4459 | todun | @Henrik, so what is REBOL if not call-by-reference? | 10-Oct 17:28 |
| 4458 | todun | @Henrik, wow! | 10-Oct 17:28 |
| 4457 | Henrik | therefore in this bit of code: button-press?: layout [ ; displays output for user interaction result-question: info " " result-answer: info " " two separate strings are also made prior to the LAYOUT function even getting the block passed. Depending on how the code that manages the INFO faces initializes the face, those two strings can possibly be referenced. | 10-Oct 17:26 |
| 4456 | Henrik | 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. | 10-Oct 17:21 |
| 4455 | Henrik | which is a clever way for not needing to assign a word to a block to use it, even just temporarily. | 10-Oct 17:14 |
| 4454 | Henrik | Try this in the console: repeat i 5 [append [] i] and see what happens. You will see that it literally is that block at that memory location that is reused for APPEND. | 10-Oct 17:13 |
| 4453 | Pekr | you might use one trick - result-answer/text: copy " " | 10-Oct 17:13 |
| 4452 | Pekr | it is normal rebol :-) | 10-Oct 17:12 |
| 4451 | todun | @Henrik, I see. Is this normal coding or just rebol? | 10-Oct 17:11 |
| 4450 | Henrik | I'm not sure that's the problem here, though. | 10-Oct 17:07 |
| 4449 | Henrik | 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. | 10-Oct 17:06 |
| 4448 | todun | @Henrik, yes. to get to see the other questions. | 10-Oct 17:01 |
| 4447 | Henrik | is one expected to click "Show Question" after clicking "Soon"? | 10-Oct 16:55 |
| 4446 | todun | I tried move/to ; move/skip and even tried backtracking with back at every button press, without luck | 10-Oct 16:54 |
| 4445 | todun | the same behavior happens for all of them. | 10-Oct 16:53 |
| 4444 | todun | the display shows a series that didn't change | 10-Oct 16:53 |
| 4443 | todun | so when I press SOON, it should advance the question 5 places ahead. The temp file shows it does. | 10-Oct 16:53 |
| 4442 | todun | @Henrik, it is not so much an error as that it doesn't do what it should do by design | 10-Oct 16:52 |
| 4441 | Henrik | which button press shows the error? and which series? | 10-Oct 16:44 |
| 4440 | todun | ok | 10-Oct 16:43 |
| 4439 | Henrik | yes, I can see it. | 10-Oct 16:41 |
| 4438 | todun | @Henrik, does it work now? | 10-Oct 16:41 |
| 4437 | todun | @Henrik, ok. | 10-Oct 16:41 |
| 4436 | Henrik | maybe there is a timeout on pastes | 10-Oct 16:39 |
| 4435 | todun | sorry about that. I don't know why it keeps doing that sometimes. | 10-Oct 16:34 |
| 4434 | todun | http://pastebin.com/eixcKrTQ | 10-Oct 16:34 |
| 4433 | todun | @Henrik..let me post it again | 10-Oct 16:19 |
| 4432 | Henrik | I get an unknown paste ID | 10-Oct 16:12 |
| 4431 | todun | http://pastebin.com/YabkWa8p | 10-Oct 15:11 |
| 4430 | todun | sure. | 10-Oct 15:09 |
| 4429 | Henrik | can you pastebin the code? | 10-Oct 14:56 |
| 4428 | todun | @Henrik, I've been debugging for hours and I think I just don't know enough about REBOL because the logic of the code seems ok..or that's my conclusion anyways. | 10-Oct 14:31 |
| 4427 | Henrik | http://www.rebol.net/wiki/Forgoing_faux_pas#The_COPY_Trap | 10-Oct 14:31 |
| 4426 | todun | @Henrik, all these look likely. I just noticed all these new errors today when I revisited the code. I actually thought it was working. | 10-Oct 14:30 |
| 4425 | Henrik | you could also be running into a copy trap, which makes it look like your blocks are changed by some unknown source. | 10-Oct 14:29 |
| 4424 | Henrik | 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. | 10-Oct 14:25 |
| 4423 | todun | @Henrik, I'm clueless as to why it is behaving like this. | 10-Oct 14:22 |
| 4422 | Henrik | it sounds like there might be an organizational problem with the action code. | 10-Oct 13:44 |
| 4421 | todun | 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. | 10-Oct 13:15 |
| 4420 | todun | @Henrik, the error had to do with the view. I am putting that on hold for now. | 10-Oct 13:14 |
| 4419 | Henrik | what error do you get? | 9-Oct 12:03 |
| 4418 | todun | trying the scheme you suggest gives me an error, and I suspect it is because of my layout | 9-Oct 11:21 |
| 4417 | todun | @Henrik, I have the layout grouping all the buttons before I call the view on it like so: button-press: layout [ ...} view button-press | 9-Oct 11:20 |
| 4416 | Henrik | the FORM converts the file! to a string!. | 9-Oct 9:09 |
| 4415 | Henrik | view/title layout [button] form %my-file.r | 9-Oct 9:08 |
| 4414 | todun | 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? | 9-Oct 8:55 |
| 4413 | todun | Is there a way of making the name of a file the header of the view? | 9-Oct 8:53 |
| 4412 | todun | @Sunanda, thanks. | 9-Oct 8:52 |
| 4411 | todun | @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. | 9-Oct 8:52 |
| 4410 | todun | @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? | 9-Oct 8:43 |
| 4409 | todun | @Henrik, I figured out the problem. I make call next on the input at the end of the button press. This causes the list to change. | 9-Oct 8:41 |
| 4408 | todun | @Sunanda, thanks. I'm looking at it now. | 9-Oct 8:38 |
| 4407 | todun | @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)? | 9-Oct 8:34 |
| 4406 | Sunanda | Nick Antonaccio's tutorial is an excellent place to start: http://re-bol.com/rebol.html | 9-Oct 8:28 |
| 4405 | Henrik | todun: qa/1/2, it means "get block at first position and get second item in that block" it's similar to: second first qa | 9-Oct 8:27 |
| 4404 | todun | @Henrik, I ask because I get my results being one off. | 9-Oct 7:59 |
| 4403 | todun | @Henrik, looking at your example code again, I'm not quite sure what the refinement qa/1/2 does. I thought it meant that "get list item 2 at 1 place away" but I'm not sureanymore.. | 9-Oct 7:52 |
| 4402 | todun | @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? | 9-Oct 7:50 |
| 4401 | Henrik | 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. | 9-Oct 7:26 |
| 4400 | Henrik | 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. | 9-Oct 7:13 |
| 4399 | todun | @Ladislav, thank you. | 9-Oct 7:13 |
| 4398 | Ladislav | http://www.rebol.com/r3/docs/concepts/scripts-headers.html | 9-Oct 7:08 |
| 4397 | todun | Is there a standard list of what goes into the block following the REBOL flag? I'm thinking javadocs here. Thanks. | 9-Oct 7:04 |
| 4396 | todun | @Henrik, do you have any advice as to the sort of things I can be learning if I want to understand REBOL better? Like specific problem sets for instance.. The tutorials are good, but they don't seem to be getting across to me. | 9-Oct 6:43 |
| 4395 | todun | @Henrik, thanks for your help. I think I've figured out most of the code and how to apply it to my situation aka HW. My previous approach was totally confusing me. | 9-Oct 6:42 |
| 4394 | todun | thanks. | 9-Oct 6:35 |
| 4393 | todun | @Ladislav, I figured out my problem. My typo. | 9-Oct 6:28 |
| 4392 | todun | button-press: layout [ .....] | 9-Oct 6:18 |
| 4391 | todun | @Ladislav, I'm trying to use the VID dialect. This is how I start my definition of button-press?.... | 9-Oct 6:18 |
| 4390 | Ladislav | It means, that you use the button-press? variable in the above expression. But, you forgot to define that variable. | 9-Oct 6:13 |
| 4389 | todun | ** Script Error: button-press? has no value ** Near: do view button-press? | 9-Oct 6:11 |
| 4388 | todun | I'm trying to trouble shoot this error I get, but not sure what it means: | 9-Oct 6:10 |
| 4387 | todun | @Henrik, I see. I will try to better trace the path the file takes to open. thanks. | 8-Oct 21:21 |
| 4386 | Henrik | ** Access Error: Cannot open file.txt
** Where: forever
** Near: were: read/lines %were-file.txt That is possibly because file.txt does not exist and you are trying to read it somewhere near that line of code. | 8-Oct 15:02 |
| 4385 | Henrik | MOVE modifies the list like SWAP does, but does not require any adjustments to index. | 8-Oct 15:00 |
| 4384 | todun | ** Access Error: Cannot open file.txt ** Where: forever ** Near: were: read/lines %were-file.txt | 8-Oct 14:42 |
| 4383 | todun | I get the following error and haven't a clue what is wrong. What normally causes this? Thanks. | 8-Oct 14:41 |
| 4382 | todun | I see you moving it within the list but the file doesn't dynamically get changed using MOVE... | 8-Oct 13:45 |
| 4381 | todun | going back to my question about using SWAP. | 8-Oct 13:44 |
| 4380 | todun | @Henrik, thanks. How does using MOVE update the original list? | 8-Oct 13:44 |
| 4379 | Henrik | it will crash at the end, so I leave it as an exercise on how to fix that :-) | 8-Oct 12:50 |
| 4378 | Henrik | 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. | 8-Oct 12:40 |
| 4377 | Henrik | or perhaps use MOVE instead of SWAP | 8-Oct 12:32 |
| 4376 | Henrik | perhaps you can try moving back one element after swapping. that might put you in the correct location. | 8-Oct 12:30 |
| 4375 | todun | what about the issue of swapping though? | 8-Oct 12:24 |
| 4374 | todun | ok | 8-Oct 12:11 |
| 4373 | Henrik | 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. | 8-Oct 12:06 |
| 4372 | todun | oh ok.. | 8-Oct 11:53 |
| 4371 | Henrik | it simply writes a new file, so the code is syntactically correct. | 8-Oct 11:53 |
| 4370 | todun | I wonder why rebol didn't flag that... | 8-Oct 11:48 |
| 4369 | todun | @Henrik, thanks! | 8-Oct 11:48 |
| 4368 | todun | @Henrik, ok. But I do want to explore the options you present because it meets my other goal of working with different data structures in rebol. | 8-Oct 11:47 |
| 4367 | Henrik | there is a typo in line 54: quesiton-list.txt | 8-Oct 11:47 |
| 4366 | todun | I am not sure how to do these individual steps yet, but I actually do understand the gist of them. | 8-Oct 11:46 |
| 4365 | Henrik | yes, it might be too dramatic. perhaps it's better to save it for later. | 8-Oct 11:46 |
| 4364 | todun | @Henrik, ok. there is allot in there. | 8-Oct 11:45 |
| 4363 | Henrik | 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. | 8-Oct 11:43 |
| 4362 | todun | 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. | 8-Oct 11:39 |
| 4361 | Henrik | is there a particular reason that you split the questions and answers in separate files? | 8-Oct 11:37 |
| 4360 | todun | exactly! | 8-Oct 11:37 |
| 4359 | Henrik | I see. And you save this, because you want to have the user start where he stopped from, when last quitting the program? | 8-Oct 11:36 |
| 4358 | todun | The user will then see the question again,.."Soon" | 8-Oct 11:35 |
| 4357 | todun | ....to move the current question to a forward location in the pool of questions becasue the user doesn't have the answer yet. | 8-Oct 11:35 |
| 4356 | Henrik | ok, and the idea of "Soon" is? | 8-Oct 11:34 |
| 4355 | todun | @Henrik, yes. | 8-Oct 11:33 |
| 4354 | todun | that'll be wonderful. I've been banging my head on these issues for over a week. | 8-Oct 11:33 |
| 4353 | Henrik | so, the user clicks "Show Question" to see a question. then he clicks "Show answer" to see if he's correct? | 8-Oct 11:33 |
| 4352 | Henrik | we'll figure that out eventually. | 8-Oct 11:32 |
| 4351 | todun | I really don't know where things should or shouldn't go. | 8-Oct 11:31 |
| 4350 | todun | @Henrik, ok... | 8-Oct 11:31 |
| 4349 | Henrik | I'm moving the content after FLASHCARD-PARSING right now, so I can get the program to start. | 8-Oct 11:30 |
| 4348 | todun | ould I be doing that as you say because I did notice an update lag and did not know what to make of it. | 8-Oct 11:29 |
| 4347 | todun | oh...I'm actually using that as is based on a suggestion I got on here. | 8-Oct 11:29 |
| 4346 | Henrik | based on its content, there is no reason to put the DO block in the layout. | 8-Oct 11:29 |
| 4345 | Henrik | do you not want the DO block in the layout to be performed after FLASHCARD-PARSING? otherwise the questions-list.txt file is not generated in time. | 8-Oct 11:28 |