« first day (1460 days earlier)      last day (3471 days later) » 

12:00 AM
@JerryCoffin was wont to say?
 
Noun: wont (usually uncountable, plural wonts)
  1. One’s habitual way of doing things, practice, custom.
  2. 2006, Orhan Pamuk, My Name Is Red:
  3. 1920, James Brown Scott, The United States of America: A Study in International Organization, page 142:
  4. 1914, Items of interest - Page 83:
Adjective: wont (not comparable)
  1. (archaic) Accustomed or used (to or with a thing).
  2. 1843, Thomas Carlyle, Past and Present, book 2, ch. XI, The Abbot’s Ways
  3. (designating habitual behaviour) Accustomed, apt (to doing something).
Verb: wont (third-person singular simple present wonts, present participle wonting, simple past and past participle wonted)
  1. (transitive, archaic) To make (someone) used to; to accustom.
 
o.o learn something new everyday
 
@Borgleader I'm sorry.
 
Ell
I have a question for you guys
Actually nvm
 
ffs i dont even recall installing sql server 2008 why is it so damn hard to remove
 
12:02 AM
@Ell Question time is on the second Tuesday of every other week.
@Borgleader It's really quite easy to remove. Remove the side of the case. Unscrew the hard disk from the case. Remove the cables from the drive. Throw away the drive.
NoSQL (and no MongoDB either).
 
@JerryCoffin I suppose you meant meaning #4.
 
Ell
@jerry actually question time is tomorrow at 22:45 on BBC One
 
> As my great aunt was 1914, Items of interest - Page 83: to say (...)
 
Undoubtedly correct, but in a pinch, maybe you could substitute something like:
adjective literary
1.
(of a person) in the habit of doing something; accustomed.
"he was wont to arise at 5:30 every morning"
synonyms: accustomed, used, given, inclined
"he was wont to arise at 5:30"
 
Ell
I don't suppose any of you have watched question time
But this is so accurate its hilarious: Harry and Paul - BBC Question Time Sketch: youtu.be/p3tUqRBiMVo
 
user1646075
12:28 AM
@Borgleader that used to come in with every VS express installation, multiple installs, and then would hang around forever even after de-installing VSE, didn't it? I remember having fun with that bitch. Also its claims about other installs possibly being broken - I came to the conclusion it's just listing every bloody thing that was installed later regardless of dependency.
 
12:45 AM
@aclarke yes thats probably where it came from
 
user1646075
it's a virus
 
D:
also MS's stuff is always thoroughly annoying because if somehow the uninstaller is borked you cant just nuke a single folder like most programs because of course they spread their files all over the fucking place
anyway, i'll keep at it later
 
user1646075
@Borgleader yeah, and the registry entries cross-linking all sorts of activity...
 
Good morning.
 
@MarkGarcia is that like the yield thing in C#?
(disclaimer: i only read the title)
 
yield, async, I think. I'm still on the first parts.
Also purely from Microsoft.
@R.MartinhoFernandes Come on. You don't have to be modest.
:)
 
@Borgleader, that's related. I want to "Putting the defintion of templated method into header file, for others, put them into c++ source files". so I wrote the above code. But the code doesn't works. So I want to know if it is possible to make it true for my intention, if my implement has some obvious error. — zhihuifan 2 hours ago
i uh... what?
@MarkGarcia Well at least it's not was bad as :
yesterday, by Borgleader
https://isocpp.org/files/papers/N4165.pdf
imo anyway
 
@Borgleader It's only proper that they submit the coroutine paper. I think they are the only ones who has a working implementation and actual experience on this.
But HERB!
 
1:20 AM
Was there something fun/interesting to do with variable templates? They’re on GCC trunk, so I can play with.
 
> Utilizing parent-stealing scheduling allows to compute fib(42) in less than 12k of space, whereas attempting to use more traditional scheduling will cause state explosion that will consume more than 2gig of memory around fib(32).
 
