« first day (786 days earlier)      last day (4161 days later) » 

user142019
6:00 PM
@R.MartinhoFernandes The Cat is the negative one.
 
user142019
Guess what I’m doing.
 
7 mins ago, by Tony The Lion
so coming back to this idea of using one of my machines as a build machine, that can provide latest builds of boost etc, would an Ubuntu dedicated box be good for that? You can install Clang, GCC, I guess GCC could cross compile to windows or would you need a win box for that?
 
@Zoidberg'-- polarizing. That's my job!
 
@EtiennedeMartel That "what." was more like "who is fucked up enough to write something like that".
 
user142019
@sehe wrong.
 
6:01 PM
@Griwes Oh
 
user142019
I’m looking at you guessing what I’m doing.
 
@TonyTheLion What? FWIW, I already have Linux build machines for x86 and ARM :P
 
What's so special about the Polish train system anyway?
 
@EtiennedeMartel Maybe it's shit.
 
...
 
6:02 PM
@R.MartinhoFernandes lol, I'm talking so the people in this room can access it.
not just you, but I'm asking you, cause you seem to know about this...
 
@R.MartinhoFernandes I wonder if the whole thing is a WW2 reference.
 
@EtiennedeMartel I think it is reference to train transports to concentration caps.
@R.MartinhoFernandes Well, it is.
 
@TonyTheLion Dunno about cross-compiling.
 
Yea, prolly need a windows box for that
 
@Griwes Yeah, that's what I figured.
 
6:10 PM
@TonyTheLion I am sure you don't need one in theory; in practice it depends on much effort it requires.
It involves at least building GCC from source, IIRC.
 
oh
Star this if you want a readily accessible build machine for this room.
 
Ell
has anyone seen the interview with the japanese cannibal?
 
erm no
 
Ell
https://www.youtube.com/watch?v=BosZxa1bYcE&NR=1&feature=endscreen
^highly disturbing o.O
and I always thought there should be some kind of virtual image which contained compilers/cross compilers and a build bot of some kind for all major platforms
 
btw
I thought that addition was right-associative?
 
user142019
6:16 PM
@Ell “I’m scared of blood” says a cannibal.
 
Addition is associative.
 
user142019
This is a list of operators in the C and C++ programming languages. All the operators listed exist in C++; the fourth column "Included in C", dictates whether an operator is also present in C. Note that C does not support operator overloading. When not overloaded, for the operators &&, ||, and , (the comma operator), there is a sequence point after the evaluation of the first operand. C++ also contains the type conversion operators const_cast, static_cast, dynamic_cast, and reinterpret_cast which are not listed in the table for brevity. The formatting of these operators means that their p...
 
user142019
Addition is left-to-right.
 
ah ok
 
@Zoidberg'-- Not for fundamental types.
 
user142019
6:17 PM
lol
 
@R.MartinhoFernandes UDTs.
wait, there's a different associativity for fundamental types and UDTs?
 
@DeadMG Well, overloaded operators are handled like function calls, right?
 
right
but logically, if you write, say, a template that's a + b + c + d, it has to be parsed one way or the other, because you don't know the type of the arguments.
 
Ell
isn't that why c++ is context sensitive?
 
@DeadMG Well, you can check if it's syntactically valid, but you cannot do anything about the actual semantics until you've instantiated the template.
 
6:20 PM
0
Q: Multiline variable assignment speed and flux

IT NinjaSo I was taking a look at the speed of variable assignment using the timeit module, and I came across some very interesting results. I have come to find out that the multi-line assignment is generally faster then single-line assignment. Why is this? Also, it is notable that when putting time.sle...

 
@Ell Not in this case.
@EtiennedeMartel I thought that associativity was set in the grammar for all types.
 
Hence why compilers usually don't report errors about templates until you've instatiated one.
@DeadMG I have absolutely no idea. @R.MartinhoFernandes, you got something?
 
Yes, a cold.
 
Get some sleep, it'll get better.
 
Anyway, a+b+c+d for UDTs is evaluated as op+(op+(op+(a,b),c),d) (or a.op+(b).op+(c).op+(d))
 
