« first day (1440 days earlier)      last day (3526 days later) » 

2:00 PM
Today I tried to use the PVS-Studio static analyzer. It sucks, don't use it.
 
lol
Has anyone given CLion a try with MinGW-w64?
 
@Abyx You just hate it for no reason!!!~~~~
 
user3010322
@R.MartinhoFernandes @Borgleader Might have.
 
user3010322
Also OOH SHINY AVATARS WHEN SEARCHING @ MENTIONS
 
ThePhD! you're back!
 
2:01 PM
@CatPlusPlus welp I wrote a post about it, but it's in Russian
struct BadStream : std::exception

"V702 Classes should always be derived from std::exception (and alike) as 'public' (no keyword was specified, so compiler defaults it to 'private'). lzmadecodercore.hpp 23"
 
Ell
agh this apple is sour
 
user1804599
lol, writing posts in languages other than English.
 
user1804599
Also I should probably try CLion.
 
@R.MartinhoFernandes it works but I don't use mingw
 
@Abyx Not sure what you mean. Do you mean you use it with something else, or you don't use it because you use something else?
 
user1804599
2:05 PM
> Configure CMake and GDB
 
user1804599
lol CMake
 
@R.MartinhoFernandes I mean I checked that it works with MinGW-w64
 
user1804599
> CLion uses the CMake project model.
 
@rightfold They have a bunch of other build systems planned in the issue tracker.
 
2:05 PM
CMake is OK. sort of.
 
user1804599
Ah, ok.
 
@R.MartinhoFernandes Yes--it only works with the "original" MinGW (i.e., the one that was last updated when I was young).
 
Plugging anything that's not C or C++ into CMake is a pain in the ass
 
user1804599
Also this whole IDE distinction thing is weird and silly.
 
user1804599
2:07 PM
Why does it not use my IntelliJ preferences.
 
Also, ugh I can't stand the letter spacing on that page.
 
It is awful
 
@R.MartinhoFernandes Ah, hadn't caught that yet. Thanks.
 
user1804599
Woot it works.
 
~free templates~
 
2:11 PM
Oh. I did a painting.
It's called The Treachery of Digits.
I suck.
 
And now I have to remodel part of the database because apparently 'one owner' means 'multiple owners'
@R.MartinhoFernandes There's a task waiting for you if you're bored :v
Ugh relational database so does not work for this project
 
Saw that. It's in my queue for the weekend.
 
I have so many duplicated models just so I can avoid generic FKs on Django level and do filtering inside the database
 
(Writing e-mails is a time-consuming process!)
 
Shit Sucks(tm)
 
2:18 PM
I like it
Wait. Zealous crop didn't do what I meant
@AlexM. that's the most annoying feature that IDEs have
 
I really like it
 
@Ell and the milk is bland, right
 
Was Lounge chat abandoned or what
 
Ell
@Cicada the project?
I'm working on it extremely slowly and not very surely
 
Why is not on Dickhub
 
2:26 PM
After I do auth (~soon~) I'll deploy XMPP server and don't really care about web frontends for now
 
Ell
there isn't enough code yet
I restarted it because it was scattered bits of code no in modules, so I'm module-ing it currently
but there is basically 0 progress
 
@Cicada He's reinventing an entire XMPP server for some reason
Would you want to put that online :v
 
Ell
@CatPlusPlus I'm not :P
I'm writing a prosody module
 
Prosody is shit not a production server
 
ETA 2017 or what
 
Ell
2:28 PM
@CatPlusPlus what is a production server?
 
Also it doesn't have to be a server-specific module, XMPP has a component protocol for that reason
@Ell One that you can deploy in production
 
@ThePhD Not home so I cant check, but im pretty sure it was mingw32
 
I don't trust Prosody
I'll be running ejabberd most likely
@Cicada 20951
 
That's so late we might even have C++ modules by then
 
Unlikely
 
2:32 PM
@sehe Would have been better with "Ceci n'est pas un pi". Closer to the original, ya know.
 
Je ne rends aucune pis
Oder so etwas
apparently, this is also possible
@Cicada wait. Is it you? Where' the butthurt
 
