« first day (1204 days earlier)      last day (3746 days later) » 

user3010322
8:00 PM
@JerryCoffin Ah. Section probably works.
 
It's an orthant.
 
user3010322
Orthant?
 
user3010322
Oh. Well, that works for me.
 
Comes from "orthos"
 
8:00 PM
@R.MartinhoFernandes Silly! An Orthant is a right-angled baby.
 
much pixelart
 
In geometry, an orthant or hyperoctant is the analogue in n-dimensional Euclidean space of a quadrant in the plane or an octant in three dimensions. In general an orthant in n-dimensions can be considered the intersection of n mutually orthogonal half-spaces. By permutations of half-space signs, there are 2n orthants in n-dimensional space. More specifically, a closed orthant in Rn is a subset defined by constraining each Cartesian coordinate to be nonnegative or nonpositive. Such a subset is defined by a system of inequalities: :ε1x1 ≥ 0      &...
 
user3010322
template <typename T, ulword n>
ulword orthant( const RVector<T, n>& value ) {
	ulword r = 0;
	for ( ulword i = 0; i < value.size( ); ++i ) {
		r |= ( ( value[i] >= 0 ) );
	}
	return r;
}
 
user3010322
Yay~
 
user3010322
I've even got DeadMG's idea used here.
 
8:05 PM
omg you named i four times you MONSTER
 