We will be changing load balancers momentarily to test a configuration change, there should be no user impact.
As of now, #stackexchange and #stackoverflow no longer support SSLv3 due to POODLE. You can read about it here: https://www.openssl.org/~bodo/ssl-poodle.pdf
 
user1646075
@Feeds awwww crap - has this hit the news yet? Is it turning the world upside-down like shellshock and heartbleed? Will we be getting annoyed by panicky customers? Will there be entertaining vid-grabs from stupid journalists?
 
1:36 AM
Checks openssl.org's SSL.
 
POODLE? OK, I'll tell Bailey, though it's only half-relevant.
 
Ell
@mark its a protocol bug
I believe. No conforming implementation can be safe
I think
 
@Ell Checks if openssl.org still uses SSLv3. ;)
 
Ell
I need to sleep now if I'm going to stay awake during my drive to Nottingham tomorrow
 
Only SSLv3 can be exploited in terms of cipher -> plain.
The downgrade attack makes the connection go to v3 for it to use exploit.
@Ell Good night.
 
Ell
1:43 AM
Night
 
Nite
 
Is it allowed to partially specialize variable templates? I’m not noticing anything special in the paper, but GCC won’t let me (could be incomplete support of course).
 
define 'partially specialise'?
oh shit
variable not variadic
 
I don’t see that mistake ever recurring.
 
Is that sarcasm?
 
1:47 AM
Naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah.
 
Guess so.
what the fuck is a polymorphic_allocator?
 
This POODLE news just came right after I've learned stuff about block cipher modes. Relating to some terms makes me feel so expert now. :P
 
10
Q: C++1y/C++14: Variable Template Specialization?

Andrew TomazosAccording to C++1y/C++14 N3690, does the type of a variable template specialization have to be the same as the type of the primary template? template<int x> char y = f(x); template<> double y<42> = g(); And if so, is it possible to leave the primary undefined somehow? template<int x> ???? y ...

 
@Rapptz It's definition may vary.
:P :P :P
 
k, I was confused by GCC’s incomplete support because it changed the error message ‘function template specialization is not allowed’ to a generic ‘non-type template specialization is not allowed’, which made me think this was a long-term thing.
 
1:50 AM
Fundamental Library TS adds polymorphic_allocator<T>
and every container that is allocator aware has a new typedef using it
 
Bummer, I could have put variable templates to work right away.
 
under pmr::stuff, e.g. std::experimental::pmr::string
wow they're really starting to employ subnamespacing now
a bit arbitrarily though
 
Btw you can’t partially specialize function templates, but we can have partially specialized variable templates of functor type (incl. lambda closures).
@Rapptz I read the paper a long time ago, I don’t recall.
 
@Rapptz pmr? "polymorphic"?
 
yeah polymorphic -> pmr
> A specialization of class template pmr::polymorphic_allocator conforms to the Allocator requirements (C++14 §17.6.3.5). Constructed with different memory resources, different instances of the same specialization of pmr::polymorphic_allocator can exhibit entirely different allocation behavior. This runtime polymorphism allows objects that use polymorphic_allocator to behave as if they used different allocator types at run time even though they use the same static allocator type.
 
1:52 AM
Polymorphic memory resources, is the general term IIRC.
(I do recall some things!)
Ooooo I remember.
 
lol memory_resource uses the same shitty NVI that iostreams is full of
:/
 
Think void api::gief(std::pmr::vector<T> all_of_your_data);
Allows to hand over the contents of any vector, regardless of its allocator.
 
why is NVI so popular in the standard library?
 
I.e. type-erasure everywhere.
@Rapptz I like NVI.
 
y
it's nasty
 
1:54 AM
@Rapptz Because it strengthens interfaces.
 
how?
 
Mmmh feel like reading a paper? It’s a good paper mind you.
 
Is it because you can specify more things in the 'real' function?
like calling f(); or something.
 
It defines precisely what functionality can be overridden by derived classes.
 