@sehe There, restored from backup
 
I hate it when CTs use monks
 
@Cicada xD
 
I have a ctor that takes a "const Foo&" argument and assigns it to a member variable of the same type (const Foo&). I'd like to not pass this argument in when constructing it with a mock. Is there a way to initialize this member variable with a "throwaway" value without constructing a Foo?
 
2:40 PM
No. A reference really must refer to an object of that type.
 
@user939259 If you use a throwaway value, it won't live long enough. How about this:
ctor(const Foo& f = some_global_foo);
 
Your design sucks
 
@FredOverflow It's actually totally fine if it doesn't live long enough, I don't want the mock class to ever use it
 
And don't try to fix it with "Patterns"!
 
@user939259 Use an optional?
 
2:42 PM
Also if you're abou to start fiddling with "invalid" references and other bullshit then save yourself trouble and just call std::terminate
 
@CatPlusPlus True! But not what I was asking about
 
@user939259 In that case:
ctor(const Foo& f = Foo());
 
^don’t do that
 
@user939259 It is the answer to your stupid question
hth
also lol mocking in C++
 
mocking C++
 
2:46 PM
Ah, "hide posts". Useful option, I didn't know that existed until I looked for it.
 
lol
 
You can perform this action again in 1 seconds - retry / cancel
4
 
3:01 PM
@Cicada I can't edit that, unrealistic
 
user3010322
I need a way to identify joysticks...
 
user3010322
I could use a std::unordered_map to go from some ID to an actual device, but what....
 
user3010322
Plus, I have to ensure thread safety, goddamnit.
 
@LightnessRacesinOrbit "WTF why did the SGA theme ever sound like the Mynabirds? Oh." pauses music player "Ah. Right. Yeah."
 
Ell
@ThePhD just lock over it?
(is that how you say it?)
It's not like you need to keep getting the devices ID over and over
 
3:08 PM
Anyone here have the rep to edit locked posts?
The tinyurl redirect should be removed and replaced with the actual link.
27
A: Hidden Features of C++?

Johannes Schaub - litbYou can access protected data and function members of any class, without undefined behavior, and with expected semantics. Read on to see how. Read also the defect report about this. Normally, C++ forbids you to access non-static protected members of a class's object, even if that class is your ...

 
:effort:
 
@CatPlusPlus Ah, c'mon!
 
Meh, that answer is not worth the effort.
It's a parlour trick.
 
@TRiG Rep doesn't matter in this case. The question is closed, so the answer can only be edited by a moderator or community manager--just high rep isn't enough.
@ThePhD I recommend writing the identification on a piece of masking tape, then sticking the tape to the joy stick.
 
@JerryCoffin Locked not closed
Closed stuff can be edited fine
 
lol
Journalism
 
#include <bash>
 
@CatPlusPlus Did you actually look? At least when I look it shows: "closed as not constructive by casperOne♦ Feb 29 '12 at 16:53"
 
Yeah and "locked" above that
 
@CatPlusPlus And how does that make it "not closed"?
 
3:24 PM
What I meant is that locked status is what prevents editing, not closed status
 
Gee, dafuq
-1
Q: How do I make a Git-like command suite application in Rust?

Insanity133How would I go about implementing a CLI application that utilises sub-commands with separate options? (CLI would be like this: phial [global options] command [command options] [arguments...]) As it currently stands I don't want to to use 3rd party libraries to do the work for me, as I want some ...

 
@CatPlusPlus Oh, okay. In any case, no amount of rep allows editing the answer.
 
"Lurk ", past self said, "it's probably sane-ish since the noobs haven't found it yet". Fuck you, past self.
 