user3010322
=[
 
user3010322
But...
 
user3010322
But why is that bad... ;~;
 
for (auto i : boost::irange(0, value.size())) or GTFO
(no, keep ulword`auto` is not always desirable!)
 
@LightnessRacesinOrbit lol
 
8:07 PM
accumulate
 
@ThePhD Robot was arguing that yesterday, against @Jefffrey
 
user3010322
I could use accumulate, that would work
 
user3010322
But I'd need iterators and stuff. Blaahhh, I don't want to use iterators and stuff. :c
 
stackoverflow.com/questions/571292/… - fuck cmake they didn't fix it since 2008
 
can we get Lounge<C++> back?
 
8:09 PM
return std::accumulate(begin(value), end(value), ulword(0), [](const auto& l, const auto& r) { return l | (r >= 0); }); // ?
summat like that
it's hardly more readable than the loop
sometimes it's best not to use new fancy shiz; when you're doing it just for its own sake, then it's never best ;)
 
@Jefffrey nope
We can go back to Lounge<Haskell>
 
@Jefffrey +1 I also wanna see C++ in the room name
 
@ThePhD what the fuck is ulword?
 
@BartekBanachewicz An unsigned long word, probably.
 
why the hell would you force that
 
8:12 PM
@BartekBanachewicz Why would you not?
 
user3010322
@BartekBanachewicz typedef for an integer that fits the platform's memory size (unsigned). lword is the signed version.
 
here comes the "don't use any types anywhere" mantra again
 
@LightnessRacesinOrbit irange looks dumb
 
@BartekBanachewicz Because it's game engine and has to be horrible.
3
 
@R.MartinhoFernandes thanks.
 
user3010322
8:12 PM
=[
 
@Jefffrey well if you read the comments it's implied that the answer is flat-out wrong
 
user2260218
Hello again! Does anyone know why some installation open up the terminal, even if there is no room for user feed? Sometimes the terminal just pops up really fast.
 
@Anthony "no room for user feed"??
You're really going to have to be a lot more specific. Lots of different "installations" on different OSs do very different things with different "terminals"
 
@Anthony because the default behaviour on windows is to give a process a console window even if it doesn't ask for it
 
@LightnessRacesinOrbit plot twist
 
8:14 PM
try doing int main() { } on windows
 
@BartekBanachewicz It needs to run from some context. Yes, by default it runs from a newly spawned shell session, rather than from within the chrome shell
I think that makes sense if you're not writing a GUI application
 
there are GUI apps, there are console apps, and there's a whole lot of apps that are neither
 
If you run the thing directly from a terminal window, rather than double clicking on some pansy icon, you get the sort of behaviour you'd probably be more comfortable with.
 
windows just assumes the default is the console vOv
 
This all stems from your addiction to GUI-spawned processes, that's all
@BartekBanachewicz No there aren't. All programs fit into one of those two categories.
 
8:16 PM
@LightnessRacesinOrbit bullshit.
 
@BartekBanachewicz Okay you know best
 
@LightnessRacesinOrbit your app doesn't have to have any signs visible to the user
 
@BartekBanachewicz I never said it did
 
so it's not a GUI app
 
8:17 PM
how the fuck regular windows application must be a GUI app is beyond me
 
What on earth are you going on about?
 
user2260218
I still am confused.
 
@Anthony windows gives you a default console window if you don't create your app in a way that doesn't create it.
 
@Anthony You should read a book on operating systems, or something. In general you need to spend time reading a lot of material. You can't learn how computers work by asking hand-picked questions in a C++ hang-out room
 
user2260218
I know, and I will.
 
8:19 PM
@BartekBanachewicz Again, no, that's not true. The Windows graphical shell spawns a new console window for running console applications.
But Windows does not automatically spawn a console window for every console application that runs.
 
@Jefffrey Yeah, I kinda want it back too.
 
Open cmd.exe and run your program from there. You will see.
 
@LightnessRacesinOrbit that's irrelevant
 
Not really
 
@BartekBanachewicz ????!
I honestly think nowadays you just like to make crap up for the sake of having something to bash
 
8:20 PM
yeah w/e
 
user2260218
@LightnessRacesinOrbit running my programs from the terminal will just run the program, without opening anything, right?
 
You used to be fairly well-reasoned
 
@Anthony yep
 
@Anthony Exactly.
 
@LightnessRacesinOrbit I'm not bashing anything.
 
8:21 PM
@BartekBanachewicz You're /bin/bashing everything, and using flat-out lies to do so
 
user3010322
Hey, guys.
 
@R.MartinhoFernandes Excellent; thanks!
 
user2260218
But I still don't understand why, when not in the terminal, it should need to open a terminal. The use isn't going to be putting any information in, so why should the file bother opening a terminal.
 
user3010322
Things like lerp usually take a float as the weight parameter. Should I change it to take a templated T and work with a specified intermediate value?
 
8:22 PM
This was a scary example of how misinformation can be presented as authoritative and peer-reviewed fact, on SO.
 
@Anthony It was probably written poorly. That sort of thing does not have to happen.
 
user3010322
Errgh. This si messy...
 
@R.MartinhoFernandes, no need to fuck
 
user2260218
@R.MartinhoFernandes It happens by default though? I just don't understand why you would have the happen by default.
 
hello everyone, any ruby user here?
 
8:24 PM
@Anthony Windows doesn't know whether your process is going to ask for user input or not, or show text output or not. When you double-click some icon in the Windows graphical shell, it looks to see whether the program is a GUI program or a console program (there is no third option, contrary to what Bartek suggested). With your console program, it needs some place to run it from. The natural place for that is a console window.
However, if you make it a GUI program that doesn't actually spawn a window, then you won't see anything.
@theharshest Why are you asking about Ruby? This room is about trucks.
 
user2260218
I see @LightnessRacesinOrbit. Thank you.
 
@Anthony You're welcome.
 
user3010322
Does this look at least a little sane?: gist.github.com/ThePhD/8758283
 
I think Bartek thinks that in order for a program to be a GUI program it actually needs a GUI
In Windows you can make a GUI program and there's no actual GUI there
 
@LightnessRacesinOrbit Yeah :( The accept well... OPs are usually in the worst position to pick the right answer since well... they don't know it. But four upvotes?
 
8:25 PM
@R.MartinhoFernandes That comment didn't last very long
 
@LightnessRacesinOrbit :(
Didn't expect it though.
 
Oh boy.
That's January 1st, 2013
 
@ThePhD hmm, I sense an infinite loop there
 
I thought that was 4 weeks ago or so.
 
qwr
8:26 PM
2
Q: n & ~(n - 1) What does this function do?

tarabyteI was asked this and am printing out tables trying to find patterns but still don't see any meaning. uint16_t hmmm(uint16_t n) { return (n & ~(n - 1)); } Part of a digital filter? A double-helix animation if printed out? I'm really wondering whether the person asking meant n & (n - 1): n & ...

 
user2260218
Wait, so is an installation a console application, or a GUI application?
 
especially if ulword is unsigned
 
@Anthony latter
 
for ( ulword i = 0; i < n; ++n )
 
user3010322
Oh, typo.
 
8:27 PM
I rest my case
I fucking rest my case.
 
lol
 
user3010322
Bloo bloo, a bad loop increment.
 
user1804599
Is it possible to friend a Catch TEST_CASE?
 
this is too funny
 
user2260218
I see. But it just opens up the console because it thinks you might need to give information.
 
8:28 PM
@rightfold no
 
fuck C-style for loops
 
no
 
@Anthony Nah, it probably does so because whoever wrote the installer messed up.
 
for loops are cool
 
user1804599
Then how would I test whether manipulation of a private field has succeeded?
 
8:29 PM
@Rapptz yes
 
make up your mind
 
@rightfold Look at its observable influence.
 
> C-style for loops
 
room topic changed to Lounge<C++>: Back by unpopular demand [c++] [c++11] [c++1y] [c++-faq]
4
 
I'm ok with for loops
 
8:29 PM
What the hell is a C-style for loop?
 
Three-legged.
 
for (int i = a; i < b; ++i)
 
user3010322
std::sqrt and friends are not templates right?
 
they are templated
 
user2260218
@R.MartinhoFernandes so it will only open up the console for console programs, and it will only think it's a console program if whoever wrote it didn't make it otherwise?
 
8:30 PM
@Jefffrey Still a for loop.
I use those every time
 
user3010322
@Rapptz Really, I don't... remember them being...
 
user3010322
To cpp reference!
 
user3010322
Nope.
 
@Rapptz tell it to the robot, he'll be thrilled
 
8:31 PM
@Anthony Yes
 
user2260218
Gracias all
 
@ThePhD Integral is right there
 
Some (all?) installers should be console applications, though. [subjective] So I wouldn't worry about it.
 
@Jefffrey I've already had this dumb discussion before
 
me too
 
user3010322
8:32 PM
@Rapptz Oh. Shiny.
 
@Rapptz That doesn't make it a template. It's a short-hand.
 
Hey! Don't leave my message alone!
 
@R.MartinhoFernandes You had already orphaned it by failing to use reply syntax :P
 
@LightnessRacesinOrbit Yeah I guess.
 
user3010322
8:37 PM
Hm.
 
user3010322
All my member functions are implemented in terms of free functions.
 
user3010322
Question.
 
user3010322
auto& me = *this;
 
user3010322
Is that a good idea, when you need to access self-operators?
 
8:39 PM
-1
A: n & ~(n - 1) What does this function do?

avihayaThis checks if the number is a power of two or not. It's true if the result is zero.

 
@LightnessRacesinOrbit It's a "fair" mistake
 
user1804599
Ugh.
 
@ThePhD It's fine
 
@FredOverflow I wonder how many times you have already re-discovered the Hamburg C++ User Group.
 
user3010322
Alrighty then.
 
user3010322
8:44 PM
I think this is a pretty good interface.
 
@Rapptz My only takeaway here is: Fuck whoever wrote return (n & ~(n - 1)); in the first place. :)
 
@ThePhD why
@Borgleader agreed
 
user3010322
@Jefffrey Better interface.
 
user3010322
Less code duplication.
 
@ThePhD how
 
user1804599
8:46 PM
std::inserter y u no iteratorless overload.
 
user3010322
I'm not writing the same stuff twice?
 
they are exactly the same except you pass this explicitly
 
@Jefffrey I imagine the free function does stuff, and the member function calls the free function? :p
 
He discovered in/out parameters and has been in love with them ever since.
It's a ThePhD phase.
 
gawd
 
user3010322
8:47 PM
I knew about in/out parameters before I knew about anything else...
 
in/out parameters? pls no
 
user3010322
And no, there are no functions that have in/out parameters here...
 
user3010322
._.
 
user3010322
Nevermind.
 
user3010322
@CatPlusPlus Hey, can you do me the favor of removing my pinned message? I doubt it'll get any attention here anyhow.
 
8:49 PM
What's the point of the pinned message?
I clicked the link and I don't get it
 
user3010322
There is no point.
 
Hmm.
I'm getting sporadic "the connection was reset".
 
Oh okay.
 
@Rapptz I dunno - he obviously didn't read the whole question, or even glance at the inputs/outputs.
 
I hope the fucking router is not gone bananas.
 
8:50 PM
@R.MartinhoFernandes it's chewing bananas, banana chewits
 
@R.MartinhoFernandes Your router is barteked.
 
user3010322
Well, I lose swizzling, but I can just replace it with something inferior
 
> Template class map build on stl::vector of structs - looking for invalid key(stl::string) and throwing an exception: As in the title I am trying to write a template class map that is build on vector of structs where I hold the key that is a string and a value of template TYPE.
Ugh, so.. much... fail......
 
eBay sure is weird.
 
user3010322
static_if... how I miss you...
 
@ThePhD In order to miss something you must have at least had it before.
 
user3010322
I had hope and a thought.
 
@Rapptz What's weird there?
 
that's a negative feedback but the comment is positive
 
user1804599
8:55 PM
@ThePhD Use D.
 
So, folks who are playing in my game tomorrow... @Cat @Dead @Xeo @who @else @was @it do you have an account on roll20.net already? Wanna pick your characters and shit?
 
Don't shit on me
 
user3010322
I'll be on a bus for several hours tomorrow, so I won't be able to play.
 
I don't know how to play
 
user3010322
Had it been today, I would have been there already.
 
8:57 PM
@R.MartinhoFernandes sure
 
Had it been yesterday, you would also have been there already.
 
@Rapptz It's not an issue in Paranoia.
 
user3010322
Yeah... I really need a general cross product here...
 
cross only makes sense in three and seven dimensions, I think.
 
8:59 PM
@DeadMG Zero and one too! But yeah.
 
user3010322
I don't care where it makes sense I care that I can write a general algorithm that will be right for dimensions 0, 1, 3 and 7.
 
@ThePhD I thought it only works in 3 and 7 dimensions :p
 
> Also, using the orientation and metric structure just as for the traditional 3-dimensional cross product, one can in n dimensions take the product of n − 1 vectors to produce a vector perpendicular to all of them. But if the product is limited to non-trivial binary products with vector results, it exists only in three and seven dimensions.
 
three is the only useful dimension number there.
 

« first day (1204 days earlier)      last day (3746 days later) »