World: r3wp
[!REBOL3]
older newer | first last |
Anton 4-Jan-2011 [6807x3] | Check ?? do-events WAIT [ ] === WAIT NONE |
13-Sep-2006 Anton Rolls WAIT without also waiting for events: view layout [ button "wait 2" [ remove find system/ports/wait-list system/view/event-port wait 2 ; wait two seconds insert system/ports/wait-list system/view/event-port ] ] | |
Oops, this is Rebol3 group. Sorry, I'm in Rebol2 head-space. | |
Kaj 4-Jan-2011 [6810x2] | Thanks |
I was hoping it would do more or less what you programmed: servicing system events but without waiting for all windows to close | |
Pavel 5-Jan-2011 [6812] | How works the preallocation in R3? str: make string! 10000 length? str -> 0 dtto for blocks etc? why it happens in r3 program? prepared for future use? |
Ladislav 5-Jan-2011 [6813] | Preallocation allocates the space needed to store the required number of characters into string. Nevertheless, the length of the string is zero, since the string initially does not contain any characters. |
Henrik 5-Jan-2011 [6814] | it's there primarily to help the garbage collector. |
Pavel 5-Jan-2011 [6815x4] | So the space IS already reserved? |
So the space IS already reserved? | |
So the space IS already reserved? | |
sorry Altme hangs for me | |
Ladislav 5-Jan-2011 [6819x2] | Here is an example showing a difference: >> time-block [str: make string! 0 loop 10000 [append str "a"]] 0,05 == 0.0023125 >> time-block [str: make string! 0 loop 10000 [append str "a"]] 0,05 == 0.0024375 |
>> time-block [str: make string! 10000 loop 10000 [append str "a"]] 0,05 == 0.002265625 >> time-block [str: make string! 10000 loop 10000 [append str "a"]] 0,05 == 0.002265625 | |
Henrik 5-Jan-2011 [6821x2] | yes, when doing a make string! 10000, the space is preallocated. this helps the garbage collector to collect quicker and also speeds up operations on the string when its expanding in size. |
its expanding in size, within the preallocated size, that is. | |
Ladislav 5-Jan-2011 [6823x2] | I would not say that it "helps the garbage collector to collect quicker", but it does not require to reallocate/recollect the space when expanding the string to 10000 characters length |
and, of course, when no reallocation occurs, no content movement is necessary | |
Pavel 5-Jan-2011 [6825] | Does it also means that it allocates consecutive space? |
Ladislav 5-Jan-2011 [6826] | REBOL strings as well as REBOL blocks (parens, paths, the majority of series,...) use consecutive space |
Robert 8-Jan-2011 [6827] | Is it already supported to get the output of a CLI programm executed via CALL? |
Pekr 8-Jan-2011 [6828x2] | no |
there were several discussions about the topic. Carl stated, that R2 code was very complex, and is willing to provide source for adaptation. After some complaint, we got /wait at least. I think that for now you have to use call/wait, output to file, and read the file .... | |
Pavel 10-Jan-2011 [6830] | Is there any reason why proxy is not implemented? Should it be part of http scheme or should be intermediate scheme? ie http -> proxy -> tcp. Where is oplaned to save proxy settings in R3? |
BrianH 10-Jan-2011 [6831] | The HTTP scheme in R3 needs a lot of work (hopefully not a full rewrite). That's why. |
Kaj 10-Jan-2011 [6832x2] | For what it's worth, the cURL binding supports proxies |
Currently only through environment variables. I don't know if that works on Windows | |
Pavel 10-Jan-2011 [6834] | Kaj full respect to your effort, in the other hand the proxy seems not to be overcomplicated. it may be a good training task, in R2 it has maybe 20 lines. question is if there is some architectual restriction (for example synchronous / asynchronous etc.) |
Kaj 10-Jan-2011 [6835] | It sure would be nice if you implemented it |
Ladislav 11-Jan-2011 [6836x2] | Remembering the function naming discussion from the !REBOL3 GUI group and seeing the http://curecode.org/rebol3/ticket.rsp?id=667&cursor=1#comments I could not help but point out: As I see it, not using the question mark *is* violating a naming principle that was explicitly stated. I know, that in REBOL we don't have to be that rigid, but, when we have explicitly stated a principle, we *should* stick to it. ( http://www.rebol.com/r3/docs/concepts/scripts-style.html#section-10 ) |
http://curecode.org/rebol3/ticket.rsp?id=1818&cursor=1 | |
Pekr 11-Jan-2011 [6838x3] | The we should stick to principles. But I am not sure even Carl himself is strictly following the rules. In his doc he claims, that 'quit is as clear, as quit-system. Well, we have 'do, and we have 'do-browser, 'do-service, where we are breaking on encapsulation rules, with excuses to not polutu 'do's name-space (not complicating it - because in other words, the proper way is to use refinements, as do-browser could be do/browser as well) What is a bit tricky about question marks is, that the meaning is not clear enough,e.g. - modified? Does it stand for the logic value, returning the true or false, or does it stand for the return of modification date? How should user know? That is just my opinion on this topic - sometimes things are not easy to sort-out. Rules are rules, and we should probably stick to them ... the other thing is, if we are not forgetting another rebol "rule" (or at least principle) - make things pop-out to your mind at first sight, if possible. So - what is more self-explanatory - faces?, or get-faces (or what was the suggestion alternative)? |
Take my notes as just another point-of-view,not a counterclaim to what you stated ... | |
You second ticket is interesting indeed .... | |
Ladislav 11-Jan-2011 [6841x3] | The points you made are intelligent and need a discussion, so, here goes: |
'quit vs. 'quit-system and 'do vs. 'do-browse: Carl just pointed out, that if the -system part was unnecessary, it shouldn't have been used. That is clearly not the case of 'do vs. 'do-browse, where the second part cannot be seen as unnecessary | |
Whether to prefer 'do-browser or do/browser - such a principle was not stated explicitly, so, we do not have any "guide" which one shall be preferred | |
Pekr 11-Jan-2011 [6844x3] | Well, I think I know why we went with do-*, open-* - simply to not overload those functions with refinements, and hence slowing them down ... |
Carl should comment. The question is, if you can get his attention - he is not much active in R3 user-land last 2-3 months .... | |
I would suggest you going with faces? then, we can always change, while in alpha mode .... | |
Ladislav 11-Jan-2011 [6847x3] | modified? Does it stand for the logic value, returning the true or false, or does it stand for the return of modification date? How should user know? - the function name rarely suffices to inform the user what exactly the function does. In such a case it is the task for the doc string to inform the user, or, we should use two words, as described in the doc. |
(even the doc string may be insufficient, and an online documentation should be consulted in some cases) | |
As far as the 'faces? vs. 'get-faces names are considered, they both adhere to the function naming convention. The only advantage of the 'faces? name is, that it is just one-word, so it is "more in the line" with the function naming convention in my opinion) | |
Pekr 11-Jan-2011 [6850] | just a note - actually, it was not get-faces, but faces-of, IIRC? |
Ladislav 11-Jan-2011 [6851] | 'get-faces was your original proposal, AFAIR. Nevertheless, the 'faces-of name, which looked as preferred by the majority, is clearly violating the above function naming convention. |
Oldes 11-Jan-2011 [6852] | for me it's more important how it looks in code.. so it's for example: foreach face faces? window [ ... ] vs. foreach face faces-of window [ ... ] |
Ladislav 11-Jan-2011 [6853x3] | And, in fact, it is a C naming convention, except for the fact, that in C it would need to be faces_of |
One of the possible solutions is to just add the *-of as an alternative convention, and have the option to choose. The only problem remaining is, that it uses two words instead of one. | |
What is interesting (and surprising me), is the fact, that, not reading/remembering the REBOL function naming convention, lots of people immediately were able to define any kinds of "ad hoc rules" which (purportedly) were in effect in Rebol for function naming, and used that as their argument why their preferred name was in accordance with the REBOL function naming convention. | |
Andreas 11-Jan-2011 [6856] | I always had the impression that the "word names" section in the style guide is more descriptive than prescriptive. To that effect, I'm very much in favour of documenting *-of as an alternate convention. |
older newer | first last |