• 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: 37501 end: 37600]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
Anton:
19-Jan-2007
Oldes, you don't need to 
	s: none

S is a local and locals are automatically set to NONE for you. (Unless 
you are using a very old rebol.)
Bo:
20-Jan-2007
Rebol, never returns from that.  It seems to be a bug in Rebol's 
FTP handler as it doesn't ever time out and continue, it just locks 
up.  I have to press "Escape" to get out of it.  I've left it for 
up to 12 hours and it still doesn't return.
Bo:
20-Jan-2007
I'm using the SDK and I'm including sdk-2-6-2/source/prot.r which 
should have the FTP protocol in it.  Does anyone know if there is 
a newer version of prot.r other than sdk-2-6-2?
Bo:
20-Jan-2007
Well, I haven't tried it with a different FTP server, but it definitely 
appears the problem is on the Rebol side.
Bo:
20-Jan-2007
I've considered installing WarFTPd or something, but this is a production 
server and I don't want to mess anything up by having two FTPd's 
installed simultaneously.
Bo:
20-Jan-2007
(I meant "I'm not even sure it is a Rebol FTP protocol issue")
Bo:
20-Jan-2007
This is part of the application I wrote called Smooth-Copy which 
I am using as a remote backup utility for some of my clients (and 
my wife's laptop, from which I got these results).
Bo:
20-Jan-2007
I am overwhelmed with projects presently, and I'm willing to pay 
if someone can come up with a patch to prot.r for FTP (if that is 
where the problem exists).  I would also allow the patched prot.r 
to be released back to the community.
Graham:
20-Jan-2007
the problem is that it may be just with a particular ftp server ...
Bo:
20-Jan-2007
But it seems the FTP server is working properly according to the 
log file.  If it cannot retrieve the directory listing, it sends 
a 425 and then eventually disconnects.  In any case, Rebol should 
never hang indefinitely even if the FTP server misbehaves.
[unknown: 9]:
20-Jan-2007
Shame.  I remmember when we had to build that, I had indeed asked 
it be made a module, so that suprises me,
Anton:
21-Jan-2007
Bo, I've done a bit of FTP hacking. Maybe I can find the bug.
Volker:
22-Jan-2007
is ftp-gadget still much better  then ftp? looks like  a module with 
gui-callbacks to me. and i spottet the word "async" somewhere.
Henrik:
22-Jan-2007
is there a way to "trace" where you read or 'do'ed a file from? would 
be handy if you had a script that could tell whether it was run from 
a webserver or from a local disk
Volker:
22-Jan-2007
webserver, disk, random example or exactly that? becausewith  webserver 
(-c) you have stuff in the  cgi-object. Carl uses that  to decide 
 if it  is  a testrun.
Bo:
22-Jan-2007
The problem I'm having is that most FTP transfers work fine, but 
somewhere along the line (say after 50 FTP connections or perhaps 
as many as a couple thousand FTP connections) one of the connections 
hangs up (presumably because the FTP server returned an unexpected 
response, like not being able to open a directory).
Volker:
22-Jan-2007
if it is  because  of a response one could try to provoke such errors. 
with some luck..
Volker:
22-Jan-2007
a special  version of rebol, or with everyone?
Bo:
22-Jan-2007
No.  I may have a bad FTP server, but I am still concerned that Rebol 
would lock up even if the FTP server was bad.
Volker:
22-Jan-2007
i thought it  is  reversed, the server tries to open a connection 
back to me.
Bo:
22-Jan-2007
The lines directly above that read:

(000032) 1/20/2007 9:16:47 AM - lechnowsky (*IP*)> PASV

(000032) 1/20/2007 9:16:47 AM - lechnowsky (*IP*)> 227 Entering Passive 
Mode (192,168,1,20,15,187)
(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> CWD somedir/

(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> 250 CWD successful. 
"/somedir" is current directory.
(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> TYPE A

(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> 200 Type set to 
A
(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> LIST

(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> 150 Connection 
accepted

(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> 226 Transfer OK
(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> CWD /

(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> 250 CWD successful. 
"/" is current directory.

(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> PORT (ip and port 
info here)

(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> 200 Port command 
successful
(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> CWD somedir/

(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> 250 CWD successful. 
"/somedir" is current directory.
(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> TYPE A

(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> 200 Type set to 
A
(000032) 1/21/2007 9:16:47 AM - lechnowsky (*IP*)> LIST
Oldes:
22-Jan-2007
If you upload a lot of files and sometimes get error, maybe it's 
problem with connection or something like that
Bo:
22-Jan-2007
My problem is that I am trying to do a remote backup of a complete 
directory that may contain thousands of files.  On a local area network, 
it always works fine (not using FTP), but when using FTP, it locks 
up seemingly at random.
Bo:
22-Jan-2007
No, by "lock up", I mean Rebol sits and waits forever for a response 
and never continues.  It never times out.
Oldes:
22-Jan-2007
And you are using just a read and write?
Bo:
22-Jan-2007
But it doesn't seem to hang up while appending to an existing file. 
 The only time I have seen it hang up is when Filezilla returns a 
425 message.
Bo:
22-Jan-2007
A simple search doesn't find 425 anywhere in that protocol.
Oldes:
22-Jan-2007
there is just a little mess with the source and target path, as I 
was using it in the scenarie, where the target path was accessed 
thru http, it should not be difficult to fix it, but I don't have 
more time now
Bo:
22-Jan-2007
If I find a solution, I'll post the fix and let you know.
Bo:
22-Jan-2007
Yup, just verified that Rebol always hangs up when the FTP server 
logs a 425 response: "425 Can't open data connection"
Bo:
23-Jan-2007
I've found THE LINE that Rebol hangs up on when the FTP server returns 
a 425 response.  It is the line with the ;<--- after it below:

	accept-connect: func [port type][
		if not port/locals/passive [
			either port/locals/listen-port [
				if type <> 'new-dir [
					port/sub-port: first port/locals/listen-port ;<---
				]
				close-listen port
				port/locals/listen-port: none
			][
				net-utils/accept-proxy port/sub-port
			]
		]
	]
Bo:
23-Jan-2007
Obviously, it is in an infinite wait for a listen port that will 
never come.  Can you see any problems if the line were changed to:


if port? lstn-prt: wait [any [system/schemes/ftp/timeout system/schemes/default/timeout 
30] port/locals/listen-port][port/sub-port: lstn-prt]
Volker:
23-Jan-2007
there should  be a timeout, yes. Would  trigger an error too, how 
 is that done in the right way with ports? Because i do not know 
what this code  does without a port/subport.

what confuses  me, this code runs also in passive  mode?


an idea of mine is to listen on both ports, control and this one. 
if the server sends the 405, its never processed because we dont 
listen there. Should  listen on both ports and still handle commands. 
But do not know what the  right vars are.  Waiting for the skilled 
 ftp-patchers  before examining^^
Bo:
23-Jan-2007
In limited testing, my patch above (slightly modified to remove typos) 
works.  If the 425 occurs, after a timeout period the patched protocol 
picks up right where it left off.  But yes, I would really like the 
skilled ftp-patchers to take a look at the problem and see if they 
can come up with a better fix.
sqlab:
24-Jan-2007
Are you sure that this happens in passive mode, despite  " if not 
port/locals/passive [  "


I found this line also to be the cause for infinite waiting when 
using ftp with active mode thru a firewall . But activating the passive 
mode eliminated the need for a patch on  my side.
Graham:
24-Jan-2007
Anyone got a quick script I can use to determine the ip address of 
a PC on the local network?
Graham:
24-Jan-2007
it's a virtual nic ...
Volker:
24-Jan-2007
there was a script which lists all  the available interfaces. bBsed 
 on 'get-modes IIRC. But  forgot  where i saw it.
Henrik:
26-Jan-2007
I think that would be a security hole.
PeterWood:
29-Jan-2007
This thread may help a little: 

http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-thread.r?m=rmlHBNQ
Oldes:
29-Jan-2007
Henrik: it seems to be very bad. But it looks that OSX will not be 
such a bad OS if it allows you work even with apps eating so much 
memory.
Henrik:
29-Jan-2007
I had a rugby script running all night that would periodically download 
1 MB of data from another machine. I guess there was a leak. :-)
Henrik:
29-Jan-2007
but it still ran instead of crashing. I think that's good, but isn't 
stats in need of a fix if it can't display mem usage above 2 GB?
Ladislav:
29-Jan-2007
BACK versus past-tail indices. Every index (except for 1) may become 
past-tail during the execution of a script (when its block/string 
"shrinks") and "legal" again (when its block/string grows sufficiently). 
Let me mention the SAME? function as an example of a consistent behaviour 
- no matter whether the index is past-tail or not, the SAME? function 
takes it into account when comparing series. The BACK function, however, 
handles past-tail indices differently than the "normal" ones. any 
wishes/notes/proposals?
Chris:
29-Jan-2007
Graham: re ports, there's not much art to it.  You try and break 
up access to any particular service according to supported accessors. 
 Almost all built in protocols are wrappers to a TCP port, containing 
all the commands for that particular protocol.  Note that 'read on 
a port uses 4 accessors: init, open, copy, close; 'write also uses 
4: init, open, insert, close; 'make will call 'init, whereas 'open 
will first 'init (unless you provide a port! as your argument -- 
eg. open make port! foo::bar), then 'open.  You can use all the other 
accessors on an open port: insert, change, remove, etc.  And of course 
'query which you can assign to provide information about the port 
without opening it.  I'd be happy for anyone to elaborate or correct 
this description...
Chris:
29-Jan-2007
The sandbox port I wrote may serve as an example, except that it 
wraps a file port and not TCP.  I hope to put together an article 
on this (before ports are changed completely in R3 :)
Graham:
29-Jan-2007
I just find the way protocols are done wrap the abstraction so tightly 
that you can't insert arbitrary command into a port without rewriting 
the protocol.  Eg. adding the TOP command to POP.
Maxim:
29-Jan-2007
the one thing I find strange comming from carl, is the fact that 
within Amiga, everything was a hook.  so you could very easily re-implement 
everything... and most of the deep internals of  REBOL are pretty 
boxed in... the stuff is still in box... but opening most of these 
secrets is like opening a can of worms...
Anton:
30-Jan-2007
id: 0 foreach [a b c] [1 2 3 4 5 6] [print id: id + 1]


use [vars id][
	vars: [a b c]
	id: 0 foreach vars [1 2 3 4 5 6] [print id: id + 1]
]
Oldes:
30-Jan-2007
use [vars id][
	vars: [a b c]
	id: 0 foreach :vars [1 2 3 4 5 6] [print id: id + 1]
]
Anton:
30-Jan-2007
Should put that in the FAQ: "How many hours should I code before 
taking a break ?"
Ladislav:
30-Jan-2007
insert/dup looks like not working when used on /binary/seek ports. 
Is that a known issue?
Oldes:
30-Jan-2007
I mean, that didn't know that it's a problem:)
Gabriele:
30-Jan-2007
i don't think it's known, otoh /seek is known to have a few problems 
so it's not really surprising. :)
Anton:
30-Jan-2007
I guess FOREACH would suffer much if the first argument was expected 
to be always a block!
Ladislav:
31-Jan-2007
try this:

foreach': func [
    "Evaluates a block for each value(s) in a series."

    word [word! block!] {Word or block of words to set each time (will 
    be local)}
    data [series!] "The series to traverse"
    body [block!] "Block to evaluate each time"
] [
    foreach :word :data :body
]
Ladislav:
31-Jan-2007
(it is a referentially transparent argument passing variant)
Graham:
1-Feb-2007
I cloned the esmtp protocol to use on port 465, and added a /secure 
to 'send so that it uses my new ssmtp protocol.
Graham:
1-Feb-2007
set-net [ [compkarori-:-gmail-:-com] smtp.gmail.com ]
send/secure [compkarori-:-gmail-:-com] "testing .. "


and a trace/net shows that it sends the message but then hangs waiting 
for a 250 response from the 'check-write
Graham:
1-Feb-2007
I've managed to send a few emails to myself using smtp.gmail.com
Graham:
2-Feb-2007
ie. you have to authenticate as a gmail user before you can send 
using their smtp interface.
Graham:
3-Feb-2007
Just to check it works for a start!  :)
Oldes:
8-Feb-2007
I think, it's a shame, that cannot do this:
>> test: func[/a a][probe a]
** Script Error: Duplicate function value: a
** Where: throw-on-error
** Near: func [/a a] [probe a]
Sunanda:
8-Feb-2007
One hack is to assign the refinement value to the refinement word 
at the start of the function:
test: func[/a _a][if not none? a [a: :_a] probe a]
You can then just refer to a.

It introduces an ambiguity though -- does none mean no /a refinement 
supplied, or that the value was none ?
Maxim:
8-Feb-2007
in useage after all these years  I've come to realize that verifying 
the refinement itself is less usefull than ingnoring the value if 
its none.  one should usually use none as the fact its not a value, 
so therefor just like a default, or something to ignore.


this kind of useage allows one to rethrow  the function (is that 
the proper term?) with very little fuss.  in a way, this becomes 
exactly like option args in other applications,  ex:

myfunc [count /option opt][
	unless (count: count - 1) = 0 [
		if opt [
			print count
		]
		myfunc/option count opt
	]
]
Maxim:
8-Feb-2007
a 10MB xml file loaded from the net and loaded with xml2rebxml  took 
about 100mb of ram.  the same file loaded in firefox  took up 600mb 
of ram.  I was pretty shocked !
Robert:
10-Feb-2007
The MAKE error stuff is return from a function.
Robert:
10-Feb-2007
For example I call:
	a-function 1


and if this function has an error, it calls an error-function that 
ends with: make error! ...
Robert:
10-Feb-2007
I can't do: attempt [a: a-function] to getback the error.
Sunanda:
10-Feb-2007
This works for me:
a-function: func [] [make error! "problem"]
error? a: try [a-function]
***

If that's not quite what you have in mind, take a look at 'throw 
and 'catch -- they may be more suited.
Ladislav:
10-Feb-2007
a-function: func [] [return make error! "problem"]
Ladislav:
10-Feb-2007
error? a-function ; == true
Ladislav:
10-Feb-2007
or: error? the-error: a-function
Graham:
10-Feb-2007
I want to create a little spreadsheet application where users have 
access to the mathematical functions in rebol and nothing else.
Graham:
10-Feb-2007
Is there some way to constrain 'do to work within a specific context 
of some mathematical functions, and nothing else?
Graham:
10-Feb-2007
Or, do I have to write a little mini parser ?
Graham:
10-Feb-2007
There's a little parser here http://www.rebol.com/docs/core23/rebolcore-15.html
Ladislav:
10-Feb-2007
you don't have to write a parser. The approach using my SAFE-EVAL 
function may be faster:

safe-eval: func [
	stm-block [block!]
	/local stm
] [
	stm: make block! (length? stm-block) * 2 + 1
	insert stm first stm-block
	while [stm-block: next stm-block not tail? stm-block] [
		insert tail stm :first
		insert/only tail stm stm-block
	]
	first do/next stm
]
Ladislav:
10-Feb-2007
then it is not for you, this was just for a function evaluation
Graham:
10-Feb-2007
Ok, so looks like it will have to be a parser
Graham:
10-Feb-2007
but it would be nice to be able to use the rebol parser do evaluate 
words within a mathematical context only
Ladislav:
10-Feb-2007
when using a parser, you can even use operator precedence rules and 
such
Graham:
10-Feb-2007
A non parse based solution ( ie. parse = too hard! )
Graham:
10-Feb-2007
How does one access the parts of a function?
Pekr:
11-Feb-2007
Graham - it was a joke. And I thought as maybe ppl would not understand, 
if I would post it in Announce group, I posted it rather in Humour 
group :-)
Gabriele:
11-Feb-2007
a different approach is to create a context with only the words you 
want to allow, then use to-block, then bind it to your context only, 
then do it.
Ladislav:
11-Feb-2007
yes, the transformation to string and to block back and forth looks 
a bit messy
Volker:
11-Feb-2007
in-shadow-context: use first system/words['some-word]

then bind to 'some-word. somewhat  expensive, but you do it only 
on input. 

Escapes: it  does not go into #[object![..]]. I have  a function 
which does  that too.  ifthe user can do a  stringwith a new word, 
that  word is still global.
Ladislav:
11-Feb-2007
yes, it has been offered for R3 in a blog
Graham:
11-Feb-2007
Yes, I want to bind it to a different context to be safe .. so exactly 
how do I create this different context for all the math stuff?
Gabriele:
11-Feb-2007
>> a: context compose [
[    (to set-word! '+) get in system/words '+
[    ]
>> a/+

** Script Error: + expected value1 argument of type: number pair 
char money date time tuple
** Near: a/+
Gabriele:
11-Feb-2007
(don't ask me why +: is not a valid set-word)
Maxim:
11-Feb-2007
my god... REBOL is going nuts!  I have a situation where the above 
is not true...  and the select pairs are [aword an-object bword another-object]
Anton:
11-Feb-2007
relax... rebol is probably not going nuts. There is a reason somewhere.
Anton:
11-Feb-2007
quickly make a little example file which demonstrates the problem 
using a new console.
Maxim:
11-Feb-2007
using a new console, things behave as expected... which is why I 
am wondering why they don't in the running code
Maxim:
11-Feb-2007
(using a block with simple values, the two lines above act as I would 
expect)
Maxim:
11-Feb-2007
but look at the simplicity of the two lines above... can you image 
a way in  which  the select would return none and the find would 
return the object?
Anton:
11-Feb-2007
A confusion between lit-words and words maybe ?
Anton:
11-Feb-2007
write clipboard:// mold/all blk
and paste it (and mold/all VAL) into a new editor window.
37501 / 6460812345...374375[376] 377378...643644645646647