Portability - what, where and how ?
Portability - what, where and how ?
Sydius, punt and myself were discussing briefly in channel yesterday whether there was a real need to have a library just for portability.
Firstly what needs to be portable.
Threads, Directories, Network, Date and Time.
The Platform.h provides ways we can do multiple OS dependant inclusions/exclusions right.
So if we have
#if UOX_PLATFORM == PLATFORM_LINUX
#elif UOX_PLATFORM == PLATFORM_WINDOWS
#elif UOX_PLATFORM == PLATFORM_APPLE
#endif
and you can add other OS'es in there if you need them.
At the end of the day, windows and linux are basically it anyway. If someone wants to add something they can always use the inclusions as long as the classes are wrapped nicely nobody can tell the difference.
I was thinking if someone did classes with interfaces like those (even a trimmed down version of these) of QT such as these would they be used?
http://doc.trolltech.com/3.3/qdir.html
http://doc.trolltech.com/3.3/qdatetime.html
http://doc.trolltech.com/3.3/qsocketdevice.html
Threading:
http://doc.trolltech.com/3.3/qthread.html
http://doc.trolltech.com/3.3/qmutex.html
http://doc.trolltech.com/3.3/qsemaphore.html (need this?)
Is there anything else?
Firstly what needs to be portable.
Threads, Directories, Network, Date and Time.
The Platform.h provides ways we can do multiple OS dependant inclusions/exclusions right.
So if we have
#if UOX_PLATFORM == PLATFORM_LINUX
#elif UOX_PLATFORM == PLATFORM_WINDOWS
#elif UOX_PLATFORM == PLATFORM_APPLE
#endif
and you can add other OS'es in there if you need them.
At the end of the day, windows and linux are basically it anyway. If someone wants to add something they can always use the inclusions as long as the classes are wrapped nicely nobody can tell the difference.
I was thinking if someone did classes with interfaces like those (even a trimmed down version of these) of QT such as these would they be used?
http://doc.trolltech.com/3.3/qdir.html
http://doc.trolltech.com/3.3/qdatetime.html
http://doc.trolltech.com/3.3/qsocketdevice.html
Threading:
http://doc.trolltech.com/3.3/qthread.html
http://doc.trolltech.com/3.3/qmutex.html
http://doc.trolltech.com/3.3/qsemaphore.html (need this?)
Is there anything else?
I’ve decided to go with libraries simply because I do not know the details of implantation on any operating system except Windows, and I want a GUI and found a library that handles only things which I need…
I can see not wanting to “overkill” a simple problem by using a full-featured library. Including small ones that only do what you need done, on the other hand, is a good idea in my opinion. Unless it is trivial and you or someone on the team knows how to implement it on every operating system you want support for.
Really, though, I’d rather leave it in the hands of people who know more about what they are doing for my case.
I can see not wanting to “overkill” a simple problem by using a full-featured library. Including small ones that only do what you need done, on the other hand, is a good idea in my opinion. Unless it is trivial and you or someone on the team knows how to implement it on every operating system you want support for.
Really, though, I’d rather leave it in the hands of people who know more about what they are doing for my case.
-
Maarc
- Developer
- Posts: 576
- Joined: Sat Mar 27, 2004 6:22 am
- Location: Fleet, UK
- Has thanked: 0
- Been thanked: 0
- Contact:
Just a thought. While I understand there isn't a huge number of things that really need to be abstracted, I do think it's better not to roll our own implementation. The temptation is always there, especially when it seems so minimal. But I think one of the biggest advantage has to be the fact that you *don't* roll your own implementation, no matter how fun or interesting it might be. Libraries (especially the common ones) are far more tested and debugged than anything we could really do, and have a proof by fire, to a large degree. It means another bit of code that we don't have to exhaustively test, update, debug and maintain (except so far as it is actually used). I think that's a very big potential plus, but it is very easy to go overboard and just library left and right.
First, the dicussion xir references was not in context to UOX3. But in general. So the dicussion itself was not a recommendation for UOX3. Now xir may have made one, based on that, but that is different.Maarc wrote:Just a thought. While I understand there isn't a huge number of things that really need to be abstracted, I do think it's better not to roll our own implementation.
Second. The point of the dicussion was to highlight the fact that it isn't a given that a library isn't ncessarly a great time savior (recognize you disagree), depending on the platform breadth one wasn't to support. There are not that many things that are platform dependent, and if abstracted (that even a library would require), it becomes a very managable thing. At that point, one then must decide if they are bringing in a library for SOLEY portablity, what it buys them (for it has its own issues, versions, compability with other libraries, fitting into your framework (if they require their own string object for instancet).etc), versus what it gains. Each one of those areas identified vary in the complexiting of rolling your own. So now that becomes decision on the effort of rolling your own versus a library choice.
So that was the discussion. A generic one at that. Now, clearly your belief as you stated was libraries are better. Given the breadth of platforms UOX has stated they want to support, personally I would disagree (recall, the libraries are for portability only, not for other gains). Debuging a date/time and directory for the platforms UOX has stated takes less then getting a library and enforcing it. But clearly it is a subjective call. Which is why the discussion didn't apply it to UOX at the time (as it really didn't mater, only uox dev's opinons did).
Now one thing however, is when people code, they understand those areas, and code to an abstrated level when enountered (versus puting a specific implementation inline) would make either decsion (library or one's own class) less work to adapt. But that was not something UOX did, so that work is there regardless.
Last edited by punt on Fri Mar 18, 2005 9:36 pm, edited 1 time in total.
I would have to agree that using already tested code is worth it, though… depending on just how trivial the changes are, and how much work using the library would require. It becomes a matter of where to the draw the line, I suppose.
I love small, compact libraries that are very easy to incorporate. Zlib, for example, I found was a “solution in a can” for compression purposes. It did not require you to change any of your other code, and did not introduce any stupid types or weird library conflicts. It did only one thing -- handle compressed memory – and did it well.
I’ve decided to go with fltk, which is not the kind of library I enjoy most. It is too feature-rich, and overkills my problem of portability. However, it has a setup that I enjoy using, and has a framework for GUI handling which I find very appealing – so now I intend to use it for more than just portability purposes.
I love small, compact libraries that are very easy to incorporate. Zlib, for example, I found was a “solution in a can” for compression purposes. It did not require you to change any of your other code, and did not introduce any stupid types or weird library conflicts. It did only one thing -- handle compressed memory – and did it well.
I’ve decided to go with fltk, which is not the kind of library I enjoy most. It is too feature-rich, and overkills my problem of portability. However, it has a setup that I enjoy using, and has a framework for GUI handling which I find very appealing – so now I intend to use it for more than just portability purposes.
this is not the generic discussion. That is true almost universally. However, one can find a lot of libraries that do a lot of code. One must target what one wants to do.Sydius wrote:I would have to agree that using already tested code is worth it, though… depending on just how trivial the changes are, and how much work using the library would require. It becomes a matter of where to the draw the line, I suppose.
you are now discussing functionality. Not the same discussion. The issue wasn't discussed that one should use a library for a function(for in fact the function WAS coded, just for windows). No one went to a library to use it to SAVE code. The question now is should one , given that constraint, move to a library STRICTLY due to portablity. One has all ready indicated they where willing to code the function in the first place (be it windows , linux, etc).
I love small, compact libraries that are very easy to incorporate. Zlib, for example, I found was a “solution in a can” for compression purposes. It did not require you to change any of your other code, and did not introduce any stupid types or weird library conflicts. It did only one thing -- handle compressed memory – and did it well.
Clearly as one moves into any of those areas earlier identified, the complexity goes up. GUI wasn't in xir's original list when applying to UOX.
I’ve decided to go with fltk, which is not the kind of library I enjoy most. It is too feature-rich, and overkills my problem of portability. However, it has a setup that I enjoy using, and has a framework for GUI handling which I find very appealing – so now I intend to use it for more than just portability purposes.
Expanding on a discussion is often beneficial to the original intent; confining a thread to the original question alone is a detriment.
Punt, you seem to put quite a bit of focus towards assumptions, clarifications, and associative qualities of what is said, as opposed to simply taking the most logical and apparent assumption and leaving needless semantic insufficiencies unsaid. Would it not be more beneficial to find the solution without quibbling over obvious intent?
I was trying to contribute, and I will not give you jurisdiction over what I deem to be relevant and beneficial. If you do not deem it as such, that is fine. If everybody agrees, I will leave. I would rather just contribute and help as I see fit with good intent.
Punt, you seem to put quite a bit of focus towards assumptions, clarifications, and associative qualities of what is said, as opposed to simply taking the most logical and apparent assumption and leaving needless semantic insufficiencies unsaid. Would it not be more beneficial to find the solution without quibbling over obvious intent?
I was trying to contribute, and I will not give you jurisdiction over what I deem to be relevant and beneficial. If you do not deem it as such, that is fine. If everybody agrees, I will leave. I would rather just contribute and help as I see fit with good intent.
I put focus on ensure the context of the discussion is understand, yes, for I believe many miscommunictions happend based on assumptions. This is a perfect example of what is logical to you, may be far from logica to me. For I believe you have "assumed" my response to be an attack or some indication of your response being invalid.Sydius wrote:Expanding on a discussion is often beneficial to the original intent; confining a thread to the original question alone is a detriment.
Punt, you seem to put quite a bit of focus towards assumptions, clarifications, and associative qualities of what is said, as opposed to simply taking the most logical and apparent assumption and leaving needless semantic insufficiencies unsaid. Would it not be more beneficial to find the solution without quibbling over obvious intent?
I don't recall this discussion addressing a stated problem. UOX all ready has portablity that it wants. So the discussion was a general one, addressing how one may approach it, not looking for a solution (since no stated issue was given).
I never stated your discussion was irrelevant or not (see, this is why I don't assume a "logical" assumption, for clearly here we don't have the same). Your response is fine. I was pointing out it was not applicable to the response directly, for clarification on the point I was dicussing. NOT that it was not applicable as a general response. Feel free to contirubte in any manner you deem. I have no intention to apply "jursidiction", nor even plan to attempt to do so. But as you plan to contribute in any manner you deem, I believe I should be afforded the same. I feel clarifcation on points is contribution, removing ambiguity. Just as you feel your "finding solutions" on "obvious intent" is fine. i do intend to clarify if I think a response is not applicable one to a specific point. But please do not interprete it to be a statement that the same response is not applicable in general (as I don't see that as a logical intent *grin*)
I was trying to contribute, and I will not give you jurisdiction over what I deem to be relevant and beneficial. If you do not deem it as such, that is fine. If everybody agrees, I will leave. I would rather just contribute and help as I see fit with good intent.
Hopefully we can learn to interprete each others posting, and take them for what they are (and accept that we clearly have different empahis we feel necessary). And not take them for more then that (eg: an attempt to curb the others post). But that is clearly up to each individual, and whatever action one choose.
I do take offense to someone implying that my response is not applicable, even to a specific question.I was pointing out it was not applicable to the response directly, for clarification on the point I was dicussing.
If someone asked, “What color is the sky?” and I reply, “The elephant is pink” – there is applicability to my statement, or else I would not have written it. Nobody can objectively determine the applicability of any response to any question, and therefore what one person (me) deems to be applicable is just as correct as anything else is which might be said. Therefore, to disqualify a response based on your interpretation of the question and your interpretation of my answer is obvious arrogance when you publicly discredit it.
If you genuinely feel the desire to clarify something, do so without disqualifying what I said, please.
[quote="SydiusI do take offense to someone implying that my response is not applicable, even to a specific question.
[/quote]
Well, I don't know where to go here. You of course can take offense to anything, as can anyone. I don't believe I was disqualifing, but was saying it wasn't applicable to MY discussion. Now taking your "logical and obivous " thread, that was clearly my opinon, so that wasn't needed to be stated as well.
In your example:
Now, you have stated you took offense to my post. I have stated it was not my intent to offend, but clarify MY position (which we both have the right to discuss our position). You have stated you will deem to contribute in any manner you seem fit, and I agree with that, and believe I am afforded the same priveldge. Outside direct and personal attacks, I believe people can post as they please.
For any given post, one may not get a response one wants, desires, or even expects. It is compounded when on such a broad arena where clearly what is important to people in their styles varies from person to person. One can always ignore , or afford tolerance and give the benifit of the doubt to the other.
I don't see where else to go with this, but offer that both of us are now way off topic (my opinon). Your closing remark was to to please not disqualify your statements. As I don't feel I did, and believe all have the equal ability to comment how it applies to their position, I can not state my posts wil be different in the future. I can only offer, that I will assume your posts are not intended to be arrogant (when they go off my intent at least) and perhaps you can consider that as well in reference to mine. In other words, tolerance from both of us to each other. We clearly both have charactersitcs that annoy the other. But I don't believe (at least to this point), that either is intentionally attempting to offend the other.
Otherwise, I don't know where to go with this other then say I will have to agree to disagree with your conclusion.
[/quote]
Well, I don't know where to go here. You of course can take offense to anything, as can anyone. I don't believe I was disqualifing, but was saying it wasn't applicable to MY discussion. Now taking your "logical and obivous " thread, that was clearly my opinon, so that wasn't needed to be stated as well.
In your example:
Again, I can say it is just as arrogant to assume it is applicable to ME. So I can publicably state it is not applicable to what I am talking about (and again, since you use the term obvious again, to me that is obvous it is my opinon). What if I said I took offense to you saying the elphant is pink and distracting form my original statement? If you dind't agree, that wasn't your intent, and don't agree with my position it did, then what is the recourse?
If someone asked, “What color is the sky?” and I reply, “The elephant is pink” – there is applicability to my statement, or else I would not have written it. Nobody can objectively determine the applicability of any response to any question, and therefore what one person (me) deems to be applicable is just as correct as anything else is which might be said. Therefore, to disqualify a response based on your interpretation of the question and your interpretation of my answer is obvious arrogance when you publicly discredit it.
Now, you have stated you took offense to my post. I have stated it was not my intent to offend, but clarify MY position (which we both have the right to discuss our position). You have stated you will deem to contribute in any manner you seem fit, and I agree with that, and believe I am afforded the same priveldge. Outside direct and personal attacks, I believe people can post as they please.
For any given post, one may not get a response one wants, desires, or even expects. It is compounded when on such a broad arena where clearly what is important to people in their styles varies from person to person. One can always ignore , or afford tolerance and give the benifit of the doubt to the other.
I don't see where else to go with this, but offer that both of us are now way off topic (my opinon). Your closing remark was to to please not disqualify your statements. As I don't feel I did, and believe all have the equal ability to comment how it applies to their position, I can not state my posts wil be different in the future. I can only offer, that I will assume your posts are not intended to be arrogant (when they go off my intent at least) and perhaps you can consider that as well in reference to mine. In other words, tolerance from both of us to each other. We clearly both have charactersitcs that annoy the other. But I don't believe (at least to this point), that either is intentionally attempting to offend the other.
Otherwise, I don't know where to go with this other then say I will have to agree to disagree with your conclusion.
I will agree with you – I think we just rub each other the wrong way.
I appreciate your contribution and knowledge to the subjects we have discussed. I just do not particularly understand the approach you take to discussions, perhaps.
A striking example of something I did not like:
Somebody came into IRC and asked where he could find a client. Xir responded with an answer to his questions, followed by the statement that UOX would most likely not be compatible with the latest client. You followed up with the statement that the original question did not include UOX… That seemed just odd to me, considering this was in the UOX IRC and that even if it had been in the Sphere one, pointing out such a thing is no better than saying it in the first place (although, I would say it was appropriate for Xir to do so, given the title of the channel).
That incident, honestly, was the match, and then reading your comment about the inapplicability of my response to Xir… well, that was the dynamite.
I will agree to just assume good intentions and ignore any inclination within me to assume you intend arrogance or offense.
I will get over it.
I appreciate your contribution and knowledge to the subjects we have discussed. I just do not particularly understand the approach you take to discussions, perhaps.
A striking example of something I did not like:
Somebody came into IRC and asked where he could find a client. Xir responded with an answer to his questions, followed by the statement that UOX would most likely not be compatible with the latest client. You followed up with the statement that the original question did not include UOX… That seemed just odd to me, considering this was in the UOX IRC and that even if it had been in the Sphere one, pointing out such a thing is no better than saying it in the first place (although, I would say it was appropriate for Xir to do so, given the title of the channel).
That incident, honestly, was the match, and then reading your comment about the inapplicability of my response to Xir… well, that was the dynamite.
I will agree to just assume good intentions and ignore any inclination within me to assume you intend arrogance or offense.
I will get over it.
Sydius wrote: Somebody came into IRC and asked where he could find a client. Xir responded with an answer to his questions, followed by the statement that UOX would most likely not be compatible with the latest client. You followed up with the statement that the original question did not include UOX… That seemed just odd to me, considering this was in the UOX IRC and that even if it had been in the Sphere one, pointing out such a thing is no better than saying it in the first place (although, I would say it was appropriate for Xir to do so, given the title of the channel).
Ok, not to change your mind, but the example you gave, this is the log:
I was responding to xir's clarification of me, that I hadn't noticed he was referenceing a client to work with uox specifically (notice his commen on the latest not working on uox was a clarifycation of my first comment). Again, I was commenting on how I gave MY answer (note the second line). So I again I am missing your point of the example. But clearly we don't see things the same way. As for the title, the discussion in that channel is rarely limited to uox (in fact usually not on uox), so I felt very upfront stating I didn't realize he was asking strictly on a client for uox).[15:57] <Kainous> so i don't need every single client?
[15:58] <punt> no, unless you want an old feature the new client doesn't support
[15:58] <xir> patch with OSI to the current client, then grab the 4.0.3b off www.shardwire.org and backup your old client and replace it with that
[15:58] <xir> 4.0.3b doesn't have samurai stuff
[15:58] <Kainous> i don't even have uo on my comp
[15:59] <xir> but i don't think the latest works on uox
[15:59] <punt> Oh, I didn't see one say it had to work with uox
Not arguing, just saying I don't really understand your example (but that is ok, I don't have to, it is valid for you regardless).
[/quote]