« first day (750 days earlier)      last day (4181 days later) » 

2:00 AM
Crunchyroll's player is good
 
I hate crunchyroll.
 
But I must admit I used to torrent fansubs. So my video player was vlc :P
 
I download my anime now too.
It's much better, high quality etc.
 
Crunchyroll has 1080p so quality isn't an issue there.
Why do you hate it?
 
Because I remember when it was extremely old, talking like 2006 old and I didn't like it back then.
 
2:02 AM
I see
I only started using it like this year or so
 
First time I've visited the site in years right now, looks fucking different.
Damn that's so different, lmao. They have a premium thing now, figures.
 
Well yeah, I see it as the netflix of Anime
 
You know, I never understood that. It's not like the anime sites are translating it.
 
but honestly the free part of the deal is actually pretty good
 
No one donates to sub groups when I used to do it.
 
2:04 AM
@Rapptz I think crunchyroll actually subs the shows themselves.
 
Doubt it. They used to take the Bleach/Naruto episodes from dattebayo.
I'm not sure if that's still around now.
 
Well dattebayo doesn't exist
hasn't for years now
I hear they got busted by some government agency at some point
 
Well that's where I used to sub for about a year.
 
You actually did some translation for them? o.O
 
It was how I learned Japanese before I moved there for a couple summers.
 
2:06 AM
Holy crap... I have at least 300 dattebayo subs on my hard drive...
 
Which ones?
I only did Naruto.. considering that's what my avatar is a drawing of lol. I don't watch it anymore though, I used to like it a lot.
^ I think he meant Aquafresh
 
Bleach 174-274, Naruto 174-220, Naruto Shippuuden 001-091, 07-Ghost (all of them), and quite possibly more. I'm kind of OCD and at some point I started renaming the files because some series spanned like 4-5 sub groups
I also have the movies
 
71-129 Naruto I was involved with.
Same with Shippuuden 1 to 3
 
for a pointee with "manual" ref-counting, AddRef and Release methods, it's ungood if a naive programmer calls these methods through a smart pointer
so I thought of
    template< class Interface >
    class ComPtr_
    {
    public:
        class CleanInterface
            : public Interface
        {
        private:
            using Interface::AddRef;
            using Interface::Release;
        };

    private:
        Interface*  p_;

        CleanInterface* cleanPtr() const
        {
            assert( (void*)(CleanInterface*)p_ == (void*)p_ );
            return static_cast< CleanInterface* >( p_ );
        }

    public:
        CleanInterface* operator->() const { return cleanPtr(); }
 
I took some japanese classes last semester (before the summer), oh boy is it complicated...
Haven't practiced much since.
@Cheersandhth.-Alf Plz bin.
 
2:14 AM
which just guards a little against inadvertent such calls
 
I always wanted to write a program that gamifies japanese language learning but man did that go bad.
 
@Borgleader it's just 20 lines or so
so i wonder if the little formal UB is worth it
lemme find a paste bin
 
pastebin.com
 
@Rapptz Rosetta stone sortof does that. It's like an interactive exam where they put pictures up and you have to match text or sound to the pictures. But that software costs hundreds of dollars.
 
2:17 AM
oh it won't let me delete
 
@Borgleader Yeah I wanted it to be free. Education should be free.
 
Ell
but someone has to make it
 
Well I don't mind paying for software but I found the price for rosetta stone to be a little too steep
 
Ell
it is quite pricey
 
@Ell If you scroll up, I wanted to make it but failed.
 
Xeo
2:20 AM
@Cheersandhth.-Alf assert( (void*)(CleanInterface*)p_ == (void*)p_ ); this doesn't seem very safe
 
Ell
oh yes. would you give it out for free though?
 
Yes.
 
Ell
oh well kudos :3
 
I wanted to make a raytracer.... couldnt get it off the ground. Either I didn't make a UI and got fed up with long iteration times. Or I'd try making a UI and get fed up because it made everything so much more complicated.
 
How I feel making a game. ^
 
Ell
2:22 AM
ui is the most annoying thing
 
@Xeo well, it's safe. and the whole point is to add a bit of safety for the newbie. but it's formal UB to do the cast down to non-existent most derived class, so my question is what you guys feel about that trade-off
it also may teach bad techniques to someone looking at the code and just copying the coding pattern
 
Xeo
@Cheersandhth.-Alf dynamic_cast<void*>(p_) will cast to the most derived class safely.
 
it does a bit more than casting to void*. it dives down deep. so it's not good here
 
Xeo
48
Q: Are there practical uses for dynamic-casting to void pointer?

Kerrek SBIn C++, the T q = dynamic_cast<T>(p); construction performs a runtime cast of a pointer p to some other pointer type T that must appear in the inheritance hierarchy of the dynamic type of *p in order to succeed. That is all fine and well. However, it is also possible to perform dynamic_cas...

@Cheersandhth.-Alf But you want to cast to the most-derived type, right?
 
no of course not
 
merely to assert that the function result is dependable and safe
 
Xeo
> but it's formal UB to do the cast down to non-existent most derived class
 
yes
the cast in the return statement
and also the cast in the assert :-)
 
