« first day (1241 days earlier)      last day (3706 days later) » 

5:00 PM
wat
 
Meh, kids and their programs.
 
that's the one whole point about auto, to increase readability
 
not every time?
 
> `for(auto i = {}, s = lambda.size(); ...`
readability
pick one.
 
i want to increase readability everytime
 
5:00 PM
it's not like auto is a religion, you should use it when it makes sense
 
5 mins ago, by Cat Plus Plus
0u
 
it makes sense for me in that case
 
You're initialising two variables in your silly for-loop.
Shut up about readability.
 
FFS why don't you guys close that fucking ( in the for?
aaarg
 
Because it's only a part of it?
 
5:01 PM
@Jefffrey There, added a magical ellipsis.
 
it's more readable and safe than to introduce a second variable outside the for loop, right?
 
finally
 
Dunno. The loop seems horrible either way.
 
Stop pretending size_type is ever not size_t and size_t is ever not unsigned and use 0u boom problem solved
 
user784668
size_t may be wider than unsigned
 
5:02 PM
@CatPlusPlus Actually, it isn't always unsigned.
 
user784668
In fact, it almost always is.
 
@Fanael Widening conversion also works
 
@JohannesSchaub-litb gimme the whole program (the whole for loop, including the body) and I'll write a readable version for you
 
3
Q: Why does converting from a size_t to an unsigned int give me a warning?

MarlonI have the code: unsigned int length = strlen(somestring); I'm compiling with the warning level on 4, and it's telling me that "conversion from size_t to unsigned int, possible loss of data" when a size_t is a typedef for an unsigned int. Why!? Edit: I just solved my own problem. I'm an XP ...

 
for (auto x : xs)
 
5:04 PM
on 64 bit linux, unsigned is 32bit
 
@CatPlusPlus That.
 
i doubt that they make size_t smaller than a pointer
 
@R.MartinhoFernandes 0u still works vOv
 
user1804599
An implementation not having size_type be std::size_t will break existing code.
 
user1804599
5:05 PM
So nobody will ever do it.
 
user784668
@rightfold Hell++
 
user1804599
Nobody cares about Hell++.
 
Ell++
 
user1804599
Such an implementation would have exactly zero serious users.
 
@rightfold Actually, that is completely wrong.
I know a lot of serious users that would really appreciate having such an implementation.
Me included.
 
5:07 PM
Yeah, it's really funny
> Hey everyone. I just recently started my team's first kickstarter. It's a deep-RPG/dating sim aimed at Bronies and Pegasisters, but now that it's panning out, it actually seems like it might be fun for pretty much everyone into dating sims.
 
It's like the ultimate conformance testing tool.
And the ultimate UB detection tool, all-in-one.
 
hell++ sets CHAR_BIT to a different prime every time you compile
 
So this exists and has a team of people working on it kickstarter.com/projects/2110528317/…
 
It has been posted yesterday IIRC
 
I'm out of words
Bronies are gross
 
5:17 PM
-5
Q: Are downvote trolls spreading over the stack overflow (especially c++ section)?

PetrAlmost everytime I ask a question, especially in C++ section, no matter of how good it is, it immediately get downvoted by huge number of people with no explanation why. Later on, someone usually ask for explanation as this clearly isn't a bad question, their comment get heavily upvoted and some ...

 
@Mysticial I wish I had enough time to ask this sort of crap on meta :)
 
is there a std::copy_until algorithm? i can't find one
 
@JohannesSchaub-litb I was looking for one recently as well, I don't think there is a reasonable way to do it generically : - / (in the language, not "overall")
 
user1804599
Feb 16 at 10:36, by rightfold
Is there something like std::copy_until?
 
5:22 PM
can you do it with copy_if and throw from the comparator when you want to stop?
 
user1804599
You can set a flag from the stateful predicate with std::copy_if.
 
user1804599
And when the flag is true, always return false.
 
user1804599
Throwing also works, yes.
 
ok that's a way, but it won't work for all iterators
istream iterators could read forever
 
user1804599
Write your own litb::copy_until.
 
5:24 PM
ah i will throw then
 
user1804599
You can also write an until iterator wrapper.
 
user1804599
I’ve done that once.
 
@JohannesSchaub-litb give me the use case
 
@Jefffrey i have an iterator that points to an open paren and i want to copy all text until the closing matching paren to another output iterator
sounds convincing ehhhhh?
lulz
 
@ScarletAmaranth Erm, what do you mean by "in the language"?
 