Because I CBA to explain (I think there’s an old GotW on that? Or one of the ‘Effective/Whatever C++’ books?)
15 hours ago, by Luc Danton
There’s a neat paper that advocates making the two available in the same language, with semantics for it. The best of both worlds (which does make for a confusing world). I think it’s for C++, too.
(‘The two’ are inner/CLOS-style overriding vs super overriding [as done in C++].)
 
Oh, Herb himself coined the term?
> [Later note: Actually it's a more restricted idiom with a form similar to that of Template Method. This idiom deserves its own name, and since writing this article I've switched to calling the idiom the Non-Virtual Interface Idiom, or NVI for short. -hps]
 
I guess so.
 
@Rapptz Welp, that seems to be the proto-article where it all comes from. Maybe historically interesting, but given how it’s long possibly not the best source to stick to explaining NVI.
18th GotW is really early. Makes sense.
 
it's not a GotW
it's those other ones
Herb Sutter's Mill?
I forget
 
> This article appeared in C/C++ Users Journal, 19(9), September 2001.
@Rapptz That’s his blog.
Well no… his current blog is named that.
 
2:02 AM
the url says mill18!
 
‘An article’ is as specific as it gets I think, no matter where reposted.
This wikibook page seems adequate. It references the article, a Dr. Dobbs thing (didn’t peek), and the C++ FAQ.
 
Does anyone know which section of the C++ standard talks about objects of a class having access to private data members of other instances of the same class?
 
11 Member access control [class.access]
Seems straightforward enough.
First paragraph:
 A member of a class can be
 — private; that is, its name can be used only by members and friends of the class in which it is  declared.
 
Thank you
 
^so access control is not defined in terms of objects/instances.
Heh, GCC does support explicit specializations for variable templates. So it’s a WIP.
 
2:07 AM
20
A: Sing Happy Birthday to your favourite programming language

David CarraherMathematica- way too many bytes Happy Birthday to You Happy Birthday to You Happy Birthday Dear Mathematica Happy Birthday to You %//Speak reads the happy birthday message out loud but it does not sing it.

lol
 
Why on earth would you use Microsoft Word for counting bytes? — WChargin yesterday
 
lol I saw that
 
And here comes the part where I rewrite all the range concepts.
I might just put concepts::Destructible inside concepts/construction. Not confusing at all.
@Rapptz I’m not using sarcasm again.
 
2:26 AM
lol
 
It's in line with established terminology, such as RAII
 
concepts/the_life_and_death_of_all_things.hpp
In fact I already have assignment related stuff in it (obv. I want CopyCons and CopyAss next to each other). I might add Swappable, too.
ooo my adl::swap doesn’t have a noexcept spec, that’s not nice.
 
mine does!
:d
so
what type of format string should I use for my printf thing?
 
I have bindings to produce the noexcept(noexcept( … )) -> decltype( … ) stuff automatically thankfully.
 
Python-style or printf a-la PHP style?
the PHP printf is the same as POSIX printf except it adds the ability for custom fill characters
 
2:36 AM
…which Python style?
 
str.format
 
All i18n-friendly formats then right?
 
essentially
I feel like printf has some issues to implement sanely
like uh %.10s behaves differently from %.10f in principle (cuts off characters vs precision)
 
@Rapptz Hang on. Python’s format is great, but part of that greatness is interpolation-like behaviour, e.g. {0.foo}. You’re not implementing that bit right?
 
ofc not
I'm not a magician.
 
2:43 AM
I can’t really think of a way to favour the one in favour of the other.
 
> error: specialization of 'void f() [with T = int]' after instantiation
balls.
 
Put it into a class template.
Hang on, there’s more to it than that.
 
I don't really know what format string to choose.
 
Well, it depends on how the definitions are set up. I do use class templates in some cases where function templates don’t work.
Cue quote about kindling and self-immolation.
 