Xeo
Well, I meant for the assert test. assert( dynamic_cast<void*>(p_) == (void*)p_ );, if I got your intention right.
@Cheersandhth.-Alf Wait, was CleanInterface meant to be derived from further?
 
no, it's a static_cast, that does the opposite of what the client code might do with the pointer
@Xeo no, not at all :-)
 
Xeo
2:30 AM
Okay, now I think I don't understand what your code is actually doing.
Oh wait.. Oooh.
 
it changes the accessibility of AddRef and Release.
easy to circumvent, but it should catch inadvertent usage
 
Xeo
You only cast to CleanInterface so the client can't access those two functions, but CleanInterface is never actually part of the inheritance tree.
 
yes
that's why it's a little bit of UB....
 
Xeo
Why make CleanInterface public btw?
 
because in Windows COM classes, those two methods are public
no wait
ok, i didn't get what you asked.
 
Xeo
2:32 AM
class ComPtr_
{
public:
    class CleanInterface
 
it doesn't need to be public, but then it doesn't need to be private either
idk
i guess with automatic doc generation it would be nice to have it in the docs
?
 
Xeo
Hm, no idea.
 
what was that doc generation for c++ again
ice something?
oh, DOxygen
need to install...
 
Doxygen sucks.
 
what's better?
 
2:34 AM
No alternative. :|
 
Hand written documentation and readable code is better
 
I agree.
 
@Pubby This
 
I'm browsing some Doxygen doc right now and it's killing me
 
Ell
what's wrong with doxygen?
you change the output style
 
2:37 AM
After browsing so many of them you get sick of it because they don't really tell you much.
 
It tends to just be pretty formatted function prototypes rather than documentaton
 
It basically just tells you, "hey these are the parameters and what it returns" with nothing else
 
It's not the fault of the tool that people are bad at docs.
(Though doxygen does suck, but for other reasons)
 
I've never seen good doxygen documentation, unless you have an example.
 
@CatPlusPlus IMO, Doxygen looks a bit too much like Javadoc.
(Hello everyone, by the way)
 
2:40 AM
konbanwa.
 
People are suppose to comment on what methods do. Doxygen can't guess at it.
 
It doesn't matter how it looks.
 
@EtiennedeMartel majorleaguegaming.com/live#event=twitch&streams=sc2%20red Flsh vs Naniwa gogogoogogogo
 
MLG? Does that mean lag and connection issues?
 
It's just a processing tool, it won't write the docs for you.
 
2:41 AM
@CatPlusPlus Maybe "look" isn't the right word.
 
@EtiennedeMartel Connection is fine for now
 
Wait, wait. Flash?
 
I wouldn't expect MS word to write essays for me.
 
The Flash?
 
That people are idiots and think that documenting arguments and return value is enough is unrelated.
Well, 'documenting'.
Anyway, Dishonored is cool, and I'm going to beed.
 
2:42 AM
@EtiennedeMartel yes THE Flash
Looked like him anyway
 
Woa shit fuck stick. I heard he moved to SC2 a few months ago, but this is the first time I see him play.
 
^ It's been like this since before I started downloading DOxygen and installing it, now finished
i just double-clicked the eror mesage
 
@Cheersandhth.-Alf I know I saw it before, but what's the magic registry edit to keep VS 2012 from the ugly all-caps menus?
 
i'd have to google that
 
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General\SuppressUppercaseConversion
REG_DWORD value: 1
4
 
2:45 AM
ooooh yay
i will have to bookmark that
 
Why do you only have 8 lives left? CatPlusPlus
By the way; does anyone know where I can find a list of restrictions placed on the WinRT sandbox?
I'm trying to debug a strange network issue that appears to be related to some restriction of DLLs calling networking APIs.
 
Everyone vote up the HKEY comment that fixes caps in VS2012
So what does everyone here use c++ for? Please don't say web pages.
 
Web pages.
 
EEEeeeeek. dies
 
@Greg Web servers that HOST web pages.
And of course the web pages are generated using C++ as well.
 
2:59 AM
Writing a web server in c++ is permissable.
 
@Greg Also, I got that from a google search. No point in starring it.
 
Well rapptz, I was just really disappointed in the new vs2012 UI
 
The all caps doesn't really bother me since I got used to it.
 
So you have to take the star. All caps is ugly, i was just upset they took away my colors.
 
VS2012 has colours. Beta didn't.
 
3:01 AM
they added back in some colors after the beta feedback
 
I don't use VS2012 a lot anymore anyway.
 
Hmm, I wonder - can you then use that fact and make a 'Counter' class that has no data members, but can count up to 255 with methods like Counter() { *((char *)this) = 0; } Counter::Incr() { *(char *)this)++; } etc? Is this going to be safe? Is it guaranteed to be safe? — Rollie 6 mins ago
 
