« first day (1863 days earlier)      last day (3084 days later) » 

6:01 AM
It's used for std::make_unique.
Not exactly unknown or dark corner material.
 
@Rapptz I've never seen it used outside of deleting copy/move constructors pretty much
@Rapptz I didn't know this, I should update my make_unique then
 
looking at your impl
that's sfinae on return type right?
or what
 
yes
 
probably the cleanest way to implement it
mind if I copy that?
under zlib license
 
6:11 AM
feel free
 
kk
(I would've probably done some enable_if stuff but your way is more elegant)
 
I want to make a C++ networking lib so bad.
But I suck at async shit
 
@Rapptz you're gna use libuv?
 
no
 
I recently tried compiling it on windows and I was actually surprised that it was a breeze
also, if you know the answer please post :)
0
Q: Is std::size_t guaranteed to be in the global scope?

orlpIs std::size_t guaranteed to be available in the global scope (::size_t) by any C++ standard, optionally after including a header? If yes, by which version(s) of the standard?

 
6:20 AM
thinking of closing as a dupe
 
if there is a dupe, do lmk
 
11
Q: are C functions declared in <c____> headers guaranteed to be in the global namespace as well as std?

Evan TeranSo this is something that I've always wondered but was never quite sure about. So it is strictly a matter of curiosity, not a real problem. As far as I understand, whenyou do something like #include <cstdlib> everything (except macros of course) are declared in the std:: namespace. Every impleme...

 
guess I'll write using std::size_t; then...
fuck std::size_t =/
 
Or use <stddef.h> like the cool kids.
 
that doesn't necessarily define std::size_t
or any std::_
 
6:24 AM
It defines size_t.
Yes.
 
@Rapptz My experience with <cstdio> on some Solaris OS with some Sun C++ compiler (it has been a while) is that functions are not declared in global namespace but only in the std namespace.
 
It varies on implementations.
libstdc++ gives you the global versions
@orlp Should probably delete it.
 
@Rapptz stddef.h is deprecated according to cppreference though
 
lol
they're never going to get removed
and they're never going to give you warnings
 
probably
 
6:28 AM
The C compat breakage there would be pretty disastrous.
tbh I'd just use std::size_t
I don't follow my own advice though so you don't have to take it.
 
Already aware m8
 
I view size_t ptrdiff_t n shit as builtin types
 
Yeah me too.
 
so writing std:: before them kinda freaks me out
I was trying to do the right thing for a while
writing std::
but it irks me everytime I write std::size_t
size_t is IMO too fundamental to be stdlib
 
6:32 AM
It breaks my syntax highlighting.
 
well, that's arguably more pragmatic, but still valid :)
 
is this real life?
 
@Rapptz when I define a deleted function in a header, I don't also have to mark that function inline do I?
to prevent multiple definitions
(in this case deleted ones)
 
Better safe than sorry.
 
@melak47 Ah, you updated. Welcome! :P
 
6:34 AM
@ElimGarak when did this happen. most recent build or earlier?
 
But I'm thinking the answer is "you don't have to"
 
@melak47 In September :P
 
FUUUUUUUUUUCK
You can't use the following wildcard characters as part of your search query: . , : ; / \ ` ' " = * ! ? # $ & + ^ | ~ < > ( ) { } [ ]. The search will simply ignore these symbols.
DO THESE PEOPLE EVEN KNOW WHAT PROGRAMMING IS OR HOW IT WORKS
"yo guys I have a good idea, let's make code searchable on our site"
"but to be super troll you can't search for special characters"
@Rapptz I think I've spotted a bug in your code
 
I'd laugh, but this is going to hurt me sometime soon too, I bet
 
look at the type of detail::unique_type<T>::array
then look at the type you're actually returning
 
6:39 AM
the same exact type
gj
 
since when is std::unique_ptr<T[]>; the same as std::unique_ptr<T>;?
 
you have much to learn about templates friend
 
enlighten me?
 
yes?
T = int[]
 
6:42 AM
k
 
not T = int
 
I am well aware.
I'll walk you through this I guess.
typename detail::unique_type<T>::array
template<typename T>
struct unique_type<T[]> {
    using array = std::unique_ptr<T[]>;
};
partial specialisation
so T = int[] in make_unique
and in unique_type T is int
and array is std::unique_ptr<int[]>
 
yes
I know
 
and then we have T which is int[]
and std::unique_ptr<T> which is....
 
oh
I'm a tard
haha
I see now, you didn't partially specialize
on the size_t
so T is still int[]
@Rapptz any particular reason you're repeating the type though?
why not just return {new U[size]()};?
 
6:45 AM
you can't
it's an explicit constructor
 
ahh that's implicit only
 
yeah sucks
 
might have to go over my codebase then
 