6:23 PM
oh, so that is left-to-right
anyways, it just surprised me
huh
they split LWG
no wonder my library proposal didn't go through properly
 
@DeadMG Huh, I thought it was because it sucked balls.
 
no
the Committee doesn't even decide whether or not it sucked balls until Bristol 2013
 
user142019
@EtiennedeMartel what a glitched web app.
 
Didn't think this was worthy of posting a question. When I cout L'a' I get a in the console as expected but when I cout L"a" I get a hex value, why? :S
 
@Zoidberg'-- Define "glitched".
 
user142019
6:32 PM
@EtiennedeMartel everything is slow and flickering.
 
@Zoidberg'-- Oh, so slowness is a bug for you?
 
user142019
Yes.
 
user142019
It should be fast.
 
@Loggie cout or wcout?
 
just cout
 
user142019
6:34 PM
Nobody on their deathbed ever said, "I wish I had spent more time reading internet comments."
 
Because cout will interpret wchar_t * as a raw pointer.
 
ah ok thanks :)
 
man
David Mitchell is so fucking funny
 
user142019
Me too.
 
6:58 PM
watched HIGNIFY three times now
 
2
Q: Difference of unsigned int vectors, interpreted as signed and casted to a float vector not rendering properly

user173342If I take the difference of the two uint vectors in my c++ code, cast to int, cast to float, and pass to GLSL, it renders fine. But when I try to make GLSL do the difference and cast, it covers the screen in a near uniform shade as if the square I'm trying to draw is really zoomed in. And yes, ...

^ This is a weird question, it's like being nonsense and deep at the same time.
 
@Cheersandhth.-Alf Exploring the furthest depths of nonsense!
 
Xeo
@DeadMG Eh, no?
room topic changed to Lounge<C++>: We have no current whatsoever. [c++] [c++11] [c++-faq] [rubenvbs-cube]
 
room topic changed to Lounge<C++>: We have no current whatsoever. Some guy put a diode in the wrong way around. [c++] [c++11] [c++-faq] [rubenvbs-cube]
 
7:14 PM
 
@Abyx Oh dear.
Being paid 75% of the salary of a man sure is "Easy Mode".
 
@EtiennedeMartel 75% ? what country is it?
 
@Abyx he he. but not all may be agree with that... ;-)
 
@Cheersandhth.-Alf yeah, maybe
 
7:18 PM
@Abyx The US. Canada. A bunch of other "advanced" countries.
Women have it rough everywhere.
And every time I bring that up, I get a bunch of anecdotes in return. It's like people are unable to look at data. Or maybe they're afraid it might contradict their beliefs.
 
well it's not only women, but women have the glass ceiling: they're not promoted above a certain level
 
@EtiennedeMartel not really everywhere. depends on employer, maybe. I heard some stories, but I've never seen it by myself
 
In economics, the glass ceiling is "the unseen, yet unbreachable barrier that keeps minorities and women from rising to the upper rungs of the corporate ladder, regardless of their qualifications or achievements." Initially, the metaphor applied to barriers in the careers of women but was quickly extended to refer to obstacles hindering the advancement of minority men, as well as women. Definition David Cotter et al. defined four distinctive characteristics that must be met to conclude that a glass ceiling exists. A glass ceiling inequality represents: #"A gender or racial difference that...
 
You don't need to see it by yourself for it to be true.
 
Speaking of minorities, in Quebec, they did a study where they crafted resumes for fictional people, then sent it to various employers. The resumes were all identical, except for the names: some had "Québécois de souche" (i.e. white French Catholic origin) sounding names, while other were more "exotic". Turns out employers were more likely to call back for the "de souche" resumes.
 
7:23 PM
@Zoidberg'-- okay, i'm gonna say that!
 
Ell
ruby > python
 
Discrimination is mostly interiorized now: you rarely see people say women are inferior, for instance, but many subconsciously think they are.
And you see people joke on that like it's nothing.
Despite the fact that it's still a serious issue.
 
@Mysticial lol, the irony of "I am friends with the admins, and I am calling them on you"
 
Why can't I seem to find (posix_)spawn in POSIX?
 
