World: r3wp
[Core] Discuss core issues
older newer | first last |
Ladislav 7-Oct-2010 [18681x2] | Universal except that is corrupts binary files - did you find any corruption? |
Though with the above you can't specify a given timestamp - that is exactly what is needed | |
GrahamC 7-Oct-2010 [18683x2] | What's the safest way to check if a string ends in a "/" or not? |
all [ not empty? series #'/" = last series ] seems painful | |
Sunanda 7-Oct-2010 [18685] | Is this any better? if "/" = back tail series [print true] |
Oldes 7-Oct-2010 [18686] | or: >> s: "" s/(length? s) == none >> s: "/" s/(length? s) == #"/" |
GrahamC 7-Oct-2010 [18687x4] | what's the most efficient ? :) |
perhaps we need a new function : rear: func [ series ][ back tail series ] | |
or 'end or 'hind .. | |
Actually I like 'endof ... so i can do remove endof series | |
Pekr 7-Oct-2010 [18691] | end of is not correct name. End is end, period :-) 'remove last-of series' would be OK though ... |
Gabriele 7-Oct-2010 [18692x2] | Ladislav, note that on Unix, the TOUCH command creates the file if it does not exist. so I would not necessarily consider that a bug... |
Ladislav: also, I think OPEN without /DIRECT will actually read the file and then write it back, so it's no different from Geomol's solution actually. Gregg's /SEEK/BINARY (actually I think /SEEK implies /BINARY) should work better. | |
Ladislav 7-Oct-2010 [18694] | I do not consider it a bug, but I do want a different behaviour, which I have to simulate somehow |
Gregg 7-Oct-2010 [18695x2] | Ladislav, yes I saw corruption. |
And performance memory issues on large files. | |
Robert 9-Oct-2010 [18697] | So, I need to send seme emails and need to login into my SMTP server. And this mostly fails out-of-the box in Rebol 2 and I can't remember what to do to make it work: >> send [robert-:-muench-:-googlemail-:-com] "Test" Net-log: ["Opening" "tcp" "for" "esmtp"] connecting to: mail.saphirion.com Net-log: [none "220"] Net-log: {220 mail.saphirion.com ESMTP Exim 4.63 Sat, 09 Oct 2010 12:12:46 +0200} Net-log: [["EHLO" system/network/host] "250"] Net-log: {250-mail.saphirion.com Hello mail.saphirion.com [10.0.0.3]} Net-log: "250-SIZE 52428800" Net-log: "250-AUTH LOGIN CRAM-MD5 DIGEST-MD5" Net-log: "250 HELP" Net-log: ["Supported auth methods:" [login cram]] Net-log: ["MAIL FROM: <[robert-:-muench-:-saphirion-:-com]>" "250"] Net-log: "250 OK" Net-log: ["RCPT TO: <[robert-:-muench-:-googlemail-:-com]>" "250"] ** User Error: Server error: tcp 530 Relaying not allowed ** Near: insert smtp-port reduce [from reduce [addr] tmp] I think the probem is that Rebol isn't logging in correctly. Either it doesn't understand the supported methods or something else is different. Any ideas how I can fix it or track it down? |
PeterWood 9-Oct-2010 [18698] | 0.k='45 |
Robert 9-Oct-2010 [18699] | ? |
PeterWood 9-Oct-2010 [18700x4] | Sorry I forgot to decompress the message: I have no problem sending from an ESMTP account from Rebol after setting the account name and password with set-net: |
? set-net is pretty self-explanatory. | |
You could possibly get this message if you are not directly connected to the ISP hosting saphirion.com. I found this explanation helpful : http://www.answersthatwork.com/Download_Area/ATW_Library/Networking/Network__3-SMTP_Server_Status_Codes_and_SMTP_Error_Codes.pdf | |
If it's neither of those this script at REBOL.org may be of help : http://www.rebol.org/view-script.r?script=patch-esmtp-net.r | |
amacleod 9-Oct-2010 [18704] | whats the easiest way to assign a block of values to a block of words? fields: [ref lname fname] data: [1 "Smith" "Bob"] |
ChristianE 9-Oct-2010 [18705] | set fields data |
amacleod 9-Oct-2010 [18706] | thanks |
Steeve 9-Oct-2010 [18707] | lol |
Henrik 9-Oct-2010 [18708] | :-) had amacleod not been a REBOLer, he might have said "stop making jokes". |
Pekr 9-Oct-2010 [18709] | awesome :-) |
amacleod 9-Oct-2010 [18710] | I've been assigning them one at a time this whole time...feel like a dope |
Steeve 9-Oct-2010 [18711] | Hard time to pass by, don't worry, we sympatize :-) |
GrahamC 9-Oct-2010 [18712x3] | this creates globals though |
And in R3, it will bypass the setting of locals with funct | |
and in R2 using the r2/forwards | |
Steeve 9-Oct-2010 [18715] | he ? SET doesn't modify the bouding context of the words |
GrahamC 9-Oct-2010 [18716] | >> unset 'crap >> context [ set [ crap ] [ 1 ]] >> crap == 1 |
Steeve 9-Oct-2010 [18717] | so what ? you didn't declare 'crap in the context. SET doesn't modify the context. |
GrahamC 9-Oct-2010 [18718] | >> global: 1 == 1 >> do test: funct [ ][ set 'global 2 ] == 2 >> global == 2 |
Steeve 9-Oct-2010 [18719] | so what ? you didn't declare 'crap in the context. SET doesn't modify the context the words. |
GrahamC 9-Oct-2010 [18720] | I'm saying that if you use the set method, then your words appear in the global context which you may not want |
Steeve 9-Oct-2010 [18721x2] | So what ? you don't declare 'crap in the context. I repeat: SET doesn't modify the context of the words. Here it's local. >> c: context [crap: 0 set [crap] [1]] c/crape == 1 |
Sorry for the echo, my connection is bad currenlty | |
GrahamC 9-Oct-2010 [18723] | It's Altme .... |
Henrik 9-Oct-2010 [18724] | I think Graham simply wants the block to be set within the context with as little additional code as possible. |
GrahamC 9-Oct-2010 [18725x2] | If you want to use the set method of whole sale settting variables you have to declare them first in the context to prevent them from becoming global. So what gain is there? |
unless you do something like this use fields [ set fields data ] | |
Ladislav 9-Oct-2010 [18727x2] | this creates globals though - this is actually wrong, SET does neither "create", nor "globals" |
And in R3, it will bypass the setting of locals with funct - in R2, as well as in R3, when using the SET function, you bypass the collection of object locals. In R3, with FUNCT, you may not bypass the collection as follows: set [a: b:] [1 2] | |
GrahamC 9-Oct-2010 [18729x2] | neat trick |
because 'funct scans the body of the function looking for set-words | |
older newer | first last |