- constexpr array in template class undefined at link time - 5 Updates
- [OT] USA solar eclipse Aug.21.2017 - 12 Updates
- quaternion graphics in C or C-style C++? - 1 Update
- reading random bytes from memory - 3 Updates
- getting system info in c++ linux - 4 Updates
Clifford Heath <no.spam@please.net>: Aug 29 02:43PM +1000 On 26/08/17 15:50, Kalle Olavi Niemitalo wrote: >> so it cannot define the array. > template <int unused> > constexpr unsigned char Base<unused>::lengths[]; I tried many variations of this. None worked. It's now a local static in the method that needs it, instead of beside the enum whose members it matches. Sigh. C++ was always a train wreck, but now it's like someone nuked the intergalactic railway convention. |
"Öö Tiib" <ootiib@hot.ee>: Aug 28 11:06PM -0700 On Tuesday, 29 August 2017 07:43:48 UTC+3, Clifford Heath wrote: > Sigh. > C++ was always a train wreck, but now it's like > someone nuked the intergalactic railway convention. Oh. Its just a tool. With gcc version 7.2.0 here your first post code seems to compile and run ... I go try with clang on mac too. |
"Öö Tiib" <ootiib@hot.ee>: Aug 28 11:09PM -0700 On Tuesday, 29 August 2017 09:06:47 UTC+3, Öö Tiib wrote: > Oh. Its just a tool. With gcc version 7.2.0 here your first > post code seems to compile and run ... I go try with clang > on mac too. Also compiled and ran ... with clang 3.8.0. |
Juha Nieminen <nospam@thanks.invalid>: Aug 29 06:53AM > printf("%d\n", x+lengths[x]); > } > }; This works ok with clang: //-------------------------------------------------------------------- template <int unused> constexpr unsigned char Base<unused>::lengths[8]; //-------------------------------------------------------------------- If it doesn't work for your compiler for some reason, try the C++98 way: //-------------------------------------------------------------------- template <int unused> class Base { public: static const unsigned char lengths[8]; void write(int x) { // dummy function body printf("%d\n", x+lengths[x]); } }; template <int unused> const unsigned char Base<unused>::lengths[8] = { 1, 3, 2, 3, 4, 2, 3, 2 }; //-------------------------------------------------------------------- |
Bo Persson <bop@gmb.dk>: Aug 25 04:01PM +0200 On 2017-08-25 13:19, Clifford Heath wrote: > MyBase base; > base.write(2); > } Using C++11 you would have to also define the array to allocate storage for it. It is static const *integral* types that can (most often) be only declared in the class declaration. With C++17 you could get away with that if you declare it `inline constexpr`. Bo Persson |
Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem>: Aug 29 05:00AM -0400 On Mon, 28 Aug 2017 16:24:23 +0000 (UTC) > When will you all realize that putting "[OT]" in the topic doesn't > excuse you from spamming up the newsgroup with unrelated stuff? First, placing [OT] in the topic is proper Usenet etiquette for for any non-topical thread. Second, **I** didn't put "[OT]" in the topic. Rick put [OT] in the topic. Please stop conflating the two of us or learn to comprehend. > You're still being annoying. As are you. > We have newsgroup charters for a reason. We have moderated groups for a reason too. These are not any of them. Please stop attempting to tell me how Usenet works. I've been using it since the 1980's. (Follow-up set to a.o.d. should you misguidedly decide to continue to project your anger onto me instead of Rick.) Rod Pemberton -- Isn't anti-hate just hate by another name? Isn't anti-protesting just protesting by another name? Peace is a choice that both sides rejected. |
Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem>: Aug 29 05:25AM -0400 On Sun, 27 Aug 2017 19:03:45 +0200 > On 27/08/17 09:31, Rod Pemberton wrote: > > On Sat, 26 Aug 2017 14:52:22 +0100 > > Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> wrote: Follow-up set to a.o.d. should D.B. decide to reply to me. > > the entire thread by filtering for "OT" in your newsreader. > I have a few points for you here, Rod, that might help you see where > people are coming from here. ... (Again, follow-ups set to a.o.d. should D.B. decide to reply to me.) > addresses. (That includes Rick, and Richard, and with a small obvious > fix, Chris and Mr. Flibble. I haven't checked everyone in this > thread.) I don't have, nor use email anymore. I stopped using it around 2004. Even so, the fact that I don't have a valid email address is irrelevant as to the issue of how others responded. Why should anyone be judged on the use of a valid email address with a service that doesn't require a valid address? I.e., Usenet. I rotate garbage address for technical reasons, instead of using RFC compliant "@invalid.invalid" etc. > off-topic thread. However, merely marking it OT does /not/ make it > appropriate for a given newsgroup. That depends on the newsgroup and > the preferences of the people that make up that group. No, it's not. It's proper Usenet etiquette. Read the FAQs. A polite, RTFM, if you don't mind. > particular, the regulars are very keen to stay on topic, and there > are many who strongly dislike OT threads. In particular, there is > massive dislike for the religious threads which Rick regularly starts. Irrelevant. Rick - unlike normal - actually posted an OT on the thread. No one has any valid cause whatsoever to complain in /this/ thread because he did so. End of story. Or, it should've been. > When you come from the outside, I can well appreciate that you don't > know this about c.l.c. - that group is fussier than many other groups > in this respect. Outside? I posted to c.l.c. for over a decade and read it for longer than that. I just didn't post while you are there, AFAIR. I've been posting to Usenet since the 1980's. You need to stop making assumptions about me. If you'd been reading c.l.m. posts other than just yours, e.g., to James Harris, you'd know I'm familiar with many of those who were and may still be on c.l.c., such as Richard Heathfield, Keith Thompson, Steve Summit, Nick Keighley, David Thompson, Jacob Navia, Chris Torek, and Eric Sosman among many others, e.g., Kenny McCormack, CBFalconer, ... > Personally, I think it is healthy for a newsgroup > to have a small proportion of OT threads - as long as it is possible > to keep them to a small proportion. Heathfield has claimed for decades that he filters posts. If true, he wouldn't be in this thread at all. So, set your newsreader to filter if you don't like OT threads. It's simple and easy to do, and, the best part, is that you don't need to stoke your own cracked ego by blaming others for your anger and irrationality over some off-topic threads. > However, that possibility has > been ruined in c.l.c., by Rick and his incessant religious posts. I don't like Rick posting _incessant_ religious posts either, but I don't filter. I don't have a problem with some religious posts, even though I'm non-religious. Some of my best friends are religious. Most of my family is religious. I know quite a bit about the Bible. No one even bothered to ask me my position on Rick. I had to state that he's a nice guy, when he's not ranting on religion. That was after everyone jumped on me. Why do you think I'm attempting to get him to think about what he says? Maybe, he'll realize it's stupid, or he doesn't believe what he is saying and will stop, or he may just burn out from arguing with "non-believers" whom he can't convince. I've only seen one person on Usenet that hasn't burned out from ranting, and I think that they're finally about to crack. > discussion in such OT threads - but decline to take part (except for > the occasional post on topicality, which is always on topic) from > respect for the group preferences. If you knew anything about politics, you'd know that group thought is usually wrong, i.e., 50%/50% correct/wrong. > newsreader. It is not hard. However, I also fully appreciate that > they want a newsgroup where they don't have to actively ignore a > substantial part of the traffic. When I was posting to c.l.c., Rick wouldn't have been a significant part of the traffic, e.g., easily multiple hundreds of posts per day. > > Rick is a good guy, as long as he stays off religion. > I try hard to hold that attitude, but Rick makes it impossible. Really? I don't see many from him on c.l.c., but see a ton on c.l.c++. (No, I'm not sub'd to either.) > People in c.l.c. know there is no point in trying to reason with Rick > about his religious posts - it is a complete waste of time, and > results in more meaningless noise. I disagree. He posts incessant religious rants to a.o.d. too. I've asked him to stop repeatedly. He does respond to replies to his posts. Replies which don't conform to his beliefs do irritate him. This is good as it makes one question their beliefs or question why they're posting them where they are or why they're posting to whom they are. > Sometimes it is worth trying to > make other people understand the effect of their posts - it may lead > to a change of behaviour. Exactly. That would confirm that you agree with me arguing with him. (I.e., every argument you present against me talking to Rick, can be use to support me doing the same. Or, there are two sides to every coin, or two edges on every sword. One path minimizes victims, while the other maximizes.) > Thus in any thread where people are > responding to Rick and encouraging threads like this, it is the other > people who are asked to stop. That's clearly the wrong approach. Two wrongs don't make a right. All that does is create angry victims. The people who responded to Rick in an attempt to encourage Rick to change become victims of the group by doing that. So, all you've done by enforcing group thought is compound the actual problem by an order of magnitude. You made it worse. Those people that the group attacked have every right to /not/ be attacked by the group or clique, not only because they are "innocent," but also in large part because they are in support of said group or it's agenda, i.e., annoyed by Rick's numerous religious rants. > I am deliberately not taking sides or judging here, or trying to say > who acted badly, or who is at fault - or even what faults might have > been committed. Really? If that was actually true, you wouldn't have replied to me with this almost TLDR post to explain your side to me. > I'd also suggest that if you are interested in technical discussions > on c.l.c., you might have "plonked" some useful contributors here. No, I didn't. Of that, I'm 100% certain. As stated above, I posted on c.l.c. for about a decade and read for longer than that. There are only *two* people who posted on c.l.c. whom I admired (probably not those you'd expect), but they and c.l.c. are of no use to me IRL. My posts are only here because Rick threw on a.o.d. Rod Pemberton -- Isn't anti-hate just hate by another name? Isn't anti-protesting just protesting by another name? Peace is a choice that both sides rejected. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Aug 29 03:15AM -0700 On Monday, August 28, 2017 at 5:50:46 PM UTC-4, Mr Flibble wrote: > Enough is enough. > *PLONK* If you ever come back, here is DNA replication in real-time: https://www.youtube.com/watch?v=O6f3ZbKaL7A Here's the whole talk: https://www.youtube.com/watch?v=WFCvkkDSfIU&t=2m55s This orchestrated complexity, showing only one aspect of the range of biological processes taking place inside a living cell, is so finessed and nuanced, comprised of so many layers of systems and sub-systems, that it is a literal impossibility that it could've come about by natural processes. DNA uses only left-hand DNA molecules, even though both left- and right-hand occur naturally. And when you get in to the N-way levels the information on DNA is used, and the way some things divvy up a gene sequence, slicing out segments here and there before use in their application of the N-way uses, it all adds up to not only design, but such incredibly complex and beautiful design that it's breathtaking. And then you factor in the variations across plants, animals, bacteria, all forms of life, different kinds, and the variation within each kind, its ability to adapt and alter form out to final forms as through selective breeding for specific gene expressions ... It's quite simple: designer, not natural processes. In fact, it's so obviously created by a designer that to say otherwise is to look foolish. When you study God's creation, He is there. Everywhere you look you find beauty beyond imagination ... except where the policies of man are applicable, and that exception is due to sin. By man's choices he mucks things up. Sin is the stain God is removing by His Son, and the existence of Hell, so that everything else can thrive in the beauty God created. Jesus makes us perfect by His righteousness. Our sin, our error, our weaknesses, our mistakes, they are poured out of us onto Him, and He bears their burden before God. We continue on thereafter as the sin-free, error-free, weakness-free, fully capable, fully complete forms God intended for us before sin. We then go on to the next stage of our existence having been purged of sin, all wrongness and error, to then be a part of God's plan for us ongoing. The Bible records in Revelation we will learn the new name of Jesus. The name Jesus literally means, "God who saves." And while it doesn't say, I'm guessing His new name is "Teacher" because I think God has future plans for us which are astounding. As beautiful as the clockwork precision of His vast universe. Thank you, Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Aug 22 09:23PM +0100 On 22/08/2017 17:17, Rick C. Hodgin wrote: [snip] > components as you look up and see this massive thing in the uni- > verse where, for a moment, you are able to realize how small you > truly are, and how big God's creation truly is). [snip] But the world is flat according to the Bible yes? Rick, fuck off; until you stop posting religious shite I am not interested in your non-religious posts including those about C++. /Flibble |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Aug 23 12:41AM +0100 On 22/08/2017 21:37, Rick C. Hodgin wrote: > to you as though they are truth), will be your undoing, Leigh. > It is not God who will condemn you. You will condemn you, > because you would not hear the truth. Everything you say is predicated on your belief that the Bible is true. Well consider this: Assumption #1: Genesis creation story is a myth/allegory and Adam and Eve are a fiction. Assumption #2: Jesus Christ (either biblical or historical) existed. The Bible (Old and New Testaments) describe the genealogy of Jesus Christ all the way from Joseph and Mary back to Adam and Eve. Given our two assumptions at what point does this 50-generation genealogy transition from fact to fiction and what is the proof of this transition? IMO the entire genealogy is suspect and assumption #2 is bogus. There is no evidence contemporary to Christ's existence of his existence: it all came out in the latter part of the first century in writings from the likes of Josephus and Tacitus a significant time after Jesus's supposed death. The Gospels themselves are complete hearsay which wouldn't hold water as evidence in a court of law. If you now claim that assumption #1 is false despite all the evidence to the contrary (e.g. weathering of the Grand Canyon, fossils confirming evolution and evolutionary time scales) then you really are beyond help as nothing can be done to mitigate such obtuse stupidity. [snip] /Flibble |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Aug 23 05:35AM -0400 On 8/23/2017 4:44 AM, Rod Pemberton wrote: > Also, don't look > at God because you'll die by doing so. (Exodus 33:20) Or, is KJV > implying that God murders you for staring at him? ... Hard to tell. It's because God is Holy, Holy, Holy, and we are fallen in sin. No flesh can look upon God and live because the purity of His holiness would induce judgment and condemnation upon the sin that lives in us. We would be consumed in an instant. Because we are born in sin, raised in sin, live in sin, know the things of this world (which are all in and of sin), we think we have some kind of handle on the state of reality, and that it falls within the realm of that which we know. What the cross teaches us is that there is more, and that we do not yet know the truth, nor do we have that which we need on our own. The cross teaches us that there is more, and that all who will look to the cross will discover this, because God Himself will lead all who do so to the truth Himself, so that it is not distorted, not twisted in some way, but for all who will truly seek the truth, God will ensure personally that they find it. The truth is it's only when Christ takes our sin away that we are able to then stand before God again, and look upon Him, and even then not until we leave this world and receive our new bodies: https://www.biblegateway.com/passage/?search=1+Corinthians+15%3A53-55&version=KJV It's not difficult to understand and know the truth about God. It just requires an honest, truth-seeking heart. There are many teachers around who will give you correct information. There are not many students who are interested in hearing the lessons of Jesus Christ because they are too focused on the sin they enjoy in their life to ever look up, step away, and learn it. > Isn't it an interesting coincidence that the Sun and KJV God are so > similar? Didn't the Egyptians worship the sun God Ra? ... They are not similar. There is only one God, though there are many gods: https://www.biblegateway.com/passage/?search=1+Corinthians+8&version=KJV 5 For though there be that are called gods, whether in heaven or in earth, (as there be gods many, and lords many,) 6 But to us there is but one God, the Father, of whom are all things, and we in him; and one Lord Jesus Christ, by whom are all things, and we by him. We also are God's children. Scripture refers to us as gods: https://www.biblegateway.com/passage/?search=John+10%3A34-38&version=KJV 34 Jesus answered them, Is it not written in your law, I said, Ye are gods? This future, this restoration to our true state, the one sin fully denies of us here in this world, that is what the enemy of God is trying to keep us from. He wants us to remain in our sin-induced ignorance, to believe this world we live in, these minds we possess, this existence is all there is. He wants us to stay away from God, stay away from the truth, stay away from salvation, so that he can defeat us in his rebellion against God. He wants us dead in his battle, not just here in sin on the Earth, but in eternity in judgment. But Jesus has made a way out from that for all who will hear. He's made a way to restore us to His Kingdom of love, power, and eternity. ----- God calls out to you, Rod, and to all people. He doesn't do it as part of a cocktail joke or a punchline. He doesn't do it as by the mocking of ignorant souls who say that such a call is only for fools and weak people. He calls out to His creation in strength, in honor, in a restoration of all right things. He does so to give us that which we cannot attain on our own. He does so to give us a second chance, to overcome death, Hell, and the grave. He does so to restore us to His Kingdom, and bring us back despite our many runnings in all manner of other directions, toward other interests, pushing Him away, kicking at Him like a spoiled child, demanding that He leave us alone. Despite all of this, He remains faithful to us, a good Father, a good God. There was a skit written and performed at Winterfest in Knoxville Tennessee in 2006 that outlines this path. It shows God creating everything, sharing all He has with man, and then sin enters in. Temptations away from God enter in through those evil spirits which tempt men away from God toward other things. We see the downfall of man, the despair from the separation, the confusion. But we then see how God steps in to overcome and defeat that which we could not defeat ourselves. It's such a brilliant skit. I literally have watched it more than 50 times over the years and cannot watch it without crying when I see what God did to restore us. He loves us so much that despite our mass and personal rebellions against Him, yet did He make a way out for all who would yet believe and repent of their sinful ways: https://www.youtube.com/watch?v=cyheJ480LYA ----- Eternity and eternal life are given to mankind. It comes to us through that which Jesus Christ did on the cross. He made a way out of our sin. He literally saved us from death. Thank you, Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Aug 23 05:11AM -0400 On 8/22/2017 7:41 PM, Mr Flibble wrote: >> It is not God who will condemn you. You will condemn you, >> because you would not hear the truth. > Everything you say is predicated on your belief that the Bible is true. Everything I believe is predicated on Jesus Christ being who He says He is, and a portion of who He is is recorded in the Bible. The experience every Christian has personally is that our faith does not resting solely upon the words of Bible, but upon the application of the One described in the Bible given to us in our daily lives. I came to faith because I read in the Bible the truth about God, about sin, about me, about Jesus Christ, but there is more to God than His written word. There is the full application of His presence in our daily lives, and it is there, from withing that relationship He initiates with us and that we enjoy each day, that the reality of His existence in our lives is manifest. We don't hover over a book as our soul source, but we learn over time that the Bible aligns with God's spirit, and God's spirit aligns with the Bible, and that there is also another spirit at work in this world that aligns not with God's spirit or the teachings of the Bible. It is that anti-Christ spirit, the exact opposite of Christ, the one who is leading souls to their destruction, the one who is causing wars and spreading hate and inflicting disease. He is the one Christ defeated at the cross, and it is why today we (mankind) has victory over sin. ----- The message of salvation is given to all of mankind, Leigh. Everyone can be saved by believing in Jesus Christ and asking Him to forgive their sin. But not everybody will be saved. Many will hear the message, reject it, believe it to be that which is false, and never accept His offer of salvation, and will enter into Hellfire for all eternity because of it. God does not force Himself on people. He calls out to every soul and says, "Here am I. With everything I possess I stand before you saying, 'Come, and I will give you eternal life.'" He calls out to every soul in one way or another, but only those who answer His call will be saved. ----- If you can hear His call in your heart, in your inmost core, in the depths of your soul, from that place where you know that you are hearing Him, the still small voice inside when you are at peace, in silence with nothing distracting you, but then in the stillness, when you are seeking the truth and being completely honest with yourself ... if you can hear His call within, then rejoice because it is Him reaching out to save your eternal soul from judgment, to give you new life, to restore you to His eternal Kingdom of love, peace, power, and authority. The message of the cross is given to all who will be saved. It is not intended for other people. He doesn't want to judge us, but He will honor our request. We will either call upon Him to be our Savior, or call upon Him to be our judge. The choice is ours, for He has already done every- thing necessary on both sides. He created Hell to contain all falseness, and He gave us His Son Jesus Christ to make a way out of judgment for just the asking. It's your choice, Leigh. You wanted the power to choose your own fate? Jesus gives you that choice. Make it a good one. Thank you, Rick C. Hodgin |
gazelle@shell.xmission.com (Kenny McCormack): Aug 23 10:25AM In article <onj9qm$9uc$1@dont-email.me>, David Brown <david.brown@hesbynett.no> wrote: ... >Look, he wrote a pleasant post about an amazing real-world experience - (etc - no need to repost) Heh heh. Here we have a CLC reg actually defending the undefendable - namely, the egregious Ricky-from-Indiana nutcase. It's the Trump effect. People (and I use the term loosly here) like Trump and Ricky just keep hammering away with their nonsense - bringing down the level of discourse so that we come to accept whatever they do as (almost) normal. We (and by "we", I mean us as CLC readers/posters and, in the larger sense, the US media) end up looking desperately for something to praise - something that's not quite as awful as the rest of it. And thus every time the Orange One fails to poop his pants on national TV, the media starts gushing about how "Presidential" he is. And whenever Rick manages to post something here that isn't completely stupid, we all want, instinctively, to say "Well done, sir!". It is human nature to want to find something to praise - something that validates the BS we were all taught growing up watching Sesame Street - the idea that there is good in everyone. -- The book "1984" used to be a cautionary tale; Now it is a "how-to" manual. |
David Brown <david.brown@hesbynett.no>: Aug 23 09:15AM +0200 On 22/08/17 22:23, Mr Flibble wrote: > you stop posting religious shite I am not interested in your > non-religious posts including those about C++. > /Flibble Look, he wrote a pleasant post about an amazing real-world experience - watching the eclipse. I have seen one myself, here in Norway, and the sight is awe-inspiring. It does not matter if you are a dedicated religious believer marvelling at God's creation, an atheist marvelling at the beauty of nature, or anything else - if you are human, you will marvel at a full solar eclipse. The post was off-topic in all the groups posted, but it was a friendly post that does no harm. Even the religious content was negligible. Your ugly, crude, angry and repetitive provocations are /not/ welcome. They are not helpful, they are not enjoyable, they are not informative, they are not intelligent, logical or rational. They do nothing but provoke Rick to post more religious waffle, which nobody wants. They spoil every thread they touch. So please take your own advice, and stick to C++. |
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Aug 29 02:22PM +0100 On Tue, 29 Aug 2017 05:25:36 -0400 > On Sun, 27 Aug 2017 19:03:45 +0200 > David Brown <david.brown@hesbynett.no> wrote: [snip] > are "innocent," but also in large part because they are in support of > said group or it's agenda, i.e., annoyed by Rick's numerous religious > rants. You are incredibly immature. You are not a victim: you were repeatedly responding to Rick's off topic posts knowing that it would encourage him to post more. You were not as your claim trying to change his posting habits, which would clearly be hopeless. Instead you said that you were posting your crap to make Rick "actually /THINK/ deeply about some of these things he says, not just accept them because it's part of his Faith". The only part of your posting that is right is that "two wrongs do not make a right". Responding to off topic posts with off topic posts does not make off topic posting OK. Stop it (and your attempts at self-justification). |
Ivan Shmakov <ivan@siamics.net>: Aug 25 01:20PM >>>>> Am Fri, 25 Aug 2017 04:54:36 -0400 schrieb Rod Pemberton: > [Your pointing out of the logical flaws in religious beliefs is quite > refreshing although I guess it's fruitless in Rick's case.] Usenet discussions are not about convincing one's opponent(s); they're about informing the audience, so the undecided can make their choice. (I mean, we do have audience, right? I'm sure we aren't all killfiled just yet!) > teaches us that siblings or a mother and her child share 50% of their > DNA. Does that mean I am genetically closer to a chimp than to my own > mother? Of course not. Yes; it means that about 50% comes from one parent, and the rest from another, while both of parents share about 99% of their respective DNA by the virtue of belonging to the same species. > So what do the 96% above refer to? Chromosoms, genes, triplets, > nukleotides? Chromosomes are too large; triplets are to small; genes sound about right. (And speaking of nucleotides does make about as much sense in this context as a "152.3 byte" file would in the context of C.) -- FSF associate member #7257 58F8 0F47 53F5 2EB2 F6A5 8916 3013 B6A0 230E 334A |
Ralf Goertz <me@myprovider.invalid>: Aug 25 03:59PM +0200 Am Fri, 25 Aug 2017 13:20:44 +0000 > Yes; it means that about 50% comes from one parent, and the rest > from another, while both of parents share about 99% of their > respective DNA by the virtue of belonging to the same species. But that is the point. Then I share 99.5% of my DNA with my mother which make the 96% a lot less impressive. > > nukleotides? > Chromosomes are too large; triplets are to small; genes sound about > right. If genes is correct, how can we be sure that a gene in a human codes the same thing as in a chimp? The latter have 48 genes and humans 46. Therefore, a one-to-one correspondence is difficult. And the same amino acid in two different proteins doesn't need to perform the same task in both places, right? > (And speaking of nucleotides does make about as much sense in this > context as a "152.3 byte" file would in the context of C.) I agree that nucleotides doesn't make much sense since one nucleotide alone doesn't code anything. But that doesn't necessarily stop people from having it in mind when they say something like that. There are many people reiterating the (in my view) nonsensical statement that Einstein used 20% of his brain capacity whereas we lesser mortals use only 10% of ours. I would really like to know what 100% refers to in that case. |
David Melik <dchmelik@gmail.com>: Aug 23 02:57AM -0700 (reply below is on Usenet and 'blind carbon copy' (BCC) to a listserv) On 08/21/2017 05:12 AM, SG wrote: > rotation matrix. Given a normalized quaternion q, it's rather easy to > determine a corresponding rotation matrix R > R = q2rot(q) (I won't bother defining q2rot) Not define... why? If, for example, quaternions (or anything) were being described in a pure mathematics textbook, *everything* would be defined, probably full detail (unless left as an exercise, where at least they'd define their terms.) It turns out I won't necessarily need definition now (if you see my reply to your question below,) but... > convert the quaternion back to a 3x3 rotation matrix because this > matrix representation is more efficient for such things in terms of > number of necessary floating point operations. Ok, so apparently they don't really improve something as basic as rotating a cube. So, if I made a larger or generalized 3D system, they could be useful. For the cube I did, I combined my rotation matrices for the three angles myself, beforehand. So, it seems, I won't achieve anything more by replacing that. > I think that answers your question? Part of it (and all most important parts for now.) I still want to learn quaternions for a 3D C or C-style C++ program, and now have a better overview (not details)... but you've clarified, I should try a 3D thing they're more useful for, first, or just a calculation program. So, I'll have to choose which way to continue, before any more detailed questions. That's all for now on on Usenet from me. ------------------------------------------------------------------------ Note to listserv I sent this to (after recent discussion.) Double-check any reply you write won't also have Usenet newsgroups in 'To:,' unless desired (probably will only be 'To:' me, but I forgot how it works when you post to a listserv & Usenet both.) My original post (only small part quoted above) was to Usenet news://comp.graphics.algorithms , news://comp.lang.c , news://comp.lang.c++ newsgroups. |
Juha Nieminen <nospam@thanks.invalid>: Aug 23 05:18AM > That's probably true of the systems that fir will meet, and it's > certainly true of anything bigger than a mobile 'phone. I doubt you'll find a mobile phone for which you can write your own software which doesn't use hardward and an OS supporting (and using) memory protection and mapping. > It's _not_ correct for some of the smaller embedded processors and the > RTOSes that run on them - there are quite a lot of low end CPUs out > there still running in real address mode with no protection. Sure, there are very simple embedded systems out there, and sometimes you can even write software for them in C++, but from the average user's perspective they are quite a rarity. They may be really common in certain industries, but not amont the average programmer. |
Vir Campestris <vir.campestris@invalid.invalid>: Aug 22 09:32PM +0100 On 22/08/2017 06:53, Juha Nieminen wrote: > a pointer) has little to nothing to do with the physical location of that > memory in the RAM chips. Both the hardware and the operating system freely > remap memory addresses to physical RAM locations. That's probably true of the systems that fir will meet, and it's certainly true of anything bigger than a mobile 'phone. It's _not_ correct for some of the smaller embedded processors and the RTOSes that run on them - there are quite a lot of low end CPUs out there still running in real address mode with no protection. Andy |
David Brown <david.brown@hesbynett.no>: Aug 23 09:04AM +0200 On 23/08/17 07:18, Juha Nieminen wrote: > you can even write software for them in C++, but from the average user's > perspective they are quite a rarity. They may be really common in certain > industries, but not amont the average programmer. Microcontrollers with linear memory (i.e., no virtual memory) totally dominate the processor world, and vastly outnumber the devices with virtual memory. Some of these will have memory protection units, which can limit the access to parts of memory, but most do not have them (or do not use them). After all, when your system only has one program, there is no need for protection from other processes. Many of these are programmed in C++, which has been used on small embedded microcontrollers for decades, and has become more popular as devices like small ARM microcontrollers have got cheaper and more dominant. Still, they are mostly programmed in C rather than C++. |
kushal bhattacharya <bhattacharya.kushal4@gmail.com>: Aug 28 11:14PM -0700 On Monday, August 28, 2017 at 9:56:13 PM UTC+5:30, red floyd wrote: > Again, this is system specific, and it doesn't matter if it's C, C++, > Pascal, Ada, Java, or whatever... > You need to ask in a newsgroup dedicated to your OS of choice. thanks but its the api function of c or c++ if present that i am interested in mainly.Parsing it from the system utility output would be a bit complex i think.So,if there is any api function of it in C or C++ that would be really good |
Ian Collins <ian-news@hotmail.com>: Aug 29 06:19PM +1200 On 08/29/17 06:14 PM, kushal bhattacharya wrote: > interested in mainly.Parsing it from the system utility output would > be a bit complex i think.So,if there is any api function of it in C > or C++ that would be really good Please wrap! No, there aren't any portable APIs. Reading and parsing files in /proc is our best bet on Linux. -- Ian |
Reinhardt Behm <rbehm@hushmail.com>: Aug 29 02:55PM +0800 AT Tuesday 29 August 2017 14:19, Ian Collins wrote: > Please wrap! > No, there aren't any portable APIs. Reading and parsing files in /proc > is our best bet on Linux. Or simply look at the source of top. This program shows all you are looking for. There you can find out how it has been done for years and it probably uses /proc. -- Reinhardt |
kushal bhattacharya <bhattacharya.kushal4@gmail.com>: Aug 29 03:28AM -0700 On Tuesday, August 29, 2017 at 11:49:49 AM UTC+5:30, Ian Collins wrote: > is our best bet on Linux. > -- > Ian thanks and sorry i didnt understand about the wrappping part |
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