error: specialization of 'test<int>' after instantiation
 struct test<int> {
        ^
so much for this idea
 
2:48 AM
I tend to find POSIX-style printf really heavy on the eyes. Which is not to say that I don’t for Python—I don’t see enough Python to comment.
@Rapptz At least you didn’t combust!
 
@Rapptz I know, but that’s not the same as seeing it in the wild.
‘How much time will it take me to understand what this code is meant to do’.
 
github isn't that useful
but I did find this monstrosity.
 
Is NumberFormat standard do you think?
 
no lol
 
2:53 AM
Monstrous, but not immediately relevant :Þ
 
I don't see many monster examples of str.format in the wild
 
Do I even bother with LvalueSwappable = Swappable<T&, U&>; I wonder. Sure, why not.
 
I do find it easier to read though there are some python-isms I can't support
and I don't quite get the point of having to escape both { and }.
 
I don’t want to run a stack machine in my head when reading format strings. Is this about that?
 
well if you want to print {0} you have to do {{0}} but I'm not sure why this is preferred over {{0}
maybe unmatching escapes look ugly
 
2:56 AM
Yeah, no stack machine please :)
 
is that for or against {{ }} :v
 
For.
 
makes the parsing harder for me incidentally
 
Correct me if I’m wrong, but to figure out whether a possibly-escaped } is, I need to recall if there is a matching { prior right?
 
not really
if you want to just print } you still have to do }}
 
2:58 AM
That’s not my question.
 
I might have misunderstood
 
In '{ {{ }' is the last } escaped or not?
 
no
 
How do you figure?
 
because the first { started a format-spec.
 
3:00 AM
k.
 
this is the biggest issue I have with the curly brace style
with printf I just have to do %% and that's it :v
annoying to read and easy to parse vs decent to read and annoying to parse
 
What prevents you from doing }} and that’s it? (I haven’t done parsing in a looong time mind you.)
 
I can't think of a way of doing it w/o going over the string twice
 
Now that I think about it, I’ve almost always done lexing before parsing, too. Not usually an issue.
 
once to check if I have matching escapes and another to actually parse the format spec
 
3:03 AM
What do you match an escape with?
 
well I'd need to bail early like python does no?
>>> '{ {{ }'.format(10)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError: unmatched '{' in format
I can't make sense of this error hm
 
I thought it was the }} escapes you had trouble parsing.
 
yeah it is
 
Is the code an example? Because it doesn’t have }}.
 
user1646075
processing { and } can be like general processing of anything with \' or doubling. The parsing of the guts inside { } has to look for a single } to close. Then it makes sense of the guts. Then away we go again. Where's the problem? As a vi user, btw, I appreciate being able to bounce between pairs using % command, so my vote would be for {{ AND }} for literals.
 
3:07 AM
I just can't think of a way to parse it w/o going over it twice.
once to verify if the braces (and their escapes) match
and a second to actually do the parsing
I'm probably being a scrub though
 
user1646075
@Rapptz meh, let that pop out organically. Unless you have a "transaction" issue...
 
If picking }} as a required escape (i.e. like Python), then I really don’t see what escape has to match what. You match { with }, any escape being a literal brace character.
 
Python does require }}
 
Oh. I need to re-read all that.
k it’s fine
 
well python's a bit fucky too
> Note that it is not possible to use { and } as fill char while using the str.format() method; this limitation however doesn’t affect the format() function.
 
user1646075
3:12 AM
wow - filling with { or } would have to be pathological!
 