5:28 PM
the core language supports some convenient abstractions for such a method
 
template <typename It, typename OutIt, typename Pred>
It copy_until(It first, It last, OutIt out, Pred pred) {
    for(; first != last && !pred(*first); ++first) *out++ = *first;
}
 
it just so happens that the stdlib isn't one of them.
 
@JohannesSchaub-litb std::copy(string.begin(), string.begin() + string.find(')'), out);
 
@Jefffrey That can make a before-the-beginning iterator!
 
@R.MartinhoFernandes ...assuming the string is well formed as in "It contains at least 1 )"
 
user784668
5:30 PM
@R.MartinhoFernandes That can iterate over "Hello World", too.
 
in other words, useless.
 
I'm sure he can manage to check for that first
 
Ooops, I missed return first;
@Jefffrey That's not how reusable code is supposed to be :<
 
Xeo
@R.MartinhoFernandes a missing return never hurt anyone
 
@R.MartinhoFernandes it's not supposed to be reusable...
it's supposed to be its specific algorithm
 
5:31 PM
in other words, useless.
 
yes, useless, exactly
 
robot
premake won't generate x86 release project :(
 
Hmmm, it generates Makefiles for me.
 
I'm using it on Windows, and the x86 release project is broken.
all the directories are set to default I think, no include or lib dirs or anything like that.
 
Actually, it generates a single set of Makefiles that can compile all configs.
Does it generate a different project for each config for VS?
 
5:34 PM
no
ahem, I mean that the project is broken when you try to build as x86 release.
 
the VS Wide plugin is super slow and I want to build in Release mode, but can't.
 
x64?
Oh, VS is still 32-bit, right?
 
yep
 
release32 sorta works fine here (it fails because the build is broken in 32-bit Linux, but that's unrelated to premake)
Also, I didn't break the build. It was never not-broken :P
 
5:36 PM
lol
well, it just seems kinda odd to me that the x86 debug and both x64 configurations are built just fine, but x86 release configuration is randomly totally wrong.
 
The Windows guy is on vacation so cannot ask him if it works.
 
well
 
@R.MartinhoFernandes Shame that our Windows guy is not here today.
 
I am spinning up configurations on TC right now to build Linux all configurations instead of just x64 release
 
Maybe your build script is buggy?
 
5:40 PM
I looked at it, and the only mention of the configurations is to note which ones I support- the current config is passed as a parameter rather than hardcoded.
 
Premake's DSL is annoying as heck because it's not based on scopes, but stateful. I was bitten by that before.
 
Everything about Premake is annoying
Also I'm a Windows guy
 
@R.MartinhoFernandes Yep, it's super bad for some reason.
@CatPlusPlus I agree, but I'm not really seeing much that's better right now.
obtw Cat, is TC set up for x86 builds or just x64?
 
TC just runs commands
I don't think GCC is multilib atm
And even if, dependencies will be missing
 
that is to what I was referring
 
5:45 PM
Yeah, that's why our linux 32-bit builds can't build too. No one has bothered to set up 32-bit deps on any of the machines.
 
I need to figure out hypervisor shit and run builders in VMs
 
And by "No one" I mean "I".
 
It's mighty annoying to do with Ubuntu
 
got my 5th yearling badge
 
5:46 PM
@StackedCrooked nice :)
 
time goes so fast
 
well
 
Oh god I'll soon have 6 of those
 
arguably I build x86 on Windows and x64 on Linux
but I'd rather build both on both.
 
@Jefffrey not sure if I like the fact that 5 years have passed so soon :)
 
5:48 PM
@CatPlusPlus "soon"
@StackedCrooked apparently you really enjoyed being here
 
hmm
 
user1804599
Hmm.
 
perhaps I should simply cut generic function parameters once I have concepts.
 
user1804599
You can merge objects and the type of the result will be a subtype of the types of the originals.
 
@Jefffrey I suppose so :D
 
5:51 PM
hmm
I should expand on my QuickInfo.
after all, "OverloadSet 201E5AF0" isn't terribly helpful.
 
Xeo
Hm, I think I wanted something like this before, at times.
 
interesting concept
 
Xeo
basically binding + comparision
 
Ugh, no decay.
 
Xeo
since the language allows only one or the other
@R.MartinhoFernandes you mean in std::not_equal_to<T>?
I was lazy
and it should really be <>, but that version of libstdc++ doesn't have that
 
