World: r3wp
[Core] Discuss core issues
older newer | first last |
Graham 2-Feb-2007 [7011x4] | gmail allows you to use their smtp server only using ssl to prevent spamming ... |
ie. you have to authenticate as a gmail user before you can send using their smtp interface. | |
But this also means that you can now send secure emails to yourself. | |
the data block should check to see if it is okay to send ... | |
Oldes 2-Feb-2007 [7015] | I would like to test it, but I don't have SSL:( |
Graham 2-Feb-2007 [7016x2] | Just buy R/Command |
I think it is kinda silly to have to get R/command just for ssl now .. since ssl is required for so many things | |
Pekr 2-Feb-2007 [7018x2] | I hope it will be free ... |
does proxy setting apply even for https? | |
Gabriele 2-Feb-2007 [7020] | petr: i think the answer is yes, but i don't remember. i'm not sure it has ever been tested though. |
Joe 3-Feb-2007 [7021] | graham, what kind of testing help do you need ? I am going to try the script |
Graham 3-Feb-2007 [7022x4] | Just to check it works for a start! :) |
I only got this script to work once .. never again after that! but it works using standard smtp port on other servers. | |
There's some type of deadlock occuring .... waiting for gmail's smtp server to respond to the insert smtp "." | |
Now, if you change insert smtp "." with insert smtp "^M^J.^M^J" gmail drops the connection | |
Oldes 8-Feb-2007 [7026x3] | . |
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] | |
as I need so often to write something and have the name same as the path :( | |
Pekr 8-Feb-2007 [7029] | yes, that is the limitation - you try to find out intuitive name for your function's refinement, but then you want to use intuitive names for your words. So I sometimes used underscore for words, but it looks ugly ... |
Sunanda 8-Feb-2007 [7030] | 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 [7031x4] | 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 ] ] |
many people say that rebol is mem hungry... I can say that today I was proven otherwise in some way. | |
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 ! | |
10mb of string becomes 600MB of binary xml objects... this is just insane. | |
Anton 8-Feb-2007 [7035x2] | Maxim, "rethrow": I would say "recursing into" myfunc or maybe "re-calling" myfunc. "Rethrow" is more for error handling. |
... error handling or "quick exit" flow control. | |
Maxim 8-Feb-2007 [7037] | that's what I was wondering... somehow rethrow sounded cooler ;-) |
Volker 9-Feb-2007 [7038] | juggling? |
Robert 10-Feb-2007 [7039x4] | I have question WRT to error handling: |
If I use | |
make error! "problem" | |
Immediatly an error message is printed to console. How can I catch this? I just want to return an error that I can catch an DISARM to get an error-object. Without anything printed to the console. | |
Sunanda 10-Feb-2007 [7043] | Wrap the target code in an attempt: attempt [oops: make error! "problem"] if error? oops [probe disarm oops] |
Robert 10-Feb-2007 [7044x4] | ah, I tried it with TRY etc. |
The MAKE error stuff is return from a function. | |
For example I call: a-function 1 and if this function has an error, it calls an error-function that ends with: make error! ... | |
I can't do: attempt [a: a-function] to getback the error. | |
Sunanda 10-Feb-2007 [7048] | 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. |
Robert 10-Feb-2007 [7049x2] | Ok, is this error than gone? It looks like within the error-object/near there is an other error. So I can handle the first one but as soon as I do something, I get the next output... |
Ah, damn, there was an other error in the code... | |
Sunanda 10-Feb-2007 [7051] | Happens to me all the time......:-( |
Ladislav 10-Feb-2007 [7052x5] | Robert: the following approach is better: |
a-function: func [] [return make error! "problem"] | |
error? a-function ; == true | |
or: error? the-error: a-function | |
etc. | |
Graham 10-Feb-2007 [7057x4] | I want to create a little spreadsheet application where users have access to the mathematical functions in rebol and nothing else. |
Is there some way to constrain 'do to work within a specific context of some mathematical functions, and nothing else? | |
Or, do I have to write a little mini parser ? | |
There's a little parser here http://www.rebol.com/docs/core23/rebolcore-15.html | |
older newer | first last |