bitches
:)
 
7:34 PM
Is it me, or every single time Java takes a feature from C#, they somehow find a way to screw it up?
I think the only exception is enums.
 
What is Java?
ah that thing in the browser..
 
Guiiiiiiiiis quick question.
 
We are not graphical user interfaces.
 
With std::vector, does .end() reference the end based on std::vector::capacity() or based on std::vector::size() ?
 
@ThePhD size.
 
7:36 PM
Goddamnit.
I wrote it thinking about capacity.
 
Why would it be capacity?
The stuff between size and capacity is a garbage dump. Why would you want your user to iterate through that?
 
@EtiennedeMartel similar study in the US found that people with common names got lower grades.
 
@MooingDuck Gonna name my kid something extra special then.
 
@MooingDuck That's interesting. Does it mean Utah has super high grades?
 
... Huh.
 
7:38 PM
it does not reference the end, but past end IIRC
 
I wonder how many parents name their child 'Kid'.
So if I'm gonna output-iterate into something like std::vector(), I'd need to resize first then?
Not just reserve?
 
@EtiennedeMartel I would imagine it depended on the teacher's perspective of "common".
@ThePhD or use push_back_iterator, yes
 
@MooingDuck ... Didn't even know something like that existed.
 
@ThePhD That's what std::back_inserter is for.
 
stl be full of surprises, yo.
 
7:39 PM
@EtiennedeMartel er yeah, that one
 
wut? (The iterator returned by) std::back_inserter or std::inserter will both allocate memory.
 
@rubenvb yes, they do
 
std::copy(begin, end, std::back_inserter(v));
 
@MooingDuck so your "yes" should be "no".
 
@rubenvb It calls push_back. If your vector already reserved the appropriate amount of memory, then you won't have to resize anything.
 
7:40 PM
Humm I'm trying to port the memoziation chapter from js the good parts to C++11..
 
@ThePhD go to en.cppreference.com/w/cpp/iterator and read everything below the words"Iterator adaptors"
 
he asked about resize.
he shouldn't need to call resize.
 
Xeo
resize would be a bad idea together with back_inserter
 
@rubenvb What do you mean find?
 
@rubenvb he asked if he has to resize. We said "yes or use back_inserter".
 
7:41 PM
@rubenvb He didn't know about back_inserter.
 
he talked about an output-iterator... I don't know any others than std::(back_)inserter.
 
tried to change my password with my power company. after I clicked submit all I get is "500 INTERNAL SERVER ERROR".
 
@netcoder I suppose spawn isn't a required C interface function.
 