@R.MartinhoFernandes Well, it was true for a while (and "yet" was a pretty good indication that you didn't expect it to last).
 
lol expecting quality on SO
 
3:27 PM
> I have no idea where I would start to go about this
This is the most annoying thing ever.
 
Admittedly, in this case "a while" may have been around 20 milliseconds, but that's quite a while (in terms of CPU cycles, anyway).
 
It's more like "I know where to start; I can start on Stack Overflow!"
 
Also motion to rename debugging to defucking
 
100666 rep .|
 
@R.MartinhoFernandes Or "I know how I'll start--I'll start by not even trying to start, and see if somebody else will do it for me instead."
 
3:29 PM
@R.MartinhoFernandes How is that now awesome?
 
@R.MartinhoFernandes That doesn't seem to have lasted long.
 
@sehe More like, remember to leave them landside.
 
@JerryCoffin Quick, downvote 5 of his answers!
 
@FredOverflow Sounds like too much work. Besides, I'm only looking for 4 answers to down-vote to get back to a multiple of 5.
 
3:33 PM
What's so special about 5?
 
It's the third prime.
 
Ell
what's so special about 3?
 
@Ell It's Pi.
 
Regular polygons of five sides can be constructed with a compass and a ruler, but no measurement.
@Ell Regular polygons of three sides can be constructed with a compass and a ruler, but no measurement.
@FredOverflow It's a fixed point of the Fibonacci function.
 
Interested by that this answer, can someone explain why std::cin would ever "read more than it needs to"?
 
3:36 PM
@OllieFord Because iostreams are terrible.
 
@OllieFord because it's buffered
@FredOverflow they are, but it's not the reason
 
Okay, it was just a shot in the blue :)
 
@Abyx Oh, so the answer is saying that cin would read "too much" into its buffer, and thus the rest is then unavailable to scanf for its buffer? Think I got it.
 
Why would you mix std::cin and scanf? That's like putting salt in your coffee.
 
@OllieFord yeah, that's it
 
3:39 PM
I wouldn't, but that was the example given in the answer of it causing problems.
@Abyx Thanks :)
 
Doesn't make any sense
No such directory as "csttdddzzzlsifibbbb"
 
Prelude Data.Function
λ fix $ fix $ \fib -> \n -> if n <= 2 then 1 else fib (n-1) + fib (n-2)
Doesn't terminate :(
 
@FredOverflow So using scanf and the like is preferred over iostreams? :/ I've "always" assumed to use the former in C, and iostreams in C++, y'know, because they're there they're surely better, right?
Naïve assumption :)
 
@R.MartinhoFernandes I feel your pain. If you wanna talk about it, I'm here for you!
 
Nobody knows my pain though.
 
3:41 PM
2014: django still doesn't strip unnecessary newlines and spaces from html so they end up in the translations file creating horrid formatted strings.
Good job django.
You were discussing this shit in 2007 FFS
 
@OllieFord Actually, no.
iostream sucks, but cstdio sucks even more.
iostream is a 30 year old library
 
@Soffia Isn't the unnecessary part pretty hard though? I mean, whether newlines are necessary or not could depend on CSS. I suppose there's a good amount between tags that could always be removed.
 
wat
CSS doesn't care about newlines.
Nor does HTML.
 
@Sofffia The feeling is mutual.
 
Preformatted text cares about newlines
Also the template engine is not HTML-specific
 
3:44 PM
Okay, extreme example: obviously you can't strip whitespace from <pre>. But what if CSS makes pre behave like div?
 
Still abc \n def and abc def is rendered exactly the same on the browser.
 
Unless it's not
 
@Sofffia Not inside <pre>.
 
Is maintaining a private nuget much pain?
 
Ok ok, not inside <pre>.
Then give me a tool that traverses the DOM and stripes newlines and unnecessary spaces, but not in <pre>.
 
3:46 PM
Still depends on CSS
 
in C#, 9 mins ago, by Kendall Frey
A QA Engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 999999 beers. Orders a lizard. Orders -1 beers. Orders a....
4
 
why do i have to deal with shit like this
@CatPlusPlus ... why? ... how?
 
Because <pre> isn't magical
You can make any element behave the same way
 
So, are you talking about <pre> or CSS?
 
Are you reading god
 
3:48 PM
"Still depends on CSS" -- "Why?" -- "Because <pre> isn't magical"
I don't get it.
Alternatively, let me define blocks of template in which you don't operate this removal of whitespace characters.
It's not that hard.
 
{% dontstripwhitespaces %} ... {% enddontstripwhitespaces %}
 
Jinja has stripping operators use it instead of Django engine which isn't very good anyway
 
