World: r3wp
[!REBOL3]
older newer | first last |
Steeve 12-Jan-2011 [7025] | In R3 >> d: make obejct1 object2 should behave like >> d: append object1 body-of object2 But yeah, the first form is more concise and faster. |
Kaj 12-Jan-2011 [7026x5] | Do you know this document? |
http://www.rebol.net/w/index.php?title=Copy_Semantics&redirect=no | |
There was a big discussion before it, so I would guess it's intended, although I'm not sure | |
Maxim should know the details, because he pushed for changes in object copying | |
I think the point was to have programmer control over the copying of an object that is being cloned | |
Maxim 12-Jan-2011 [7031] | yes copy control was implemented because of real world issues trying to use early R3 alphas and also because the lack of control in R2 makes many big data sets very hard to manage in R2. |
BrianH 12-Jan-2011 [7032] | Ladislav, FACES? was created in accordance with the current documentation of the function naming standards, not the current function naming standards. The documentation needs fixing. |
Ladislav 12-Jan-2011 [7033x2] | So, could you tell me what your preferences are? |
(regarding the wording) | |
BrianH 12-Jan-2011 [7035] | If it's a function that takes a face or gob as a parameter and returns the faces inside of it, I prefer FACES-OF. If it is a member function (assigned to a field of a face and bound to it), FACES. Those look best to those familiar with English. We're trying to cut down on *? for functions that aren't questions or part of the help system. |
Ladislav 12-Jan-2011 [7036x2] | I thought, you did not intend to change the wording of of http://www.rebol.com/r3/docs/concepts/scripts-style.html#section-11 , did you? |
Aha, that "if it is a member function" was what you meant. It is not, currently. | |
BrianH 12-Jan-2011 [7038x2] | If necessary, yes. The noun-OF convention should be added, and some sensible *? conventions should be mentioned too. In particular, the "is it a question?" criteria is a good thing to mention. |
I don't have the time this week to do so, and am waiting on some more community understanding before I jump in. The "intrinsic property" thing likely won't survuve the cut, being replaced by the "implicit -of" thing. | |
Ladislav 12-Jan-2011 [7040] | But, the Face/faces was used before the change, and it was not a function, but a block "storing" the faces |
BrianH 12-Jan-2011 [7041x2] | Then FACES-OF would be the best name for the function, letting 'faces be used for variables, and maybe letting FACES? mean "does it have faces?". |
It definitely wasn't based on any C convention, definitely on English :) | |
Oldes 13-Jan-2011 [7043x2] | Where should be stored equivalent to R2's system/user/name and system/user/email ? |
Also do we have any standart way how to specify that a script requires R3 in script's header? | |
Kaj 13-Jan-2011 [7045x2] | There's no mail functionality yet |
Graham's SMTP protocol doesn't seem to have a place for them, either | |
Oldes 13-Jan-2011 [7047x5] | I'm not looking for mail functionality, but where will be stored the user info. |
Another question... if I want function which converts integer to one byte, is there better way than: copy back tail to binary! 60 | |
maybe: to binary! to char! min 255 60 | |
I should try if extension could speed up such a conversions. | |
Hm.. R3 version of conversion to 2 bytes is slower:/ R3: >> tm 100000 [copy/part head reverse to binary! 300 2] == 0:00:00.079 R2: >> ui16-struct: make struct! [value [short]] none tm 100000 [ui16-struct/value: 300 third ui16-struct] == 0:00:00.047 | |
Pekr 13-Jan-2011 [7052] | make a new native as an extension, link it as a command :-) |
Cyphre 13-Jan-2011 [7053] | Kaj, Maxim, thanks for pointing out the document. |
PeterWood 13-Jan-2011 [7054] | Does copy/part head reverse to binary! 300 2 give the correct answer? >> to binary! 300 ==#{000000000000012C} >> copy/part head reverse to binary! 300 2 == #{2C01} |
Oldes 13-Jan-2011 [7055x2] | good... as an extension I have: const short int val = RXA_INT32(frm, 1); REBSER *ser = RL_MAKE_STRING(1, FALSE); RL_SET_CHAR(ser, 0, val ); RL_SET_CHAR(ser, 1, val >> 8); RXA_SERIES(frm, 1) = ser; RXA_TYPE(frm, 1) = RXT_BINARY; return RXR_VALUE; >> tm 100000 [to-ui16 300] == 0:00:00.016 |
Peter: yes.. but speed is important! | |
Cyphre 13-Jan-2011 [7057] | not sure how fast is this, but you can use vector for diffferent int conversions...like: >> uint16: make vector! [unsigned integer! 16 1] == make vector! [unsigned integer! 16 1 [ 0 ]] >> uint16/1: 300 skip to-binary uint16/1 6 == #{012C} |
Pekr 13-Jan-2011 [7058] | So the extension is fastest? |
Cyphre 13-Jan-2011 [7059] | maybe to-binary on vector! could do the job best way but this is not implemented yet probably |
Oldes 13-Jan-2011 [7060] | Command is the best solution for me... I just wonder if there is not a better way how to write it in C, like using pointers or something like that |
Pekr 13-Jan-2011 [7061] | Cyphre - I think that vectore type is still not finished. There were also some blogs about conversions, but I don't remember the outcome .... |
Oldes 13-Jan-2011 [7062] | But for me today starts a new era... I'm really starting to use R3 since now. |
Cyphre 13-Jan-2011 [7063] | Pekr, yes...from http://www.rebol.net/r3blogs/0079.html: Conversions from vectors to blocks and binaries will also be supported. blk: to block! vect bin: to binary! vect Details to be defined. |
Pekr 13-Jan-2011 [7064x2] | Oldes - that is cool to hear! |
Could you tell us, what was the breaking point for you? Is it extension mechanism, which allows you to extend Core? | |
Oldes 13-Jan-2011 [7066] | yes.. it's the extensions posibility... I was doing some heavy math with images recently and I think it's time to move and start using R3.. at least for new scripts.. which also require to rewrite some old which I use often. |
Henrik 13-Jan-2011 [7067x2] | did anyone download the protocols that Graham posted before his wiki went down? |
(Carl is asking) | |
GrahamC 13-Jan-2011 [7069x2] | Sorry for cross posting this in different channels over the last year https://github.com/gchiu/Rebol3/tree/master/protocols |
:) | |
Oldes 13-Jan-2011 [7071] | So Carl is alive? Good to know:) |
Henrik 13-Jan-2011 [7072] | Deciding what to work on next |
Kaj 13-Jan-2011 [7073] | Is he afraid of cURL? ;-) |
Ladislav 13-Jan-2011 [7074] | Yes, sure, he is afraid of everything, that could distract him. |
older newer | first last |