@Xeo At the moment, I was just resize (most memory I'll need) and then begin(), end() into a function which returned the amount of space it took up, so I then resize( how much space was actually taken ) to get it to behave.
Which probably sounds redundant.
But it should work that way too. Albeit probably not the best.
 
@ThePhD common when working with C apis. C++ api should use reserve+back_inserter.
 
7:43 PM
@ThePhD It also sounds like UB waiting to happen.
 
I like back_inserter
@EtiennedeMartel UB ?
 
@ThePhD resize will default construct all new elements IIRC, that's bad.
 
@ThePhD Undefined behavior.
 
@EtiennedeMartel I know that by now, gosh. D: I meant whyyyy?
 
@rubenvb It's not, but when you say "you can't find it" what do you mean? It's definition? (i.e.: header file)
 
7:44 PM
@ThePhD accidentally iterating past the end I assume
 
@MooingDuck Yeah, that's what I meant.
 
@netcoder normally google returns the opengroup web manual thingie. Or in the worst case some Mac OS X manpage.
 
But I pass in an end(), and tell it not to go past the end(). Doesn't that save me the trouble?
 
Oversizing and clipping the extra after the fact is not UB.
 
@ThePhD yes
 
7:45 PM
@R.MartinhoFernandes Aah. I simply misread it then.
 
-1
Q: c++ how to get a random number to be zero

Ian LundbergI have been using srand(time(NULL)); Random_Number = rand() % 9; However I have noticed that it NEVER picks '0' for what I need to do it can't be BETWEEN 0 and 8 it has to be FROM 0 to 8. If you can give me any help on this I will really appreciate it.

 
user1182183
Hey everyone, ye it's me :$ with a small(?) problem again xd if you guys don't want to be bothered thenuh just tell me :F
 
It's a bit silly when you can reserve and back insert, but fine.
 
What complexity does find() of std::unordred_set have?
 
Runs in constant time.
 
7:45 PM
@Nils O(1) "normal case" O(N) in extremely rare cases.
 
@R.MartinhoFernandes amortized constant
 
@R.MartinhoFernandes I just didn't know you could invoke something like Push_back with an iterator. I was still thinking about iterators in terms of pointers, which I guess I have to shake off.
 
thx @MooingDuck
 
Xeo
@ThePhD Overload operators, and you can make them poledance.
2
 
@ThePhD normal iterators are like generalized pointers. Output iterators are something else.
 
user1182183
7:46 PM
anyway the problem is that I am writing a DLL, and yes it load etc, intercepts D3D9 calls, works, no crashes, but I need something that gets executed every tick/ms / whatever? something thet gets constantly executed. Is there such an "export" for windows applications?
 
@ThePhD an RNG is like an automatically incrementing iterator
 
@rubenvb You mean this? Or this? Dunno, typed posix_spawn in Google and there it was
 
@MooingDuck and set?
 
user1182183
srsly always when I ask something the lounge get's quiet XD
 
@netcoder well I thought the posix_ part would've been left out in, well, the posix standard.
 
Xeo
7:48 PM
@Nils logarithmic at all times.
 
user1182183
am I hurting all your processing power ? :( I"m no human anymore :x
 
@GamErix usually you tell the OS to execute your callback every N milliseconds. It's a timer.
 
allright, thx @Xeo
 
user1182183
@MooingDuck oo, what's the function for that?
 
@GamErix I've never used the raw WinAPI for that, not sure
 
user1182183
7:48 PM
ah okay thanks
 
user1182183
will google
 
So for caching fibonacci std::unordred_set would be a choice..
 
@rubenvb No. Constant time.
 
@R.MartinhoFernandes then cppreference is wrong.
 
Xeo
find can't ever cause a rehash, so amortized would be strange.
 
7:50 PM
@GamErix msdn.microsoft.com/en-us/library/windows/desktop/… I was mistaken, you tell it you want to fire a windows event every N milliseconds, which means you'd have to have some sort of windows message pump.
 
You cannot amortize find without memoizing.
 
Well, the C++11 standard says: Average case O(1), worst case O(b.size()).
 
@rubenvb That's not amortized.
 
@Nils why would you cache it? It is a cache!
 
That's exactly what it says: average constant, worst linear.
 
7:51 PM
well, I just said what cppreference said before.
 
@R.MartinhoFernandes I believe you are mistaken
 
user1182183
Yay settimer, thaaaanks ! :D
 
Xeo
@rubenvb Wait, when would you get linear complexity?
 
@Xeo When the hash is being attacked.
 
@Xeo with an extremely bad hash I guess, with all elements in the same bucket thing.
 
7:52 PM
Well I am using it for memoziation..
 
@R.MartinhoFernandes wait, yes. That
 
Xeo
Ah
 
@Nils that's a good use for it
 
-4
Q: Draw a dot on the screen (What language to code games in)

Jonathan OI am currently trying to draw a dot on the screen. Upon researching this topic I see that most sites recommend OpenGL. Is this still a valid method? What language and graphics library are used for current games? Is it still C++ and OpenGL and GLUT? What would a new game like Guild Wars be pro...

 
Still, it can be made worst case constant with a decent implementation.
I actually expected the standard to require that.
 
7:53 PM
but it's not required. So your standardeze intuition has been corrupted by your cold.
 
I actually had to suggest this same improvement to DeadMG's implementation last week.
Or maybe it wasn't this one.
 
I'm outta here.
 
Xeo
@R.MartinhoFernandes Mind elaborating?
 
@R.MartinhoFernandes what sort of implementation? Cuckoo hashing seems closest
 

« first day (786 days earlier)      last day (4161 days later) »