World: r3wp
[Linux] group for linux REBOL users
older newer | first last |
Maxim 1-Sep-2010 [3871x2] | remote-spec: [scheme: 'ftp host: "ftp.mysite.org" user: "[user-:-mysite-:-org]" pass: "xxxxxxxxxx"] local-file: %text.txt source-port: open/binary/direct/read local-file ; BINARY mode print "Attempting FTP connection..." target-port: open/binary/direct/new/write remote-spec ; BINARY mode insert target-port copy source-port attempt [close target-port] attempt [close source-port] |
oops pressed send too quickly... not sure I was done... | |
Graham 1-Sep-2010 [3873x4] | write [ scheme: 'ftp host: "ftp.compkarori.com" port-id: 21 target: %/htdocs/reb/test.txt user: "compka" pass: "*****" ] "hello" |
works for me | |
it's the same as the normal one liner syntax | |
Moccachino will do fine | |
Maxim 1-Sep-2010 [3877] | my snippet is from a client app of mine and definitively works for me |
Graham 1-Sep-2010 [3878] | Hold the marsmellow |
Maxim 1-Sep-2010 [3879x2] | hehe |
my example allows you to insert just a few bytes at a time and update a progress bar, if you replace the 'INSERT line by a loop which only copies 2000 bytes at a time until the copy returns none | |
Graham 1-Sep-2010 [3881x2] | My example just does what you asked for :) |
Of course you could use my ftp protocol for Rebol3 if you're brave | |
caelum 1-Sep-2010 [3883] | I'm not that brave. |
Maxim 1-Sep-2010 [3884] | ex: while [buffer: copy/part source-port 2000][ insert target-port buffer prin ">" ] |
Graham 1-Sep-2010 [3885x2] | You have to be brave if you're a soldier in the rebolution! |
If you live in the Midlands .. you can visit Sunanda :) | |
caelum 1-Sep-2010 [3887x2] | I'm a Brit living in WA state USA. My sister lives in the midlands. I'll visit Sunanda next time I visit the UK. |
Looks like I owe two coffees. Give me a delivery address(es) and I'll oblige. Graham, you will havo to wait until December/January, but that's a Moccachino on its way. | |
Graham 1-Sep-2010 [3889x2] | hehe |
At home we just use those single use Gregg's powdered Mocas that you pour into a cup and tip hot water into ... :) | |
caelum 1-Sep-2010 [3891] | Wow, I'm 80 miles outside Seattle and if any Seattlite heard you say that they would shriek! |
Graham 1-Sep-2010 [3892] | BTW, we have the "Rebol School" group ... where we *encourage* questions |
caelum 1-Sep-2010 [3893] | Always good to encourage questions. Thanks for the code, much appreciated. It will take me past this impasse I was in. Thinking about it, I must be brave because I want to replace all the PHP code I have written for my customers over the last seven years with Rebol code. If that is not brave, I don't know what is. |
Graham 1-Sep-2010 [3894] | sensible ? |
caelum 1-Sep-2010 [3895] | If i get it right, it will prove invaluable to my customers and me, as I will have more to offer them. If I don't I can just leave the PHP in place. I've been called a practical idealist by some people (and much worse by others). Besides, I'll be able to promote Rebol. Always a good thing. |
Graham 1-Sep-2010 [3896] | Are you switching to using Cheyenne? |
caelum 1-Sep-2010 [3897] | I've read about Cheyenne. I probably will when I can code competently in Rebol and I have my own server, which are cheap these days. So I am on a steep Rebol learning curve right now. I am a fast learner when I'm motivated. But Cheyenne will have to wait several months. |
Maxim 1-Sep-2010 [3898x2] | its actually about 15 minutes to download install and run on any server (or your machine). and from there, rebol cgi is much faster since its persistent. |
unless you have specific needs (like https) I really suggest you take an hour and look into it. it might change how you build all of your rebol web stuff... better sooner than later no? | |
caelum 1-Sep-2010 [3900] | I will certainly take a look at Cheyenne before I start doing complex stuff, and before I spend time designing this project on paper, which I have yet to do. ATM I'm playing around to discover what can be done with Rebol. |
MaxV 1-Sep-2010 [3901x3] | Ehi, my package its' view, not core! |
The last version of Rebview binary it's called "rebol", not rebview as usual. It's on rebol.com site. | |
maybe who made the Linux version applied the wrong name.... | |
caelum 1-Sep-2010 [3904] | Both those ftp code snippets work. Thanks Graham. Thanks Maxim. I'm on my Rebol way! |
Gregg 1-Sep-2010 [3905] | I've also done this to work around the @ issue: net-utils/url-parser/user-char: union net-utils/url-parser/user-char make bitset! #"@" |
Graham 1-Sep-2010 [3906x7] | I think a better solution is to fix the protocols. |
Eg. for ftp-protocol, change this open-check: [none ["220" "230"] ["USER" port/user] "331" ["PASS" port/pass] "230" "SYST" "*"] to open-check: [none ["220" "230"] ["USER" dehex port/user] "331" ["PASS" port/pass] "230" "SYST" "*"] | |
and then you can url-encode the username user%40mysite.org | |
The same should be done for the prot-pop.r and any others | |
Any objections for this making it to 2.7.8 ? | |
For all of this in agreement, please say nothing! Thanks. | |
all of those ... | |
Gabriele 2-Sep-2010 [3913x2] | Graham, the problem with url-encoding is not at the protocol level, it's at the URL! type parsing level. REBOL decodes characters at the wrong time. |
(see the note at the beginning of http://www.rebol.it/power-mezz/parsers/uri-parser.html - this was written at the beginning of R3 development, but I don't think anyone paid attention) | |
Graham 2-Sep-2010 [3915x3] | still this is a fix right? |
It seems unlikely that the URL! parsing will be fixed in R2 | |
and I presume that this is happening in r3lib.dll so outside our reach | |
Gabriele 2-Sep-2010 [3918] | this is a fix - no, because the %40 is converted to @ It might work if you do use %2540 (double encoding)... |
Graham 2-Sep-2010 [3919x2] | well, it works for me... doing a trace/net .. I saw the username being passed correctly to the ftp server |
Hmm... I must have hallucinated | |
older newer | first last |