there was a proposal to make return explicit
 
might have assumed that it isn't in some places
 
6:47 AM
but it got rejected cause it's bad
 
is there a reason to make return { ... }; not the same as return RetType{...}?
 
I still toss and turn in my bed at night and wistfully sigh, thinking what C++ could have been
 
@orlp there was a paper by a lounger himself on why it was a bad idea
 
@LucDanton I think once LLVM has matured another decade we'll see another golden age in programming languages
because the floor to make one will be so much lower
 
lol
The original paper proposing it is by Herb himself.
Quite an accomplishment to dethrone that I guess.
 
6:49 AM
I mean I can see one problem
and that's auto return types
but that's a problem even right now
or, well, 'problem'
it's just a syntax error
 
I keep playing with the back of my mouth, feels like I'm gonna swallow my tongue and die.
 
@Rapptz easy set up for penis-related joke
either way, thanks for dealing with my stupid questions
 
I can't find the paper
 
it's k
 
Oo, love this app ... keeps on shutting itself off when I do a search
 
6:53 AM
unless it's short I probably wouldn't read it anyway
 
seriously I can't stop messing around with my mouth
 
@Rapptz is there a way for ninja to keep building alternative paths if a subcommand fails?
 
absolutely no sexual pun intended what so ever but it's bugging me
@orlp ?
 
