- My thoughts and prayers - 1 Update
- what do you think about this? - 14 Updates
- std::array is packed, unpadded and can be casted? - 1 Update
- Vector of Objects vs Vector of Pointers And Memory Access Patterns - 3 Updates
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Mar 24 11:15PM >>> Love. Joy. Peace. Hope. In Christ alone. >> Fuck. Off. > U mad princess? I am very cross, dear. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
David Brown <david.brown@hesbynett.no>: Mar 24 09:44AM +0100 On 23/03/2020 23:27, Mr Flibble wrote: > The reason why we restrict the language symbols to ASCII is quite > simple: most of us have keyboards that only have ASCII symbol keys. Now > stop being a lemon. Not quite - most of us have keyboards with different symbols, where ASCII symbols form the common subset. I am confident that I have more non-ASCII symbols than you (for Norwegian letters), but I expect you have § ¤ £ € at the very least. Those are common enough and distinguishable enough that they could reasonably be allowed in a programming language. They are also supported in many 8-bit code pages (and therefore in most fonts). Beyond that, it's hard to get an agreement. *nix users typically have easy access to a fair number of extra letters and symbols, but it would be silly to write code that is hard work with on Windows. |
Ian Collins <ian-news@hotmail.com>: Mar 24 10:00PM +1300 On 24/03/2020 21:44, David Brown wrote: > distinguishable enough that they could reasonably be allowed in a > programming language. They are also supported in many 8-bit code pages > (and therefore in most fonts). Not on a "standard" US keyboard you don't! I get fed up copy and pasting £ when chatting to friends back home! -- Ian. |
alelvb <alelvb@inwind.it>: Mar 24 11:19AM +0100 Il 23/03/20 23:20, Paavo Helde ha scritto: > > [...] > > and use it usually: > > Vector v = a ∧ b; Mine was just a proposal to know what do you all (here on the newsgroup) do think about it. I had that idea and I wanted to know how expert people like you would have taken it as a point for reflection. Thank you, alessandro |
Melzzzzz <Melzzzzz@zzzzz.com>: Mar 24 11:59AM > ASCII symbols form the common subset. I am confident that I have more > non-ASCII symbols than you (for Norwegian letters), but I expect you > have § ¤ £ € at the very least. I don't have them. US ASCII keyboard... -- press any key to continue or any other to quit... U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan narod poludi -- Zli Zec Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi bili naoruzani. -- Mladen Gogala |
David Brown <david.brown@hesbynett.no>: Mar 24 01:09PM +0100 On 24/03/2020 12:59, Melzzzzz wrote: >> non-ASCII symbols than you (for Norwegian letters), but I expect you >> have § ¤ £ € at the very least. > I don't have them. US ASCII keyboard... You don't even have § and ¤ ? (I don't think £ or € would make particularly nice symbols anyway.) |
James Kuyper <jameskuyper@alumni.caltech.edu>: Mar 24 09:58AM -0400 On 3/24/20 4:44 AM, David Brown wrote: ... > ASCII symbols form the common subset. I am confident that I have more > non-ASCII symbols than you (for Norwegian letters), but I expect you > have § ¤ £ € at the very least. My keyboard has the following keys: `1234567890-= qwertyuiop[]\ asdfghjkl;' zxcvbnm,./ And this is what I get with the shift key: ~!@#$%^&*()_+ QWEWRTYUIOP{}| ASDFGHJKL:" ZXCVBNM<>? If your keyboard has the four characters you mentioned, then unless your keyboard has more keys than mine, it probably doesn't have all of the characters I've listed. |
Paavo Helde <myfirstname@osa.pri.ee>: Mar 24 04:08PM +0200 On 24.03.2020 15:58, James Kuyper wrote: > If your keyboard has the four characters you mentioned, then unless your > keyboard has more keys than mine, it probably doesn't have all of the > characters I've listed. My US-ASCII keyboard has also AltGr key, which I can easily use to generate: ¡²³¤€¼½¾''¥×äåé®þüúíóö«»¬ø¶´æ©ñµç¿ |
alelvb <alelvb@inwind.it>: Mar 24 03:14PM +0100 Il 24/03/20 13:09, David Brown ha scritto: >> I don't have them. US ASCII keyboard... > You don't even have § and ¤ ? (I don't think £ or € would make > particularly nice symbols anyway.) I think that the problem is not if a keyboard has the sign or symbol on it, but how can I get it. I use Linux with a keyboard layout set to "no dead keys" that includes a lot o signs pressing a key together with ALT, CTRL, SHIFT or a combination of them. Anway both Windows and Linux have a character palette application from which it is possible to pick "special" characters. Possibilities to break the tradition are widespread nowadays. Thank you, alessandro |
David Brown <david.brown@hesbynett.no>: Mar 24 03:22PM +0100 On 24/03/2020 14:58, James Kuyper wrote: > If your keyboard has the four characters you mentioned, then unless your > keyboard has more keys than mine, it probably doesn't have all of the > characters I've listed. I have all of these, but I have alt-gr instead of shift to make a few of them. I have: |1234567890+\ qwertyuiopå¨ asdfghjkløæ' <zxcvbnm,.- then with shift: §!"#¤%&/()=?` QWERTYUIOPÅ^ ASDFGHJKLØÆ* >ZXCVBNM;:_ then with alt+gr (right-hand alt): ¦¡@£$½¥{[]}±´ @ł€®þ←↓→œπ"~ ªßðđŋħ ĸł'^˝ ½«»©""nµ¸…– then with shift alt+gr: ¶¹²³¼‰⅝÷«»°¿¬ ΩŁ¢™Þ¥↑ıŒΠ°ˇ º§ÐªŊĦ̛&Ł˝ˇ× <>©''Nº˛·— On Windows, you don't get all of these alt-gr keys. You do get: @£$[]{}€'~ Some of the keys are "dead keys", for accents - it's easy to type éñöç and the like. And with Linux compose key, all sorts of new symbols are possible, such as ÷±⅔₂™œ I thought even US keyboards had § and ¤. I guess you are more limited than I thought. |
James Kuyper <jameskuyper@alumni.caltech.edu>: Mar 24 08:25AM -0700 On Tuesday, March 24, 2020 at 10:22:39 AM UTC-4, David Brown wrote: ... > And with Linux compose key, all sorts of new symbols are possible, such > as ÷±⅔₂™œ I posted my message from a Linux system, so I should be able to do that - but I was unaware of that capability, I've checked online for a description of that feature - it seems that my compose key should be shift-right Alt, but I couldn't get that to work as described. It says that "compose-key ~ a" should produce an a with an umlaut over it. When I type "shift right-alt ~" it brings up a selector from which I can choose which of the currently open windows to switch to. |
Melzzzzz <Melzzzzz@zzzzz.com>: Mar 24 03:55PM >> I don't have them. US ASCII keyboard... > You don't even have § and ¤ ? (I don't think £ or € would make > particularly nice symbols anyway.) Nope, I don't. Perhaps if I bought Serbian keyboard I would, but I bought US ASCII as I am used to. -- press any key to continue or any other to quit... U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan narod poludi -- Zli Zec Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi bili naoruzani. -- Mladen Gogala |
Ralf Goertz <me@myprovider.invalid>: Mar 24 05:29PM +0100 Am Tue, 24 Mar 2020 08:25:27 -0700 (PDT) > that "compose-key ~ a" should produce an a with an umlaut over it. > When I type "shift right-alt ~" it brings up a selector from which I > can choose which of the currently open windows to switch to. Hm here "shift right-alt ~" results in ¯. If you use kde there is an input device section in systemsettings5. Under Advanced you can specify which should be the compose key. It's probably best to do it there instead of globally which might be what the online description refered to. If (under layouts) you add a map then you can also use the preview to look at what you have. I guess that gnome has a similar program. |
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Mar 24 01:33PM -0700 > On 24/03/2020 21:44, David Brown wrote: [...] >> (and therefore in most fonts). > Not on a "standard" US keyboard you don't! I get fed up copy and > pasting £ when chatting to friends back home! Indeed. A typical US computer keyboard has exactly zero non-ASCII printable characters. (Remember that the 'A' in "ASCII" stands for "American".) There are generally ways to enter non-ASCII characters, but they vary with the operating system and application. Typing a £ symbol, for example is at least an order of magnitude more difficult than typing a # symbol (unless you can copy-and-paste it). It's often possible to configure other layouts, but the keycap symbols are still strictly ASCII. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */ |
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Mar 24 01:41PM -0700 David Brown <david.brown@hesbynett.no> writes: [...] > I have all of these, but I have alt-gr instead of shift to make a few > of them. I have an "Alt Gr" key on my keyboard (Windows laptop), but it doesn't appear to do anything useful. There might be a way to make it work, but I'm not sufficiently motivated at the moment to look into it. The problem, I think, is either that there's no standard for entering characters that don't appear directly on the keyboard, or there are far too many standards. [...] > I thought even US keyboards had § and ¤. I guess you are more limited > than I thought. I suggest doing an image search for US keyboard layouts. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */ |
Juha Nieminen <nospam@thanks.invalid>: Mar 24 10:28AM > *reinterpret_cast<array<char,4> *>(&abc[8]) > ); > } If you absolutely cannot change the signature of Func() above (eg. because it's not code you are developing nor can affect), and you absolutely must be able to "split" an existing std::array into several, then it's probably not very kosher to do that according to the standard (although this is just my hunch. I haven't read that part of the standard.) If all that code is developed by you and you have a choice, then you can simply create your own "array" class that explicitly offers that kind of functionality. In modern C++ terminology it would be an an "array view". Which, incidentally, is supported in C++20 directly IIRC, so if you can afford using C++20 you can use the standard library implementation. But creating your own should be quite easy. |
Real Troll <real.troll@trolls.com>: Mar 23 07:59PM -0400 Memory access patterns are one of the key factors for writing efficient code that runs over large data sets. In this blog post, you'll see why there might be a difference of almost 2.5x (in both directions!) when working with a vector of pointers versus a vector of value types. <https://www.bfilipek.com/2014/05/vector-of-objects-vs-vector-of-pointers.html> Good luck. |
Melzzzzz <Melzzzzz@zzzzz.com>: Mar 24 07:02AM > working with a vector of pointers versus a vector of value types. ><https://www.bfilipek.com/2014/05/vector-of-objects-vs-vector-of-pointers.html> > Good luck. Hm, I find that vector of values is more efficient. Especially sorting linked list by value exchange is more efficient then swapping pointers. eg after sort just traversing list is much more efficent. -- press any key to continue or any other to quit... U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan narod poludi -- Zli Zec Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi bili naoruzani. -- Mladen Gogala |
"Öö Tiib" <ootiib@hot.ee>: Mar 24 12:10AM -0700 On Tuesday, 24 March 2020 01:56:48 UTC+2, Real Troll wrote: > working with a vector of pointers versus a vector of value types. > <https://www.bfilipek.com/2014/05/vector-of-objects-vs-vector-of-pointers.html> > Good luck. Why projects use pointers to objects of their most massive data type, and what alternatives to suggest? If it is dynamic polymorphism then there is boost::base_collection to consider. If it is need for more control over life-time of single objects then there are std::optional and std::variant to consider. If it is need for sorting then there is boost::intrusive::set to consider. If it is because that way was easier to mock for unit testing, then .. huh, consider trying more. If it is because of desire to have our most massively used type opaque then ... huh, consider dropping that stupid idea. |
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