Really seemed unnecessary though. Give us better tools, not a changed GUI
 
Oh how I wish that was legal
 
im still using 2010 when im coding c#
 
3:02 AM
@Pubby Maybe I'm missing something but why not use a lambda or increment it normally?
 
hey...anyone know if I can change my network password from a wireless connection. My intuition says that is not possible, but I want to double check.
 
depends on your router.
 
@EtiennedeMartel: What is this.... so awesome... I don't even .... omg
 
@0gravity you can change your password from a wifi connection BUT once you click "apply" you will be disconnected and must use the new password to connect to the router.
 
3:18 AM
"# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output"
 
wow, thats great, imagine how long it would take to make all those directories by hand.
 
@DiscreteGenius yea that is what I thought...but I was not sure If the reset would have worked since when I hit apply it will kick me out in the middle of the reset.
 
lol why do you have 4096 subdirectories?
that's exactly 2^10 * 4
 
Gravity, i've done it before and it does work, you just have to log back on.
 
ok thanks guys
 
3:21 AM
2^10 * 4 = 2^12
 
I was thinking 1024 x 4 hence 2^10 * 4. Good call though.
 
why not 256 * 16?
 
because 1024 is 1 M/K/G B
 
lol ok :P
 
@0gravity It will work. Click Apply, wait 30 seconds, then reconnect with new password. Voila! Now, after you successfully connect with your new password, you may need to wait to log back into the routers "settings" panel because you may be issued a different IP address. If you try to log in and it says that just give it 5 or 10 minutes to time out, then you can log back into settings.
 
Xeo
3:49 AM
Just a general comment: Downvoting a question from Johannes Schaub - litb after less than 10 minutes study is not a very smart thing to do. — Howard Hinnant 14 mins ago
Haha.
 
@Xeo ohh how I have warm feelings for him!
 
Xeo
@Johannes: I don't see how you read that you get "copied!" printed. All I can see is "the argument is passed in such a way that the receiving function can obtain the value of the argument by invoking va_arg", nothing specific.
 
@Xeo it says that the lvalue to rvalue conversion is done
 
Xeo
@JohannesSchaub-litb Well, that was my misunderstanding of lvalue-to-rvalue conversion, then.
FWIW, VC10 also doesn't print anything.
@JerryCoffin: "being a copy-constructor" != "being called when passed a non-const lvalue of class type"
@JohannesSchaub-litb: Oh, I see. You're trying to cheat. You're trying to do an end-run around C++11's triviality rules, by pretending that your class is trivial, and using this template function to somehow hijack the copying to call actual code during the copy. — Nicol Bolas 1 min ago
Heh, he finally got it.
That the templated ctor wins is a big trip-up for many people.
For example when declaring a perfect-forwarding constructor.
template<class T>
C(T&&){} // oops, called when using an lvalue to perform a copy
template<class T, DisableIf<NakedSame<T,C>>...>
C(T&&){} // now it's ok
 
