[REBOL] Block Creation Re:
Hi, block1: [] Each time around, block1 is pointed at a growing block, starting out initially as []. The block is modified to include "text1" each time round. Remember, the thing that is actually modified is the []!!! To see this, try this one-liner: do a: does [loop 3 [blk: [] insert blk 'gold source a]] You should notice that the thing that blk is pointing to is actually growing in the source. block2: to-block "" This code gets evaluated each time, which means that the thing that block2 used to point to (["text2"]) is forgotten in favour of the newly created []. Regards, Anton. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 18 October 2000 7:14 PM To: [EMAIL PROTECTED] Subject: [REBOL] Block Creation Here's a block query... block1: [] == [] block2: to-block "" == [] The above would appear to have created identical blocks, but as the following little script shows they're not the same... rebol [] for test1 1 5 1 [ block1: [] insert block1 "text1" ] prin "block1: " print block1 for test2 1 5 1 [ block2: to-block "" insert block2 "text2" ] prin "block2: " print block2 The output from this is... block1: text1 text1 text1 text1 text1 block2: text2 I'm assuming this is normal REBOL behaviour and not a bug, (and I know... block1: [] clear block1 would've given the same results as with to-block), but what's the point of the difference? Carl Read.
[REBOL] Block to string Re:(2)
Woops! It should be text "..." not text: "..." Sorry, -Anton. At 00:50 18/08/00 +1000, you wrote: See below... [EMAIL PROTECTED] wrote: here is my sample script. The problem is that he script continues evaluate the block as objects instead of strings. Someone tell me how to get the correct URL out of this instead of ftp://?object?:?object?@?object? which should be ftp://administrator:[EMAIL PROTECTED] -- REBOL [] view layout [ backdrop 0.128.0 title "Pauls FTP Access" 255.255.0 host-addr: text "Enter Host Address" field "127.0.0.1" You want text: "Enter Host Address" host-addr: field "127.0.0.1" then refer to host-addr/text etc.. -Anton login-name: text "Enter Login Name" field "administrator" Pass-word: text "Enter Password" field "whatever" button "Convert to string" [ host-addr2: to string! host-addr login-name2: to string! login-name Pass-word2: to string! Pass-word ] button "test" [ print type? host-addr2 print type? login-name2 print type? Pass-word2 ]
[REBOL] to-path curio Re:
Hi, The classic MacOS has a 33 character length restriction on filenames, IIRC. Anton. At 23:55 3/07/00 +1000, you wrote: And finally print replace %anz-visa-statement--.r "--" { [30-May-2000 27-Jun-2000]} anz-visa-statement [30-May-2000 27-Jun-2000].r Success. Last question: Are such filenames legal on other OSs (other than Windows)? Brett.
[REBOL] Is é a valid char for use in urls? Re:(4)
(user and pass substituted). This works: read ftp://user:[EMAIL PROTECTED]/resume.html This doesn't: read ftp://user:[EMAIL PROTECTED]/résumé.html ** User Error: URL error: ftp://user:[EMAIL PROTECTED]/résumé.html. ** Where: read ftp://user:[EMAIL PROTECTED]/résumé.html Finally, this does: read rejoin [ftp:// user ":" pass "@" to-url "ftp.melbourne.net/r%E9sumE9.html"] I can: write rejoin [ftp:// user ":" pass "@" to-url "ftp.melbourne.net/r%E9sum%E9.html"] read %/c/anton/résumé.html but upon reading the directory I see the name: r%E9sum%E9.html ! and I can't browse to it using netscape or rebol: read to-url "http://www.melbourne.net/antonr/r%E9sum%E9.html" ** User Error: Error. Target url: http://www.melbourne.net/antonr/r%E9sum%E9.html could n ot be retrieved. Server response: HTTP/1.0 404 Not Found. ** Where: read to-url "http://www.melbourne.net/antonr/r%E9sum%E9.html" I am about to give up on using the e acute (this must surely annoy French users) in the filename, but... Would it be good if to-url converted "é" (and other characters that cause URL errors) to %E9 etc? Could read also take "%E9" and find the file "é" ? I am not really sure what should be, but I am having difficulty. Surely my directory isn't the only one with strange characters in it? Anton.
[REBOL] Is é a valid char for use in urls?
I can read this file: read http://www.melbourne.net/antonr/resume.html but not this one: read http://www.melbourne.net/antonr/résumé.html ** User Error: URL error: http://www.melbourne.net/antonr/résumé.html. ** Where: read http://www.melbourne.net/antonr/résumé.html Both the files exist. You can browse to both of them. Anyone know why the above URL error happens? I'd like to update my résumé, not my resume... Am I disobeying naming rules, perhaps? Anton.
[REBOL] can't explain Re:(3)
At 15:50 16/06/00 +0200, pekr wrote: [EMAIL PROTECTED] wrote: Yeah, that sounds funny. For me, your example script does throw an error for values other than 1 or 2. If you are saying that it doesn't for you, then that sounds funny... I tried it on both rebol core 2.2.0.3.1 and REBOL/View 0.9.9.3.1 1-Jun-2000 The error is: ** Script Error: command0 has no value. ** Where: command0 Of course it does? What do you expect? From the original question, it sounds like he isn't getting this error that you and I can get so easily :-) 1) below script will not work, as rejoin returns "command1" for e.g. as a string - command: input 1 == "1" - type? rejoin ["command" command] == string! - It works for ok for 1 and 2. 2) if you will put there do to-word rejoin , it will crash for other than command1 and command2 values, as there are no words of such name defined Or am I wrong here? -pekr- (Of course you don't mean 'crash', you mean it will give a script error.) But getting back to the original question (which is not too clearly worded), it sounds like he isn't getting any error when he enters '0', for example. If he is *not* getting a script error when he enters '0', then that's a serious bug. But I am not sure that's what he means... [EMAIL PROTECTED] -Anton. At 04:33 16/06/00 -0700, you wrote: Hi, can anyone tell me what's wrong with this script and why it does'nt throw an error for input numbers 1 - 9. thanks alot.. tim BEGIN SCRIPT REBOL [ ] Listing: [ print "Choose Command..." print "1 - Command 1" print "2 - Command 2" ] command1: [print "Doing Command 1"] command2: [print "Doing Command 2"] forever [ do listing command: input do rejoin ["command" command] ] -Anton.
[REBOL] REBOL international Re:(4)
What would be really interesting is to be able to do REBOL right to left in Arabic, Urdu or Sindhi. [l'empreinte Druck stampa impressão impresión] is all very well for all you LtoR types but what about the rest of the known world? I guess if you want to type from right to left you could maybe get an editor that does that, then set the words in your language with letters in reverse order. Are there any such editors? Anton.
[REBOL] user defined datatypes?
Hi, Is there a way to create user defined datatypes? For example sample! I've tried a few things but can't seem to figure it out. Could someone point me to any existing docs on it? Thanks, Anton.
[REBOL] Re: essay/2
Hello [EMAIL PROTECTED], The translation of the REBOL expression: [10 "1234" 11] could be described by the picture (not REBOL notation!): {{block! 1 *}} | V 10 * 12 ^ whoops, surely you mean 11 ? | V {{string! 1 *}} | V #"1" #"2" #"3" #"4" Keep up the good work! Regards -- Anton
[REBOL] Re: Passing by reference
Hello [EMAIL PROTECTED], Passing by reference a: 0 ; 0 b: 'a ; a to-set-word b ; a: to-set-word b 1 ; 1 a ; 0 so what is the point of to-set-word if I can then not use it to set the thing? Do I need an extra block and a "do" or something like that? c: to-set-word b c 1 a ; 1 Regards -- Anton
[REBOL] Re: Rethink - new real markets (was) Rebol website update :-) Re:(12)
Hello Russ, On 29-Oct-99, [EMAIL PROTECTED] wrote: PS -- Perhaps further discussion of this should be done off this list, as I'm not sure that many here are interested in these topics, and I think REBOL's position is now clear. Anyone interested may feel free to Email me directly. I think it's interesting even if I'm not really into that field and don't have much to comment on it myself. I delete the mails after I've read them, because they contain no code :-), but they are worth reading. Regards -- Anton
[REBOL] embed html, ibrowse amiga
Hello, My ISP won't allow pre-compiled binaries (non-open source) to run on the server. But I still want to test embedded rebol scripts in web pages (on an Amiga). Who knows how to tell IBrowse where to look for rebol to execute it and make it run embedded scripts? Kind regards -- Anton