Type | Bug | Status | submitted | Date | 26-Feb-2013 14:52 |
---|---|---|---|---|---|
Version | r3 master | Category | Ports | Submitted by | Ladislav |
Platform | All | Severity | minor | Priority | normal |
Summary | A failing clipboard:// test |
---|---|
Description | The test below fails both in R2 as well as in R3, the question is whether it is OK. |
Example code |
p: open clipboard:// append p c: "Clipboard port test" strict-equal? c copy p |
Assigned to | n/a | Fixed in | - | Last Update | 26-Feb-2013 23:08 |
---|
Comments | |
---|---|
(0003509)
Ladislav 26-Feb-2013 14:52 |
In the core-tests suite. |
(0003517)
BrianH 26-Feb-2013 21:33 |
Why would COPY work on a port in R3 like it does in R2? The port models are different. Are the APPEND and COPY actions even defined for clipboard:// ports? AFAIK the clipboard:// port is a R3-style READ and WRITE based port scheme, not trying to emulate R2-style behavior. It seems to me that the test itself is wrong for R3. |
(0003519)
Ladislav 26-Feb-2013 22:54 |
Why? Because:
copy: make action! [[ "Copies a series or object." value [series! port! map! object! bitset! any-function!] /part "Limits to a given length or position" length [number! series! pair!] /deep "Also copies series values within the block" /types "What datatypes to copy" kinds [typeset! datatype!] ]] |
(0003520)
BrianH 26-Feb-2013 23:08 |
Whether a particular action applies to a port scheme depends on the scheme model. If an action doesn't apply to the model for a particular scheme, it isn't supported, regardless of whether the action has port! in its spec or not. COPY only has port! in its spec to make it possible to support in schemes, not because it is supposed to be supported.
R3-style schemes generally don't have the series-like actions defined for them. The only schemes that I know of that support COPY even in open-port mode are Steeve's virtual block scheme that is supposed to act like a series, and ChristianE's ODBC scheme that is specifically designed to be compatible with the R2/Command ODBC scheme (though that really should be a compatibility port scheme returned by FIRST of an otherwise R3-style scheme). Most other R3 schemes don't use INSERT or APPEND, they use WRITE, and they don't use COPY, they use READ. That is the R3 style. When designing a port scheme, which actions you deliberately don't support are as important as which you do support. The model of interaction you intend depends on these choices. For the R3-style port scheme model, R2-compatibility was dropped on purpose and for good reasons. It's not the only possible model, but it is the main R3 model. |
Date | User | Field | Action | Change |
---|---|---|---|---|
27-Feb-2013 04:39 | BrianH | Comment : 0003520 | Modified | - |
26-Feb-2013 23:13 | BrianH | Comment : 0003520 | Modified | - |
26-Feb-2013 23:10 | BrianH | Comment : 0003520 | Modified | - |
26-Feb-2013 23:09 | BrianH | Comment : 0003520 | Modified | - |
26-Feb-2013 23:09 | BrianH | Comment : 0003520 | Modified | - |
26-Feb-2013 23:08 | BrianH | Comment : 0003520 | Added | - |
26-Feb-2013 22:54 | Ladislav | Comment : 0003519 | Added | - |
26-Feb-2013 21:34 | BrianH | Comment : 0003517 | Modified | - |
26-Feb-2013 21:33 | BrianH | Code | Modified | - |
26-Feb-2013 21:33 | BrianH | Category | Modified | Unspecified => Ports |
26-Feb-2013 21:33 | BrianH | Comment : 0003517 | Added | - |
26-Feb-2013 14:52 | Ladislav | Comment : 0003509 | Added | - |
26-Feb-2013 14:52 | Ladislav | Ticket | Added | - |