4:13 AM
lol i'm trying to "cheat"
 
Xeo
Hm, it can't even be copy elision, since that only elides actualy calls to the copy / move ctor...
 
there is nothing to elide
i'm copying an lvalue.
 
Xeo
that too
 
open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#535 changes the copy elision rules to also allow constructor templates
it's already in the WP
 
Xeo
Well, as long as you didn't rely on that behaviour of not being elidable...
 
4:30 AM
@Xeo Not just constructors -- that a templated function wins over what looks like an exact match without a template trips people up -- largely because it's counter-intuitive to the point that it just seems wrong (even after all this time, it still seems weird to me).
 
Xeo
@JerryCoffin Yeah, but the constructor one especially since I think many people heard that "a templated ctor is not a copy ctor"
 
@Xeo Yeah, poor (and misleading) wording to say something isn't a copy constructor, even though it can be used to construct a copy...
 
c++ is full of such things
A reference declaration is an object declaration, but a reference is not an object.
There are functions that are not non-template functions.
 
@JohannesSchaub-litb True -- it's had a few all along, and C++11 added quite a few more.
 
Xeo
@JohannesSchaub-litb explicit function template specializations?
 
Xeo
lol
 
@Xeo indeed. even generated function template specializations. any function template specialization isn't a non-template function :)
 
Xeo
heh
 
and a constexpr constructor is not a constexpr function!
 
@JohannesSchaub-litb Well yes, but that one's obvious, since constructors aren't functions! [closed captioning for the humor impaired: please ignore this message.]
 
4:42 AM
no, constructors are functions!
lol
 
@JohannesSchaub-litb Yes -- just functions without names that predate lambdas, which are named for functions without names, but really aren't functions and really do have names, even though we don't know what they are.
 
