World: r4wp
[#Red] Red language group
older newer | first last |
Gregg 30-Apr-2013 [7485] | I guess it is still deep voodoo, just a different kind. :-) |
DocKimbel 30-Apr-2013 [7486] | Actually, it's fairly simple, think about a GUI app that sends a click event to your Red/System binding, how do you pass the event to Red code if you can't call it from Red/System. ;-) |
Gregg 30-Apr-2013 [7487x2] | Right, easy for people like me to use, but voodoo under the hood. |
If you do voodoo, I can call you WitchDoc. ;-) | |
Kaj 30-Apr-2013 [7489x3] | It replaces this: |
; Call back into Red stack/mark-func ~on-action integer/push as-integer face integer/push action f_on-action stack/unwind stack/reset | |
For a callback with two arguments | |
DocKimbel 30-Apr-2013 [7492] | It just pushes the Red/System arguments on a new Red stack frame and invokes the Red function. No black magic required. ;) |
Gregg 30-Apr-2013 [7493] | Don't tell me that. I want to imagine that it's *reeeallly* hard and bad things will happen if I even try to understand it. :-) |
Kaj 30-Apr-2013 [7494] | I was convinced about that for Unicode, and it didn't work out well ;-) |
DocKimbel 30-Apr-2013 [7495x2] | Ah, one thing to not, the type casting shortcuts like: as-integer, as-byte, etc.. won't work within #call because the Red/System preprocessor is invoked too late. |
not => note | |
Gregg 30-Apr-2013 [7497] | That sounds important to document. |
Pekr 30-Apr-2013 [7498] | I would probably prefer it being called #callback, or some ppl might relate it to REBOL's CALL :-) |
DocKimbel 30-Apr-2013 [7499] | Actually, it is related a bit, because in both cases, you are making an "external" call. |
Kaj 30-Apr-2013 [7500] | #call is more generic; you're not necessarily calling back |
DocKimbel 30-Apr-2013 [7501] | That's why I've opted finally for just #call. |
Kaj 30-Apr-2013 [7502] | A Red/System logic! is stored as integer!, right, not byte!? |
DocKimbel 30-Apr-2013 [7503] | Integer! yes. |
Pekr 1-May-2013 [7504x3] | Just one question - I can see refeinements again mentioned. Is that technologically it is not easy achievable, or will we get refinement support for #call and routines later in the future? |
Doc - strange thing on Trello - I I would not have my link in the cache, Search on Trello.com does not show any results for Red, or Red programming language ... strange ... | |
I I would = If I would .... | |
DocKimbel 1-May-2013 [7507] | Refinements: these are a matter of cost vs added value. It costs significantly to add refinements support to routines and #call, and the added value is small. So, it is possible to add them, but it falls in the "nice to have" feature list, not "must to have", so they are very low priority. |
Henrik 1-May-2013 [7508x2] | Does Red attempt to answer Carl's old question of passing big options? Carl wrote a document on this once, but I can't find it. |
Essentially it was the idea of doing something else, when a function grows to have too many refinements, as this is both not very user friendly and reduces performance. | |
DocKimbel 1-May-2013 [7510] | APPLY is there for that (not yet implemented in Red though). |
Henrik 1-May-2013 [7511] | ok |
DocKimbel 1-May-2013 [7512] | There's also the special /options (IIRC) refinement in Topaz that allows use to pass a block with set-words/value for each arguments (including refinements). That should be also a solution to consider. |
Gregg 1-May-2013 [7513] | I've sometimes thought /WITH would be a good name for the arg block idea, though it would conflict with a few existing cases. |
Kaj 1-May-2013 [7514] | Agreed, I'm using that when marshalling Red to Red/System parameters |
PeterWood 4-May-2013 [7515] | I have consolidated the current Red/System V2 wish list on the Github wiki - https://github.com/dockimbel/Red/wiki/Red-System-v2-Wish-List |
DocKimbel 5-May-2013 [7516x3] | Thanks Peter. Could you please add a message like "Wish moved to v2 wish list on wiki" to each related tickets and close them? |
Also, having details for #27 and #28 would helpful. As is, I don't understand them. | |
Also each wish has to be motivated by some need, else it will be likely rejected if the need is not obvious to me. | |
Pekr 5-May-2013 [7519] | Quite extensive list. If there are no show-stoppers, I would proceed with Red first, e.g. getting us onto IOS, Android, bindings to native APIs, I/O, parse, etc. :-) |
Kaj 5-May-2013 [7520] | A lot of that needs to go through Red/System, so it's hard setting priorities |
PeterWood 5-May-2013 [7521] | I've closed the issues and will write up #27 and #28 (as I understand them) and add to the needs as I understand them. |
Kaj 5-May-2013 [7522] | Nice list, Peter |
PeterWood 5-May-2013 [7523] | Quite a few are youre Kaj :-) |
Kaj 5-May-2013 [7524] | Yes, but it's important to have them in a more structured form |
DocKimbel 5-May-2013 [7525x3] | Right, having a more formal specification like Python's PEP would be nice. |
Pekr: it's for Red/System 2.0, so it's not a short-term task. | |
Also, probably half of them will be rejected, or superseded by other features. | |
Arnold 6-May-2013 [7528x3] | No rejected items yet, looking good! Point 5 and 17 both have a wish for a BREAK. |
What do we need GOTO for in Red? GOTO END-PROGRAM ;) | |
Array type +1 | |
DocKimbel 7-May-2013 [7531] | Arnold: I haven't processed the list yet. |
Pekr 7-May-2013 [7532] | Array type + 2, no matter if you processed it :-) |
DocKimbel 7-May-2013 [7533] | Having an array type is probably not as useful as you might think. The only real advantage I see is the ability to add optional bound-checking, which should protect from a whole class of errors. |
PeterWood 7-May-2013 [7534] | Array syntax is a little more "average" programmer friendly than allocating memory and user pointers though :-) |
older newer | first last |