format delegates over to type(value).__format__(format_spec) so I have no idea why that's a limitation
{{{:{}}} suddenly things got ugly
doesn't work!
on second thought I'm not sure this was the best idea
 
user1646075
@Rapptz oh yeah that's nasty. Which shows that the use of doubling is seriously dodgy. I don't suppose that could be made to work with \ in python?
 
I can't seem to get this to work
 
user1646075
maybe literal { should be added with {{} in python - only thing I can think of that would allow all wierd-ass combinations to actually be expressible.
 
this experience isn't very pleasant
 
user1646075
3:19 AM
printf style at least relies on the syntax after % having a natural termination.
 
user1646075
probably {{ would always have natural termination, but it was thought that humans might appreciate {{ }}
 
I'm trying to get something like {{{{{{10} or w/e
 
user1646075
eeek good luck!
 
just trying to test python's parser :v
 
user1646075
my gut-feeling is that a {{ pair should only be recognised IF there's a non- { after it
 
3:22 AM
>>> format(10, '{{{0:{>10}}}')
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError: Invalid format specifier
 
user1646075
wait, i think I'm being ass-backwards. {{ => { whereas {blah => formatting activity. Damn
 
user1646075
/me needs to think again.
 
@Rapptz I’ve not been able to use format save for an empty string as the format spec btw.
 
user1646075
so ... {{{blah => { and {blah-action ??
 
user1646075
3:23 AM
can't see why it can't work. is that embedded :{>10} part of a format-spec?
 
@Rapptz Ah, I have some results with ints. It’s for strings that it gets wonky.
 
@StackedCrooked Whoo! Good thing those aren't our kind of bugs.
 
user1646075
maybe a formal spec of Python's rules is worth hunting for. Hopefully these issues have been thrashed out
 
I can't make sense of why it doesn't work
 
I’ve given up personally :Þ What with concepts and all…
 
3:27 AM
I guess that's one vote for printf :v
 
Can’t have Iterator<int* const> what with mutable increment and all. That seems sensible.
 
It's still an iterator
!
you just have to believe in yourself
 
Well, void foo(T const&); constrained on Iterator<T> works.
 
int main() {
    int arr[] = { 1, 2, 3 };
    const int* x = arr;
    const int* y = x + 1;
    // *y
    // am I not iterating?
}
:3
 
void foo(T&&); constrained on Iterator<T> won’t.
 
3:30 AM
I'm being facetious, you don't have to answer
 
It’s a good question regardless.
If you try auto const it = find(…); foo(it); and it fails, is that expected?
 
if foo expects an Iterator I'd think it isn't
I think I'll do printf-style
 
What does it take to have void bar(T&& t); constrained on Iterator<?> express ‘I accept lvalues or rvalues of possibly const-qualified models of Iterator’?
 
yes
 
For void qux(T& t); it’s easy, you pick a constraint on Iterator<remove_const_t<T>> and that’s ‘I accept possibly const-qual’d lvalues that model Iterator’. The forwarding ref. trick is annoying though.
 
3:35 AM
I always found errors w.r.t. typename T::value_type etc when T == T&& annoying.
 
I suppose a metafunction/alias that means ‘remove cv-quals under the reference type’ with a very good name would go a long way here.
 
always that groan where I go 'ugh guess I have to unqualify it'
props to PHP for having the best printf format string :p
 
Operationally speaking I can spell that as qualifying_value_category_of_t<Type, unqualified_t<Type>> but obviously that’s a mouthful.
 
decay_cv
 
user1646075
but then this:
Warning

Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results
 
3:38 AM
Begs the question ‘is it a remove_cv that decays?’, I think.
 
remove_all_cv!
akin to remove_all_extents
 
remove_all_cv_t<int* const* const&> // hang on, there is a const in there
mutable<Type>? Nevermind the keyword, is this the right area?
mutable being an opposite of const in e.g. lambda expressions.
 
I still prefer remove_all_cv
 
void i_accept_const_iterators(It&& it) requires Iterator<mutable_version_of<It>>; (names silly on purpose)
^I think I want something like that, the remove_* and strip and decay kinds of aliases are too imperative. They spell what they do, they don’t describe what the result is for.
Makes sense?
 
I guess.
 
3:44 AM
E.g. element_of<Type*> vs remove_pointer<T*>.
I’mma pick mutable_t and see how that plays out.
 
oh the PHP printf doesn't allow printf("%*.*s", 10, 10, "hello world");
 
user1646075
@Rapptz heh - that would be too normal for PHP
 
I guess I'll do POSIX + PHP extension
having the ability to specify a custom fill character is invaluable :v
 
user1646075
although maybe they expect plain interpolation of the value if you want it variable...
 
printf is also not without gotchas
 
user1646075
3:50 AM
yeah - which is why many languages add little extensions here and there
 
@Xeo Could use additional input for a meaningful alias that means something akin to ‘The mutable version of that type’. See discussion above.
 
6
Q: How do positional arguments like "1$" work with printf()?

Je RogBy man I find printf("%*d", width, num); and printf("%2$*1$d", width, num); are equivalent. But IMO the second style should be the same as: printf("%*d", num, width); However via testing it seems man is right; why?

 
Don’t think std::iterator_traits<It const> is supposed to work.
Oh, I’m seeing void_t in proposals. The void is spreading!
 
 
lol, std::swap is not SFINAE-friendly.
Not sure how to go on implementing Swappable when it encounters immutable values.
I think I’mma implement my own then. What does it take, one overload for values, one for arrays?
Yup that’s it.
 
4:07 AM
why does Swappable even exist?
 
To swap stuff.
 
What types are not swappable?
 
Most const qualified ones, for a start.
Anything with swap(Left&, Right&) = delete; with ADL enabled.
 
then shouldn't you just check for that?
 
And so on etc.
 
4:09 AM
Hmm.
I forgot about = delete
 
Also keep in mind that Swappable<A, B> check for two possibly different types.
There, fixed my concept to perform the symmetry check.
Note that the plain std::swap uses:
> Requires: Type T shall be MoveConstructible (Table 20) and MoveAssignable (Table 22).
That excludes const qualified types.
This is kinda annoying, I want my adl/swap header to be minimalistic, but everything is connected (e.g. swap for arrays require that the element types be swappable).
Ah fuck it, I’ll add <type_traits>.
 
mine's simple
:>
 
Is it SFINAE-friendly?
 
don't know
I do not see why it wouldn't be
 
It uses std::swap, which is not required to be.
This was the whole starting point.
 
4:18 AM
I don't necessarily advertise much outside of 'equivalent to using std::swap; swap(t, u);'
So I'm not gonna shoot myself over it.
also that has a copy paste error
 
Wouldn’t you like Check<concepts::Iterator<int const>>() to be false?
 
I don't see how that requires adl::swap
 
Iterators must be LvalueSwappable in the Standard.
Here we go, fixed. Takes ~10 lines.
 
too demotivated for this
 
The format strings, or the concepts?
 
4:25 AM
former
 
lol, ADL on Standard iterators finds the borked std::swap.
That makes Swappable a concept that’s impossible to implement without dirty tricks.
I’ll move the constraints onto the ADL wrapper.
Which, all told, is neither dirty nor a trick come to think of it.
Oh, of course it is. It fucks up all the ADL swap ops that have relaxed requirements.
No wonder Boost.Swap uses a different name to hook ADL. Nope, doesn’t.
a->m === (*a).m is a syntactical requirement that I’m not sure can be tested for with Concepts-Lite.
 
4:51 AM
> o denotes a value of some type that is writable to the output iterator
That’s useful.
I don’t really want an OutputIterator<It, Write> concept :(
Mmh actually that’d make sense; then e.g. ForwardIterator would delegate to OutputIterator<It, reference>.
 
Morning!
Speaking of ADL, this reminds me of this issues I had with C++03 and static functions: stackoverflow.com/questions/17661308/…
It was quite surprising to find out.
 
5:10 AM
Iterator requires *r with type reference. An output iterator is allowed to have void for its reference; but it’s customary for operator*` to return *this so that *r = o works. What gives?
> [ Note: The only valid use of an operator* is on the left side of the assignment statement. …
If that were true, then how can OutputIterator be a refinement of Iterator?
Ah—perhaps ‘useful’/‘lawful’ instead of ‘valid’.
Welp, I have to special case void.
 
5:28 AM
lol, std::istream_iterator<int> fulfils all the syntactical requirements of ForwardIterator, I can chuck everything into the garbage bin and match the iterator category.
Oh, right. I can’t check anything more involved than Input-/OutputIterator because nothing is constrained/SFINAE-friendly anyway. Just as planned then.
 

« first day (1460 days earlier)      last day (3471 days later) »