Does anyone remember/have a link to that one funny question (I don't think it was C++) where the OP was trying to reverse a one-way hash?
 
@chris "one"? That comes up roughly once a month. I'm pretty sure I've voted to close at least a half dozen (though I don't recall any that were particularly funny).
 
@JerryCoffin, I'm sure someone posted a link to a largely downvoted one that was pretty funny. It might have been deleted.
 
> (Though why you didn't bother to explain all of this in your question eludes me, since you obviously did your research.)
he updated his answer
haha
 
Xeo
4:57 AM
@JohannesSchaub-litb I kinda have to agree on him in that point. It's definitly unclear from the question why you expect this to do what you want.
 
5:08 AM
@Xeo it is boring without some rages
 
@JohannesSchaub-litb IOW, you were at least semi-trolling again (or is that "still"?)
 
:( it was a honest question
 
@JohannesSchaub-litb An honest question, but expressed in a semi-trolling manner.
 
Wait, so C++17 became C++14
That's very hard to believe.
 
Xeo
5:14 AM
@chris Nope
They added C++14 for minor stuffs.
 
Well, still. I was expecting nothing for 6 years, and maybe more again.
Filesystems and networking sounds ok for half of that.
And then they can focus on modules :p
 
does anyone in here have knowledge of GLSL? im making a c++ program that uses a fragment shader
 
@chris C++14 is pretty much expected to have minor edits to the standard itself, but mostly do a better job of specifying what's intended to be essentially the same language. C++17 is intended to have pretty serious updates to the language. They are treating the standard more like a piece of software, and following recognized, modern practices for how to update it so it keeps up with customers' needs.
@Need4Sleep Some. Are you dealing with the shader itself, or the C++ part that does the loading, compiling, linking, etc?
 
Well, I'm pretty excited for it, even if I do have to wait some years.
 
I'm getting word that proposal n3241 by STL was accepted. The one that turns e.g. std::greater<> (note defaulted template param) into a polymorphic functor.
 
5:23 AM
@LucDanton Possible typo there? n3241 was a rather older paper.
 
Whoa, I never knew i = {}; was valid syntax :o (ref)
 
@JerryCoffin n3421 indeed.
 
I'm loving this day. I'm learning a lot more than usual.
 
Xeo
@LucDanton Yes, it was accepted. STL said so in Core C++ 6
 
@chris New in C++11 as part of the uniform initialization overhaul.
 
5:26 AM
@LucDanton, Indeed, but I've never seen it used like that.
 
Xeo
I like the greater<> addition very much, to be honest.
 
@Xeo I'm conflicted. It's one feature I wanted (and I rolled my own), but std::greater<> looks dumb.
 
Xeo
It's the best you can get, imho.
 
Anyway, their less<> is bugged so I guess I can keep mine!
 
@Xeo Under the circumstances, yeah, about as well as can be done (but even in the paper, he outlines approaches everybody would prefer if we didn't have to deal with backward compatibility).
 
Xeo
5:28 AM
@LucDanton Why?
 
Not so much a bug as an non-obvious design decision. std::set<int*, std::less<int*>> works, std::set<int*, std::less<>> doesn't.
 
Xeo
Doesn't work how specifically?
 
UB for most typical use cases.
 
Xeo
Aha? (I really don't see what you mean.)
 
int i; int j; s.insert(&i); s.insert(&j); /* Oops */
@Xeo std::less<> does lhs < rhs for pointer operands. std::less<int*> doesn't.
 
Xeo
5:32 AM
Ah
 
You can't compare pointers in general. You can compare random-access iterators, which some pointers are.
 
Xeo
I see now.
Make a comment on Core C++ 6 or send a mail to get it fixed. :P
 
I've overloaded my own operators::less to defer std::less<CommonType<Lhs, Rhs>> for pointer operands to avoid surprising cases.
 
Xeo
Well, go and propose that as the fix. :)
 
However arg1 < arg2 truly uses operator<, since you ask for it. That's the non-obvious and difficult design decision imo: what if someone really wants operator<?
 
Xeo
5:36 AM
You mean for random-access iterator-style pointers into arrays?
If you really want that, I think going out of your way to write a function object (or lambda) isn't going to hurt.
 
Other differences from my stuff is that I couldn't bring myself to name unary_minus negate, and that I have unary_minus, assign_to, comma, dereference, subscript, call, increment, decrement, post_increment, post_decrement, construct.
 
Xeo
Proposal time~ Else, it's never going to get added!
 
@Xeo I suppose. Being generic I leave the user to choose for themselves, e.g. val(ops::less {})(arg1, arg2) if that's the behaviour they want. I should provide some shortcuts though.
 
Xeo
@LucDanton Does that actually use < for pointer types then?
 
@Xeo No, the operator version is in the spirit of std::less. It's arg1 < arg2, which literally involves '<', that does operator<.
 
Xeo
5:40 AM
ah
I didn't recognize argN as placeholders there.
Anyways, sleepy time~ And after that, onwards to O(1) instantiations contains<T, List, of, all, the, things>.
 
5:55 AM
4
A: What's the 'long' data type used for?

Cheers and hth. - Alflong is guaranteed (at least) 32 bits. int is only guaranteed (at least) 16 bits. on 16- and 8-bit systems long provided range at a cost of efficiency. cheers & hth.,

After two years I'm still receiving downvotes on that very short and correct answer.
Talk about persistent psychos.
 
Tabber33 has never seen the C standard being referenced?
 
he was another name then
of course it was partly my fault for not reading the whole standard closely at once, and noticing the use of the term "incorporated", in an obscure place
i just could not imagine that anyone could doubt it
 
I notice this always happens to your answers.
 
not always but very often
 
I always wondered why you don't just.. quote it.
 
6:00 AM
no quote would have satisfied the troll
to wit, no quote did satisfy the troll
so it would have been some days work for me, not helping anyone
that's the beauty of trolling
one can always insist on more details, details that are very hard to find and that no sane person would need
 
 
1 hour later…
7:16 AM
Is there a good name for the operation that turns (f, args...) into a functor g such that g() returns f(args...)? It's not a bind imo because e.g. there is no placeholder business.
(Strictly speaking it returns invoke(f, args...) just in case that inspires you.)
 
@LucDanton I'd call it application
 
@Pubby I fear that suggests that op(f, args...) has the effect of invoke(f, args...).
The net result of the operation is not any application.
 
delay_invoke maybe?
 
Things like deferred/delayed invocation have their appeal, yes.
defer_invoke or deferred_invoke? First one is shorter but I feel like the meaning is a bit harder to grasp. The result/effect of op(f, args...) is not to defer anything, but it represents a deferred invocation, no?
 
@LucDanton It seems to represent a Command.
 
7:26 AM
What'd you call the operation of building/constructing/making a such?
 
@LucDanton Based on my time in the military, you "bark" a command, but that's probably not a very useful term...
 
Ah, SICP uses delay/force for the operations that turns an expression into a lazy thunk/promise and evaluate them respectively.
 
7:51 AM
You can use /ignore:4099 as a linker flag, but there's a catch. Unfortunately, Microsoft decided to make 4099 a non-ignorable warning, so you have to patch the link.exe. Sounds kinda crazy, but there's simply no other way. More details here: bottledlight.com/docs/lnk4099.html I used HxD as a hex editor, and following the description on that page worked fine with VS10. The order is still 4088, 4099, 4105. — Andreas Haferburg Feb 13 at 14:59
"issue" a command
or "create" one, depending on context
 
 
3 hours later…
10:42 AM
Good morning , Vietnam !
@Cheersandhth.-Alf so... that puts it in the 'wrong', not 'missing' bucket then:
11 hours ago, by sehe
@Cheersandhth.-Alf missing/wrong include paths?
You might simply want to view the preprocessed source, unless, you already figured it out of course :)
@LucDanton make_invoke?
 
@sehe Used to be called that but I'm changing it because it conflicts with another naming convention of mine.
 
Welllll.... I guess that means it wasn't the worst naming idea after all :(
 
I don't disagree :p
 
Perhaps: bind_all (loosely after bind1st, bind2nd, bindnth, bindn, bind_all..)
 
11:34 AM
 
11:52 AM
7
A: need a virtual template member workaround

DeadMGWhat you should do is separate the BaseVisitor. class BaseVisited; class BaseVisitorInternal { public: virtual void visit(BaseVisited*) = 0; virtual ~BaseVisitorInternal() {} }; class BaseVisited { BaseVisited(); virtual void accept(BaseVisitorInternal* visitor) { visitor->vis...

I keep re-reading this question and answer
I have no idea what the fuck the answer is doing.
 
lol, you have on idea what your answer was?
 
yep
I can grok the question, but I've no idea what the answer is
how can it possibly solve his problem? the templated class doesn't contain any mentions of the template parameter.
 
That's for being added later.
It looks just like run-of-the-mill type erasure.
 
what the comment says too
but I can't figure out how the type is erased or where the real type ends up
 
I think you need to take a break.
@DeadMG The type is gone, all that remains of it is the vptr.
 
12:03 PM
vptr to what? the derived class which is templated doesn't make any use of the return type
 
Oh, there's a return type in the question.
I was looking just at the answer.
Basically, your answer didn't solve that part of the problem.
 
thanks for clearing that up
 
It's either boost::any or more handcrafted type erasure.
 
yeah
I wouldn't have written such an answer now
 
My NFC normalization would benefit from quick-checking first. Right now, if you pass something that is already or is almost in NFC, it decomposes everything and recomposes everything again. It becomes a very expensive identity operation.
 
user142019
12:26 PM
Good evening.
 
yeah, decomposing everything and then re-composing it sounds rather.. expensive
did your 10k umlauts test pass?
 
@DeadMG Yes.
 
funniest test ever
 
I took it straight from the spec!
 
that's what makes it even funnier
 
12:41 PM
It doesn't test much that wasn't already tested right now, but when I switch to a small buffer optimization, it will serve as a nice test for that.
    // But I am considering this instead:
    //! Move the underlying storage out
    Container storage() && {
        return std::move(storage_);
    }
    //! View the underlying storage
    Container const& storage() const {
        return storage_;
    }
 

« first day (750 days earlier)      last day (4181 days later) »