- legal UTF-8 characters in Identifiers ? - 14 Updates
- Containers that enforce size limits - 10 Updates
- Copy and move the member object - 1 Update
Anssi Saari <as@sci.fi>: Mar 31 11:18AM +0300 > key. I do not find it makes any noticeable difference. Of course it > takes time to change habits and muscle memory - but once you are used > to it, one position is as good as another. I don't agree. I want fast and easy access for the common punctuation used in HDLs and software languages. Other less commonly used stuff can go behind AltGr or just the right Alt on a US keyboard. I've long thought the ¤ meant the asshole who designed the Finnish/Swedish keyboard layout and have for a long time used the US layout, no matter what's printed on the keys. Got familiar with xmodmap in the 1990s when Sun workstations all came with US keyboards, even here in Finland. xmodmap still does the job 30 years later. Other tools work in other environments. > when you want to type something other than plain ASCII. I can write > I²C, µF, πr², 25°C, café, naïve, 2½, «Hello», and lots of other > symbols directly from the keyboard Interesting. Maybe the Norwegian layout is more flexible than Finnish/Swedish? I know I can get the common accents (´`¨~) from the dead keys and § and ½ directly since they have a dedicated key but for the rest... I guess I learned something. |
Muttley@dastardlyhq.com: Mar 31 09:16AM On Thu, 30 Mar 2023 17:53:38 GMT >>ow immediate access to their preferred variant to be defective. >Muttley appears to be British, and many brits still believe the sun doesn't >set on the empire. That's no longer the case. Before being a sarcastic jackass you might want to check whether the UK keyboard is pure ascii too. It isn't. However, the standard ascii punctuation characters aside from dollar are used all over the world and should be clearly visible on any keyboard, not hidden. |
Muttley@dastardlyhq.com: Mar 31 09:17AM On Thu, 30 Mar 2023 20:21:52 +0100 >imperial attitude is not common among those young enough to know what an >emoji is! I thought Muttley was from the USA as ASCII-nationalism has, >historically, been more common in the US than in the UK. Oh do fuck off you patronising arsewipe. I was under the impression people who read this group were developers and developers require the full set of ascii punctuation characters along with anyone who does more online than write comments on tik-tok. |
Muttley@dastardlyhq.com: Mar 31 09:18AM On Thu, 30 Mar 2023 19:07:08 +0200 >>> symbols >> Whatever those are they come out as gibberish in my terminal. >Are you unable to view UTF-8 ? What newsreader are you using? Its running in Mac Terminal. |
David Brown <david.brown@hesbynett.no>: Mar 31 12:40PM +0200 On 30/03/2023 21:14, Ben Bacarisse wrote: > type those characters with ease. The OS and it's input methods have > more to do with it than what I would call the "layout", but maybe I'm > missing something from what you mean by the term. There are several aspects to keyboard layout. The most obvious one is physical - when you buy an off-the-shelf keyboard in the UK, and one in Norway, there are different symbols on the keys. When you look at your "7" key, you'll see an "&" symbol accessible by "shift-7". I see "/" above the 7, so "shift-7" on a Norwegian keyboard layout should give "/" - I type "shift-6" for "&". My "7" key also has a "{" symbol to the side - thus I use "AltGr-7" to get "{". It is, of course, the OS and/or GUI and/or any configurable input methods that determines how the low-level keycodes are interpreted. But at a minimum, to be able to say you are using the standard UK or Norwegian keyboard layouts, your system must support those physically marked keys and symbols. On the software side, keyboard layouts can support more. The standard layouts on Windows support little more than the basics - for standard English (not "international", "extended" or "deadkey" versions), you have very little extra. With standard Norwegian layout, there are dead keys for a few common diacriticals, usable on vowels (é è ë ê ẽ). It is still very limited compared to Linux, but at least a step beyond the standard UK or US English keyboard layout on Windows. However, I have had very little use of standard English (UK or US) keyboard layouts in Linux for a very long time - perhaps it supports more than I thought. It is, of course, always possible to choose international English varieties, enable AltGr, dead keys, a compose key, and so on - but that's going beyond /standard/ layout. But are you getting easy access to characters like Å ,ß, ¼ without having enabled anything special? > clan who see facilitating typing (or, God forbid, posting) non-ASCII > characters as the thin end of some subversive socialist wedge. First > they let you type an acute accent, but then they come for your guns! If anyone thinks they need non-ASCII letters, you should explain LOUDLY and S L O W L Y why the Queen's English is good enough for them! |
Muttley@dastardlyhq.com: Mar 31 10:58AM On Fri, 31 Mar 2023 12:40:47 +0200 >> they let you type an acute accent, but then they come for your guns! >If anyone thinks they need non-ASCII letters, you should explain LOUDLY >and S L O W L Y why the Queen's English is good enough for them! I see the straw men are busy today. Are you capable of comprehending the difference between "need all ascii characters" and "not needing non ascii characters". Given you claim to be a developer the simple boolean logic difference should be evident. |
David Brown <david.brown@hesbynett.no>: Mar 31 01:00PM +0200 On 31/03/2023 10:18, Anssi Saari wrote: > I don't agree. I want fast and easy access for the common punctuation > used in HDLs and software languages. Other less commonly used stuff can > go behind AltGr or just the right Alt on a US keyboard. I don't know what you are disagreeing about - I /have/ fast and easy access to the symbols used in common programming languages. (APL does not count :-) ). I am at a loss as to why some people think it is hard to type "AltGr-7" to get "{", and feel that "shift-[" is so much simpler on /their/ layout. It is not as though I need to press "compose", "(" and "-" to get it. > in the 1990s when Sun workstations all came with US keyboards, even here > in Finland. xmodmap still does the job 30 years later. Other tools work > in other environments. There certainly was a time when multiple competing variants of ASCII character sets were a problem. You'd try to print out your C code, and the braces and brackets were replaced with Å or æ, or hash was replaced by a pound sign. But that was a character set issue, not a keyboard layout issue. I have never had an issue using Norwegian keyboards and Norwegian keyboard layouts when typing C code. (But I only used Sun workstations before I moved to Norway.) > Finnish/Swedish? I know I can get the common accents (´`¨~) from the > dead keys and § and ½ directly since they have a dedicated key but for > the rest... I guess I learned something. I should really have been more careful about the OS in question. I get lots of extra symbols on the standard Norwegian layout on Linux - the standard Norwegian layout on Windows has more possibilities than the standard UK/US English layout on Windows, but not nearly as much as Linux. I would assume the Finnish layout is very similar to the Norwegian layout on both systems. Or are you using a Finnish layout on Linux (or other X system) but don't have ², π, Ω and other symbols accessible directly with AltGr ? |
David Brown <david.brown@hesbynett.no>: Mar 31 01:05PM +0200 On 30/03/2023 21:21, Ben Bacarisse wrote: > I am sad for my country's recent dive into xenophobic politics, but that > imperial attitude is not common among those young enough to know what an > emoji is! Unfortunately, it is the old xenophobes that make most of the policy. The vote on Brexit should have had an upper age limit of perhaps 50 - such important decisions about the future should be made by the people who will live in that future, not those who are leaving. (As a Scot, I am not xenophobic - merely anglophobic!) |
David Brown <david.brown@hesbynett.no>: Mar 31 01:08PM +0200 > keyboard is pure ascii too. It isn't. However, the standard ascii punctuation > characters aside from dollar are used all over the world and should be clearly > visible on any keyboard, not hidden. You mean like they are on my Norwegian keyboard? Clearly visible and easy to type, as I have described? I wonder if it is not just non-ASCII characters you have trouble reading. |
Muttley@dastardlyhq.com: Mar 31 11:27AM On Fri, 31 Mar 2023 13:05:59 +0200 >The vote on Brexit should have had an upper age limit of perhaps 50 - >such important decisions about the future should be made by the people >who will live in that future, not those who are leaving. People aged 50 could live for another 50 years. >(As a Scot, I am not xenophobic - merely anglophobic!) Same thing. But now with Humza Useless as FM you can look forward to Scotlandistan becoming a thing. Only SNP supporters could be thick enough to believe a devout muslim would be more liberal than a christian. |
Muttley@dastardlyhq.com: Mar 31 11:28AM On Fri, 31 Mar 2023 13:08:00 +0200 >> visible on any keyboard, not hidden. >You mean like they are on my Norwegian keyboard? Clearly visible and >easy to type, as I have described? So what are you arguing about then? I'm simply saying all ascii characters should be available on a keyboard. >I wonder if it is not just non-ASCII characters you have trouble reading. You wonder a lot and never seem to have any answers. |
David Brown <david.brown@hesbynett.no>: Mar 31 03:36PM +0200 > Same thing. But now with Humza Useless as FM you can look forward to > Scotlandistan becoming a thing. Only SNP supporters could be thick enough > to believe a devout muslim would be more liberal than a christian. Are you seriously posting blatant racism and religious prejudice here? It is one thing to comment on the depressing but very real fact that British politics has more xenophobic and insular in recent times. You can agree or disagree with the politics - that's the freedom of a democracy. But undisguised hate speech and bigotry - judging the SNP leadership candidates purely on unjustified claims of stereotypical group behaviours due to one aspect of their characters - that has no place here or anywhere else. My apologies to the rest of this group for my part in a thread which led to such a post. |
Muttley@dastardlyhq.com: Mar 31 03:00PM On Fri, 31 Mar 2023 15:36:36 +0200 >> Scotlandistan becoming a thing. Only SNP supporters could be thick enough >> to believe a devout muslim would be more liberal than a christian. >Are you seriously posting blatant racism and religious prejudice here? My god, the irony meter just went off the scale! >leadership candidates purely on unjustified claims of stereotypical >group behaviours due to one aspect of their characters - that has no >place here or anywhere else. Oh diddums, has ickle snowflake been triggered? Go to your safe space poppet and hug the therapy teddy. Fact: Strict Islam doesn't tolerate a number of liberal shibboleths. Don't believe me? Visit saudi or iran and hold your boyfriends hand in the street and see how long it is before you're carted away in a van. >My apologies to the rest of this group for my part in a thread which led >to such a post. Yes, you should apologise for your clear xenophobia. |
Malcolm McLean <malcolm.arthur.mclean@gmail.com>: Mar 31 12:37PM -0700 On Friday, 31 March 2023 at 14:36:52 UTC+1, David Brown wrote: > leadership candidates purely on unjustified claims of stereotypical > group behaviours due to one aspect of their characters - that has no > place here or anywhere else. Under the Labour government the British National Party (a far right Britihs political party) had several council seats and two European Parliament seats. Now they don't have a single one. It's not as simple as you are saying. And it's hard to characterise the current governing party as racist when it chose an Indian as Prime Minister. |
Muttley@dastardlyhq.com: Mar 31 09:25AM I'm currently writing software that requires a deque that will reach a max size and stay there so for example at the limit when I push something on one end it automatically pops it off the other. Obviously this is simple to accomplish with some boiler plate size check code, but does anyone know if this sort of functionality has been mooted for upcoming STL versions? |
Sam <sam@email-scan.com>: Mar 31 07:39AM -0400 > on one end it automatically pops it off the other. Obviously this is simple > to accomplish with some boiler plate size check code, but does anyone know if > this sort of functionality has been mooted for upcoming STL versions? STL hasn't existed for decades. There's nothing of that sort in the current version of the C++ library, and I haven't heard anything about anything of that sort. I think it's unlikely. |
"Öö Tiib" <ootiib@hot.ee>: Mar 31 04:44AM -0700 > on one end it automatically pops it off the other. Obviously this is simple > to accomplish with some boiler plate size check code, but does anyone know if > this sort of functionality has been mooted for upcoming STL versions? You mean C++ standard library? No. That seems quite unusual behaviour for deque. It is unclear why you just do not wrap std::deque to adapter that checks the size and does what you want? Or maybe what you really need is circular buffer? There is circular_buffer class in boost. |
Malcolm McLean <malcolm.arthur.mclean@gmail.com>: Mar 31 05:26AM -0700 > on one end it automatically pops it off the other. Obviously this is simple > to accomplish with some boiler plate size check code, but does anyone know if > this sort of functionality has been mooted for upcoming STL versions? A deque can throw. On most systems with a bug free and reasonable program, this is so unlikely that the possibility can be ignored. If a dequeu has a maximum size, then data has to be discarded when the maximum is reached. Whilst you can think of circumstances in which this is appropriate, for example if you are injecting a stream of badddies into a video game, it's too unusual and special purpose to be attractive for standardisation. |
Paavo Helde <eesnimi@osa.pri.ee>: Mar 31 03:50PM +0300 > on one end it automatically pops it off the other. Obviously this is simple > to accomplish with some boiler plate size check code, but does anyone know if > this sort of functionality has been mooted for upcoming STL versions? Silently discarding data is not a behavior which should be present in a standard container IMO. There are also multiple variations about what and how such a thing could behave, which are in my mind no worse, or less often needed: - discarding not the first entry, but some other(s), depending on condition - throwing an exception - waiting until another thread makes room in the queue - yielding to a coroutine for making room in the queue - ... |
Muttley@dastardlyhq.com: Mar 31 03:02PM On Fri, 31 Mar 2023 07:39:59 -0400 >> to accomplish with some boiler plate size check code, but does anyone know if >> this sort of functionality has been mooted for upcoming STL versions? >STL hasn't existed for decades. I see pendant mode has been turned to 11 again today. STL is shorthand for the containers in the standard library amongst a lot of us. |
Muttley@dastardlyhq.com: Mar 31 03:04PM On Fri, 31 Mar 2023 04:44:47 -0700 (PDT) >You mean C++ standard library? No. That seems quite unusual behaviour for >deque. It is unclear why you just do not wrap std::deque to adapter that >checks the size and does what you want? For the same reason I use C++ and not C and writing my own implementation of a queue. >Or maybe what you really need is circular buffer? There is circular_buffer >class >in boost. Boost? Ugh. That abomination should crawl away and die in a corner, its time has passed. |
Muttley@dastardlyhq.com: Mar 31 03:07PM On Fri, 31 Mar 2023 15:50:49 +0300 >> this sort of functionality has been mooted for upcoming STL versions? >Silently discarding data is not a behavior which should be present in a >standard container IMO. Depends on the type of container. > - waiting until another thread makes room in the queue > - yielding to a coroutine for making room in the queue > - ... Or in my case, a message queue in which messages cease to be valid after X messages have followed them so if they haven't been read by then they can be binned. |
Christian Gollwitzer <auriocus@gmx.de>: Mar 31 07:20PM +0200 >> in boost. > Boost? Ugh. That abomination should crawl away and die in a corner, its time > has passed. Regardless of Boost, I think what you describe is a circular buffer (also called ring buffer). It can be implemented efficiently with a fixed-size array and two pointers. You can certainly find other implementations besides Boost. Christian |
Bonita Montero <Bonita.Montero@gmail.com>: Mar 31 08:00PM +0200 > on one end it automatically pops it off the other. Obviously this is simple > to accomplish with some boiler plate size check code, but does anyone know > if this sort of functionality has been mooted for upcoming STL versions? A size-limited deque<> doens't make sense. |
"Öö Tiib" <ootiib@hot.ee>: Mar 31 03:39AM -0700 On Monday, 27 March 2023 at 23:11:53 UTC+3, Pawel Por wrote: > Hello, > Assume there is a struct with a single member object. When creating the object of a struct I want the member object sometimes be copied and sometimes moved. Is the following approach correct ? Assume I don't want to use generic programing. Note that destructor of Item is missing. In your example (that does nothing) it does not matter, but in real class it should be always present when you define any of assignment, move or copy construction. It is called "Rule of zero, three or five". Your Container lacks all of 5 (that is OK) but has implicit copy and move conversion constructors from other class. That can cause confusion. Perhaps do not use examples that do nothing. You may fail when you attempt to write programs that do something. Yes, your main() compiles but most compilers optimise all the code out of it as it does nothing externally observable. IOW copying or moving has only any point when there is something to copy or to move and that is used for something meaningful. Note that also such code compiles (and does also nothing, and so is as meaningless): Item a; Container cont = a; Container cont2 = std::move(a); cont = cont2; cont = std::move(cont2); cont2 = a; cont2 = std::move(a); |
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