World: r3wp
[Core] Discuss core issues
older newer | first last |
Oldes 9-Jun-2011 [1659x3] | I think the most practical solution is to provide response-code in port/locals and return none for 204 and 205. |
I suppose that server should provide date on 304 response, not client. | |
Also when you are using just: new-content: read url-with-no-content-response using error chatching and parsing the error message should be enough. | |
Gregg 9-Jun-2011 [1662] | Thanks Oldes. I can handle it simply for now, and maybe this can be addressed more thoroughly in R3. |
Geomol 9-Jun-2011 [1663] | Tonight's Moment of REBOL Zen: >> same? :empty? :tail? == true Wouldn't it be better to define EMPTY? as: empty?: func [ series ][ tail? head series ] |
Endo 10-Jun-2011 [1664] | They are different and not backward compatible. >> b: [1 2 3] == [1 2 3] >> c: skip b 3 == [] >> empty? b == false >> empty? c == true ; c references to b, b is not empty, but c is. |
Oldes 13-Jun-2011 [1665x2] | in R3: >> same? :empty? :tail? == false |
but the result is same.. for me it's fine as it is. | |
BrianH 14-Jun-2011 [1667] | On R3, TAIL? is a redefinition of EMPTY? with fewer supported types. Internally they are the same function code. This was done in order to have one version that is more flexible, and another that triggers useful errors. |
amacleod 15-Jun-2011 [1668x2] | Getting an error when sending bulk email: ** User Error: Server error: tcp 501 <>: missing or malformed local part ** Near: insert smtp-port reduce [from address message] The number of email addresses is 52. I can send using the same settings one at a time and I have succeeded sending 8 addresses at one time. But it bombs on my whole list. |
Found a bad address thats probably the problem.... | |
Endo 15-Jun-2011 [1670] | Did you try send/only ? |
Henrik 8-Jul-2011 [1671x2] | Has anybody built a binary diff/patch function set? |
If I want to store some fairly big data as undo information, it seems to make sense to store it as a diff, and load the data that I want to undo/redo to. Then it would also be possible to store the entire changes sequence to disk. | |
Gabriele 8-Jul-2011 [1673x2] | binary diff can be expensive - if you control the application that modifies the data, can you log the changes instead? |
if not, you probably want something like this: http://publications.cse.iitm.ac.in/734/ | |
Gregg 8-Jul-2011 [1675x3] | I did some a long time ago Henrik. It isn't fast enough to work on data of any size though. I can dig it out if you're interested. Can't remember what state of completion it's in. |
Any *significant* size that is. | |
It's also high space complexity. | |
Henrik 8-Jul-2011 [1678] | The biggest object here is around 4 MB or 550 kb compressed. I expect that binary diff would only be used during load and save, and then keep full objects in memory. |
Gregg 8-Jul-2011 [1679x2] | Mine will be way too slow for that. |
My original goal was not binary diffs, but diffing blocks. | |
Henrik 9-Jul-2011 [1681] | you are right. I looked into it and it looks to be way too slow, so I'm trying another approach. |
Geomol 11-Jul-2011 [1682x3] | >> negate 2 + - 2 == 0 >> - 2 + - 2 == -4 Bug? |
Isn't unary minus introducing a third semantic rule? Functions are prefix, operators are infix with precedence over functions. And then unary minus is prefix with precedence similar to operators? | |
w> - (2 + (- 2)) == 0 w> (- 2) + (- 2) == -4 Question is, how would we read - 2 + - 2 | |
Endo 11-Jul-2011 [1685] | It does correctly I think, here is the trace log: >> - 2 + - 2 Trace: - (word) Trace: 2 (integer) Infix: op (add) Trace: - (word) Trace: 2 (integer) |
Geomol 11-Jul-2011 [1686] | I'm asking, if unary minus should work as if being defined like this: >> set '- :negate |
Maxim 11-Jul-2011 [1687] | no, AFAICT the unary minus is applied exactly like all operator precedence (from left to right). negate and "-" do not have the same precedence, as you noted, so its normal for: >> negate 2 + - 2 and >> - 2 + - 2 to give different results. |
Geomol 11-Jul-2011 [1688] | Ok, intensional then. I'm surprised. |
Steeve 11-Jul-2011 [1689] | You shouldn't old pal :-) |
Geomol 11-Jul-2011 [1690x2] | Is unary minus the only prefix thing, that has same precedence as operators? |
:) Sometimes I feel, I have no clue about this language. ;) | |
Steeve 11-Jul-2011 [1692] | actually, unary minus has an higher precedence than other ops |
Geomol 11-Jul-2011 [1693x2] | Functions with literal arguments works about the same. >> f: func ['a] [probe a] >> f 2 + 2 2 == 4 So f gets the value 2 in this example. |
Complicated rules! ;) | |
Steeve 11-Jul-2011 [1695] | because functions with literals stop the evaluation flow |
Geomol 11-Jul-2011 [1696x2] | yeah |
Tonight's Moment of REBOL Zen: >> switch/default 'a [a 1] 2 == 2 | |
Andreas 11-Jul-2011 [1698] | What's the insight here? |
Geomol 11-Jul-2011 [1699] | >> switch/default 'a [a [1]] 2 == 1 |
Steeve 11-Jul-2011 [1700] | so what ? |
Geomol 11-Jul-2011 [1701] | Isn't it strange, that if the value being searched for (in this case a) is found, and the next item in the block isn't a block, then it fails to defaul? |
Andreas 11-Jul-2011 [1702] | No. |
Geomol 11-Jul-2011 [1703x2] | *default* |
ok :) | |
Andreas 11-Jul-2011 [1705x2] | From the docstring for SWITCH: "Selects a choice and evaluates the block that follows it." |
>> switch 'a [a b [1]] == 1 >> switch 'b [a b [1]] == 1 | |
Steeve 11-Jul-2011 [1707] | must be a block, nothing else |
Geomol 11-Jul-2011 [1708] | Oh, the docs are different at http://www.rebol.com/docs/words/wswitch.html It sais "Selects a choice and evaluates what follows it." Must be a block ... hm why? |
older newer | first last |