4:00 PM
QA Engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 999999999 beers. Orders a lizard. Orders -1 beers. Orders a sfdeljknesv.
 
yesterday, by Mark Garcia
QA Engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 999999999 beers. Orders a lizard. Orders -1 beers. Orders a sfdeljknesv.
aside from that, excellent job
 
I read a very small % of the transcript
 
well that's your problem right there
no dedication or commitment
to the gallows!
 
it is sad
 
4:11 PM
so sad
 
I know
where the hell is our rack
can't find it
 
so very sad
 
the gallows are too soft
 
the gallows are too hard
 
072 101 108 108 111 @LightnessRacesinOrbit — Joshpbarron 10 mins ago
 
4:24 PM
1
Emacsemacs.stackexchange.com

Beta Q&A site for those using, extending or developing emacs.

Currently in private beta.

 
user3010322
Has anyone come across the issue where std::reference_wrapper requires the class to be defined before you can use std::reference_wrapper<MyUnDefinedButDeclaredClass> ?
 
user3010322
I would assume all it needed was a forward declaration, not the full thing?
 
You should not assume that for any stdlib template. The ones that work with incomplete types are explicitly called out.
Dunno if reference_wrapper does, though.
 
@ThePhD For example?
 
guys i have something to tell you
 
4:28 PM
@R.MartinhoFernandes It's not stated, though I'd have expected a forward decl to suffice
perhaps it's op() breaking that
 
user3010322
It works on Coliru... it must be MSVC?
 
"it"
WHAT works?
for fuck's sake, ThePhD
you've been here long enough
 
user3010322
The simplified example compiles okay on G++... lemme try a slimmed down main in VC++...
 
Xeo
How about you try that exact example?
Also, I need ideas on what food to make
 
4:32 PM
> Error 1 error C2139: 'woof' : an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_abstract' c:\program files (x86)\microsoft visual studio 11.0\vc\include\type_traits 755 1 test3
VS2012
 
@Xeo pasta
 
Xeo
@AlexM. I should buy a pan sometime soon
Don't have one right now, though, so no pasta
 
@LightnessRacesinOrbit This is what happens when Puppy goes AWOL.
 
my C++ teacher went AWOL went people were declaring their array's as "jimmy" and "foo"
 
I have a cache that I will write to disk very frequently, saving state to recover from power loss etc. Is there something to think about or is it all handled by OS and HDD cache?
 
Xeo
@LightnessRacesinOrbit Why the fuck does reference_wrapper care about abstractness...
 
user1804599
@Xeo ox with bacon, fried goat cheese and port sauce.
 
Xeo
wtf MSVC.
 
> Memory leaks are rampant, you can build a two story castle log for 2 minutes return and notice whole sections missing.
... I'm not sure that's a memory leak, necessarily
more like a section leak
 
user3010322
Maybe I should file a bug report.
 
Xeo
4:44 PM
Great success
 
0
Q: Can I instantiate an std::reference_wrapper<T> where T is an incomplete type?

Lightness Races in OrbitDoes std::reference_wrapper<T> allow T to be incomplete, in the same way that a T& can be dealt with without T being complete? GCC 4.9 accepts the following: #include <functional> struct woof; struct test { test(woof& w) : w(w) {} std::reference_wrapper<woof> w; }; struct woof { int...

 
Xeo
When the wrapped type is abstract, you can't call it's operator() on MSVC
So it's a bug in any case.
even if the type is complete.
 
user3010322
In short, VC++ is retarded yet again.
 
user3010322
I really need to finish Visual G++
 
Xeo
Try ^ with VC
the online version at rise4fun fails compilation at least
 
user3010322
4:46 PM
rise4fun is the latest and greatest, I think
 
user3010322
So if it fails there it's bug-report ready.
 
Xeo
> visual c++ Compiler version: 19.00.22029(x86) Last updated: Sep. 2, 2014
I guess
This is stupid. Why do they do that.
Why would they exclude operator() from reference_wrapper if the type is abstract.
It makes... no sense.
 
user3010322
Something something 30 year old code something something customers something shipping cadence.
 