5:59 PM
No, in T and V.
Stores references if lvalues :S
 
Xeo
yes
not the most useful, now that I think about it
since you don't need a new binding if you already have an lvalue
call it proof-of-concept
 
@Xeo Maybe you do.
 
@R.MartinhoFernandes I mean there is no copy_until that you can use out of the box, can't words because stupid
 
lvalues don't mean you have the name handy.
 
Xeo
hm
 
6:02 PM
But the point is that the checker may not be returnable if say, you use a parameter in it.
 
Xeo
why would you return the checker object other than from the factory functions?
 
Gosh knows. I don't really understand the use case.
 
Xeo
7 mins ago, by Xeo
basically binding + comparision
it has come up at times
but really, it's just to not introduce a variable outside of the if-scope
call it laziness if you want
 
user1804599
Hmm, fuck.
 
user1804599
Not sure how to implement free variables.
 
6:09 PM
you mean, function locals?
 
@Xeo Meh. I'd write a function that returns the range with the parens, and then let clients do whatever. It's an empty range if the input has no closing paren.
 
that requires more advanced range tools than just "iterators", I believe.
 
user1804599
Also what the fuck happened to Facebook, and what idiot is responsible for this margin that is a few pixels too small.
 
user1804599
@DeadMG Well, captured variables.
 
so lambda captures?
 
user1804599
6:11 PM
I need to store them in the the function objects but not sure how to access them later.
 
@DeadMG Not really. Pair of iterators does the thing fine.
 
user1804599
Easiest would be to just copy them to the stack frame when the function is called, right between the argument and the local variables.
 
auto content = between_parens(str.begin(), str.end());
std::copy(content.first, content.second, out);
 
@R.MartinhoFernandes that requires at least forward iterators
 
@JohannesSchaub-litb Any solution that does a find first does.
 
6:14 PM
a copy_until as you proposed before would not
 
I've sent my annoyance to the std-proposals list
they don't seem to agree with me
let's see what Richard the word-Smith says
 
Xeo
gimme composable range algorithms, and not a *_until variation of everything :|
 
user1804599
Not only _until, but also _unless and _while!
 
6:16 PM
woops.
 
@JohannesSchaub-litb I agree with them.
 
auto x = { ... } giving initializer_list is so wrong
 
@JohannesSchaub-litb Oh, I agree with that.
But the state of affairs is such that fixing is not going to happen.
 
making {} and { nonempty} be errors but {e1} not is wrong aswell IMO
I don't think many people do auto x = { ... } and expect an initializer list.
 
Your use case is also dodgy :S
 
6:19 PM
@JohannesSchaub-litb Scott Meyers also has a blog post about that
 
and he seems to agree with you
 
What is this I don't even.
 
6:21 PM
hi
 
Fuck, it's 19:30.
 
by the way it's 19:30.
in your timezone.
I felt that you should know.
 
It's actually 19:26!
You have 4 minutes to panic.
 
Xeo
lol
 
6:28 PM
guys, you are all from the german time zone?
 
not everybody
 
hmm
maybe I should trim that leading . that occurs everywhere.
 
Hmm cake place closes at 19:00. Dammit
 
Is it your cake day?
 
No.
But I feel like having some cake now.
 
6:37 PM
how is it called again.. "nivo"
or "niveo"
if you want to say "the level is too high"
lol i hate such words
 
What?
"Over 9000"?
 
Dude asked me if I would license my PR under the Boost license.
 
?
 
6:44 PM
I made a pull request and the author asked me if I'd be okay with my changes being under the Boost license.
 
what lic is the original project under?
 
BSD but he wants to change
 
well IANAL but it seems to me like if you contribute to his project then it's still his project and I'm not sure why he would have to ask you
 
It's still my code.
What I write is mine.
Though usually if it's something minimal it doesn't matter.
 
seems like that'd be a real hassle if you run an OSS project and then after ten years you want to change licences.
 
6:48 PM
Technically it is.
 
isn't this why linux can't change to gpl3
 
AFAIK all GPL licenses permit using later versions explicitly
 
GPL is teh dumbs anyway
 
But it's also fine if you change to a 'compatible' license.
 
what is the difference between BSD and Boost anyway?
I always kinda assumed that BSD, Boost, and MIT were basically all the same licence.
 
Xeo
6:53 PM
great, tldrlegal's compare is down :|
 
@DeadMG yeah, basically they are
 

« first day (1241 days earlier)      last day (3706 days later) »