« first day (2405 days earlier)      last day (2769 days later) » 

12:00
@6EQUJ5 They can't.
nwp
nwp
@6EQUJ5 Depends on the optimization level and how smart cheat engine is. In theory it can rewrite the entire application and do whatever it wants. In practice it will just change some data in some memory location and hope that the memory access was not optimized out.
In the same way that a "do not steal this sign" sign can't be stolen
@BoundaryImposition I just tried... it works.
@6EQUJ5 Not sure what you were expecting. The police don't come around. You just get undefined behaviour.
@nwp So, there is really no way to protect variables from modification externally even with const qualifier?
12:02
a piece of C++ source code cannot physically protect bits of memory on your computer
@BoundaryImposition Why is it undefined?
with physical access you can do anything you like
don't expect consistent results though
@BoundaryImposition Oh, so this is out of C++ control?
simple answer: yes
long answer: depends entirely on what you're doing, which you haven't told us
@BoundaryImposition The OS handles it?
12:03
the OS doesn't care
@6EQUJ5 not in source, you'd have to toggle page protections
nwp
nwp
@6EQUJ5 You can put the variable into a trusted device, like your server. Otherwise you cannot really tell people what they can and cannot do with their computer.
@nwp Is the purpose of const just to prevent programmers from modifying it in the source code?
const, for the most part, is a source-level protection. your compiler will stop you from accidentally modifying a const thing, and that's it. In reality it's still just a piece of memory. HOWEVER you may not even find the object in memory if it didn't need to be emplaced there (see: optimisations)
this whole enterprise is just a bad idea and don't do it
@BoundaryImposition Thanks. I was just curious.
12:04
rightfold started out "just curious"
it's a slippery slope
:)
@BoundaryImposition lol
@BoundaryImposition I noticed the compiler optimized the const variable out of memory when I didn't use it.
so I finally got my OIDs baked into my source (kinda)
forgot I still have a third-party library that only accepts strings lol
@6EQUJ5 it'd probably have done that even if it wasn't const
nwp
nwp
@6EQUJ5 Not quite. If it is top-level const the compiler assumes it will never change, so if you write const int i = 5; std::cout << i; the compiler will optimize it to std::cout << 5; and i doesn't exist in memory for cheat engine to change. It would need to change the code everywhere, but it is hard to tell if it is a literal 5 or an optimized i so it will not work out of the box.
C++ source is a description of how your program should behave with respect to its outputs and inputs, not a one-to-one mapping of machine code instructions that will be physically executed
if a variable isn't needed to satisfy that description, there's no guarantee it'll be in the finished/compiled program
people call that "optimisation"; I just call it a fundamental consequence of what C++ is: an abstraction
@6EQUJ5 the better way to handle memory permissions is to use the OS to remove other processes rights to access your memory. The downside of this is it makes it nearly impossible to debug anything that happens while in this state
12:06
@nwp Yes, I was about to say that. The compiler didn't optimize it when I initialized the const variable from input from another int variable because of this.
@Mgetz I learned a lot about const today. :)
also quit cheating
@BoundaryImposition Cheating?
@6EQUJ5 learn about constexpr too, it's a lot more fun
@BoundaryImposition Cheating how?
12:08
@6EQUJ5 what does modifying memory via a tool called "Cheat Engine" do?
@BoundaryImposition You assume I'm cheating. No, I'm actually experimenting with memory. I haven't cheated in any games with it.
@6EQUJ5 good :P
@BoundaryImposition Kind of entertaining modifying memory in my C++ programs.
I prefer to watch TV but YMMV
@BartekBanachewicz look what I just found
> But I’m sorry, dudes: that just isn’t how it works. “Men are trash” is simply not the same thing as sexist attacks on women, because you don’t face the systemic oppression that makes sexist slurs so toxic. If you’re a man and someone calls you a stupid trash man, wow, I’m sorry you had a bad day. If someone calls a woman a bitch or a slut, that’s tinged with millennia of oppression.
12:09
@RudiantoPrasetya lol
TIL Susan at number 4 has suffered "millennia of oppression" before slinging vile insults at me over the fence
@Mgetz Anything interesting about constexpr?
@6EQUJ5 constexpr helps you not to accidentally initialise your const from that runtime variable, when you wanted it to be compile-time calculable
@6EQUJ5 yes it's broken on VS
@BoundaryImposition So, is it just a tool for initializing const variables from constant expressions.
@RudiantoPrasetya Wow, it is?!
@RudiantoPrasetya How?
@6EQUJ5 a tool for enforcing that they are initialized that way, yes
@6EQUJ5 incompetence
12:11
Hello
@BoundaryImposition How so?
(that's not fair; C++ is insanely complex and compilers mind-bogglingly so)
@trilolil tralalala
@RudiantoPrasetya uh, please read the release notes for VS2017
Oops, I just realized I should of been replying to Rudianto.
I have a short question about finding the smallest value inside a vector.
vector <int> vectorRadii;

indexSmallesCircle = std::min_element(vectorRadii.begin(), vectorRadii.end());

I can't compile the above code, the compiler says:

error: cannot convert ‘__gnu_cxx::_normal iterator<int*, std::vector<int> >’ to ‘int’ in assignment|
Any idea what I may be doing incorrectly?
@BoundaryImposition okay
12:13

C++ Questions and Answers

Solve problems and approach solutions. Just ask and lurkers wi...
@Mgetz understood. I hope someone answers there...
@trilolil You need to deference the result of std::min_element.
@6EQUJ5 should have*
@trilolil Not reading the documentation?
@BoundaryImposition Sorry, not exactly the grammer nazi.
12:14
@BoundaryImposition I am far from being an expert when it comes to cpp
> **Return value**
>
> Iterator to the smallest element in the range [first, last). If several elements in the range are equivalent to the smallest element, returns the iterator to the first such element. Returns last if the range is empty.
returns an iterator
what do we do with iterators?
@trilolil std::min_element returns an iterator to the min element.
indexSmallesCircle = std::min_element(vectorRadii.begin(), vectorRadii.end()); should be: indexSmallesCircle = *std::min_element(vectorRadii.begin(), vectorRadii.end());
also
7
A: How to find minimum value from vector?

bames53#include <iostream> #include <vector> #include <algorithm> // std::min_element #include <iterator> // std::begin, std::end int main() { std::vector<int> v = {5,14,2,4,6}; auto result = std::min_element(std::begin(v), std::end(v)); if (std::end(v)!=result) std::cout << *result <

@6EQUJ5 you should check for success first
@BoundaryImposition I'm afraid that I need to put parentheses... am I right?
12:16
@BoundaryImposition Oh...
@BoundaryImposition Well it compiles and runs correctly...
@BoundaryImposition Is your profile picture actually you?
@Mgetz They work now?
@RudiantoPrasetya What's wrong with constexpr in VS?
Is this the future
they will have it 100% and constexpr if in the next toolset update
@RudiantoPrasetya this is now
queue spaceballs gif
12:22
I need to double check the year
@6EQUJ5 obviously
@6EQUJ5 Not when the vector is empty it doesn't
@6EQUJ5 why would anyone on the internet not use their own pic?
@6EQUJ5 You need to get out of the habit of assuming that everything is ok because "it compiles and runs correctly"
@RudiantoPrasetya Me?
also please no hitting on boundary because she's a woman that's quite sexist
12:23
@BoundaryImposition Sorry, didn't try empty vector.
@RudiantoPrasetya millennia of oppression
@RudiantoPrasetya It's ok no intention of that.
@6EQUJ5 you mean to say you're not actually a nebula
@RudiantoPrasetya Yes
@6EQUJ5 srs? shit, fooled me
12:24
Hi (I think this comment will be flagged as offensive to moderator in this chat room)
@BoundaryImposition Lol.
now that you mention it, it's true the pic kind of looks like the pleiads
@BoundaryImposition What the...
what's with the huge inflow of newblets on this chat tonight/today
12:25
if we could have a huge outflow of telkitties instead that'd be great
@6EQUJ5 What?
@BoundaryImposition I didn't read. :P
nwp
nwp
@Telkitty Robot changed the title and apparently there are more PTSD victims than anticipated.
@RudiantoPrasetya What was the problem with constexpr in VS?
why the singular
12:27
@RudiantoPrasetya Since, you mentioned it.
I still use VS2015 and support for constexpr is partial and ICE-y.
Mgetz above said this is fixed in 2017 which is good if true.
Maybe I haven't had enough coffee yet this morning, but anyone up to figuring out a template metaprogramming question? Essentially how to figure out the ::value_type of an arbitrarily nested container stackoverflow.com/questions/44024453/…
@RudiantoPrasetya How was it partially supported?
@RudiantoPrasetya What didn't it support?
12:28
wtf
zero chance a bloke would get away with this
@6EQUJ5 all of valid constexpr constructs
of course it'd affect her career prospects. that's the whole facking point
it's a PUNISHMENT
@RudiantoPrasetya ... It didn't support this?: constexpr int = 5;
> Medical student Woodward met the Cambridge University student on dating app Tinder, the court heard. During the attack at the college, she thumped him, lunged at him with a bread knife, and stabbed him in the leg. She also threw a laptop, glass, and jam jar at him before stabbing herself, the court heard.
snowflake wants to be a doctor despite this so we should just let her free???
@6EQUJ5 Oh that it does, generally speaking simple constexpr are fine.
12:29
@BoundaryImposition Was this on the front page?
@BoundaryImposition ... I rarely watch the news...
why a bread knife tho, it's england, should've been a scone spoon or sth
@6EQUJ5 that's ok, nothing ever happens anywhere
wtf is a scone spoon
Really funny how on bbc.co.uk the front page shows the president in the most humiliating way...
@RudiantoPrasetya Lol.
@6EQUJ5 the BBC's pretty good at showing bias in its articles by picking unflattering images from unrelated periods of time
@RudiantoPrasetya that's a teaspoon
(the rightmost object)
@BoundaryImposition lol no clearly those are scones
@BoundaryImposition I've never seen the president shown in good light on the front page of any news... maybe I don't watch enough of it
@RudiantoPrasetya there is a teaspoon alongside the scones
@6EQUJ5 I think he's a moron, but the way he's portrayed by image choices is not how many other politicians are treated. Farage got much the same treatment. It's really quite obvious bias but nobody cares
12:32
it's clearly a scone spoon by virtue of the absence of tea and presence of scones
@BoundaryImposition You think Donald Trump's a moron? Ha...
the BBC also does things like saying "rates have improved" in articles about abortion rates, without bothering to declare what they think "improvement" means in that case
@BoundaryImposition I think he's amazing... Jkjkjkjk
@BoundaryImposition lol
@RudiantoPrasetya that's not actually true, please keep your slander to yourself
12:33
I reckon they don't even realise they're doing it, is the scariest thing
like any good Western organisation, they just assume they're the good guys :D
@Mgetz your hurt feelings are none of my concern
@Mgetz I've often wondered whether it's really slander (cos we're sorta chatting) or technical libel (cos text + publishing)
@RudiantoPrasetya not hurt feelings, I'm just tired of people spouting bad misinformation because they don't like a specific vendor
@BoundaryImposition US: Slander, UK: Libel
12:35
@Mgetz eh
@Abyx looks pretty healthy
but US company so Slander
that's news to me
slander is for speech, libel is for print. I thought.
doesn't matter where you are
@BoundaryImposition I am not a lawyer
@Mgetz clearly
12:35
@Mgetz VS2015 ICEs weekly on me and that's not "bad misinformation" (what's good misinformation?). Some of it is because of constexpr, some of it isn't. I don't hate MS and you won't prevent me from saying what I think of VS, whether good or bad.
There's a handy ignore button on my profile if you wish to ignore me btw, thanks.
Defamation—also calumny, vilification, and traducement—is the communication of a false statement that harms the reputation of an individual person, business, product, group, government, religion, or nation. Under common law, to constitute defamation, a claim must generally be false and must have been made to someone other than the person defamed. Some common law jurisdictions also distinguish between spoken defamation, called slander, and defamation in other media such as printed words or images, called libel. False light laws protect against statements which are not technically false, but which...
@RudiantoPrasetya VS2015's constexpr is C++11 compliant IIRC
Anyone here know that the president in South Korea was "exiled" (not sure if that's the right word)? And went to court?
if you want C++14 go use VS2017
@RudiantoPrasetya lol burn
12:36
@Mgetz If you ignore all the bugs and crashes, yes.
@R.MartinhoFernandes a lot of which were fixed in the toolset updates
@R.MartinhoFernandes STOP THE SLANDER
@Mgetz What about g++.
get implementation limit’d
@6EQUJ5 bet he wished he'd made different korea choices
12:37
@Mgetz A lot of which weren't.
@6EQUJ5 still doesn't have a complete library IIRC
@BoundaryImposition 4/10
@RudiantoPrasetya libel*
@BoundaryImposition She not he.
@6EQUJ5 how do you know what he/she identifies as?
12:38
@6EQUJ5 she was impeached and imprisoned, if that's what you mean
@Mgetz Any other compilers has a complete library. Any that supports C++14 fully?
@6EQUJ5 did you just assume their gender?
@BoundaryImposition Yeah. Not good at politics... What? Isn't Bakgeunhae a she?
@6EQUJ5 clang and libc++ are the closest IIRC, but they have some gaps too. Nobody fully supports it because of some odd corner cases
> Bakgeunhaea
lol
12:39
@6EQUJ5 you'd have to ask her to be sure. we live in uncertain times
@RudiantoPrasetya Edited. Typo lol.
still a terrible way to spell a korean name
Bak guenhae?
Park Geun-Hae
@RudiantoPrasetya that's the Revised Romanization rendering
> The Revised Romanization of Korean (국어의 로마자 표기법; gugeoui romaja pyogibeop; lit. "Roman-letter notation of the national language") is the official Korean language romanization system in South Korea proclaimed by Ministry of Culture and Tourism to replace the older McCune–Reischauer system
so, basically, you're wrong
12:40
Actually, I think that is the standard way to write Korean to English.
Nvm...
@6EQUJ5 there isn’t just one such way
@BoundaryImposition Seriously? Do you write Kimjeongil?
@RudiantoPrasetya Of what relevance is the way I write it?
It's a plural you
I represent all 7 billion now?
Sweet!
So, yes, at least some of me does.
12:41
@BoundaryImposition Hmmm... at school I learned to write names: Bak geunhae... dashes optional for pronounciation
cellwise probably more even
@RudiantoPrasetya I'm guessing North Korea won't buy this.
@R.MartinhoFernandes They can't afford it
@R.MartinhoFernandes they won't buy it, they'll steal it, claim they invented it and have a big military parade
But since the evolutionary biologist made the observation in 1871, scientists have debated whether animals can actually feel jealousy, with many arguing it is an emotion that only humans exhibit. Now experts believe they have proven that dogs do get jealous when their owners give too much attention to a rival.
right ...
12:43
@Mgetz no libel & slander because you hate a particular country
lol
@Telkitty blatantly obvious to anyone who looks after more than one dog
there's no other reasonable explanation for the ensuing behaviour
not just dogs, chicken and cats are the same ... so are many other animals I assume
yep
quick, lol back so I can delete it
Was that targeted towards me?
12:45
Lol just wondering
:37145841 I never said this was me! Even provided a link to Wikipedia!
Sees messages being removed...
:37145841 how do we know? we've never met you in person
@6EQUJ5 It was against me (I'm from Indonesia, which is a country in South Asia)
(removed)
@RudiantoPrasetya no it was against Telkitty
stop with the me me me
@RudiantoPrasetya Obviously. I'm from South Korea.
that's ok nobody's perfect
@BoundaryImposition Lol.
12:49
Does GCC fully support C++98?
Yes it does
I wonder when it will support C++17 fully...
This rather involves the attack being on the other side of the airtight hatchway. If the computer you're running on is already compromised it probably has a kernel exploit in place, in which case it can load whatever it wants to into your address space. In other words it's already too late at the point you're trying to protect your application. — Mgetz 10 secs ago
@6EQUJ5 sometime after C++17 is finalized
@BartekBanachewicz somehow I missed the paragraph just above
> More to the point: “men are trash” is not hate speech. Largely, men who act offended by things like “men are trash” or “white people suck” are doing it to make a point, not because they really are offended; they seem to think being offended by a slur is a fun activity they’re being left out of.
@Luc Je t'avais link ce chan ?
@Telkitty lol
@RudiantoPrasetya does it? Including export?
12:57
pls no trolling
@RudiantoPrasetya oh god
@RudiantoPrasetya what was the source?
@RudiantoPrasetya url pls
@RudiantoPrasetya gnon
@BoundaryImposition @Abyx oh but gladly
12:59
> Libby Watson
> As the old saying goes, “men are trash.”
"I come in peace"
brilliant. every line of it

« first day (2405 days earlier)      last day (2769 days later) »