e.g. if the dependency chain is A -> C B -> C and compiling A fails, can it still build B somehow (since B doesn't rely on A) while I try to fix the bugs in A?
obviously it can't build C
if you're working on a really big codebase then one erronous file shouldn't block an entire build - it should only block the compilation of the files that rely on it
(if compiling a project takes like 20 min or smt, this can save a lot of time potentially)
 
implicit dependency?
x | dep1 dep2
 
6:57 AM
nope, it just stops when a subcommand failed
 
@Rapptz say, do you care at all about concepts?
 
even if there's more independent stuff it could compile
 
@LucDanton yeah
 
ah
it's -k
I wonder if -k 0 is infinite
it probably is, but it's not documented in the command line --help
 
I’ve been mulling over some stuff for a long time and it’s starting to gel together but I still have a potential pitfall/awkwardness in the way
 
7:00 AM
hello guys. I am confused on why we should use macros ?
 
config->failures_allowed = value > 0 ? value : INT_MAX;
 
AFAIK so far everybody has been working on concepts for types, i.e. Iterator<concrete> would hold if type concrete is a model of Iterator, whatever that means
 
yep, my suspicion was correct
 
an unfortunate(?) consequence is that you have to handle template<typename X> void foo(X&&) requires Iterator<handle_t<X>>;, with handle_t = std::decay_t probably being the favourite
 
@AbdulazizAsiri who told you that :p
 
7:02 AM
instead I’ve been pursuing something like template<typename X> void foo(X&&) requires Iterator<X>; for some time now, and it’s recently occurred to me that in this flipped perspective concepts are tailored around variables
 
wouldn't the shorthand form work?
void foo(Iterator&&)?
 
I.e. Iterator<concrete> then asks if concrete x;is a variable usable as an Iterator, whatever that means
@Rapptz yeppers
now the remaining bit is
 
it has to be default constructible?
well I mean iterators have to be I guess
 
if you write template<typename X> void foo(X const&); then you have to be careful to constrain on Iterator<X const&>, but at least that still mirrors the parameter (which is a kind of variable)
@Rapptz lol
 
It's in the requirement list!
 
7:05 AM
the problem is with template<typename X> void foo(X);
that requires destructibility
but we’re already co-opting C<X> for X&&
so… it doesn’t really work
sucks right?
 
hm
 
plus template<typename X> void foo(Concept const&); is likely 'wrong'
 
how?
 
I don’t know how right it is for concept-for-types though
 
I was under the impression that concepts were supposed to mainly replace loose template types.
 
7:08 AM
@Rapptz you’d have a concrete const& x; variable but constrain on concrete x;
 
Hm. Really?
I would have thought const Concept& x is equivalent to Concept<const T&>
 
@Rapptz strictly from my own perspective of concepts-for-variables
I’d better check
 
Hm I haven't messed with concepts.
 
I didn't know Islam is a race - since when an anti-anti-Islamic protest becomes an anti-racism protest?
 
7:10 AM
Maybe it'll bring some C++ love back to my life.
 
@chmod666telkitty because people mistake the term racism for bigotry
and/or people believe that attacks against muslims are mostly attacks against brown people / people from a certain origin (arab)
 
why do people make issues and then make a PR for the issue
 
the clean shaven white muslim doesn't even blip on their radar
 
honestly asking
 
@Rapptz because they're orthogonal
he can reject my PR
 
7:12 AM
why do people people
 
because he doesn't like my solution
then there's still the issue
if I just PR then there won't be an issue after the rejection
he can reject both - I can respect that
or he can accept both - then it saved him time
 
i c
 
it's a win/win
the only scenario that doesn't exist is accept PR/close issue as invalid
so I guess they're not orthogonal
there's probably some fancy word for it, but I guess the issue is independent from the PR (not the other way around though)
@Rapptz is that a satisfactory explanation?
 
is it time to build gcc trunk for windows
last time the hardest part was uh
perl and openssl
you might be wondering "why does building mingw require openssl?"
 
I've never built mingw-w64
 
7:15 AM
and the answer is "I don't know"
 
@Rapptz are you ONLY building GCC?
or the full collection/mingw-w64 tools?
 
yeah, placeholder& -> template<typename Invented> … Invented&
 
because I suspect it's some tool that needs it
 
where placeholder can be auto, decltype(auto) or a concept
 
@orlp gcc and gdb
 
7:16 AM
I'd be surprised if SSL isn't optional either
 
I'm going in deep
 
is int* const the type a model of Iterator-for-types, and is int* const p; the variable a model of Iterator-for-variables?
 
@Rapptz can gdb download files?
 
no
 
it's probably just some part of gcc or gdb can download files?
and has to support SLL for that
otherwise I dno
 
7:18 AM
I think I also built wget or something
only explanation I have anyway
 
> To create a native Windows x86-64 compiler you first have to create a MinGW-w64 cross compiler.
wat
solid build process they've got there
 
it took me like 6 hours to build mingw
 
I’m tempted to bite the bullet and write template<typename X> void foo(X&& x) requires Blah<X&&>;, i.e. match the variable/parameter declaration faithfully
 
wait so foo(const Concept& x) is not equivalent to Concept<const&>?
 
nope
 
7:20 AM
but why
 
@Rapptz 6 hours build time or 6 hours of 'install dependency, try compile, ugggggggh ok now I have to do this, try it, ooooooooh I need to do that, install dep, uugghh wrong version, etc'?
 
does that make too much sense or something
 
I think concepts-for-types is the predominant viewpoint here
 
@orlp latter man. The actual gcc building part took like 5 minutes
 
@Rapptz heh knew it
 
7:21 AM
i.e. auto foo(AConceptForAType const&); just works (maybe)
 
kinda weird
 
@orlp God I hate that shit. Even worse is trying to build a portable Linux binary.
If you can get it to statically link, then you're set as long as it doesn't touch the network.
Otherwise, you're fucked.
 
I'm in that 2nd category on the next version of my Pi program because of the stupid Cilk Plus dependency.
 
7:24 AM
I have no recollection of this
 
@Rapptz compared to standard we're both missing remove_cv
 
well then time to chuck it all out
 
I built libqt on windows once
once.
 
why would I use remove_cv
 
ask the std
 
7:25 AM
when I remove it manually
also this function is not to_array
 
@Rapptz is this me being a tard again?
 
and it predates that TS anyway
this to_array function sucks ass
 
oh btw writing concepts-for-variables means a lot of qux(as_const(var)) constraints
so logically I might want template<typename X> auto foo(X&& x) requires Concept<bikeshed_t<X&&>>;
where bikeshed_t is the type-level equivalent of as_const; or even more simply it’s its result type
what colour to pick for that one?
 
$ rm -rf mingw-builds/
I feel like I made a mistake
 
well done
 
7:29 AM
@LucDanton why not Concept<X&&>?
 
in a template declaration
what is the difference between
constexpr std::array<T, N> to_array(T const (&a)[N]);
and
constexpr std::array<T, N> to_array(T (&a)[N]);
I don't really know what the const binds to
 
latter T can have the const qualifier
 
@Rapptz I think I already have a case where I need the above but I can’t recall what it is
 
@Rapptz but they both accept exactly the same right?
(albeit with different T deductions)
 
one returns std::array<const int, ...> the other returns std::array<int, ...>
 
7:31 AM
yes, ignore the return type
there's not a difference in what it accepts, right?
 
not in this case
 
kk
 
also
template<Tuple X> auto foo(X&& x);
I still have a problem re: destructibility
requiring it here is too strict
and of course there’s template<Tuple X> auto foo(X x);
there’s no way of avoiding this overlap
I’m tempted to require destructibility for both and call it a day
 
can someone explain to me what exactly "Technical Specification" means for the standard?
is it similar to "experimental/X" in that it's being refined and added to core C++ later?
or is it 'your compiler may or may not choose to implement this, but it is fully done and standard'?
or something else?
I never fully grasped the significance of what it means to be a TS
 
ICBW but the only thing I lose is something like foo(concrete {}); running in a privileged context which has access to an otherwise restricted concrete::~concrete
not exactly the most common scenario
 
7:37 AM
I wonder if there's a nice way to temporarily remove a folder from my PATH
without copy pasting the entire thing
 
ah
2
Q: What is C++ Technical Specification?

nkdmConcepts-lite C++ (proposal N3701) feature is not included in C++1y standard, but it is said it will be published as Technical Specification. What does it exactly mean? Will it automatically become a standard feature in next C++ releases?

 
you barely started and you’re already hacking it up?
 
hm?
 
lol, privacy concerns brought up during installation of Win10 SDK.
 
I need to remove gcc from my path to build gcc :v
and my path is huge ._.
 
7:38 AM
PATH="${PATH/\/path\/to\/remove/}"
if batch
if windows, I'd use path editor
 
@Rapptz hence my question
 
'batch' is a windows .bat file btw
 
eehm
I meant bash
not batch
@Rapptz there is a link to path editor
 
I want to edit it temporarily lol
 
I use it all the time
 
7:39 AM
like just for the current shell
time to copy paste
 
do you have sed?
actually I dno
w/e
fuck windows shell
 
I'm using bash
(forced to)
 
oh
then you could've used what I said
PATH="${PATH/\/path\/to\/remove/}"
 
alright catch you later
 
$ git clone <url>
$ cd mingw-builds/
$ git checkout develop
error: Your local changes to the following files would be overwritten by checkout:
        codestyle.txt
        licenses/python/LICENSE.txt
Please, commit your changes or stash them before you can switch branches.
Aborting
pls
good start so far
@LucDanton see ya
 
7:45 AM
@Rapptz I always forget how to reset
I'm so lazy
git stash && git stash clear
"get the fuck outta here I don't remember IDC"
I mean, git is pretty great
but man do I find it hard to remember all the shit
 
it's not that
I just don't get how I have staged changes post-cloning
lol
these files will not unstage themselves
I only have one explanation for this.
autocrlf
fucking git
 
oh, snag, that’s what this whole destructibility thing is—not a pitfall
that was bugging me
 
hm?
 
do you guys ever get those goliath commits because you refuse to commit in a broken state and you have to change like 50 things at once because you're doing an architectural redesign of your project?
 
yeah all the time
 
7:50 AM
@orlp I do them myself all the time.
 
sometimes I feel guilty
 
Though I get a nice, clean feeling when I have much smaller, precise commits
 
but I really hate commiting non-building states
 
kind of like only needing to wipe once
 
I avoid large commits if possible.
 
7:51 AM
@Prismatic I never wipe once
even if it comes out bone dry I'll wipe again
you never know
 
@Prismatic I don't even use source control for my personal projects. The only commits I do are on GitHub.
 
@Mysticial kinda a shame though
even if you never intend to publish
 
I don't use vcs for my personal projects up until they get to a certain point
 
just doing a git commit -am "asfjkashfkejfh" every once in a while is useful
I remember that before I discovered git I had like x_v2 and x_old folders all over the place
 
When I start anything out its always incredibly chaotic and I change everything so often its not worth using vcs imo. So for those projects I just back them up every time I change something by archiving them and uploading them to google drive
 
7:52 AM
@orlp I've published some of my stuff on GitHub. Mostly in the form of massive commits that consists entirely of rebases to my local (trunk) copy.
 
@Mysticial heh I know those projects
you thought it started off simple
 
When they are clean/stable enough I'll init a git repo and start making an attempt to be clean with my updates
 
and then you have a 5kloc "Initial commit." on github :P
 
@orlp Or rather, in my case: I already have this 3 year old project. Now I'm gonna dump it on GitHub.
 
@Mysticial by the way, is there any particular reason you've decided to keep your pi program closed source?
competitiveness, or?
 
7:55 AM
Indirectly yes.
There are a number of secrets which I'm not willing to reveal. And they're so important to the project that it's pointless to share everything else.
I'm already having second thoughts about releasing the pre-compiled library which is the back-end of the Pi program.
I haven't done so yet.
 
@Mysticial feel free to refuse to answer, but are these secrets algorithmic or primitives (e.g. fast operation X in N amount of cycles that you worked a lot on)
I have no ambitions to beat you to pi btw
 
@orlp All of that actually. Both algorithmic and primitives.
 
(although not everyone reading this chat might have the same ambitions as me)
@Mysticial asymptotical?
or just 'not-asymptotical-but-if-you-include-cache-effects-n-shizzle-its-fast'
 
@orlp Not really. At this level, everything is within a log factor of each other. So it's the Big-O that matters.
 
like how quicksort is the fastest algorithm
despite no asymptotical difference (excluding worst case) to, say, heapsort
 

« first day (1863 days earlier)      last day (3084 days later) »