Xeo
Seems like an oversight for when they changed / introduced their _Call_wrapper base or something
Which I assume is not just for reference_wrapper
So yeah, great success all around.
 
user1804599
Time to make my compiler so that lambdas actually capture. :v
 
Xeo
4:49 PM
@rightfold Sounds too heavy :o
@AlexM. Damn you, now I really want some pasta.
 
order some
 
Xeo
but but but... I have a kitchen. Gotta use it!
 
user1804599
For now I will just make all lambdas capture everything in scope. Easier to implement. :v
 
@Xeo borrow a pan!
 
user3010322
std::decay<T&> ----> T&, right?
 
user3010322
4:56 PM
But std::decay<T&&> ----> T ?
 
Xeo
@ThePhD T (or not, depending on what T is)
decay kills all the things
@ThePhD That's be std::remove_rvalue_reference
Okay, why the fuck does "pan" translate to "Pfanne", "Topf" and "Schüssel"
 
user1804599
I'm not sure if I want to make debug.trace write to stdout or to stderr.
 
Xeo
(frying pan, pot and bow)
@rightfold Write to dbgout
 
user1804599
That doesn't exist! ;_;
 
> <meta charset="windows-1252">
 
Xeo
4:59 PM
stdlog?
Oh, hm, I just remembered I have spring rolls I could make. Hmm.
 
HTML5 with legacy encoding is new
 
user1804599
I think stderr is better, because programs usually write most things to stdout and this makes filtering easier.
 
Xeo
But I already had some rice for lunch, so I don't wanna make another serving of that...
 
user1804599
Or I could make it a parameter to the interpreter.
 
Ell
Do I have to define template member functions in the header file (versus declare in header define in source) if the class isn't a template?
Idk why I'm having such a mare getting this to compile >.<
 
Xeo
5:00 PM
@Ell If you plan to use them outside of the class / the file they're defined in...
 
Ell
I'm terrible
 
user1804599
Yes, you are.
 
Ell
man now I'm gonna have to move all the code back into the header
 
user1804599
@Cicada ERMAHGERD AN S BUG
 
user1804599
Quick, tell Jeff!
 
5:08 PM
I have -0.15PLN unaccounted for and it's driving me crazy
 
user1804599
@FredOverflow y u no explicit
 
user1804599
@LightnessRacesinOrbit javascript.txt
 
user1804599
Hmm.
 
user1804599
I could make non-sugar AST node types extend trait NoSugar {} and then in my AST-to-SSA transformer take Expression with NoSugar instead of just Expression.
 
user1804599
And maybe abstract class Expression { def desugared: Expression } trait NoSugar { this: Expression => override def desugared = this }.
 
user1804599
5:23 PM
Or well, def desugared: Expression with NoSugar.
 
user1804599
Shiny type system is shiny.
 
so, what do companies expect for a code sample?
 
user1804599
Singleton factories.
 
Ell
Gah my life isn't organised enough
 
user1804599
Weeee beautiful.
 
5:30 PM
For some weird values of beautiful
 
We still haven an umposter in our midst
 
@sehe At least i'm not leaving the poop posted.
 
@OlalekanOmotayo Its still not a question. And if your question is "Why isnt this code working" well, it's off-topic as well (there is a close reason specifically for this). — Borgleader 17 secs ago
 
5:48 PM
@sehe I need to save a file ~once per second 24/7 in my app. Recovery cache, do you have any advice for that?
 
Ell
Ref has a function which returns a Method and Method has a function taking a Ref. All by value, idk how to make this compile
 
That they are by value makes no difference.
It's the same thing you'd do to get them to compile if they did all that by reference.
 
Ell
@R.MartinhoFernandes I thought you needed a complete type to do stuff with values?
whereas with references and pointers you don't
 
Not for declarations.
 
@sehe I'm not an unposter. I just haven't much really recently.
 
Ell
5:51 PM
how about for definitions of templates? They're not used until instantiation are they
 
Declare types, define types (which declares the functions), define functions.
 
Ell
Man I thought I was better at c++ than this :P
2
 
Ell
I haven't written any in a while :L
 
Relapse alert
 

« first day (1440 days earlier)      last day (3526 days later) »