- NxPhysics.dll - 7 Updates
- Yucky logic with redundancy, suggestions for alternatives? - 7 Updates
- linus - 4 Updates
- coding drivers - 1 Update
- size differences - 6 Updates
fir <profesor.fir@gmail.com>: Dec 19 10:51AM -0800 W dniu wtorek, 19 grudnia 2017 18:29:00 UTC+1 użytkownik Real Troll napisał: > the original creator is the best place to start. Ask him/her if you > could have the source code!!! > Good luck. i ask for laziness.maybe good googling will show it.. dont know yet |
fir <profesor.fir@gmail.com>: Dec 19 10:54AM -0800 W dniu wtorek, 19 grudnia 2017 18:22:36 UTC+1 użytkownik red floyd napisał: > On 12/19/2017 8:28 AM, fir wrote: > > [OT redacted] > Did you have a C++ language question? i guess it was written in c/c++ (and i dont share the view that this or c group are only for talking language, if so and this is c-language where is c-programming group) (i know its c++ but write c for short, i dislike c++ only like when it covers with c ;c) |
red floyd <dont.bother@its.invalid>: Dec 19 12:03PM -0800 On 12/19/2017 10:54 AM, fir wrote: > (and i dont share the view that this or c > group are only for talking language, if > so and this is c-language where is c-programming group) (i know its c++ but write c for short, i dislike c++ only like when it covers with c ;c) 1. There is no such language as C/C++. 2. Minesweeper was written in either C or C++, therefore by your logic, we should be able to discuss Minesweeper here. Please also see: http://www.dietmar-kuehl.de/mirror/c++-faq/how-to-post.html#faq-5.9 |
fir <profesor.fir@gmail.com>: Dec 19 12:55PM -0800 W dniu wtorek, 19 grudnia 2017 21:03:54 UTC+1 użytkownik red floyd napisał: > we should be able to discuss Minesweeper here. > Please also see: > http://www.dietmar-kuehl.de/mirror/c++-faq/how-to-post.html#faq-5.9 ofc you should discussing c/c++ programs design here it would be much more interesting and knowledge-giving than discussing language which is for newbs and is boring discuss c/c++ real programmming not language |
Vir Campestris <vir.campestris@invalid.invalid>: Dec 19 09:31PM On 19/12/2017 18:54, fir wrote: > (and i dont share the view that this or c > group are only for talking language, if > so and this is c-language where is c-programming group) (i know its c++ but write c for short, i dislike c++ only like when it covers with c ;c) For C questions comp.lang.c seems a good place to start. I don't follow it. Andy |
fir <profesor.fir@gmail.com>: Dec 19 02:06PM -0800 W dniu wtorek, 19 grudnia 2017 22:31:32 UTC+1 użytkownik Vir Campestris napisał: > > so and this is c-language where is c-programming group) (i know its c++ but write c for short, i dislike c++ only like when it covers with c ;c) > For C questions comp.lang.c seems a good place to start. I don't follow it. > Andy then subscribe, c is great (c is divine) though they sadly ike here or even more talk about the language instead of real matter |
red floyd <dont.bother@its.invalid>: Dec 19 02:18PM -0800 On 12/19/2017 2:06 PM, fir wrote: >> Andy > then subscribe, c is great (c is divine) > though they sadly ike here or even more talk about the language instead of real matter Because not everything in the entire world is a Windows box... |
Christian Gollwitzer <auriocus@gmx.de>: Dec 19 08:38PM +0100 Am 19.12.17 um 16:39 schrieb David Brown: > in the Windows world, it is more recent (Windows has supported a variant > of UTF-16 for nearly two decades, but good UTF-8 support and good fonts > are not as old. This opinion seems very biased. As you say, Windows uses UTF-16 (formerly UCS-2) *internally* for the API to submit a Unicode string to the display. That doesn't mean that UTF-8 doesn't work there, UTF-8 is just a transport encoding for Unicode codepoints, and recent ("10 years old") software can anytime recode it into UTF-16 to call the Windows API. There is no problem to run Internet Explorer on XP and display a HTML page encoded in UTF-8. > Remember, Windows XP is the third most popular OS in > the world!). Very sad, since it is not supported any longer. > days of MS-DOS, have it. So someone who is running XP and likes "MS > sans serif" will have no problem with ö, but will have difficulty with > directional quotation marks. Quote from Wikipedia: https://en.wikipedia.org/wiki/Microsoft_Sans_Serif "Version 1.41 (supplied with Windows XP SP2) includes 2257 glyphs (2301 characters, 28 blocks), which extended Unicode ranges to include Combining Diacritical Marks, Currency Symbols, Cyrillic Supplement, Geometric Shapes, Greek Extended, IPA Extensions, Number Forms, Spacing Modifier Letters. New OpenType scripts include Arabic MAR script. Additional OpenType features includes rlig for Arabic scripts." So, MS Sans Serif actually seems to be a decent Unicode font. Not to mention "Arial Unicode" which shipped in 2000 with almost everything in the BMP. I'm inclined to say that the Unicode support used to be much better in Windows actually than in Linux. I remember a shell tool "fetchmsttfonts" which downloaded the fonts from Microsoft's servers to improve the Unicode coverage in Linux. Christian |
legalize+jeeves@mail.xmission.com (Richard): Dec 19 08:02PM [Please do not mail me a copy of your followup] Ralf Goertz <me@myprovider.invalid> spake the secret code >> simply different. >You say that probably because for your native language there is no >difference between ASCII and UTF-8. Nope. I say it because most of the time when I encounter UTF-8 laden email the uses are gratuitous and often the author isn't even aware that such gratuitous uses of UTF-8 were done "on their behalf." (Yes, Microsoft, I'm glaring at you.) I am conversationally fluent in French and took several years of immersion Chinese (mainland, not PRC/traditional; I don't consider myself fluent by any means, but with a dictionary and enough time I can translate written text reasonably well). I can certainly appreciate UTF-8 in contexts where it provides value and I recognize that those contexts exist aplenty. I certainly would not advocate going back to national character set extensions of 8-bit ASCII! >to put it differently, with a richer character set in their language) it >is a huge relief to have an encoding where you don't have to bother >about code pages and stuff like that. Agreed. One of my first jobs out of college was working at a company outside Paris and it was an interesting experience reading source code where all the comments and variable names were in French :). >found myself playing around with those other characters like „…" >(ellipsis in german style quotation marks) just because I can and it is >so much nicer. Spoiled by using LaTeX, I guess. Yeah, well to me it looks like a bunch of hex binary characters, so it just comes out like useless gibberish. And seriously, do we really need to use a fancy Unicode character when we could just write ... and be universally clear? I know this is not going to sway you, I'm simply making the point that while there are Unicode characters for which there is no adequate representation in ASCII, there are also a bunch of Unicode characters for which the ASCII representation is just fine. We're not trying to typeset books on usenet or email, we're trying to communicate effectively. IMO, most of these kinds of uses of Unicode are impeding communication rather than enhancing it. But hey, we're all luddites here in the sense that we are using usenet and not the "forum" on cplusplus.com. >> Just like I find your preference to always use trailing return >> type :). >With that I agree ;-) My statement was awkwardly worded, but you know I was saying your use of trailing return type was gratuitous, right? :) -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
legalize+jeeves@mail.xmission.com (Richard): Dec 19 08:06PM [Please do not mail me a copy of your followup] Ralf Goertz <me@myprovider.invalid> spake the secret code >Can't we assume that in a computer oriented newsgroup like this people >know how to have UTF-8 displayed correctly after so many years that it >is around? You can assume it, but it isn't universally true. Just to be clear, I'm not asking for any accommodation of my old tools :), but UTF-8 still isn't universal. I think this is mostly because some tools that people like (e.g. me) aren't being actively maintained. I've investigated the source code for my favorite news reader to see about updating it, but unfortunately the thing was already a big mess when the last maintainer stopped updating it themselves. A perfect example of how open source software gets abandoned because people allowed the messes to accumulate over time. Kind of like when you watch an episode of "hoarders" and those people wallowing in all that mess insist they "need" everything and how they know where everything is. Of course, to any casual outside observer the thing looks like the contents of a trash dumpster. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
David Brown <david.brown@hesbynett.no>: Dec 19 09:54PM +0100 On 19/12/17 20:38, Christian Gollwitzer wrote: > old") software can anytime recode it into UTF-16 to call the Windows > API. There is no problem to run Internet Explorer on XP and display a > HTML page encoded in UTF-8. Biased, perhaps, but based on experience. Even though NT had UCS-2 (mostly like UTF-16, but without the support for multi-code encodings) from the beginning, that was in the kernel and the NTFS filesystem. Lots of software did not support Unicode of any sort, and the few fonts with Unicode encoding were very sparse. It got better, of course, with far better fonts and support by the time of XP, and certainly with Win7 (I skipped Vista entirely) there is no problem with UTF-8 in most applications. Blame it on slow or lazy app developers, rather than Windows, if you prefer. >> Remember, Windows XP is the third most popular OS in >> the world!). > Very sad, since it is not supported any longer. I have never found support or lack thereof for Windows to be of any significant benefit. But if you mean that the latest versions of some applications no longer run on XP, then I agree. Generally, however, I find I can run most programs fine in XP. (I use Win7 for my Windows desktop, but XP or even W2K when I need a Windows virtual machine. Such machines are for running particular programs - not for using the latest and greatest web browsers.) > better in Windows actually than in Linux. I remember a shell tool > "fetchmsttfonts" which downloaded the fonts from Microsoft's servers to > improve the Unicode coverage in Linux. Well, experiences vary, I suppose. Perhaps I was unlucky in the fonts I used or the software I used. "fetchmsttfonts" is (was) mainly to get fonts that are compatible with common ones from the Windows world - so that your OpenOffice/LibreOffice documents match up in font metrics, and so that your Windows programs under Wine work. There was a time when Unicode in Linux was bad too, and fonts were limited. UTF-8 always worked underneath, because most of Linux and the filesystems simply ignore the details - UTF-8 strings work the same way as ASCII strings. |
Christian Gollwitzer <auriocus@gmx.de>: Dec 19 10:04PM +0100 Am 19.12.17 um 21:54 schrieb David Brown: > I have never found support or lack thereof for Windows to be of any > significant benefit. But if you mean that the latest versions of some > applications no longer run on XP, then I agree. I meant that Microsoft stopped supporting XP in 2014, i.e. there will be known unfixable security bugs in XP. For that reason Windows developers also stop testing their software on XP. There's anyway no good to reason to stay with XP - unless you have some specialized hardware like, e.g. a CT scanner or similar stuff. Christian |
scott@slp53.sl.home (Scott Lurndal): Dec 19 09:25PM >>is around? >You can assume it, but it isn't universally true. >Just to be clear, I'm not asking for any accommodation of my old tools I am :-). I've no desire to try to use UTF-8 with the athena widgets that drive my fast, efficient and lightweight newsreader (xrn), certainly not to display smart quotation marks. >:), but UTF-8 still isn't universal. I think this is mostly because >some tools that people like (e.g. me) aren't being actively >maintained. Hear, Hear! |
David Brown <david.brown@hesbynett.no>: Dec 19 10:29PM +0100 On 19/12/17 22:04, Christian Gollwitzer wrote: > also stop testing their software on XP. There's anyway no good to reason > to stay with XP - unless you have some specialized hardware like, e.g. a > CT scanner or similar stuff. When you use Windows, you know it has security bugs. (The same applies to all systems, of course - but Windows' reputation is, let us say, not stellar.) When a new version of Windows comes out, there is a flurry of fixes of the big stuff - gaping holes, or issues that are likely to be met by many people in practice. But by the time you get past a service pack or two, these are all done - it is rare that there are security threats that have a significant risk to normal users who take reasonable precautions. When you look at the list of security fixes after this initial period, they are all about local privilege escalations, or holes in obscure features and services that few people use, or things that are easily blocked by having a real firewall between your PC and the internet. Your significant security risks are then from applications, perhaps especially MS's browsers and other MS software (at least from the XP era), from user errors (like clicking on random links, opening "I Love U" emails, and downloading random software), and from broken "security" software. I simply do not find XP - at least after SP2 when it stabilized - to be a significant security risk compared to Win7 or later Windows. The reason Windows developers stop supporting XP and testing their code for XP is that they can use newer features on newer OS's, and testing takes time and costs money - people with XP are unlikely to pay for that cost. No Windows application developer thinks "I /could/ support XP and get a wider customer base. But I want to encourage people to have better security, so I will disable XP support in my code to force people to update their OS for their own good". There are lots of reasons to keep running XP. This is perhaps best seen by looking at the numbers from usage trackers - there are /lots/ of XP machines in use. And that does not count them all, since many (such as the CT scanners) are not used for internet browsing. Of course in many cases, there may not be a good reason for sticking to XP - but a huge proportion of users really do not see the point in paying lots of money to "fix" something that is doing a perfectly good job for them. |
James Kuyper <jameskuyper@verizon.net>: Dec 19 01:34PM -0500 On 12/18/2017 06:59 PM, Ian Collins wrote: ... > It's foolish to write of a chunk of a language because it can be abused. "write off"? |
Ian Collins <ian-news@hotmail.com>: Dec 20 07:42AM +1300 On 12/20/2017 07:34 AM, James Kuyper wrote: > .... >> It's foolish to write of a chunk of a language because it can be abused. > "write off"? Indeed :) -- Ian. |
legalize+jeeves@mail.xmission.com (Richard): Dec 19 07:53PM [Please do not mail me a copy of your followup] Thiago Adams <thiago.adams@gmail.com> spake the secret code >> >for windows and we don´t have a refactoring tool. >> clang-tidy is pretty much ubiquitous. >But this tool cannot remove old custom macros. Yes, it can. (I've written some of the checks that ship in clang-tidy.) Custom transformations of course require custom code to identify those transformations. There are some commercial tools out there that have a custom DSL in which you can write such tranfsormations. However, clang-tidy doesn't (yet) have such a DSL for specifying transformations. DMS is a commercial tool for transforming C++ code with a DSL for specifying the transformations. Here is a lightning talk about it from CppCon 2017: <https://www.youtube.com/watch?v=86fwuXSz7lQ> It looks pretty cool from that talk, but I have not experience in using it. Here is a page from their site explaining code transformations: <http://www.semdesigns.com/Products/DMS/ProgramTransformation.html?Home=DMSToolkit> Given that I can't find a price for DMS directly on their prices page, I'm assuming it's expensive. My guess would be somewhere between $10K and $50K per seat. Still, that may be cheap compared to modernizing a legacy code base by hand (and presumably less error prone). -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
scott@slp53.sl.home (Scott Lurndal): Dec 19 09:21PM >I'm assuming it's expensive. My guess would be somewhere between $10K >and $50K per seat. Still, that may be cheap compared to modernizing a >legacy code base by hand (and presumably less error prone). I could see using it for Jovial to C, that makes a lot of sense, particularly in the context of the B2. I'm not as confident that it would be worth the price for C to C or C++ to C++, which seems like churn for the sake of churn. |
fir <profesor.fir@gmail.com>: Dec 19 01:01PM -0800 have someone here some experience in coding drivers here (esp in windows) and could geve some good story what it is really all about? i would like to get some understanding without reading too much alone is my view that coding a driver is like a coding dll library that would have to implement predefined api (the api that would be used for higher layer dlls) and form the bottom side it communicated with device? (but if communicate with device att bottom side, does it do it in some also predefined way? what is that bottom way?) and what else? |
James Kuyper <jameskuyper@verizon.net>: Dec 19 02:13PM -0500 On 12/18/2017 07:47 PM, Öö Tiib wrote: ... > C++ does not have concept of "layout-compatible types" like C has so > I think the behavior is legal and does not violate standards. The latest version of the C++ standard that I have on my system is n3797.pdf, 2013-10-13. I uses the term "layout-compatible" twice in 3.9p11, one each in 3.9.2p2 and 7.2p9, twice in 9.2p16 and 9.2p17, and one last time in 9.2p18. The term never appears anywhere in the C standard. |
James Kuyper <jameskuyper@verizon.net>: Dec 19 02:30PM -0500 On 12/18/2017 07:15 PM, Christopher Pisz wrote: > { > assert(sizeof(S1) == sizeof(S2)); > } I'm using n3797.pdf for my citations. "Two standard-layout struct (Clause 9) types are layout-compatible if they have the same number of non-static data members and corresponding non-static data members (in declaration order) have layout-compatible types (3.9)." (9.2p16) Note that "A standard-layout class ... has the same access control (Clause 11) for all non-static data members". (9p7), a condition met by both S1 and S2. I expected the standard to assert somewhere that layout-compatible types have the same size and the same value of offsetof() for each non-static data member. But if there's any such guarantee, I've been unable to locate it. About the only constraint I could find on the layout of non-static data members is that "If two pointers point to different non-static data members of the same object, or to subobjects of such members, recursively, the pointer to the later declared member compares greater provided the two members have the same access control (Clause 11) and provided their class is not a union." (5.9p3). |
Ian Collins <ian-news@hotmail.com>: Dec 20 08:43AM +1300 On 12/20/2017 08:30 AM, James Kuyper wrote: > recursively, the pointer to the later declared member compares greater > provided the two members have the same access control (Clause 11) and > provided their class is not a union." (5.9p3). std::is_standard_layout<T> is your friend. -- ian |
bartc <bc@freeuk.com>: Dec 19 07:47PM On 19/12/2017 00:15, Christopher Pisz wrote: > { > assert(sizeof(S1) == sizeof(S2)); > } What are the two sizes? -- bartc |
"Öö Tiib" <ootiib@hot.ee>: Dec 19 11:54AM -0800 On Tuesday, 19 December 2017 21:13:50 UTC+2, James Kuyper wrote: > 3.9p11, one each in 3.9.2p2 and 7.2p9, twice in 9.2p16 and 9.2p17, and > one last time in 9.2p18. > The term never appears anywhere in the C standard. Yes. I remembered it wrongly. There is layout-compatibility in C++ for union members with common initial sequence. I meant the sufficiently similar types of C that were concept of compatible types. I believe the S1 and S2 of OP were such types until C99. |
James Kuyper <jameskuyper@verizon.net>: Dec 19 03:17PM -0500 On 12/19/2017 02:54 PM, Öö Tiib wrote: > union members with common initial sequence. I meant the sufficiently > similar types of C that were concept of compatible types. I believe > the S1 and S2 of OP were such types until C99. All citations in this message are from the C standard, not the C++ one. The only difference between S1 and S2 involves a feature ("public:") not supported by C99. If you drop that feature, they are compatible types, but only if declared in separate translation units (6.2.7p1), and nothing changed in that regard in C99. 6.2.7p1 is a peculiar feature of the C standard that deserves some explanation. You might think that two struct types declared identically in different translation units would be considered to declare the same type, but "The presence of a struct-declaration-list in a struct-or-union-specifier declares a new type, within a translation unit." The fact that the type's scope is restricted to that translation unit means that the rule that "Two types have compatible type if their types are the same." (6.2.7p1) doesn't allow you to say that struct types defined identically in different translation units are compatible with each other. Therefore, 6.2.7p1 was added to say that they are. However, the C standard deliberately restricts that rule to types declared in separate translation units. If you define two struct types identically in one translation unit, it's assumed that you deliberately intended them to be distinct types, and that you would therefore want to get the diagnostic messages you will get if you accidentally mix them up in contexts where relevant types are required to be compatible. The fact that they are incompatible allows certain optimizations, based mainly upon the anti-aliasing rules, but because they would be compatible with identical declarations in a different translation unit, an implementation is not free to lay them out differently unless it can be certain that they won't be used for communication between translation units. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment